hl-core 0.0.10-beta.51 → 0.0.10-beta.53

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.
@@ -40,6 +40,8 @@
40
40
  :model-value="modelValue"
41
41
  :min-date="minDate"
42
42
  :max-date="maxDate"
43
+ :min="minDate"
44
+ :max="maxDate"
43
45
  @update:modelValue="$emit('update:modelValue', $event)"
44
46
  />
45
47
  </template>
@@ -38,6 +38,7 @@
38
38
  <div v-if="$dataStore.buttons && $dataStore.buttons.length" class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[10%] w-full pr-4">
39
39
  <div v-for="(item, index) of $dataStore.buttons" :key="index">
40
40
  <transition enter-active-class="animate__animated animate__fadeIn animate__faster" leave-active-class="animate__animated animate__fadeOut animate__faster">
41
+ <!-- @vue-ignore -->
41
42
  <base-btn
42
43
  v-if="$dataStore.filters.show(item)"
43
44
  :text="item.title!"
@@ -6,6 +6,18 @@
6
6
  <base-btn v-if="underDocumentsList && underDocumentsList.length" :loading="documentLoading" text="Загрузить" size="sm" class="mt-3" @click="uploadUnderFiles" />
7
7
  </base-animation>
8
8
  </base-form-section>
9
+ <section class="w-full px-[10px] pt-[14px]" v-if="$dataStore.isPension && formStore.hasRepresentative">
10
+ <base-content-block :class="[$styles.textSimple]">
11
+ <div :class="[$styles.whiteBg, $styles.rounded]" class="p-2 h-12 flex items-center relative">
12
+ <span class="ml-2">{{ $dataStore.t('policyholdersRepresentative.informationDoc') }}</span>
13
+ <i
14
+ class="transition-all cursor-pointer mdi mdi-tray-arrow-down pl-2 mr-3 border-l-[1px] text-xl absolute right-0"
15
+ :class="[$styles.greenTextHover]"
16
+ @click="$dataStore.generatePDFDocument('All_Spokesman', '24', 'pdf')"
17
+ ></i>
18
+ </div>
19
+ </base-content-block>
20
+ </section>
9
21
  <section
10
22
  v-if="$dataStore.isPension && (showContract || formStore.applicationData.statusCode === 'PreparationDossierForm')"
11
23
  class="w-full px-[10px] pt-[14px] flex flex-col gap-2"
@@ -80,6 +92,22 @@
80
92
  </div>
81
93
  </base-content-block>
82
94
  </section>
95
+ <section class="w-full px-[10px] pt-[14px]" v-if="$dataStore.isPension && formStore.hasRepresentative">
96
+ <base-form-section
97
+ v-if="!formStore.signedDocumentList.find(i => i.fileTypeCode === '16')"
98
+ :title="$dataStore.t('policyholdersRepresentative.powerOfAttorneyDoc')"
99
+ class="mt-[14px] d-flex"
100
+ >
101
+ <base-file-input :loading="$dataStore.isLoading" @input="uploadAdditionalFile($event, '16')" />
102
+ </base-form-section>
103
+ <base-form-section
104
+ v-if="!formStore.signedDocumentList.find(i => i.fileTypeCode === '24')"
105
+ :title="$dataStore.t('policyholdersRepresentative.informationDoc')"
106
+ class="mt-[14px] d-flex"
107
+ >
108
+ <base-file-input :loading="$dataStore.isLoading" @input="uploadAdditionalFile($event, '24')" />
109
+ </base-form-section>
110
+ </section>
83
111
  <section v-if="requiredSign">
84
112
  <div v-for="(member, index) in jointMembers.filter(i => memberHasDocumentsToSign(i.iin))" :key="index">
85
113
  <base-form-section :title="`${member.firstName} ${member.lastName}`" class="mx-[10px] mt-[14px] d-flex">
@@ -274,8 +274,9 @@
274
274
  :label="$dataStore.t('form.documentDate')"
275
275
  :readonly="isDisabled"
276
276
  :clearable="!isDisabled"
277
- :rules="$rules.date"
277
+ :rules="$rules.date.concat($rules.checkPastOrToday)"
278
278
  :maska="$maska.date"
