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

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
@@ -523,7 +523,7 @@ export class ApiClass {
523
523
  });
524
524
  }
525
525
 
526
- async sendUnderwritingCouncilTask(data: any) {
526
+ async sendUnderwritingCouncilTask(data: Partial<SendTask>): Promise<void> {
527
527
  return this.axiosCall({
528
528
  method: Methods.POST,
529
529
  url: '/Arm/api/UnderwritingCouncil/SendTask',
@@ -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>
@@ -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
 
@@ -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>
@@ -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,
@@ -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,6 +238,7 @@ 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));
@@ -200,6 +259,7 @@ export default defineComponent({
200
259
  handleTask,
201
260
  openSmsPanel,
202
261
  openEpayPanel,
262
+ onFileChange,
203
263
 
204
264
  // Computed
205
265
  buttonText,
@@ -207,9 +267,11 @@ export default defineComponent({
207
267
  signingActions,
208
268
  payingActions,
209
269
  acceptAction,
270
+ affiliateActions,
210
271
  paymentPeriod,
211
272
  insurancePremiumPerMonth,
212
273
  requestedSumInsured,
274
+ affiliationDocument,
213
275
  };
214
276
  },
215
277
  });
@@ -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;
@@ -1129,6 +1133,7 @@ export class FormStoreClass {
1129
1133
  this.additionalInsuranceTermsWithout = [];
1130
1134
  this.signUrls = [];
1131
1135
  this.epayLink = null;
1136
+ this.invoiceData = null;
1132
1137
  this.affilationResolution = {
1133
1138
  id: null,
1134
1139
  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: ['год', 'года', 'лет'],
package/locales/en.json CHANGED
@@ -140,7 +140,8 @@
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"
144
145
  },
145
146
  "dialog": {
146
147
  "title": "Confirmation",
@@ -161,7 +162,8 @@
161
162
  "pay": "Are you sure you want to pay?",
162
163
  "familyMember": "Pick family member",
163
164
  "register": "Вы действительно хотите добавить в реестр данного ребенка?",
164
- "toApprove": "Are you sure you want to send to approve?"
165
+ "toApprove": "Are you sure you want to send to approve?",
166
+ "affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?"
165
167
  },
166
168
  "sign": {
167
169
  "chooseDoc": "Choose documents to sign",
@@ -214,6 +216,7 @@
214
216
  "clientsStatement": "Client's Statement",
215
217
  "document": "Document",
216
218
  "documents": "Documents",
219
+ "invoiceData": "Payment info",
217
220
  "statementAndSurvey": "Statement and Questionnaire",
218
221
  "underwriterDecisionDocument": "",
219
222
  "clientsCard": "Client Card",
@@ -287,7 +290,8 @@
287
290
  "iin&bin": "IIN/BIN",
288
291
  "insurerIin": "Insured IIN",
289
292
  "insurerLongName": "Insured Full Name",
290
- "jsonObject": "JSON value"
293
+ "jsonObject": "JSON value",
294
+ "epayPage": "ePay page"
291
295
  },
292
296
  "placeholders": {
293
297
  "login": "Login",
@@ -300,6 +304,7 @@
300
304
  "numbers": "Field should contain only numbers",
301
305
  "numbersSymbols": "Field should contain numbers",
302
306
  "ageExceeds": "Year cannot exceed 50 years",
307
+ "age18": "Client should be adult",
303
308
  "sums": "Field should contain only numbers",
304
309
  "iinRight": "IIN must consist of 12 digits",
305
310
  "onlySymbols": "Field should not contain numbers",
package/locales/kz.json CHANGED
@@ -140,7 +140,8 @@
140
140
  "pay": "Оплатить",
141
141
  "register": "Укажите номер регистрации реестра",
142
142
  "send": "Отправить",
143
- "toStatement": "Продолжить оформление"
143
+ "toStatement": "Продолжить оформление",
144
+ "affiliate": "Добавить решение АС"
144
145
  },
145
146
  "dialog": {
146
147
  "title": "Подтверждение",
@@ -161,7 +162,8 @@
161
162
  "pay": "Вы действительно хотите оплатить?",
162
163
  "familyMember": "Выберите члена семьи",
163
164
  "register": "Вы действительно хотите добавить в реестр данного ребенка?",
164
- "toApprove": "Вы действительно хотите отправить на согласование?"
165
+ "toApprove": "Вы действительно хотите отправить на согласование?",
166
+ "affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?"
165
167
  },
166
168
  "sign": {
167
169
  "chooseDoc": "Выберите документы для подписание",
@@ -214,6 +216,7 @@
214
216
  "clientsStatement": "Заявление клиента",
215
217
  "document": "Документ",
216
218
  "documents": "Документы",
219
+ "invoiceData": "Данные об оплате",
217
220
  "statementAndSurvey": "Заявление и анкета",
218
221
  "underwriterDecisionDocument": "",
219
222
  "clientsCard": "Карта клиента",
@@ -287,7 +290,8 @@
287
290
  "iin&bin": "ИИН/БИН",
288
291
  "insurerIin": "ИИН застрахованного",
289
292
  "insurerLongName": "ФИО застрахованного",
290
- "jsonObject": "JSON значение"
293
+ "jsonObject": "JSON значение",
294
+ "epayPage": "Страница на ePay"
291
295
  },
292
296
  "placeholders": {
293
297
  "login": "Логин",
@@ -300,6 +304,7 @@
300
304
  "numbers": "Поле должно содержать только цифры",
301
305
  "numbersSymbols": "Поле должно содержать цифры",
302
306
  "ageExceeds": "Год не может превышать больше 50 лет",
307
+ "age18": "Клиент должен быть совершеннолетним",
303
308
  "sums": "Поле должно содержать только цифры",
304
309
  "iinRight": "ИИН/БИН должен состоять из 12 цифр",
305
310
  "onlySymbols": "Поле не должно содержать число",
package/locales/ru.json CHANGED
@@ -140,7 +140,8 @@
140
140
  "pay": "Оплатить",
141
141
  "register": "Укажите номер регистрации реестра",
142
142
  "send": "Отправить",
143
- "toStatement": "Продолжить оформление"
143
+ "toStatement": "Продолжить оформление",
144
+ "affiliate": "Добавить решение АС"
144
145
  },
145
146
  "dialog": {
146
147
  "title": "Подтверждение",
@@ -161,7 +162,8 @@
161
162
  "pay": "Вы действительно хотите оплатить?",
162
163
  "familyMember": "Выберите члена семьи",
163
164
  "register": "Вы действительно хотите добавить в реестр данного ребенка?",
164
- "toApprove": "Вы действительно хотите отправить на согласование?"
165
+ "toApprove": "Вы действительно хотите отправить на согласование?",
166
+ "affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?"
165
167
  },
166
168
  "sign": {
167
169
  "chooseDoc": "Выберите документы для подписание",
@@ -214,6 +216,7 @@
214
216
  "clientsStatement": "Заявление клиента",
215
217
  "document": "Документ",
216
218
  "documents": "Документы",
219
+ "invoiceData": "Данные об оплате",
217
220
  "statementAndSurvey": "Заявление и анкета",
218
221
  "underwriterDecisionDocument": "",
219
222
  "clientsCard": "Карта клиента",
@@ -287,7 +290,8 @@
287
290
  "iin&bin": "ИИН/БИН",
288
291
  "insurerIin": "ИИН застрахованного",
289
292
  "insurerLongName": "ФИО застрахованного",
290
- "jsonObject": "JSON значение"
293
+ "jsonObject": "JSON значение",
294
+ "epayPage": "Страница на ePay"
291
295
  },
292
296
  "placeholders": {
293
297
  "login": "Логин",
@@ -300,6 +304,7 @@
300
304
  "numbers": "Поле должно содержать только цифры",
301
305
  "numbersSymbols": "Поле должно содержать цифры",
302
306
  "ageExceeds": "Год не может превышать больше 50 лет",
307
+ "age18": "Клиент должен быть совершеннолетним",
303
308
  "sums": "Поле должно содержать только цифры",
304
309
  "iinRight": "ИИН/БИН должен состоять из 12 цифр",
305
310
  "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.14",
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"
@@ -1283,16 +1283,11 @@ export const useDataStore = defineStore('data', {
1283
1283
  },
1284
1284
  async sendUnderwritingCouncilTask(data) {
1285
1285
  try {
1286
- this.isLoading = true;
1287
1286
  await this.api.sendUnderwritingCouncilTask(data);
1288
1287
  this.showToaster('success', this.t('toaster.successOperation'), 5000);
1289
1288
  return true;
1290
1289
  } catch (err) {
1291
- console.log(err);
1292
- this.showToaster('error', this.t('toaster.error'), 5000);
1293
- return false;
1294
- } finally {
1295
- this.isLoading = false;
1290
+ return ErrorHandler(err);
1296
1291
  }
1297
1292
  },
1298
1293
  async definedAnswers(filter, whichSurvey, value = null, index = null) {
@@ -1716,6 +1711,21 @@ export const useDataStore = defineStore('data', {
1716
1711
  }
1717
1712
  break;
1718
1713
  }
1714
+ case constants.actions.affiliate: {
1715
+ try {
1716
+ const sended = await this.sendUnderwritingCouncilTask({ taskId: taskId, decision: constants.actions.accept });
1717
+ if (!sended) return;
1718
+ this.formStore.$reset();
1719
+ if (this.isEFO || this.isAML) {
1720
+ await this.router.push({ name: 'Insurance-Product' });
1721
+ } else {
1722
+ this.sendToParent(constants.postActions.toHomePage, this.t('toaster.successOperation') + 'SUCCESS');
1723
+ }
1724
+ } catch (err) {
1725
+ ErrorHandler(err);
1726
+ }
1727
+ break;
1728
+ }
1719
1729
  }
1720
1730
  this.isButtonsLoading = false;
1721
1731
  } else {
@@ -1726,6 +1736,7 @@ export const useDataStore = defineStore('data', {
1726
1736
  try {
1727
1737
  const response = await this.api.getInvoiceData(processInstanceId);
1728
1738
  if (response) {
1739
+ this.formStore.invoiceData = response;
1729
1740
  return response;
1730
1741
  } else {
1731
1742
  return false;
@@ -2338,6 +2349,9 @@ export const useDataStore = defineStore('data', {
2338
2349
  }
2339
2350
  return true;
2340
2351
  },
2352
+ canViewInvoiceInfo() {
2353
+ return this.isAdmin();
2354
+ },
2341
2355
  },
2342
2356
  });
2343
2357
 
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');