hl-core 0.0.10-beta.52 → 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;
@@ -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,6 +887,7 @@ 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:
890
892
  this.isUsns() ||
891
893
  this.isDsuio() ||
@@ -935,6 +937,7 @@ export class RoleController {
935
937
  this.isTravelAgent() ||
936
938
  this.isHR() ||
937
939
  this.isNotAccumulativeSanctionerUSNS() ||
940
+ this.isReInsurer() ||
938
941
  baseAccessRoles,
939
942
  };
940
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.52",
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),
@@ -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') {
@@ -4290,7 +4299,7 @@ export const useDataStore = defineStore('data', {
4290
4299
  }
4291
4300
  },
4292
4301
  hasJobSection(whichForm: keyof typeof StoreMembers) {
4293
- 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;
4294
4303
  switch (whichForm) {
4295
4304
  case this.formStore.beneficiaryFormKey:
4296
4305
  case this.formStore.beneficialOwnerFormKey:
@@ -4320,6 +4329,7 @@ export const useDataStore = defineStore('data', {
4320
4329
  if (!this.isPension || Number(this.formStore.applicationData.processCode) === 24) return false;
4321
4330
  switch (whichForm) {
4322
4331
  case 'beneficiaryForm':
4332
+ case 'policyholdersRepresentativeForm':
4323
4333
  return false;
4324
4334
  default:
4325
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
@@ -126,6 +126,7 @@ export enum Roles {
126
126
  TravelAgent = 'TravelAgent',
127
127
  HR = 'HR',
128
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>;