279
+ :max-date="getToday()"
279
280
  append-inner-icon="mdi mdi-calendar-blank-outline"
280
281
  />
281
282
  <base-form-input
@@ -283,8 +284,9 @@
283
284
  :label="$dataStore.t('form.documentExpire')"
284
285
  :readonly="isDisabled"
285
286
  :clearable="!isDisabled"
286
- :rules="$rules.date"
287
+ :rules="$rules.date.concat($rules.checkTodayOrFuture)"
287
288
  :maska="$maska.date"
289
+ :min-date="getToday()"
288
290
  append-inner-icon="mdi mdi-calendar-blank-outline"
289
291
  />
290
292
  <base-form-input v-model.trim="member.migrationCard" :label="$dataStore.t('policyholdersRepresentative.numberVisa')" />
@@ -882,6 +884,9 @@ export default {
882
884
  if (dataStore.isGons) return member.value.chooseChild === dataStore.t('form.addBeneficiary');
883
885
  return true;
884
886
  });
887
+ const getToday = (): Date => {
888
+ return new Date(new Date().setHours(0, 0, 0, 0));
889
+ };
885
890
 
886
891
  const isTask = computed(() => route.params.taskId === '0' || dataStore.isTask());
887
892
  const isIinPhoneDisabled = computed(() => member.value.hasAgreement);
@@ -2272,6 +2277,7 @@ export default {
2272
2277
  birthDateRule,
2273
2278
 
2274
2279
  // Functions
2280
+ getToday,
2275
2281
  addChild,
2276
2282
  searchMember,
2277
2283
  openPanel,
@@ -56,7 +56,7 @@
56
56
  </div>
57
57
  </base-form-section>
58
58
  <base-form-section
59
- v-if="isUnderwriterRole && whichProduct !== 'pensionannuitynew' && whichProduct !== 'balam' && whichProduct !== 'tumar'"
59
+ v-if="isUnderwriterRole && whichProduct !== 'pensionannuitynew' && whichProduct !== 'balam' && whichProduct !== 'borrower' && whichProduct !== 'tumar'"
60
60
  :title="$dataStore.t('recalculationInfo')"
61
61
  >
62
62
  <base-form-input
@@ -487,8 +487,9 @@
487
487
  v-model="contract.transferContractFirstPaymentDate"
488
488
  :maska="$maska.date"
489
489
  :label="$dataStore.t('pension.transferContractFirstPaymentDate')"
490
- :rules="$dataStore.rules.required.concat($dataStore.rules.birthDate)"
490
+ :rules="[...$rules.required, $rules.validateAfterContractDate(contract.transferContractFirstPaymentDate, contract.transferContractDate)]"
491
491
  append-inner-icon="mdi mdi-calendar-blank-outline"
492
+ :min-date="formatDate(contract.transferContractDate) ?? undefined"
492
493
  :readonly="isDisabled"
493
494
  :clearable="!isDisabled"
494
495
  />
@@ -85,7 +85,7 @@
85
85
  :class="[$styles.blueBgLight]"
86
86
  class="rounded-lg p-4"
87
87
  >
88
- <base-form-toggle v-model="isOnlineEnpf" title="Онлайн подписание согласия для ЕНПФ" :has-border="false" @clicked="setActualEnpf" />
88
+ <base-form-toggle v-model="isOnlineEnpf" title="Онлайн подписание согласия для ЕНПФ" :disabled="isOnlineEnpfDisabled" :has-border="false" @clicked="setActualEnpf" />
89
89
  </div>
90
90
  <div :class="[$styles.blueBgLight]" class="rounded-lg p-4">
91
91
  <v-expansion-panels v-if="formStore.signatories.length" variant="accordion" :multiple="false">
@@ -316,6 +316,7 @@ export default defineComponent({
316
316
  return signingFiles.value;
317
317
  }
318
318
  });
319
+ const isOnlineEnpfDisabled = computed(() => (dataStore.isPension && formStore.hasRepresentative ? true : false));
319
320
 
