hl-core 0.0.8-beta.13 → 0.0.8-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api/index.ts CHANGED
@@ -13,7 +13,7 @@ export class ApiClass {
13
13
 
14
14
  private async axiosCall<T>(config: AxiosRequestConfig): Promise<T> {
15
15
  const dataStore = useDataStore();
16
- if (((dataStore.isEFO || dataStore.isAML) && !this.baseURL) || (!dataStore.isEFO && !dataStore.isAML && (!this.baseURL || !this.productUrl))) {
16
+ if ((dataStore.isBridge && !this.baseURL) || (!dataStore.isEFO && !dataStore.isAML && !dataStore.isLKA && (!this.baseURL || !this.productUrl))) {
17
17
  console.error('No Axios baseURL or productURL');
18
18
  }
19
19
  const { data } = await useAxios(this.baseURL).request<T>(config);
@@ -411,6 +411,13 @@ export class ApiClass {
411
411
  });
412
412
  }
413
413
 
414
+ async getProcessHistoryLog(historyId: string) {
415
+ return this.axiosCall({
416
+ method: Methods.GET,
417
+ url: `/Arm/api/Bpm/ProcessHistoryLog/${historyId}`,
418
+ });
419
+ }
420
+
414
421
  async createInvoice(processInstanceId: string, amount: number | string): Promise<string> {
415
422
  return this.axiosCall({
416
423
  method: Methods.POST,
@@ -523,7 +530,7 @@ export class ApiClass {
523
530
  });
524
531
  }
525
532
 
526
- async sendUnderwritingCouncilTask(data: any) {
533
+ async sendUnderwritingCouncilTask(data: Partial<SendTask>): Promise<void> {
527
534
  return this.axiosCall({
528
535
  method: Methods.POST,
529
536
  url: '/Arm/api/UnderwritingCouncil/SendTask',
@@ -21,7 +21,7 @@ export default function (axios: AxiosInstance) {
21
21
  if (error.response.status === 401) {
22
22
  dataStore.$reset();
23
23
  localStorage.clear();
24
- if (dataStore.isEFO || dataStore.isAML) {
24
+ if (dataStore.isBridge) {
25
25
  router.push({ name: 'Auth', query: { error: 401 } });
26
26
  } else {
27
27
  dataStore.sendToParent(constants.postActions.Error401, 401);
@@ -1,9 +1,10 @@
1
1
  <template>
2
- <v-dialog v-model="fieldModel">
2
+ <v-dialog v-model="fieldModel" :persistent="true">
3
3
  <v-card class="self-center w-full sm:w-3/4 md:w-2/3 lg:w-2/4 xl:w-[600px] rounded-lg !p-2">
4
4
  <v-card-title>
5
5
  <slot v-if="!title" name="title"></slot>
6
6
  {{ title }}
7
+ <v-btn class="!absolute top-2 right-3" icon="mdi mdi-window-close" variant="plain" @click="$emit('update:modelValue', null)"></v-btn>
7
8
  </v-card-title>
8
9
  <v-card-subtitle>
9
10
  <slot v-if="!subtitle" name="subtitle"></slot>
@@ -1,6 +1,9 @@
1
1
  <template>
2
2
  <section :class="[$libStyles.blueBgLight, $libStyles.rounded]" class="mt-[14px] p-4 flex flex-col gap-[1px]">
3
- <h2 :class="[$libStyles.textTitle]" class="font-medium text-center w-full mb-4">{{ title }}</h2>
3
+ <h2 :class="[$libStyles.textTitle]" class="font-medium text-center w-full mb-4">
4
+ {{ title }}
5
+ <slot name="icon"></slot>
6
+ </h2>
4
7
  <slot></slot>
5
8
  </section>
6
9
  </template>
@@ -7,16 +7,20 @@
7
7
  <p v-if="!!subtitle" :class="[$libStyles.greyText, $libStyles.textSimple]">{{ subtitle }}</p>
8
8
  </div>
9
9
  <div class="mt-6 grid grid-cols-3 lg:grid-cols-5 auto-rows-fr items-center">
10
- <span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.requestedSumInsured') }}</span>
11
- <span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.insurancePremiumPerMonth') }}</span>
12
- <span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.coverPeriod') }}</span>
13
- <span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.payPeriod') }}</span>
10
+ <span v-if="hasSum" :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.requestedSumInsured') }}</span>
11
+ <span v-if="hasPremium" :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.insurancePremiumPerMonth') }}</span>
12
+ <span v-if="hasPolicyNumber" :class="[$libStyles.textSimple]" class="font-medium">{{ $t('buttons.InsuranceContract') }}</span>
13
+ <span v-if="hasContractDate" :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.contractDate') }}</span>
14
+ <span v-if="hasCoverPeriod" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.coverPeriod') }}</span>
15
+ <span v-if="hasPayPeriod" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.payPeriod') }}</span>
14
16
  </div>
15
17
  <div class="grid grid-cols-3 lg:grid-cols-5 auto-rows-fr items-center">
16
- <span :class="[amount === null && $libStyles.emptyBlockCol]">{{ amount }} </span>
17
- <span :class="[premium === null && $libStyles.emptyBlockCol]"> {{ premium }}</span>
18
- <span :class="[coverPeriod === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ coverPeriod }} </span>
19
- <span :class="[paymentPeriod === null && $libStyles.emptyBlockCol]" class="hidden lg:block">
18
+ <span v-if="hasSum" :class="[amount === null && $libStyles.emptyBlockCol]">{{ amount }} </span>
19
+ <span v-if="hasPremium" :class="[premium === null && $libStyles.emptyBlockCol]"> {{ premium }}</span>
20
+ <span v-if="hasPolicyNumber" :class="[policyNumber === null && $libStyles.emptyBlockCol]"> {{ policyNumber }}</span>
21
+ <span v-if="hasContractDate" :class="[policyNumber === null && $libStyles.emptyBlockCol]"> {{ contractDate }}</span>
22
+ <span v-if="hasCoverPeriod" :class="[coverPeriod === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ coverPeriod }} </span>
23
+ <span v-if="hasPayPeriod" :class="[paymentPeriod === null && $libStyles.emptyBlockCol]" class="hidden lg:block">
20
24
  {{ paymentPeriod }}
21
25
  </span>
22
26
  <div
@@ -43,6 +47,7 @@ export default defineComponent({
43
47
  },
44
48
  },
45
49
  setup() {
50
+ const dataStore = useDataStore();
46
51
  const formStore = useFormStore();
47
52
 
48
53
  const amount = computed(() =>
@@ -51,12 +56,47 @@ export default defineComponent({
51
56
  const premium = computed(() =>
52
57
  formStore.productConditionsForm && formStore.productConditionsForm.insurancePremiumPerMonth ? formStore.productConditionsForm.insurancePremiumPerMonth : null,
53
58
  );
59
+ const policyNumber = computed(() => (formStore.applicationData && formStore.applicationData.policyAppDto ? formStore.applicationData.policyAppDto.policyNumber : null));
60
+ const contractDate = computed(() =>
61
+ formStore.applicationData && formStore.applicationData.policyAppDto ? reformatDate(formStore.applicationData.policyAppDto.contractDate) : null,
62
+ );
54
63
  const coverPeriod = computed(() => (formStore.productConditionsForm && formStore.productConditionsForm.coverPeriod ? formStore.productConditionsForm.coverPeriod : null));
55
64
  const paymentPeriod = computed(() =>
56
65
  formStore.productConditionsForm && formStore.productConditionsForm.paymentPeriod && !!formStore.productConditionsForm.paymentPeriod.nameRu
57
66
  ? formStore.productConditionsForm.paymentPeriod.nameRu
58
67
  : null,
59
68
  );
69
+
70
+ const hasSum = computed(() => {
71
+ return true;
72
+ });
73
+ const hasPremium = computed(() => {
74
+ return true;
75
+ });
76
+ const hasPolicyNumber = computed(() => {
77
+ if (dataStore.isFinCenter()) {
78
+ return true;
79
+ }
80
+ return false;
81
+ });
82
+ const hasContractDate = computed(() => {
83
+ if (dataStore.isFinCenter()) {
84
+ return true;
85
+ }
86
+ return false;
87
+ });
88
+ const hasCoverPeriod = computed(() => {
89
+ if (dataStore.isFinCenter()) {
90
+ return false;
91
+ }
92
+ return true;
93
+ });
94
+ const hasPayPeriod = computed(() => {
95
+ if (dataStore.isFinCenter()) {
96
+ return false;
97
+ }
98
+ return true;
99
+ });
60
100
  return {
61
101
  // State
62
102
  formStore,
@@ -64,8 +104,16 @@ export default defineComponent({
64
104
  // Computed
65
105
  amount,
66
106
  premium,
107
+ policyNumber,
108
+ contractDate,
67
109
  coverPeriod,
68
110
  paymentPeriod,
111
+ hasSum,
112
+ hasPremium,
113
+ hasPolicyNumber,
114
+ hasContractDate,
115
+ hasPayPeriod,
116
+ hasCoverPeriod,
69
117
  };
70
118
  },
71
119
  });
@@ -13,7 +13,7 @@
13
13
  <slot></slot>
14
14
  </div>
15
15
  <base-panel-handler v-else></base-panel-handler>
16
- <slot></slot>
16
+ <slot name="panel"></slot>
17
17
  </v-navigation-drawer>
18
18
  </template>
19
19
 
@@ -34,7 +34,7 @@ const dataStore = useDataStore();
34
34
  const handleFontSize = (action: 'increase' | 'decrease') => {
35
35
  if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
36
36
  if (action === 'decrease' && dataStore.fontSize > 14) dataStore.fontSize -= 2;
37
- if (dataStore.isEFO || dataStore.isAML) {
37
+ if (dataStore.isBridge) {
38
38
  dataStore.sendToChild(constants.postActions.font, dataStore.fontSize);
39
39
  } else {
40
40
  dataStore.sendToParent(constants.postActions.font, dataStore.fontSize);
@@ -1,27 +1,88 @@
1
1
  <template>
2
- <section class="flex flex-col justify-evenly">
3
- <img draggable="false" class="w-2/3 lg:w-[25vw] self-center" src="~/assets/auth-logo.svg" />
4
- <v-form ref="vForm" class="w-2/3 lg:w-[35vw] self-center">
5
- <base-rounded-input
6
- class="mb-1"
7
- v-model="login"
8
- :rules="$rules.required"
9
- :loading="authLoading"
10
- :placeholder="$t('buttons.userLogin')"
11
- type="text"
12
- @submitted="submitAuthForm"
13
- ></base-rounded-input>
14
- <base-rounded-input
15
- class="mb-1"
16
- v-model="password"
17
- :rules="$rules.required"
18
- :loading="authLoading"
19
- :placeholder="$t('buttons.password')"
20
- type="password"
21
- @submitted="submitAuthForm"
22
- ></base-rounded-input>
23
- <base-btn :text="$t('buttons.login')" :disabled="authLoading" :btn="$libStyles.greenBtn" @click="submitAuthForm"></base-btn>
24
- </v-form>
2
+ <section class="flex h-full" :class="$libStyles.blueBgLight">
3
+ <aside :class="{ '!hidden': !$display().lgAndUp.value }" class="w-full lg:w-1/4 bg-white flex flex-col justify-between border-r-2 relative px-8">
4
+ <img draggable="false" class="w-[50%] mt-8" src="~/assets/auth-logo.svg" />
5
+ <div class="self-center flex flex-col items-center justify-center base-auth">
6
+ <v-carousel :show-arrows="false" color="#009C73">
7
+ <v-carousel-item v-for="(item, index) of carouselItems" :key="index">
8
+ <img draggable="false" class="mx-auto" :src="item.img" />
9
+ <div class="flex flex-col items-center justify-center mt-12 mb-8 text-center">
10
+ <h2 class="text-[22px] font-medium mb-1">{{ item.title }}</h2>
11
+ <h4 class="text-[16px]">{{ item.subtitle }}</h4>
12
+ </div>
13
+ </v-carousel-item>
14
+ </v-carousel>
15
+ </div>
16
+ <base-btn :text="$t('buttons.more')" :disabled="true" class="mb-28"></base-btn>
17
+ </aside>
18
+ <section v-if="isLogin" class="w-full lg:w-3/4 flex flex-col justify-center">
19
+ <img :class="{ '!block': !$display().lgAndUp.value }" draggable="false" class="hidden w-2/4 sm:w-1/3 mb-10 self-center" src="~/assets/auth-logo.svg" />
20
+ <div class="flex flex-col items-center mb-8">
21
+ <h1 class="text-[28px] font-medium mb-1">{{ $t('labels.welcomeHL') }}</h1>
22
+ <span :class="[$libStyles.greyTextDark]" class="text-[16px]">{{ $t('labels.needAuth') }}</span>
23
+ </div>
24
+ <v-form ref="vForm" class="w-2/3 lg:w-[25vw] self-center">
25
+ <base-rounded-input
26
+ class="mb-1"
27
+ v-model="login"
28
+ :rules="$rules.required"
29
+ :loading="authLoading"
30
+ :placeholder="$t('buttons.userLogin')"
31
+ type="text"
32
+ @submitted="submitAuthForm"
33
+ ></base-rounded-input>
34
+ <base-rounded-input
35
+ class="mb-1"
36
+ v-model="password"
37
+ :rules="$rules.required"
38
+ :loading="authLoading"
39
+ :placeholder="$t('buttons.password')"
40
+ :append-inner-icon="showPassword ? 'mdi-eye-outline' : 'mdi-eye-off-outline'"
41
+ @append="showPassword = !showPassword"
42
+ :type="showPassword ? ('' as InputTypes) : 'password'"
43
+ @submitted="submitAuthForm"
44
+ ></base-rounded-input>
45
+ <span v-if="$dataStore.isLKA" class="inline-block w-full text-end mb-4" :class="[$libStyles.textSimple, $libStyles.greyTextDark]" @click="isLogin = false">{{
46
+ $t('labels.resetPassword')
47
+ }}</span>
48
+ <base-btn :text="$t('buttons.login')" :disabled="authLoading" :btn="$libStyles.greenBtn" @click="submitAuthForm"></base-btn>
49
+ </v-form>
50
+ </section>
51
+ <section v-if="isLogin === false" class="w-full lg:w-3/4 flex flex-col justify-center items-center">
52
+ <div class="flex flex-col items-center mb-4">
53
+ <h1 class="text-[28px] font-medium mb-1">{{ $t('labels.resetPassword') }}</h1>
54
+ <span :class="[$libStyles.greyTextDark]" class="text-[16px]">{{ $t('labels.resetType') }}</span>
55
+ </div>
56
+ <div class="p-[2px] mb-8 rounded-[12px] border-[1px]" :class="[$libStyles.whiteBg]">
57
+ <v-tabs v-model="resetPasswordType" density="compact" slider-color="#009c73" class="base-reset-password rounded-[12px] w-2/3 lg:w-[25vw]" :class="[$libStyles.whiteBg]">
58
+ <v-tab :ripple="false" value="phone"> {{ $t('form.phoneNumber') }} </v-tab>
59
+ <v-tab :ripple="false" value="email"> {{ $t('form.email') }} </v-tab>
60
+ </v-tabs>
61
+ </div>
62
+ <v-form ref="vForm" class="w-2/3 lg:w-[25vw] self-center">
63
+ <base-rounded-input
64
+ v-if="resetPasswordType === 'phone'"
65
+ v-model="phone"
66
+ :maska="$maska.phone"
67
+ :rules="$rules.required.concat($rules.phoneFormat)"
68
+ :loading="authLoading"
69
+ :placeholder="$t('form.phoneNumber')"
70
+ type="text"
71
+ @submitted="submitAuthForm"
72
+ ></base-rounded-input>
73
+ <base-rounded-input
74
+ v-if="resetPasswordType === 'email'"
75
+ v-model="email"
76
+ :rules="$rules.required.concat($rules.email)"
77
+ :loading="authLoading"
78
+ :placeholder="$t('form.email')"
79
+ type="text"
80
+ @submitted="submitAuthForm"
81
+ ></base-rounded-input>
82
+ <span class="inline-block w-full text-end mb-4" :class="[$libStyles.textSimple, $libStyles.greyTextDark]" @click="isLogin = true">{{ $t('buttons.login') }}</span>
83
+ <base-btn :text="$t('buttons.reset')" :disabled="authLoading" :btn="$libStyles.greenBtn" @click="submitAuthForm"></base-btn>
84
+ </v-form>
85
+ </section>
25
86
  </section>
26
87
  </template>
27
88
 
@@ -33,6 +94,11 @@ export default defineComponent({
33
94
  const dataStore = useDataStore();
34
95
 
35
96
  const vForm = ref<any>(null);
97
+ const isLogin = ref<boolean>(true);
98
+ const showPassword = ref<boolean>(false);
99
+ const phone = ref<string>();
100
+ const email = ref<string>();
101
+ const resetPasswordType = ref<string>();
36
102
 
37
103
  const credentials = {
38
104
  production: { login: '', password: '' },
@@ -41,6 +107,24 @@ export default defineComponent({
41
107
  vercel: { login: '', password: 'asdqwe123' },
42
108
  };
43
109
 
110
+ const carouselItems = [
111
+ {
112
+ title: 'Все полисы в один клик!',
113
+ subtitle: 'Мгновенный доступ к информации о ваших полисах',
114
+ img: '/left-side-1.png',
115
+ },
116
+ {
117
+ title: 'Все полисы в один клик!',
118
+ subtitle: 'Мгновенный доступ к информации о ваших полисах',
119
+ img: '/left-side-1.png',
120
+ },
121
+ {
122
+ title: 'Все полисы в один клик!',
123
+ subtitle: 'Мгновенный доступ к информации о ваших полисах',
124
+ img: '/left-side-1.png',
125
+ },
126
+ ];
127
+
44
128
  const useEnv = {
45
129
  envMode: import.meta.env.VITE_MODE,
46
130
  isDev: import.meta.env.VITE_MODE === 'development',
@@ -68,24 +152,57 @@ export default defineComponent({
68
152
  const submitAuthForm = async () => {
69
153
  await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
70
154
  if (v.valid) {
71
- authLoading.value = true;
72
- await dataStore.loginUser(login.value, password.value, numAttempts.value);
73
- numAttempts.value++;
74
- authLoading.value = false;
75
- if (!!dataStore.user.id) {
76
- router.push({ name: 'index' });
155
+ if (isLogin.value === true) {
156
+ authLoading.value = true;
157
+ await dataStore.loginUser(login.value, password.value, numAttempts.value);
158
+ numAttempts.value++;
159
+ authLoading.value = false;
160
+ if (!!dataStore.user.id) {
161
+ router.push({ name: 'index' });
162
+ }
163
+ } else {
164
+ // TODO Reset password
77
165
  }
78
166
  }
79
167
  });
80
168
  };
81
169
 
82
170
  return {
171
+ // State
83
172
  login,
84
- password,
85
173
  vForm,
174
+ phone,
175
+ email,
176
+ isLogin,
177
+ password,
86
178
  authLoading,
179
+ showPassword,
180
+ carouselItems,
181
+ resetPasswordType,
182
+
183
+ // Functions
87
184
  submitAuthForm,
88
185
  };
89
186
  },
90
187
  });
91
188
  </script>
189
+
190
+ <style>
191
+ .base-auth .v-carousel__controls {
192
+ background: white !important;
193
+ }
194
+ .base-reset-password .v-tab__slider {
195
+ z-index: -1;
196
+ height: 100% !important;
197
+ border-radius: 12px;
198
+ }
199
+ .base-reset-password .v-tab {
200
+ width: 50%;
201
+ color: #566681;
202
+ text-transform: unset;
203
+ font-size: 12px;
204
+ }
205
+ .base-reset-password .v-tab--selected {
206
+ color: white !important;
207
+ }
208
+ </style>
@@ -0,0 +1,30 @@
1
+ <template>
2
+ <section class="w-full px-[10px] pt-[14px] flex flex-col gap-4" :class="[$libStyles.scrollPage]" v-if="!!invoiceData">
3
+ <lazy-base-form-section :title="$t('labels.jsonObject')">
4
+ <template #icon>
5
+ <v-btn icon="mdi mdi-content-copy !text-[18px]" size="x-small" variant="plain" color="#A0B3D8" @click="$dataStore.copyToClipboard(JSON.stringify(invoiceData))"></v-btn>
6
+ </template>
7
+ <lazy-base-json-viewer :data="invoiceData" class="bg-white p-4 rounded"></lazy-base-json-viewer>
8
+ </lazy-base-form-section>
9
+ <lazy-base-form-section v-if="invoiceData.paymentLink && invoiceData.status !== 1" :title="$t('labels.epayPage')" class="flex items-center">
10
+ <div class="w-full lg:w-[70%] bg-white">
11
+ <iframe :src="invoiceData.paymentLink" frameborder="0" class="w-full h-[70vh]"></iframe>
12
+ </div>
13
+ </lazy-base-form-section>
14
+ </section>
15
+ </template>
16
+
17
+ <script lang="ts">
18
+ export default defineComponent({
19
+ setup() {
20
+ const formStore = useFormStore();
21
+ const invoiceData = formStore.invoiceData;
22
+
23
+ return {
24
+ // State
25
+ formStore,
26
+ invoiceData,
27
+ };
28
+ },
29
+ });
30
+ </script>
@@ -59,7 +59,7 @@
59
59
  :readonly="isDisabled || isFromGBD"
60
60
  :clearable="!isDisabled"
61
61
  :label="$t('form.birthDate')"
62
- :rules="$rules.required.concat($rules.birthDate)"
62
+ :rules="birthDateRule"
63
63
  :maska="$maska.date"
64
64
  append-inner-icon="mdi mdi-calendar-blank-outline"
65
65
  ></base-form-input>
@@ -96,7 +96,7 @@
96
96
  @append="openPanel($t('form.relations'), [], 'relationDegree', $dataStore.getRelationTypes)"
97
97
  ></base-panel-input>
98
98
  <base-form-input
99
- v-if="whichForm === formStore.beneficiaryFormKey && $dataStore.hasPercentageOfPayoutAmount()"
99
+ v-if="whichForm === formStore.beneficiaryFormKey"
100
100
  v-model="member.percentageOfPayoutAmount"
101
101
  :readonly="isDisabled"
102
102
  :clearable="!isDisabled"
@@ -574,53 +574,64 @@ export default {
574
574
  return dataStore.controls.hasGKB && !!dataStore.isTask() && byProductCondition && perMemberCondition();
575
575
  });
576
576
 
577
+ const birthDateRule = computed(() => {
578
+ const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
579
+ const byMemverAndProductRule = () => {
580
+ if (whichForm.value === formStore.policyholderFormKey) {
581
+ if (dataStore.isGons || dataStore.isBolashak || dataStore.isBaiterek) {
582
+ return dataStore.rules.age18ByDate;
583
+ }
584
+ }
585
+ if (whichForm.value === formStore.insuredFormKey) {
586
+ if (dataStore.isBolashak || dataStore.isBaiterek) {
587
+ return dataStore.rules.age18ByDate;
588
+ }
589
+ }
590
+ return [];
591
+ };
592
+ return baseDateRule.concat(byMemverAndProductRule());
593
+ });
577
594
  const ageRule = computed(() => {
578
- const baseAgeRule = dataStore.rules.required.concat(dataStore.rules.numbers);
595
+ const baseAgeRule = dataStore.rules.numbers;
579
596
  const byMemberAndProductRule = () => {
580
- switch (whichForm.value) {
581
- case formStore.policyholderFormKey: {
582
- if (dataStore.isGons || dataStore.isBolashak) {
583
- return dataStore.rules.policyholderAgeLimit;
584
- }
597
+ if (whichForm.value === formStore.policyholderFormKey) {
598
+ if (dataStore.isGons || dataStore.isBolashak || dataStore.isBaiterek) {
599
+ return dataStore.rules.age18;
585
600
  }
586
- case formStore.beneficiaryFormKey: {
587
- if (dataStore.isBolashak) {
588
- return dataStore.rules.beneficiaryAgeLimit;
589
- }
601
+ }
602
+ if (whichForm.value === formStore.beneficiaryFormKey) {
603
+ if (dataStore.isBolashak) {
604
+ return dataStore.rules.beneficiaryAgeLimit;
590
605
  }
591
- default:
592
- return [];
593
606
  }
607
+ if (whichForm.value === formStore.insuredFormKey) {
608
+ if (dataStore.isBaiterek || dataStore.isBolashak) {
609
+ return dataStore.rules.age18;
610
+ }
611
+ }
612
+ return [];
594
613
  };
595
614
  return baseAgeRule.concat(byMemberAndProductRule());
596
615
  });
597
616
 
598
617
  const phoneRule = computed(() => {
599
618
  const basePhoneRule = dataStore.rules.required.concat(dataStore.rules.phoneFormat);
600
- const byMemberAndProductRule = () => {
601
- switch (whichForm.value) {
602
- case formStore.beneficiaryFormKey: {
603
- if (dataStore.isGons || dataStore.isBolashak) {
604
- return [];
605
- }
606
- }
607
- default:
608
- return basePhoneRule;
619
+ if (whichForm.value === formStore.beneficiaryFormKey) {
620
+ if (dataStore.isGons || dataStore.isBolashak) {
621
+ return [];
609
622
  }
610
- };
611
- return byMemberAndProductRule();
623
+ }
624
+ return basePhoneRule;
612
625
  });
613
626
 
614
627
  const residencyRule = computed(() => {
615
- switch (whichForm.value) {
616
- case formStore.policyholderFormKey: {
617
- if (dataStore.isBolashak || dataStore.isBaiterek) {
618
- return dataStore.rules.objectRequired.concat(dataStore.rules.noResident);
619
- }
628
+ const baseResidencyRule = dataStore.rules.objectRequired;
629
+ if (whichForm.value === formStore.policyholderFormKey) {
630
+ if (dataStore.isBolashak || dataStore.isBaiterek) {
631
+ return baseResidencyRule.concat(dataStore.rules.noResident);
620
632
  }
621
- default:
622
- return dataStore.rules.objectRequired;
623
633
  }
634
+ return baseResidencyRule;
624
635
  });
625
636
 
626
637
  const getOtpConditionByMember = () => {
@@ -927,12 +938,14 @@ export default {
927
938
  return false;
928
939
  }
929
940
  const isInsured = formStore.isPolicyholderInsured;
941
+ const remoteIsInsured = ref<boolean | null>(null);
930
942
  if (whichForm.value == formStore.policyholderFormKey) {
931
943
  if (route.params.taskId === '0') {
932
944
  try {
933
945
  const taskId = await dataStore.startApplication(member.value);
934
946
  if (taskId) {
935
947
  await dataStore.getApplicationData(taskId, false, false, false, false);
948
+ remoteIsInsured.value = formStore.applicationData.clientApp.isInsured;
936
949
  await router.replace({
937
950
  name: route.name!,
938
951
  params: { taskId: taskId as string },
@@ -957,20 +970,22 @@ export default {
957
970
  const memberFromApplicaiton = memberStore.getMemberFromApplication(whichForm.value as MemberKeys, whichIndex.value ? Number(whichIndex.value) : undefined);
958
971
  const isSaved = await dataStore.saveMember(member.value, memberStore.getMemberCode(whichForm.value as MemberKeys), memberFromApplicaiton);
959
972
  if (!isSaved) return false;
960
- if (whichForm.value === formStore.policyholderFormKey && isInsured === true) {
961
- formStore.insuredForm[0] = formStore.policyholderForm;
962
- const isInsuredSaved = await dataStore.saveMember(
963
- member.value,
964
- memberStore.getMemberCode(formStore.insuredFormKey as MemberKeys),
965
- memberStore.getMemberFromApplication(formStore.insuredFormKey as MemberKeys, formStore.insuredFormIndex),
966
- );
967
- if (!isInsuredSaved) return false;
973
+ if (whichForm.value === formStore.policyholderFormKey) {
974
+ if (isInsured === true || remoteIsInsured.value === true) {
975
+ formStore.insuredForm[0] = formStore.policyholderForm;
976
+ const isInsuredSaved = await dataStore.saveMember(
977
+ member.value,
978
+ memberStore.getMemberCode(formStore.insuredFormKey as MemberKeys),
979
+ memberStore.getMemberFromApplication(formStore.insuredFormKey as MemberKeys, formStore.insuredFormIndex),
980
+ );
981
+ if (!isInsuredSaved) return false;
982
+ }
968
983
  }
969
984
  await router.replace({
970
985
  name: route.name!,
971
986
  query: { ...route.query, id: member.value.id },
972
987
  });
973
- await dataStore.getApplicationData(route.params.taskId, false, false, false, false);
988
+ await dataStore.getApplicationData(route.params.taskId, false, true, true, false);
974
989
  if (dataStore.controls.hasCalculator) {
975
990
  if (formStore.additionalInsuranceTermsWithout && formStore.additionalInsuranceTermsWithout.length !== 0) {
976
991
  formStore.additionalInsuranceTerms.forEach((term: any) => {
@@ -1206,6 +1221,7 @@ export default {
1206
1221
  ageRule,
1207
1222
  phoneRule,
1208
1223
  residencyRule,
1224
+ birthDateRule,
1209
1225
 
1210
1226
  // Functions
1211
1227
  searchMember,
@@ -13,6 +13,16 @@
13
13
  subtitle="Если несовершеннолетний не достиг возраста 14 лет - законному представителю в соответствии с законодательством Республики Казахстан"
14
14
  ></base-form-text-section>
15
15
  </base-form-section>
16
+ <base-form-section v-if="isUnderwriterRole && $dataStore.members.insuredApp.has === true" :title="$t('insuredForm')">
17
+ <div v-for="(insured, index) of formStore.insuredForm" :key="index">
18
+ <base-form-input v-model="insured.longName" :label="$t('labels.insurerLongName')" :readonly="true"> </base-form-input>
19
+ <base-form-input v-model="insured.job" :label="$t('form.job')" :readonly="true"> </base-form-input>
20
+ <base-form-input v-model="insured.jobPosition" :label="$t('form.jobPosition')" :readonly="true"> </base-form-input>
21
+ <base-form-input v-model="insured.birthDate" :label="$t('form.birthDate')" :readonly="true"> </base-form-input>
22
+ <base-form-input v-model="insured.age" :label="$t('form.age')" :readonly="true"> </base-form-input>
23
+ <base-form-input v-model="insured.gender.nameRu" class="mb-4" :label="$t('form.gender')" :readonly="true"> </base-form-input>
24
+ </div>
25
+ </base-form-section>
16
26
  <base-form-section v-if="isUnderwriterRole" :title="$t('recalculationInfo')">
17
27
  <base-form-input
18
28
  v-model="productConditionsForm.lifeMultiply"
@@ -9,7 +9,7 @@
9
9
  </section>
10
10
  <section v-if="acceptAction">
11
11
  <div :class="[$libStyles.flexColNav]">
12
- <base-content-block class="flex flex-col gap-3">
12
+ <base-content-block v-if="hasConditionsInfo" class="flex flex-col gap-3">
13
13
  <span
14
14
  >{{ `Сумма страховой премии ${paymentPeriod}:` }} <b>{{ `${insurancePremiumPerMonth}₸` }}</b></span
15
15
  >
@@ -89,6 +89,27 @@
89
89
  </base-fade-transition>
90
90
  </div>
91
91
  </section>
92
+ <section v-if="affiliateActions">
93
+ <div :class="[$libStyles.flexColNav]">
94
+ <v-form ref="vForm">
95
+ <base-content-block class="flex flex-col gap-3">
96
+ <base-form-input v-model="formStore.affilationResolution.number" :rules="$rules.required" :label="$t('form.documentNumber')"></base-form-input>
97
+ <base-form-input
98
+ v-model="formStore.affilationResolution.date"
99
+ :maska="$maska.date"
100
+ :rules="$rules.required"
101
+ :label="$t('form.date')"
102
+ append-inner-icon="mdi mdi-calendar-blank-outline"
103
+ ></base-form-input>
104
+ <base-file-input v-if="!affiliationDocument" @input.prevent="onFileChange($event)"></base-file-input>
105
+ <base-empty-form-field v-if="affiliationDocument" class="justify-between">
106
+ {{ `${affiliationDocument.fileTypeName} - ${affiliationDocument.fileName}` }}
107
+ <i class="cursor-pointer mdi mdi-file-document mr-6 text-[#a0b3d8] text-xl"></i> </base-empty-form-field
108
+ ></base-content-block>
109
+ </v-form>
110
+ <base-btn :text="buttonText" :loading="loading" @click="submitForm"></base-btn>
111
+ </div>
112
+ </section>
92
113
  </template>
93
114
 
94
115
  <script lang="ts">
@@ -103,6 +124,19 @@ export default defineComponent({
103
124
  const isSendNumberOpen = ref<boolean>(false);
104
125
  const phoneNumber = ref<string | null>(formStore.policyholderForm.phoneNumber ?? '');
105
126
  const selectedClient = ref<SignUrlType>();
127
+ const documentDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Решение АС'));
128
+ const affiliationDocument = computed(() => formStore.signedDocumentList.find(file => file.fileTypeName === 'Решение АС'));
129
+ const affiliationData = ref<{
130
+ processInstanceId: string | number;
131
+ fileTypeId: string | number | null;
132
+ fileTypeCode: string | number | null;
133
+ fileName?: string | number | null;
134
+ }>({
135
+ processInstanceId: formStore.applicationData.processInstanceId,
136
+ fileTypeId: documentDict.value ? documentDict.value.id : '',
137
+ fileTypeCode: documentDict.value ? documentDict.value.code : '',
138
+ });
139
+ const affiliationFormData = ref(new FormData());
106
140
 
107
141
  const openSmsPanel = (signInfo: SignUrlType) => {
108
142
  if (signInfo) {
@@ -121,6 +155,17 @@ export default defineComponent({
121
155
  dataStore.panelAction = null;
122
156
  };
123
157
 
158
+ const onFileChange = (event: InputEvent) => {
159
+ if (event.target) {
160
+ const files = (event.target as HTMLInputElement).files;
161
+ if (files && files.length && files[0].name !== affiliationData.value.fileName) {
162
+ affiliationData.value.fileName = files[0].name;
163
+ affiliationFormData.value.append('file', files[0]);
164
+ affiliationFormData.value.append('fileData', JSON.stringify([affiliationData.value]));
165
+ }
166
+ }
167
+ };
168
+
124
169
  const submitForm = async () => {
125
170
  await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
126
171
  if (v.valid) {
@@ -132,6 +177,17 @@ export default defineComponent({
132
177
  case constants.actions.sign:
133
178
  await dataStore.sendSMS('SignUrl', phoneNumber.value, selectedClient.value?.uri);
134
179
  break;
180
+ case constants.actions.affiliate:
181
+ formStore.affilationResolution.processInstanceId = formStore.applicationData.processInstanceId;
182
+ let uploaded, confirmed;
183
+ confirmed = await dataStore.setConfirmation();
184
+ if (affiliationData.value.fileName) {
185
+ uploaded = await dataStore.uploadFiles(affiliationFormData.value);
186
+ }
187
+ if ((affiliationData.value.fileName && confirmed && uploaded) || (!affiliationData.value.fileName && confirmed)) {
188
+ await handleTask();
189
+ }
190
+ break;
135
191
  default:
136
192
  await handleTask();
137
193
  }
@@ -161,6 +217,8 @@ export default defineComponent({
161
217
  return dataStore.t('buttons.pay');
162
218
  case constants.actions.register:
163
219
  return dataStore.t('buttons.register');
220
+ case constants.actions.affiliate:
221
+ return dataStore.t('buttons.send');
164
222
  }
165
223
  });
166
224
 
@@ -180,9 +238,16 @@ export default defineComponent({
180
238
  const acceptAction = computed(() => dataStore.panelAction === constants.actions.accept);
181
239
  const signingActions = computed(() => dataStore.panelAction === constants.actions.sign);
182
240
  const payingActions = computed(() => dataStore.panelAction === constants.actions.pay);
241
+ const affiliateActions = computed(() => dataStore.panelAction === constants.actions.affiliate);
183
242
  const paymentPeriod = computed(() => formStore.productConditionsForm.paymentPeriod.nameRu);
184
243
  const insurancePremiumPerMonth = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.insurancePremiumPerMonth));
185
244
  const requestedSumInsured = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.requestedSumInsured));
245
+ const hasConditionsInfo = computed(() => {
246
+ if (dataStore.isFinCenter()) {
247
+ return false;
248
+ }
249
+ return true;
250
+ });
186
251
 
187
252
  return {
188
253
  // State
@@ -200,6 +265,7 @@ export default defineComponent({
200
265
  handleTask,
201
266
  openSmsPanel,
202
267
  openEpayPanel,
268
+ onFileChange,
203
269
 
204
270
  // Computed
205
271
  buttonText,
@@ -207,9 +273,12 @@ export default defineComponent({
207
273
  signingActions,
208
274
  payingActions,
209
275
  acceptAction,
276
+ affiliateActions,
210
277
  paymentPeriod,
211
278
  insurancePremiumPerMonth,
212
279
  requestedSumInsured,
280
+ affiliationDocument,
281
+ hasConditionsInfo,
213
282
  };
214
283
  },
215
284
  });
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <vue-json-pretty
3
+ :data="(data as JSONDataType)"
4
+ :show-icon="true"
5
+ :show-line="true"
6
+ :show-line-number="true"
7
+ :show-double-quotes="true"
8
+ :show-key-value-space="true"
9
+ :collapsed-on-click-brackets="true"
10
+ :deep="4"
11
+ ></vue-json-pretty>
12
+ </template>
13
+
14
+ <script lang="ts">
15
+ import VueJsonPretty from 'vue-json-pretty';
16
+ import 'vue-json-pretty/lib/styles.css';
17
+ import { JSONDataType } from 'vue-json-pretty/types/utils';
18
+
19
+ export default defineComponent({
20
+ components: { VueJsonPretty },
21
+ props: {
22
+ data: {
23
+ required: false,
24
+ },
25
+ },
26
+ });
27
+ </script>
@@ -807,6 +807,8 @@ export class DataStoreClass {
807
807
  hasCalculator: boolean;
808
808
  // Блок прикрепления к менеджеру
809
809
  hasAttachment: boolean;
810
+ // Решение АС
811
+ hasAffiliation: boolean;
810
812
  };
811
813
  members: {
812
814
  clientApp: MemberSettings;
@@ -932,6 +934,7 @@ export class DataStoreClass {
932
934
  hasInsis: false,
933
935
  hasCalculator: false,
934
936
  hasAttachment: true,
937
+ hasAffiliation: true,
935
938
  };
936
939
  this.hasLayoutMargins = true;
937
940
  this.processIndexRate = [];
@@ -1056,6 +1059,7 @@ export class FormStoreClass {
1056
1059
  additionalInsuranceTermsWithout: AddCover[];
1057
1060
  signUrls: SignUrlType[];
1058
1061
  epayLink: string | null;
1062
+ invoiceData: EpayResponse | null;
1059
1063
  affilationResolution: {
1060
1064
  id: string | number | null;
1061
1065
  processInstanceId: string | number | null;
@@ -1104,6 +1108,7 @@ export class FormStoreClass {
1104
1108
  beneficialOwnerApp?: any;
1105
1109
  spokesmanApp?: any;
1106
1110
  isTask?: boolean | null;
1111
+ policyAppDto?: any;
1107
1112
  };
1108
1113
  policyholderForm: PolicyholderForm;
1109
1114
  policyholderFormKey: string;
@@ -1129,6 +1134,7 @@ export class FormStoreClass {
1129
1134
  this.additionalInsuranceTermsWithout = [];
1130
1135
  this.signUrls = [];
1131
1136
  this.epayLink = null;
1137
+ this.invoiceData = null;
1132
1138
  this.affilationResolution = {
1133
1139
  id: null,
1134
1140
  processInstanceId: null,
@@ -46,6 +46,7 @@ export const constants = Object.freeze({
46
46
  pay: 'pay',
47
47
  register: 'register',
48
48
  send: 'send',
49
+ affiliate: 'affiliate',
49
50
  },
50
51
  yearCases: [2, 0, 1, 1, 1, 2],
51
52
  yearTitles: ['год', 'года', 'лет'],
@@ -36,6 +36,8 @@ export class Styles {
36
36
  greyBtnBg: string = 'bg-[#EEE6E6]';
37
37
  greyBtnDisabledBg: string = 'bg-[#919191]';
38
38
  blueLightBgHover: string = 'hover:bg-[#F3F6FC]';
39
+ greyTextDark: string = 'text-[#9197A1]';
40
+
39
41
  // Red
40
42
  redText: string = 'text-[#FF897D]';
41
43
  redBg: string = 'bg-[#FF897D]';
package/locales/en.json CHANGED
@@ -140,7 +140,10 @@
140
140
  "pay": "Pay",
141
141
  "register": "Registration reestr number",
142
142
  "send": "Send",
143
- "toStatement": "Continue checkout"
143
+ "toStatement": "Continue checkout",
144
+ "affiliate": "Attach Underwriter CD",
145
+ "more": "More",
146
+ "reset": "Reset"
144
147
  },
145
148
  "dialog": {
146
149
  "title": "Confirmation",
@@ -161,7 +164,8 @@
161
164
  "pay": "Are you sure you want to pay?",
162
165
  "familyMember": "Pick family member",
163
166
  "register": "Вы действительно хотите добавить в реестр данного ребенка?",
164
- "toApprove": "Are you sure you want to send to approve?"
167
+ "toApprove": "Are you sure you want to send to approve?",
168
+ "affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?"
165
169
  },
166
170
  "sign": {
167
171
  "chooseDoc": "Choose documents to sign",
@@ -214,6 +218,7 @@
214
218
  "clientsStatement": "Client's Statement",
215
219
  "document": "Document",
216
220
  "documents": "Documents",
221
+ "invoiceData": "Payment info",
217
222
  "statementAndSurvey": "Statement and Questionnaire",
218
223
  "underwriterDecisionDocument": "",
219
224
  "clientsCard": "Client Card",
@@ -248,7 +253,8 @@
248
253
  "insurancePremiumAmount": "Insurance Premium Amount",
249
254
  "insurancePremiumAmountInDollar": "Amount of the Insurance premium (insurance fee) in dollars",
250
255
  "coverPeriodFrom2to22": "Cover Period (from 2y to 20y)",
251
- "dollarExchangeRateNBRK": "NBRK dollar exchange rate"
256
+ "dollarExchangeRateNBRK": "NBRK dollar exchange rate",
257
+ "contractDate": "Contract date"
252
258
  },
253
259
  "history": {
254
260
  "addRegNumber": "Number",
@@ -266,6 +272,10 @@
266
272
  "userFullName": "Assignee"
267
273
  },
268
274
  "labels": {
275
+ "needAuth": "You are required to authorize",
276
+ "welcomeHL": "Welcome to Halyk Life",
277
+ "resetType": "Pick resetting method",
278
+ "resetPassword": "Forgot password?",
269
279
  "search": "Search",
270
280
  "searchByIIN": "Search by IIN",
271
281
  "chooseScannedDoc": "Choose scanned document",
@@ -287,7 +297,8 @@
287
297
  "iin&bin": "IIN/BIN",
288
298
  "insurerIin": "Insured IIN",
289
299
  "insurerLongName": "Insured Full Name",
290
- "jsonObject": "JSON value"
300
+ "jsonObject": "JSON value",
301
+ "epayPage": "ePay page"
291
302
  },
292
303
  "placeholders": {
293
304
  "login": "Login",
@@ -300,6 +311,7 @@
300
311
  "numbers": "Field should contain only numbers",
301
312
  "numbersSymbols": "Field should contain numbers",
302
313
  "ageExceeds": "Year cannot exceed 50 years",
314
+ "age18": "Client should be adult",
303
315
  "sums": "Field should contain only numbers",
304
316
  "iinRight": "IIN must consist of 12 digits",
305
317
  "onlySymbols": "Field should not contain numbers",
package/locales/kz.json CHANGED
@@ -96,7 +96,7 @@
96
96
  "add": "Добавить",
97
97
  "userLogin": "Логин",
98
98
  "password": "Пароль",
99
- "login": "Вход в систему",
99
+ "login": "Войти в систему",
100
100
  "save": "Сохранить",
101
101
  "back": "Назад",
102
102
  "sign": "Подписать",
@@ -140,7 +140,10 @@
140
140
  "pay": "Оплатить",
141
141
  "register": "Укажите номер регистрации реестра",
142
142
  "send": "Отправить",
143
- "toStatement": "Продолжить оформление"
143
+ "toStatement": "Продолжить оформление",
144
+ "affiliate": "Добавить решение АС",
145
+ "more": "Подробнее",
146
+ "reset": "Восстановить"
144
147
  },
145
148
  "dialog": {
146
149
  "title": "Подтверждение",
@@ -161,7 +164,8 @@
161
164
  "pay": "Вы действительно хотите оплатить?",
162
165
  "familyMember": "Выберите члена семьи",
163
166
  "register": "Вы действительно хотите добавить в реестр данного ребенка?",
164
- "toApprove": "Вы действительно хотите отправить на согласование?"
167
+ "toApprove": "Вы действительно хотите отправить на согласование?",
168
+ "affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?"
165
169
  },
166
170
  "sign": {
167
171
  "chooseDoc": "Выберите документы для подписание",
@@ -214,6 +218,7 @@
214
218
  "clientsStatement": "Заявление клиента",
215
219
  "document": "Документ",
216
220
  "documents": "Документы",
221
+ "invoiceData": "Данные об оплате",
217
222
  "statementAndSurvey": "Заявление и анкета",
218
223
  "underwriterDecisionDocument": "",
219
224
  "clientsCard": "Карта клиента",
@@ -248,7 +253,8 @@
248
253
  "coverPeriodFrom2to22": "Срок страхования (от 2-х до 20 лет)",
249
254
  "insurancePremiumAmount": "Размер Страховой премии (страховой взнос)",
250
255
  "insurancePremiumAmountInDollar": "Размер Страховой премии (страховой взнос) в долларах",
251
- "dollarExchangeRateNBRK": "Курс доллара НБРК"
256
+ "dollarExchangeRateNBRK": "Курс доллара НБРК",
257
+ "contractDate": "Дата контракта"
252
258
  },
253
259
  "history": {
254
260
  "addRegNumber": "Номер",
@@ -266,6 +272,10 @@
266
272
  "userFullName": "Исполнитель"
267
273
  },
268
274
  "labels": {
275
+ "needAuth": "Для получения доступа Вам необходимо авторизоваться",
276
+ "welcomeHL": "Добро пожаловать в Halyk Life",
277
+ "resetType": "Выберите способ восстановление пароля",
278
+ "resetPassword": "Забыли пароль?",
269
279
  "search": "Поиск",
270
280
  "searchByIIN": "Поиск по ИИН",
271
281
  "chooseScannedDoc": "Выбрать отсканированный документ",
@@ -287,7 +297,8 @@
287
297
  "iin&bin": "ИИН/БИН",
288
298
  "insurerIin": "ИИН застрахованного",
289
299
  "insurerLongName": "ФИО застрахованного",
290
- "jsonObject": "JSON значение"
300
+ "jsonObject": "JSON значение",
301
+ "epayPage": "Страница на ePay"
291
302
  },
292
303
  "placeholders": {
293
304
  "login": "Логин",
@@ -300,6 +311,7 @@
300
311
  "numbers": "Поле должно содержать только цифры",
301
312
  "numbersSymbols": "Поле должно содержать цифры",
302
313
  "ageExceeds": "Год не может превышать больше 50 лет",
314
+ "age18": "Клиент должен быть совершеннолетним",
303
315
  "sums": "Поле должно содержать только цифры",
304
316
  "iinRight": "ИИН/БИН должен состоять из 12 цифр",
305
317
  "onlySymbols": "Поле не должно содержать число",
package/locales/ru.json CHANGED
@@ -96,7 +96,7 @@
96
96
  "add": "Добавить",
97
97
  "userLogin": "Логин",
98
98
  "password": "Пароль",
99
- "login": "Вход в систему",
99
+ "login": "Войти в систему",
100
100
  "save": "Сохранить",
101
101
  "back": "Назад",
102
102
  "sign": "Подписать",
@@ -140,7 +140,10 @@
140
140
  "pay": "Оплатить",
141
141
  "register": "Укажите номер регистрации реестра",
142
142
  "send": "Отправить",
143
- "toStatement": "Продолжить оформление"
143
+ "toStatement": "Продолжить оформление",
144
+ "affiliate": "Добавить решение АС",
145
+ "more": "Подробнее",
146
+ "reset": "Восстановить"
144
147
  },
145
148
  "dialog": {
146
149
  "title": "Подтверждение",
@@ -161,7 +164,8 @@
161
164
  "pay": "Вы действительно хотите оплатить?",
162
165
  "familyMember": "Выберите члена семьи",
163
166
  "register": "Вы действительно хотите добавить в реестр данного ребенка?",
164
- "toApprove": "Вы действительно хотите отправить на согласование?"
167
+ "toApprove": "Вы действительно хотите отправить на согласование?",
168
+ "affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?"
165
169
  },
166
170
  "sign": {
167
171
  "chooseDoc": "Выберите документы для подписание",
@@ -214,6 +218,7 @@
214
218
  "clientsStatement": "Заявление клиента",
215
219
  "document": "Документ",
216
220
  "documents": "Документы",
221
+ "invoiceData": "Данные об оплате",
217
222
  "statementAndSurvey": "Заявление и анкета",
218
223
  "underwriterDecisionDocument": "",
219
224
  "clientsCard": "Карта клиента",
@@ -248,7 +253,8 @@
248
253
  "coverPeriodFrom2to22": "Срок страхования (от 2-х до 20 лет)",
249
254
  "insurancePremiumAmount": "Размер Страховой премии (страховой взнос)",
250
255
  "insurancePremiumAmountInDollar": "Размер Страховой премии (страховой взнос) в долларах",
251
- "dollarExchangeRateNBRK": "Курс доллара НБРК"
256
+ "dollarExchangeRateNBRK": "Курс доллара НБРК",
257
+ "contractDate": "Дата контракта"
252
258
  },
253
259
  "history": {
254
260
  "addRegNumber": "Номер",
@@ -266,6 +272,10 @@
266
272
  "userFullName": "Исполнитель"
267
273
  },
268
274
  "labels": {
275
+ "needAuth": "Для получения доступа Вам необходимо авторизоваться",
276
+ "welcomeHL": "Добро пожаловать в Halyk Life",
277
+ "resetType": "Выберите способ восстановление пароля",
278
+ "resetPassword": "Забыли пароль?",
269
279
  "search": "Поиск",
270
280
  "searchByIIN": "Поиск по ИИН",
271
281
  "chooseScannedDoc": "Выбрать отсканированный документ",
@@ -287,7 +297,8 @@
287
297
  "iin&bin": "ИИН/БИН",
288
298
  "insurerIin": "ИИН застрахованного",
289
299
  "insurerLongName": "ФИО застрахованного",
290
- "jsonObject": "JSON значение"
300
+ "jsonObject": "JSON значение",
301
+ "epayPage": "Страница на ePay"
291
302
  },
292
303
  "placeholders": {
293
304
  "login": "Логин",
@@ -300,6 +311,7 @@
300
311
  "numbers": "Поле должно содержать только цифры",
301
312
  "numbersSymbols": "Поле должно содержать цифры",
302
313
  "ageExceeds": "Год не может превышать больше 50 лет",
314
+ "age18": "Клиент должен быть совершеннолетним",
303
315
  "sums": "Поле должно содержать только цифры",
304
316
  "iinRight": "ИИН/БИН должен состоять из 12 цифр",
305
317
  "onlySymbols": "Поле не должно содержать число",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.8-beta.13",
3
+ "version": "0.0.8-beta.15",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -47,6 +47,7 @@
47
47
  "pinia": "^2.0.35",
48
48
  "v-idle-3": "^0.3.14",
49
49
  "vue-i18n": "^9.2.2",
50
+ "vue-json-pretty": "^2.2.4",
50
51
  "vue-toastification": "^2.0.0-rc.5",
51
52
  "vue-uuid": "^3.0.0",
52
53
  "vuetify": "^3.3.1"
package/pages/500.vue CHANGED
@@ -69,7 +69,7 @@ export default defineComponent({
69
69
  });
70
70
 
71
71
  const goBack = () => {
72
- if (dataStore.isEFO || dataStore.isAML) {
72
+ if (dataStore.isBridge) {
73
73
  router.push({ name: 'Auth' });
74
74
  } else {
75
75
  dataStore.sendToParent(constants.postActions.Error500, 500);
@@ -32,6 +32,8 @@ export const useDataStore = defineStore('data', {
32
32
  getters: {
33
33
  isEFO: state => state.product === 'efo',
34
34
  isAML: state => state.product === 'aml',
35
+ isLKA: state => state.product === 'lka',
36
+ isBridge: state => state.product === 'efo' || state.product === 'aml' || state.product === 'lka',
35
37
  isBaiterek: state => state.product === 'baiterek',
36
38
  isBolashak: state => state.product === 'bolashak',
37
39
  isMycar: state => state.product === 'mycar',
@@ -65,7 +67,7 @@ export const useDataStore = defineStore('data', {
65
67
  },
66
68
  copyToClipboard(text) {
67
69
  if (typeof text === 'string' || typeof text === 'number') {
68
- if (this.isEFO || this.isAML) {
70
+ if (this.isBridge) {
69
71
  navigator.clipboard.writeText(text);
70
72
  } else {
71
73
  this.sendToParent(constants.postActions.clipboard, text);
@@ -1283,16 +1285,11 @@ export const useDataStore = defineStore('data', {
1283
1285
  },
1284
1286
  async sendUnderwritingCouncilTask(data) {
1285
1287
  try {
1286
- this.isLoading = true;
1287
1288
  await this.api.sendUnderwritingCouncilTask(data);
1288
1289
  this.showToaster('success', this.t('toaster.successOperation'), 5000);
1289
1290
  return true;
1290
1291
  } catch (err) {
1291
- console.log(err);
1292
- this.showToaster('error', this.t('toaster.error'), 5000);
1293
- return false;
1294
- } finally {
1295
- this.isLoading = false;
1292
+ return ErrorHandler(err);
1296
1293
  }
1297
1294
  },
1298
1295
  async definedAnswers(filter, whichSurvey, value = null, index = null) {
@@ -1644,6 +1641,13 @@ export const useDataStore = defineStore('data', {
1644
1641
  this.isLoading = false;
1645
1642
  }
1646
1643
  },
1644
+ async getProcessHistoryLog(taskId) {
1645
+ try {
1646
+ return await this.api.getProcessHistoryLog(taskId);
1647
+ } catch (err) {
1648
+ ErrorHandler(err);
1649
+ }
1650
+ },
1647
1651
  async setApplication() {
1648
1652
  try {
1649
1653
  await this.api.setApplication(this.formStore.applicationData);
@@ -1716,6 +1720,21 @@ export const useDataStore = defineStore('data', {
1716
1720
  }
1717
1721
  break;
1718
1722
  }
1723
+ case constants.actions.affiliate: {
1724
+ try {
1725
+ const sended = await this.sendUnderwritingCouncilTask({ taskId: taskId, decision: constants.actions.accept });
1726
+ if (!sended) return;
1727
+ this.formStore.$reset();
1728
+ if (this.isEFO || this.isAML) {
1729
+ await this.router.push({ name: 'Insurance-Product' });
1730
+ } else {
1731
+ this.sendToParent(constants.postActions.toHomePage, this.t('toaster.successOperation') + 'SUCCESS');
1732
+ }
1733
+ } catch (err) {
1734
+ ErrorHandler(err);
1735
+ }
1736
+ break;
1737
+ }
1719
1738
  }
1720
1739
  this.isButtonsLoading = false;
1721
1740
  } else {
@@ -1726,6 +1745,7 @@ export const useDataStore = defineStore('data', {
1726
1745
  try {
1727
1746
  const response = await this.api.getInvoiceData(processInstanceId);
1728
1747
  if (response) {
1748
+ this.formStore.invoiceData = response;
1729
1749
  return response;
1730
1750
  } else {
1731
1751
  return false;
@@ -1899,7 +1919,7 @@ export const useDataStore = defineStore('data', {
1899
1919
  const sumOfPercentage = localMembers.reduce((sum, member) => {
1900
1920
  return sum + Number(member.percentageOfPayoutAmount);
1901
1921
  }, 0);
1902
- if (sumOfPercentage !== 100 && this.hasPercentageOfPayoutAmount()) {
1922
+ if (sumOfPercentage !== 100) {
1903
1923
  this.showToaster('error', this.t('toaster.errorSumOrPercentage'), 3000);
1904
1924
  return false;
1905
1925
  }
@@ -2333,11 +2353,11 @@ export const useDataStore = defineStore('data', {
2333
2353
  }
2334
2354
  },
2335
2355
  hasPercentageOfPayoutAmount() {
2336
- if (this.isKazyna) {
2337
- return false;
2338
- }
2339
2356
  return true;
2340
2357
  },
2358
+ canViewInvoiceInfo() {
2359
+ return this.isAdmin();
2360
+ },
2341
2361
  },
2342
2362
  });
2343
2363
 
package/store/rules.js CHANGED
@@ -96,6 +96,8 @@ export const rules = {
96
96
  },
97
97
  ],
98
98
  age: [v => /^\d+$/.test(v) || t('rules.age')],
99
+ age18: [v => v >= 18 || t('rules.age18')],
100
+ age18ByDate: [v => Math.abs(new Date(Date.now() - new Date(formatDate(v)).getTime()).getUTCFullYear() - 1970) >= 18 || t('rules.age18')],
99
101
  birthDate: [
100
102
  v => {
101
103
  if (new Date(formatDate(v)) > new Date(Date.now())) return t('rules.exceedDate');