320
321
  const openSmsPanel = (signInfo: Types.SignUrlType) => {
321
322
  if (signInfo) {
@@ -1031,6 +1032,7 @@ export default defineComponent({
1031
1032
  inSigningOrder,
1032
1033
  isNewSign,
1033
1034
  hasEpayPay,
1035
+ isOnlineEnpfDisabled,
1034
1036
  getFilesDownloadButtons,
1035
1037
  };
1036
1038
  },
@@ -20,6 +20,7 @@ export const constants = Object.freeze({
20
20
  pensionannuitynew: 19,
21
21
  halykkazynaap: 20,
22
22
  balam: 21,
23
+ borrower: 40,
23
24
  halykkazynaapsms: 23,
24
25
  pensionannuityrefundnew: 24,
25
26
  pensionannuityjointnew: 25,
@@ -31,7 +32,7 @@ export const constants = Object.freeze({
31
32
  checkcontragent: 1,
32
33
  checkcontract: 2,
33
34
  },
34
- extractedProducts: ['dso', 'uu', 'lka'],
35
+ extractedProducts: ['dso', 'uu', 'lka', 'reinsurance'],
35
36
  editableStatuses: [Statuses.StartForm, Statuses.EditBeneficiaryForm, Statuses.EditForm, Statuses.InputDataForm],
36
37
  documentsLinkVisibleStatuses: [
37
38
  Statuses.Completed,
@@ -264,7 +264,7 @@ export const policyholderToBeneficialOwner = (isPolicyholderBeneficialOwner: boo
264
264
  beneficialOwner.citizenship = policyholder.clientData.authoritedPerson.citizenship;
265
265
  beneficialOwner.birthDate = policyholder.clientData.authoritedPerson.birthDate;
266
266
  beneficialOwner.gender = policyholder.clientData.authoritedPerson.gender;
267
- beneficialOwner.resident = policyholder.clientData.resident;
267
+ beneficialOwner.resident = policyholder.clientData.authoritedPerson.resident;
268
268
  beneficialOwner.taxResidentCountry = policyholder.clientData.taxResidentCountry;
269
269
  beneficialOwner.economySectorCode = policyholder.clientData.economySectorCode;
270
270
  beneficialOwner.identityDocument.issuedOn = policyholder.clientData.authoritedPerson.identityDocument.issuedOn;
@@ -840,7 +840,7 @@ export class RoleController {
840
840
  isUpk = () => this.isRole(constants.roles.UPK);
841
841
  isUrp = () => this.isRole(constants.roles.URP);
842
842
  isUsns = () => this.isRole(constants.roles.USNS);
843
- isUsnsHead = () => this.isRole(constants.roles.UsnsHead);
843
+ isNotAccumulativeSanctionerUSNS = () => this.isRole(constants.roles.NotAccumulativeSanctionerUSNS);
844
844
  isAccountant = () => this.isRole(constants.roles.Accountant);
845
845
  isDrn = () => this.isRole(constants.roles.DRNSJ);
846
846
  isSupport = () => this.isRole(constants.roles.Support);
@@ -866,6 +866,7 @@ export class RoleController {
866
866
  isURAP = () => this.isRole(constants.roles.URAP);
867
867
  isTravelAgent = () => this.isRole(constants.roles.TravelAgent);
868
868
  isHR = () => this.isRole(constants.roles.HR);
869
+ isReInsurer = () => this.isRole(constants.roles.ReInsurer);
869
870
  hasAccess = () => {
870
871
  const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn() || this.isDsuioOrv();
871
872
  return {
@@ -886,14 +887,16 @@ export class RoleController {
886
887
  this.isArchivist() ||
887
888
  this.isSecurity() ||
888
889
  baseAccessRoles,
890
+ toReinsurance: this.isReInsurer() || this.isAdjuster() || this.isHeadAdjuster() || baseAccessRoles,
889
891
  toDSO:
892
+ this.isUsns() ||
890
893
  this.isDsuio() ||
891
894
  this.isActuary() ||
892
- this.isUsnsHead() ||
893
895
  this.isHeadOfDso() ||
894
896
  this.isAccountant() ||
895
897
  this.isUSNSACCINS() ||
896
898
  this.isDsoDirector() ||
899
+ this.isNotAccumulativeSanctionerUSNS() ||
897
900
  this.isServiceManager() ||
898
901
  this.isUSNSsanctioner() ||
899
902
  this.isAccountantDirector() ||
@@ -933,7 +936,8 @@ export class RoleController {
933
936
  this.isURAP() ||
934
937
  this.isTravelAgent() ||
935
938
  this.isHR() ||
936
- this.isUsnsHead() ||
939
+ this.isNotAccumulativeSanctionerUSNS() ||
940
+ this.isReInsurer() ||
937
941
  baseAccessRoles,
938
942
  };
939
943
  };
package/locales/ru.json CHANGED
@@ -152,7 +152,8 @@
152
152
  "needToRecalc": "Дата оплаты не совпадает с датой договора, нажмите «Перерасчет» и отправьте клиенту новый QR для подписания.",
153
153
  "notDigDoc": "Выданный документ не найден",
154
154
  "siblingRelationDoc": "Необходимо вложить документы, подтверждающие родственные связи между Страхователем и Выгодоприобретателем.\nВ случае, если степень родства Выгодоприобретателя выбрано:\n Полнородный брат/сестра или Неполнородный брат/сестра - Необходимо вложить 2 документа: Свидетельство о рождении Выгодоприобретателя и Свидетельство о рождении Страхователя",
155
- "grandchildRelationDoc": "Необходимо вложить документы, подтверждающие родственные связи между Страхователем и Выгодоприобретателем.\nВ случае, если степень родства Выгодоприобретателя выбрано:\n Внук/Внучка - Необходимо вложить 2 документа: Свидетельство о рождении Выгодоприобретателя и Свидетельство о рождении родителя (который является ребенком страхователя) Выгодоприобретателя"
155
+ "grandchildRelationDoc": "Необходимо вложить документы, подтверждающие родственные связи между Страхователем и Выгодоприобретателем.\nВ случае, если степень родства Выгодоприобретателя выбрано:\n Внук/Внучка - Необходимо вложить 2 документа: Свидетельство о рождении Выгодоприобретателя и Свидетельство о рождении родителя (который является ребенком страхователя) Выгодоприобретателя",
156
+ "missingDocuments": "Необходимо вложить документы доверенность представителя и сведения о представителе"
156
157
  },
157
158
  "notSignedContract": "Неподписанный Договор",
158
159
  "Contract": "Договор страхования",
@@ -906,6 +907,7 @@
906
907
  "agePrePensionInsured": "Пороговое значение по возрасту с 55 по 63",
907
908
  "checkDate": "Укажите корректную дату",
908
909
  "searchQueryLen": "Поиск должности должен осуществляться по запросу не менее чем из {len} символов",
910
+ "validateAfterContractDate": "Дата должна быть больше Даты заключения договора",
909
911
  "fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг",
910
912
  "lengthLimit": "Превышен лимит символов. Введите текст длиной не более {len} символов"
911
913
  },
@@ -922,7 +924,9 @@
922
924
  "numberVisa": "Номер миграционный карточки",
923
925
  "numberLicense": "Номер лицензии",
924
926
  "confirmAuthority": "Лицо, подписавшего документ, подтверждающий полномочия, -Нотариус?",
925
- "documentIssuers": "Наименование органа, выдавшего документ"
927
+ "documentIssuers": "Наименование органа, выдавшего документ",
928
+ "powerOfAttorneyDoc": "Доверенность представителя",
929
+ "informationDoc": "Сведения о представителе"
926
930
  },
927
931
  "payment": {
928
932
  "method": "Способ оплаты",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.51",
3
+ "version": "0.0.10-beta.53",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -66,6 +66,7 @@ export const useDataStore = defineStore('data', {
66
66
  isCritical: state => state.product === 'criticalillness',
67
67
  isBalam: state => state.product === 'balam',
68
68
  isTumar: state => state.product === 'tumar',
69
+ isBorrower: state => state.product === 'borrower',
69
70
  isDSO: state => state.product === 'dso',
70
71
  isUU: state => state.product === 'uu',
71
72
  hasClientAnketa: state => Array.isArray(state.formStore.additionalInsuranceTerms) && state.formStore.additionalInsuranceTerms.find(i => i.coverTypeCode === 10),
@@ -390,19 +391,19 @@ export const useDataStore = defineStore('data', {
390
391
  try {
391
392
  const queryData = isNonResident
392
393
  ? {
393
- firstName: member.firstName ?? '',
394
- lastName: member.lastName ?? '',
395
- middleName: member.middleName ?? '',
396
- iin: '',
397
- birthDate: member.birthDate ? formatDate(member.birthDate)?.toISOString() ?? '' : '',
398
- }
394
+ firstName: member.firstName ?? '',
395
+ lastName: member.lastName ?? '',
396
+ middleName: member.middleName ?? '',
397
+ iin: '',
398
+ birthDate: member.birthDate ? formatDate(member.birthDate)?.toISOString() ?? '' : '',
399
+ }
399
400
  : {
400
- firstName: '',
401
- lastName: '',
402
- middleName: '',
403
- iin: member.iin ? member.iin.replace(/-/g, '') : '',
404
- birthDate: '',
405
- };
401
+ firstName: '',
402
+ lastName: '',
403
+ middleName: '',
404
+ iin: member.iin ? member.iin.replace(/-/g, '') : '',
405
+ birthDate: '',
406
+ };
406
407
  const contragentResponse = await this.api.getContragent(queryData);
407
408
  if (contragentResponse.totalItems > 0) {
408
409
  if (contragentResponse.items.length === 1) {
@@ -1656,11 +1657,11 @@ export const useDataStore = defineStore('data', {
1656
1657
  return n === null
1657
1658
  ? null
1658
1659
  : n
1659
- .toLocaleString('ru', {
1660
- maximumFractionDigits: 2,
1661
- minimumFractionDigits: 2,
1662
- })
1663
- .replace(/,/g, '.');
1660
+ .toLocaleString('ru', {
1661
+ maximumFractionDigits: 2,
1662
+ minimumFractionDigits: 2,
1663
+ })
1664
+ .replace(/,/g, '.');
1664
1665
  },
1665
1666
  async getTaskList(
1666
1667
  search: string = '',
@@ -1696,8 +1697,8 @@ export const useDataStore = defineStore('data', {
1696
1697
  groupCode: groupCode,
1697
1698
  processCodes: this.isEFO
1698
1699
  ? Object.values(constants.products).filter(
1699
- i => i !== constants.products.pensionannuity && i !== constants.products.pensionannuityrefund && i !== constants.products.pensionannuityjoint,
1700
- )
1700
+ i => i !== constants.products.pensionannuity && i !== constants.products.pensionannuityrefund && i !== constants.products.pensionannuityjoint,
1701
+ )
1701
1702
  : [constants.products.baiterek],
1702
1703
  };
1703
1704
  if (byOneProcess !== null) {
@@ -1708,9 +1709,9 @@ export const useDataStore = defineStore('data', {
1708
1709
  processInstanceId === null
1709
1710
  ? query
1710
1711
  : {
1711
- ...query,
1712
- processInstanceId: processInstanceId,
1713
- },
1712
+ ...query,
1713
+ processInstanceId: processInstanceId,
1714
+ },
1714
1715
  );
1715
1716
  if (needToReturn) {
1716
1717
  this.isLoading = false;
@@ -2115,8 +2116,8 @@ export const useDataStore = defineStore('data', {
2115
2116
  } catch (err) {
2116
2117
  ErrorHandler(err);
2117
2118
  return {
2118
- "scheduleDividend": null,
2119
- "scheduleDividend2": null
2119
+ scheduleDividend: null,
2120
+ scheduleDividend2: null,
2120
2121
  };
2121
2122
  } finally {
2122
2123
  this.isLoading = false;
@@ -3298,6 +3299,14 @@ export const useDataStore = defineStore('data', {
3298
3299
  return false;
3299
3300
  }
3300
3301
  }
3302
+ if (this.isPension && this.formStore.hasRepresentative) {
3303
+ const requiredIds = ['16', '24'];
3304
+
3305
+ const missingDocuments = requiredIds.filter(id => !this.formStore.signedDocumentList.some(i => i.fileTypeCode === id));
3306
+ if (missingDocuments.length > 0) {
3307
+ this.showToaster('error', this.t('toaster.missingDocuments'), 3000);
3308
+ }
3309
+ }
3301
3310
  return true;
3302
3311
  },
3303
3312
  validateAnketa(whichSurvey: 'surveyByHealthBase' | 'surveyByHealthBasePolicyholder' | 'surveyByCriticalBase' | 'surveyByCriticalBasePolicyholder') {
@@ -3347,62 +3356,62 @@ export const useDataStore = defineStore('data', {
3347
3356
  await Promise.allSettled([
3348
3357
  this.getQuestionList('health', this.formStore.applicationData.processInstanceId, this.formStore.applicationData.insuredApp[0].id, 'surveyByHealthBase'),
3349
3358
  this.isClientAnketaCondition &&
3350
- this.getQuestionList(
3351
- 'health',
3352
- this.formStore.applicationData.processInstanceId,
3353
- this.formStore.applicationData.clientApp.id,
3354
- 'surveyByHealthBasePolicyholder',
3355
- 'policyholder',
3356
- ),
3359
+ this.getQuestionList(
3360
+ 'health',
3361
+ this.formStore.applicationData.processInstanceId,
3362
+ this.formStore.applicationData.clientApp.id,
3363
+ 'surveyByHealthBasePolicyholder',
3364
+ 'policyholder',
3365
+ ),
3357
3366
  ,
3358
3367
  ]);
3359
3368
  this.isClientAnketaCondition
3360
3369
  ? await Promise.allSettled([
3361
- ...this.formStore.surveyByHealthBase!.body.map(async question => {
3362
- await this.definedAnswers(question.first.id, 'surveyByHealthBase');
3363
- }),
3364
- ...this.formStore.surveyByHealthBasePolicyholder!.body.map(async question => {
3365
- await this.definedAnswers(question.first.id, 'surveyByHealthBasePolicyholder');
3366
- }),
3367
- ])
3370
+ ...this.formStore.surveyByHealthBase!.body.map(async question => {
3371
+ await this.definedAnswers(question.first.id, 'surveyByHealthBase');
3372
+ }),
3373
+ ...this.formStore.surveyByHealthBasePolicyholder!.body.map(async question => {
3374
+ await this.definedAnswers(question.first.id, 'surveyByHealthBasePolicyholder');
3375
+ }),
3376
+ ])
3368
3377
  : await Promise.allSettled(
3369
- this.formStore.surveyByHealthBase!.body.map(async question => {
3370
- await this.definedAnswers(question.first.id, 'surveyByHealthBase');
3371
- }),
3372
- );
3378
+ this.formStore.surveyByHealthBase!.body.map(async question => {
3379
+ await this.definedAnswers(question.first.id, 'surveyByHealthBase');
3380
+ }),
3381
+ );
3373
3382
  } else {
3374
3383
  await Promise.allSettled([
3375
3384
  this.getQuestionList('health', this.formStore.applicationData.processInstanceId, this.formStore.applicationData.insuredApp[0].id, 'surveyByHealthBase'),
3376
3385
  this.getQuestionList('critical', this.formStore.applicationData.processInstanceId, this.formStore.applicationData.insuredApp[0].id, 'surveyByCriticalBase'),
3377
3386
  this.isClientAnketaCondition &&
3378
- this.getQuestionList(
3379
- 'health',
3380
- this.formStore.applicationData.processInstanceId,
3381
- this.formStore.applicationData.clientApp.id,
3382
- 'surveyByHealthBasePolicyholder',
3383
- 'policyholder',
3384
- ),
3387
+ this.getQuestionList(
3388
+ 'health',
3389
+ this.formStore.applicationData.processInstanceId,
3390
+ this.formStore.applicationData.clientApp.id,
3391
+ 'surveyByHealthBasePolicyholder',
3392
+ 'policyholder',
3393
+ ),
3385
3394
  ]);
3386
3395
  this.isClientAnketaCondition
3387
3396
  ? await Promise.allSettled([
3388
- ...this.formStore.surveyByHealthBase!.body.map(async question => {
3389
- await this.definedAnswers(question.first.id, 'surveyByHealthBase');
3390
- }),
3391
- ...this.formStore.surveyByCriticalBase!.body.map(async question => {
3392
- await this.definedAnswers(question.first.id, 'surveyByCriticalBase');
3393
- }),
3394
- ...this.formStore.surveyByHealthBasePolicyholder!.body.map(async question => {
3395
- await this.definedAnswers(question.first.id, 'surveyByHealthBasePolicyholder');
3396
- }),
3397
- ])
3397
+ ...this.formStore.surveyByHealthBase!.body.map(async question => {
3398
+ await this.definedAnswers(question.first.id, 'surveyByHealthBase');
3399
+ }),
3400
+ ...this.formStore.surveyByCriticalBase!.body.map(async question => {
3401
+ await this.definedAnswers(question.first.id, 'surveyByCriticalBase');
3402
+ }),
3403
+ ...this.formStore.surveyByHealthBasePolicyholder!.body.map(async question => {
3404
+ await this.definedAnswers(question.first.id, 'surveyByHealthBasePolicyholder');
3405
+ }),
3406
+ ])
3398
3407
  : await Promise.allSettled([
3399
- ...this.formStore.surveyByHealthBase!.body.map(async question => {
3400
- await this.definedAnswers(question.first.id, 'surveyByHealthBase');
3401
- }),
3402
- ...this.formStore.surveyByCriticalBase!.body.map(async question => {
3403
- await this.definedAnswers(question.first.id, 'surveyByCriticalBase');
3404
- }),
3405
- ]);
3408
+ ...this.formStore.surveyByHealthBase!.body.map(async question => {
3409
+ await this.definedAnswers(question.first.id, 'surveyByHealthBase');
3410
+ }),
3411
+ ...this.formStore.surveyByCriticalBase!.body.map(async question => {
3412
+ await this.definedAnswers(question.first.id, 'surveyByCriticalBase');
3413
+ }),
3414
+ ]);
3406
3415
  }
3407
3416
  if (this.validateAnketa('surveyByHealthBase')) {
3408
3417
  let hasCriticalAndItsValid = null;
@@ -3681,8 +3690,8 @@ export const useDataStore = defineStore('data', {
3681
3690
  const validDocument = this.isLifetrip
3682
3691
  ? filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.PS)
3683
3692
  : filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes['1UDL']) ??
3684
- filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.VNZ) ??
3685
- filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.PS);
3693
+ filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.VNZ) ??
3694
+ filteredDocuments.find(i => i.type.code === CoreEnums.GBD.DocTypes.PS);
3686
3695
  if (validDocument) {
3687
3696
  const documentType = this.documentTypes.find(
3688
3697
  (i: Value) => i.ids === Object.keys(CoreEnums.GBD.DocTypes)[Object.values(CoreEnums.GBD.DocTypes).indexOf(validDocument.type.code)],
@@ -3751,9 +3760,11 @@ export const useDataStore = defineStore('data', {
3751
3760
  try {
3752
3761
  (Object.keys(local) as Array<keyof GroupMember>).forEach(key => {
3753
3762
  if (key === 'actualAddress' || key === 'legalAddress') {
3754
- const address = `${checkForNull(local[key].country.nameRu)}, ${checkForNull(local[key].state.nameRu)},${local[key].region.nameRu ? ` ${local[key].region.nameRu},` : ''
3755
- } ${checkForNull(local[key].regionType.nameRu)} ${checkForNull(local[key].city.nameRu)},${local[key].square ? ` квартал ${local[key].square},` : ''}${local[key].microdistrict ? ` мкр ${local[key].microdistrict},` : ''
3756
- } ул. ${checkForNull(local[key].street)}, д. ${checkForNull(local[key].houseNumber)}`;
3763
+ const address = `${checkForNull(local[key].country.nameRu)}, ${checkForNull(local[key].state.nameRu)},${
3764
+ local[key].region.nameRu ? ` ${local[key].region.nameRu},` : ''
3765
+ } ${checkForNull(local[key].regionType.nameRu)} ${checkForNull(local[key].city.nameRu)},${local[key].square ? ` квартал ${local[key].square},` : ''}${
3766
+ local[key].microdistrict ? ` мкр ${local[key].microdistrict},` : ''
3767
+ } ул. ${checkForNull(local[key].street)}, д. ${checkForNull(local[key].houseNumber)}`;
3757
3768
  local[key].longName = address;
3758
3769
  local[key].longNameKz = address;
3759
3770
  }
@@ -4288,7 +4299,7 @@ export const useDataStore = defineStore('data', {
4288
4299
  }
4289
4300
  },
4290
4301
  hasJobSection(whichForm: keyof typeof StoreMembers) {
4291
- if (this.isLifetrip || this.isPension || this.isBalam || this.isTumar) return false;
4302
+ if (this.isLifetrip || this.isPension || this.isBalam || this.isBorrower || this.isTumar) return false;
4292
4303
  switch (whichForm) {
4293
4304
  case this.formStore.beneficiaryFormKey:
4294
4305
  case this.formStore.beneficialOwnerFormKey:
@@ -4318,6 +4329,7 @@ export const useDataStore = defineStore('data', {
4318
4329
  if (!this.isPension || Number(this.formStore.applicationData.processCode) === 24) return false;
4319
4330
  switch (whichForm) {
4320
4331
  case 'beneficiaryForm':
4332
+ case 'policyholdersRepresentativeForm':
4321
4333
  return false;
4322
4334
  default:
4323
4335
  return true;
package/store/rules.ts CHANGED
@@ -250,6 +250,24 @@ export const rules = {
250
250
  }
251
251
  },
252
252
  ],
253
+ checkPastOrToday: [
254
+ (v: any) => {
255
+ const today = new Date();
256
+ today.setHours(0, 0, 0, 0);
257
+ const selectedDate = new Date(formatDate(v)!);
258
+ selectedDate.setHours(0, 0, 0, 0);
259
+ return selectedDate <= today || t('rules.checkDate');
260
+ },
261
+ ],
262
+ checkTodayOrFuture: [
263
+ (v: any) => {
264
+ const today = new Date();
265
+ today.setHours(0, 0, 0, 0);
266
+ const selectedDate = new Date(formatDate(v)!);
267
+ selectedDate.setHours(0, 0, 0, 0);
268
+ return selectedDate >= today || t('rules.checkDate');
269
+ },
270
+ ],
253
271
  twoDayBeforeTodayDate: [
254
272
  (v: any) => {
255
273
  const now = new Date();
@@ -304,4 +322,16 @@ export const rules = {
304
322
  }
305
323
  return t('rules.lengthLimit', { len: limit });
306
324
  },
325
+ validateAfterContractDate(v: any, date: any) {
326
+ const parseDate = (str: string): Date => {
327
+ const [day, month, year] = str.split('.');
328
+ return new Date(Number(year), Number(month) - 1, Number(day));
329
+ };
330
+ const inputDate = parseDate(v);
331
+ const limitDate = parseDate(date);
332
+ if (inputDate < limitDate) {
333
+ return t('rules.validateAfterContractDate');
334
+ }
335
+ return true;
336
+ },
307
337
  };
package/types/enum.ts CHANGED
@@ -125,7 +125,8 @@ export enum Roles {
125
125
  URAP = 'URAP',
126
126
  TravelAgent = 'TravelAgent',
127
127
  HR = 'HR',
128
- UsnsHead = 'UsnsHead',
128
+ NotAccumulativeSanctionerUSNS = 'NotAccumulativeSanctionerUSNS',
129
+ ReInsurer = 'ReInsurer'
129
130
  }
130
131
 
131
132
  export enum Statuses {
package/types/index.ts CHANGED
@@ -32,6 +32,7 @@ export type Projects =
32
32
  | 'lka-auletti'
33
33
  | 'prepensionannuity'
34
34
  | 'balam'
35
+ | 'borrower'
35
36
  | 'criticalillness'
36
37
  | 'tumar';
37
38
  export type MemberKeys = keyof ReturnType<typeof useFormStore>;