hl-core 0.0.9-beta.34 → 0.0.9-beta.36

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/base.api.ts CHANGED
@@ -690,14 +690,14 @@ export class ApiClass {
690
690
  }
691
691
 
692
692
  async getTripInsuredAmount(data: getTripInsuredAmountRequest) {
693
- return this.axiosCall<TripInsuranceAmount>({
693
+ return await this.axiosCall<TripInsuranceAmount>({
694
694
  method: Methods.POST,
695
695
  url: `/${this.productUrl}/api/Application/InsuranceAmountOptions`,
696
696
  data: data,
697
697
  });
698
698
  }
699
699
  async downloadTemplate(fileType: number) {
700
- return this.axiosCall({
700
+ return await this.axiosCall({
701
701
  method: Methods.GET,
702
702
  url: `/${this.productUrl}/api/Application/DownloadTemplate?fileType=${fileType}`,
703
703
  responseType: 'arraybuffer',
@@ -705,7 +705,7 @@ export class ApiClass {
705
705
  }
706
706
 
707
707
  async sendTemplateToEmail(email: string) {
708
- return this.axiosCall({
708
+ return await this.axiosCall({
709
709
  method: Methods.GET,
710
710
  url: `/${this.productUrl}/api/Application/SendTemplateToEmail?emailTo=${email}`,
711
711
  });
@@ -782,8 +782,8 @@ export class ApiClass {
782
782
  });
783
783
  }
784
784
 
785
- async getClientData(clientId: string) {
786
- return this.axiosCall({
785
+ async getClientData<T>(clientId: string) {
786
+ return await this.axiosCall<T>({
787
787
  method: Methods.GET,
788
788
  url: `/${this.productUrl}/api/Application/GetClientData`,
789
789
  params: {
@@ -792,18 +792,18 @@ export class ApiClass {
792
792
  });
793
793
  }
794
794
 
795
- async getInsuredData(insuredId: string) {
796
- return this.axiosCall({
795
+ async getInsuredData<T>(insuredId: string) {
796
+ return await this.axiosCall<T>({
797
797
  method: Methods.GET,
798
- url: `/${this.productUrl}/api/Application/GetClientData`,
798
+ url: `/${this.productUrl}/api/Application/GetInsuredData`,
799
799
  params: {
800
800
  insuredId,
801
801
  },
802
802
  });
803
803
  }
804
804
 
805
- async getBeneficiaryData(beneficiaryId: string) {
806
- return this.axiosCall({
805
+ async getBeneficiaryData<T>(beneficiaryId: string) {
806
+ return await this.axiosCall<T>({
807
807
  method: Methods.GET,
808
808
  url: `/${this.productUrl}/api/Application/GetBeneficiaryData`,
809
809
  params: {
@@ -812,47 +812,73 @@ export class ApiClass {
812
812
  });
813
813
  }
814
814
 
815
- async saveClientData(clientId: string) {
816
- return this.axiosCall({
815
+ async getBeneficialOwnerData<T>(beneficiaryId: string) {
816
+ return await this.axiosCall<T>({
817
+ method: Methods.GET,
818
+ url: `/${this.productUrl}/api/Application/GetBeneficialOwnerData`,
819
+ params: {
820
+ beneficiaryId,
821
+ },
822
+ });
823
+ }
824
+
825
+ async saveClientData<T>(clientId: string, data: T) {
826
+ return await this.axiosCall({
817
827
  method: Methods.POST,
818
828
  url: `/${this.productUrl}/api/Application/SaveClient`,
819
829
  params: {
820
830
  clientId,
821
831
  },
832
+ data: data,
822
833
  });
823
834
  }
824
835
 
825
- async saveInsuredData(processInstanceId: string, insuredId: string) {
826
- return this.axiosCall({
836
+ async saveInsuredData<T>(processInstanceId: string, insuredId: string, data: T) {
837
+ return await this.axiosCall({
827
838
  method: Methods.POST,
828
839
  url: `/${this.productUrl}/api/Application/SaveInsured`,
829
840
  params: {
830
841
  processInstanceId,
831
842
  insuredId,
832
843
  },
844
+ data: data,
833
845
  });
834
846
  }
835
847
 
836
- async saveBeneficiaryData(processInstanceId: string, benificiaryId: string) {
837
- return this.axiosCall({
848
+ async saveBeneficiaryData<T>(processInstanceId: string, benificiaryId: string, data: T) {
849
+ return await this.axiosCall({
838
850
  method: Methods.POST,
839
851
  url: `/${this.productUrl}/api/Application/SaveBenificiary`,
840
852
  params: {
841
853
  processInstanceId,
842
854
  benificiaryId,
843
855
  },
856
+ data: data,
857
+ });
858
+ }
859
+
860
+ async saveBeneficialOwnerData<T>(processInstanceId: string, benificiaryId: string, data: T) {
861
+ return await this.axiosCall({
862
+ method: Methods.POST,
863
+ url: `/${this.productUrl}/api/Application/SaveBeneficialOwner`,
864
+ params: {
865
+ processInstanceId,
866
+ benificiaryId,
867
+ },
868
+ data: data,
844
869
  });
845
870
  }
846
871
 
847
- async setApplicationData() {
848
- return this.axiosCall({
872
+ async setApplicationData(data: SetApplicationRequest) {
873
+ return await this.axiosCall({
849
874
  method: Methods.POST,
850
875
  url: `/${this.productUrl}/api/Application/SetApplicationData`,
876
+ data: data,
851
877
  });
852
878
  }
853
879
 
854
880
  async calculate(processInstanceId: string) {
855
- return this.axiosCall({
881
+ return await this.axiosCall({
856
882
  method: Methods.POST,
857
883
  url: `/${this.productUrl}/api/Application/Calculator`,
858
884
  params: {
@@ -12,7 +12,7 @@
12
12
  v-for="(item, index) of panelList.filter(i => i.nameRu && (i.nameRu as string).match(new RegExp(searchQuery, 'i')))"
13
13
  :key="index"
14
14
  :text="(item.nameRu as string)"
15
- :selected="item.nameRu === panelValue.nameRu"
15
+ :selected="item.nameRu === panelValue"
16
16
  @click="pickPanelValue(item)"
17
17
  />
18
18
  </div>
@@ -35,7 +35,7 @@ export default defineComponent({
35
35
  setup() {
36
36
  const dataStore = useDataStore();
37
37
  const isPanelOpen = ref<boolean>(false);
38
- const panelValue = ref<Value>(new Value());
38
+ const panelValue = ref<any>(new Value());
39
39
  const panelList = ref<Value[]>([]);
40
40
  const isPanelLoading = ref<boolean>(false);
41
41
  const searchQuery = ref<string>('');
@@ -80,6 +80,7 @@ export default defineComponent({
80
80
  isPanelOpen.value = true;
81
81
  dataStore.rightPanel.open = true;
82
82
  dataStore.rightPanel.title = dataStore.t(listOfPanelTitles[field.fetchFrom]);
83
+ panelValue.value = field.modelValue;
83
84
  panelList.value = (await dataStore[field.fetchFrom]()) as Value[];
84
85
  isPanelLoading.value = false;
85
86
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="h-[74px] !pl-2 md:!pl-5 flex items-center justify-start gap-4"
3
+ class="min-h-[74px] !pl-2 md:!pl-5 flex items-center justify-start gap-5"
4
4
  :class="[$styles.whiteBg, hasBorder ? 'border-[1px] rounded-lg' : 'border-b-[1px] border-b-[#f3f6fc] rounded']"
5
5
  >
6
6
  <v-switch
@@ -14,8 +14,10 @@
14
14
  hide-details
15
15
  :disabled="disabled"
16
16
  />
17
- <p :class="[$styles.textSimple]">{{ `${title}` }}</p>
18
- <p class="mr-3" :class="[modelValue ? $styles.greenText : '', $styles.textSimple]">{{ `${modelValue ? $dataStore.t('confirm.yes') : $dataStore.t('confirm.no')}` }}</p>
17
+ <p class="p-2" :class="[$styles.textSimple]">{{ `${title}` }}</p>
18
+ <p v-if="showValue" class="mr-3" :class="[modelValue ? $styles.greenText : '', $styles.textSimple]">
19
+ {{ `${modelValue ? $dataStore.t('confirm.yes') : $dataStore.t('confirm.no')}` }}
20
+ </p>
19
21
  </div>
20
22
  </template>
21
23
 
@@ -38,6 +40,10 @@ export default defineComponent({
38
40
  type: Boolean,
39
41
  default: true,
40
42
  },
43
+ showValue: {
44
+ type: Boolean,
45
+ default: true,
46
+ },
41
47
  },
42
48
  emits: ['update:modelValue', 'clicked'],
43
49
  });
@@ -375,6 +375,10 @@ export default defineComponent({
375
375
  await onInit();
376
376
  });
377
377
 
378
+ onUnmounted(() => {
379
+ dataStore.abortRequests();
380
+ });
381
+
378
382
  watch(
379
383
  () => dataStore.rightPanel.open,
380
384
  () => {
@@ -513,7 +513,7 @@
513
513
  :clearable="!isDisabled"
514
514
  :rules="whichForm === formStore.beneficiaryFormKey || member.isInsuredUnderage ? [] : $rules.phoneFormat"
515
515
  />
516
- <base-form-input v-model.trim="member.email" :label="$dataStore.t('form.email')" :rules="$rules.email" />
516
+ <base-form-input v-model.trim="member.email" :label="$dataStore.t('form.email')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.email" />
517
517
  </base-form-section>
518
518
  </v-form>
519
519
  <base-btn v-if="showSaveButton" :loading="isButtonLoading || isSubmittingForm" :text="$dataStore.t('buttons.save')" @click="submitForm" />
@@ -457,10 +457,10 @@
457
457
  :value="term.coverSumName"
458
458
  :readonly="isTermsDisabled"
459
459
  :clearable="false"
460
- :label="term.coverTypeName"
460
+ :label="coverTypeName(term)"
461
461
  append-inner-icon="mdi mdi-chevron-right"
462
462
  :suffix="!!term.amount ? `${formatTermValue(term.amount)} ${currencySymbolsAddTerm}` : ''"
463
- @append="openTermPanel(term.coverTypeName, $dataStore.getAdditionalInsuranceTermsAnswers, term.coverTypeId, index)"
463
+ @append="openTermPanel(coverTypeName(term), $dataStore.getAdditionalInsuranceTermsAnswers, term.coverTypeId, index)"
464
464
  />
465
465
  </div>
466
466
  </base-form-section>
@@ -1198,6 +1198,14 @@ export default defineComponent({
1198
1198
  }
1199
1199
  return true;
1200
1200
  };
1201
+
1202
+ const coverTypeName = (term: AddCover) => {
1203
+ if (whichProduct.value === 'lifebusiness') {
1204
+ return String(term.coverTypeNameRu);
1205
+ }
1206
+ return term.coverTypeName;
1207
+ };
1208
+
1201
1209
  const submitForm = async () => {
1202
1210
  vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
1203
1211
  if (v.valid) {
@@ -1557,6 +1565,7 @@ export default defineComponent({
1557
1565
  pickfixInsValue,
1558
1566
  openFixInsPanel,
1559
1567
  pickCoverPeriodValue,
1568
+ coverTypeName,
1560
1569
  };
1561
1570
  },
1562
1571
  });
@@ -4,6 +4,7 @@ import interceptors from '../api/interceptors';
4
4
  export const useAxiosInstance = (baseURL: string) => {
5
5
  const axiosInstance = axios.create({
6
6
  baseURL: baseURL,
7
+ signal: useDataStore().rController.signal,
7
8
  });
8
9
  interceptors(axiosInstance);
9
10
 
@@ -576,7 +576,7 @@ export class Member extends Person {
576
576
  this.isDisability = isDisability;
577
577
  this.disabilityGroup = disabilityGroupId;
578
578
  this.percentageOfPayoutAmount = percentageOfPayoutAmount;
579
- this._cyrPattern = /[\u0400-\u04FF]+/;
579
+ this._cyrPattern = /[\u0400-\u04FF -]+/;
580
580
  this._numPattern = /[0-9]+/;
581
581
  this._phonePattern = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
582
582
  this._emailPattern = /.+@.+\..+/;
@@ -1230,7 +1230,13 @@ export class FormStoreClass {
1230
1230
  signedContractFormData: any;
1231
1231
  lfb: {
1232
1232
  clients: ClientV2[];
1233
- policyholder: MemberV2;
1233
+ policyholder: {
1234
+ isIpdl: boolean;
1235
+ clientData: {
1236
+ company: MemberV2;
1237
+ authoritedPerson: MemberV2;
1238
+ };
1239
+ };
1234
1240
  hasAccidentIncidents: boolean;
1235
1241
  accidentIncidents: AccidentIncidents[];
1236
1242
  policyholderActivities: PolicyholderActivity[];
@@ -1336,7 +1342,13 @@ export class FormStoreClass {
1336
1342
  this.signedContractFormData = null;
1337
1343
  this.lfb = {
1338
1344
  clients: [],
1339
- policyholder: new MemberV2(),
1345
+ policyholder: {
1346
+ isIpdl: false,
1347
+ clientData: {
1348
+ company: new MemberV2(),
1349
+ authoritedPerson: new MemberV2(),
1350
+ },
1351
+ },
1340
1352
  hasAccidentIncidents: true,
1341
1353
  policyholderActivities: [new PolicyholderActivity()],
1342
1354
  beneficialOwners: [new BeneficialOwner()],
@@ -1433,15 +1445,19 @@ export class FormStoreClass {
1433
1445
  export class MemberV2 {
1434
1446
  iin: string | null;
1435
1447
  phoneNumber: string | null;
1436
- firstName: string | null;
1437
- middleName: string | null;
1438
- lastName: string | null;
1448
+ firstName?: string | null;
1449
+ middleName?: string | null;
1450
+ lastName?: string | null;
1451
+ name?: string | null;
1452
+ longName?: string | null;
1453
+ nameKz?: string | null;
1454
+ longNameKz?: string | null;
1439
1455
  citizenship: Value;
1440
1456
  email: string | null;
1441
1457
  resident: Value;
1442
1458
  taxResidentCountry: Value;
1443
1459
  economySectorCode: Value;
1444
- isPublicPerson: boolean;
1460
+ isActualAddressEqualLegalAddres: boolean;
1445
1461
  identityDocument?: {
1446
1462
  documentType: Value;
1447
1463
  documentNumber: string | null;
@@ -1456,7 +1472,7 @@ export class MemberV2 {
1456
1472
  bik: string | null;
1457
1473
  kbe: string | null;
1458
1474
  };
1459
- workDetails: {
1475
+ workDetails?: {
1460
1476
  workplace: string | null;
1461
1477
  position: string | null;
1462
1478
  jobDuties: string | null;
@@ -1466,26 +1482,14 @@ export class MemberV2 {
1466
1482
  documentNumber: string | null;
1467
1483
  date: string | null;
1468
1484
  };
1469
- organizationInfo: {
1470
- bin: string | null;
1471
- organizationName: string | null;
1472
- kbe: string | null;
1473
- resident: Value;
1474
- taxResidentCountry: Value;
1475
- economySectorCode: Value;
1476
- typeOfEconomicActivity: string | null;
1477
- organizationPhone: string | null;
1478
- organizationEmail: string | null;
1479
- organizationInternetResource: string | null;
1480
- organizationStartDate: string | null;
1481
- isActualAddressEqualLegalAddres: boolean;
1482
- organizationLegalAddress: Address;
1483
- organizationActualAddress: Address;
1484
- activityTypes: {
1485
- activityTypeName: string | null;
1486
- empoloyeeCount: number | null;
1487
- }[];
1488
- };
1485
+ kbe: string | null;
1486
+ typeOfEconomicActivity: string | null;
1487
+ legalAddress: Address;
1488
+ actualAddress: Address;
1489
+ activityTypes: {
1490
+ activityTypeName: string | null;
1491
+ empoloyeeCount: number | null;
1492
+ }[];
1489
1493
  isLeader?: boolean;
1490
1494
  beneficalOwnerQuest?: {
1491
1495
  order: number;
@@ -1498,12 +1502,16 @@ export class MemberV2 {
1498
1502
  this.firstName = null;
1499
1503
  this.middleName = null;
1500
1504
  this.lastName = null;
1505
+ this.name = null;
1506
+ this.longName = null;
1507
+ this.nameKz = null;
1508
+ this.longNameKz = null;
1501
1509
  this.citizenship = new Value();
1502
1510
  this.email = null;
1503
1511
  this.resident = new Value();
1504
1512
  this.taxResidentCountry = new Value();
1505
1513
  this.economySectorCode = new Value();
1506
- this.isPublicPerson = false;
1514
+ this.isActualAddressEqualLegalAddres = true;
1507
1515
  this.identityDocument = {
1508
1516
  documentType: new Value(),
1509
1517
  documentNumber: null,
@@ -1528,28 +1536,16 @@ export class MemberV2 {
1528
1536
  documentNumber: null,
1529
1537
  date: null,
1530
1538
  };
1531
- this.organizationInfo = {
1532
- bin: null,
1533
- organizationName: null,
1534
- kbe: null,
1535
- resident: new Value(),
1536
- taxResidentCountry: new Value(),
1537
- economySectorCode: new Value(),
1538
- typeOfEconomicActivity: null,
1539
- organizationPhone: null,
1540
- organizationEmail: null,
1541
- organizationInternetResource: null,
1542
- organizationStartDate: null,
1543
- isActualAddressEqualLegalAddres: true,
1544
- organizationLegalAddress: new Address(),
1545
- organizationActualAddress: new Address(),
1546
- activityTypes: [
1547
- {
1548
- activityTypeName: null,
1549
- empoloyeeCount: null,
1550
- },
1551
- ],
1552
- };
1539
+ this.kbe = null;
1540
+ this.typeOfEconomicActivity = null;
1541
+ this.legalAddress = new Address();
1542
+ this.actualAddress = new Address();
1543
+ this.activityTypes = [
1544
+ {
1545
+ activityTypeName: null,
1546
+ empoloyeeCount: null,
1547
+ },
1548
+ ];
1553
1549
  this.isLeader = false;
1554
1550
  this.beneficalOwnerQuest = [
1555
1551
  {
@@ -1630,7 +1626,7 @@ export class BeneficialOwner {
1630
1626
  this.insisId = 0;
1631
1627
  this.iin = null;
1632
1628
  this.longName = null;
1633
- this.isIpdl = true;
1629
+ this.isIpdl = false;
1634
1630
  this.isTerror = true;
1635
1631
  this.isIpdlCompliance = true;
1636
1632
  this.isTerrorCompliance = true;
@@ -2,6 +2,7 @@ import { Actions, PostActions, Roles, Statuses } from '../types/enum';
2
2
 
3
3
  export const constants = Object.freeze({
4
4
  products: {
5
+ pensionannuity: 1,
5
6
  baiterek: 3,
6
7
  halykmycar: 5,
7
8
  lifetrip: 7,
@@ -18,7 +19,7 @@ export const constants = Object.freeze({
18
19
  checkcontract: 2,
19
20
  },
20
21
  extractedProducts: ['dso', 'uu'],
21
- editableStatuses: [Statuses.StartForm, Statuses.EditBeneficiaryForm, Statuses.EditForm],
22
+ editableStatuses: [Statuses.StartForm, Statuses.EditBeneficiaryForm, Statuses.EditForm, Statuses.InputDataForm],
22
23
  documentsLinkVisibleStatuses: [
23
24
  Statuses.DocumentsSignedFrom,
24
25
  Statuses.UnderwriterForm,
@@ -26,13 +27,22 @@ export const constants = Object.freeze({
26
27
  Statuses.Completed,
27
28
  Statuses.InsurancePremiumOnlinePaid,
28
29
  ],
29
- returnStatementStatuses: [Statuses.DocumentsSignedFrom, Statuses.ContractSignedFrom, Statuses.WaitingInsurancePremiumForm, Statuses.UnderwriterForm],
30
+ returnStatementStatuses: [
31
+ Statuses.DocumentsSignedFrom,
32
+ Statuses.DocumentsSignedClientFrom,
33
+ Statuses.ContractSignedFrom,
34
+ Statuses.WaitingInsurancePremiumForm,
35
+ Statuses.UnderwriterForm,
36
+ Statuses.InputDataForm,
37
+ ],
30
38
  cancelApplicationStatuses: [
31
39
  Statuses.StartForm,
32
40
  Statuses.EditForm,
33
41
  Statuses.EditBeneficiaryForm,
34
42
  Statuses.WaitingInsurancePremiumForm,
35
43
  Statuses.DocumentsSignedFrom,
44
+ Statuses.DocumentsSignedClientFrom,
45
+ Statuses.InputDataForm,
36
46
  Statuses.ContractSignedFrom,
37
47
  ],
38
48
  gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
package/locales/ru.json CHANGED
@@ -146,6 +146,7 @@
146
146
  "createStatement": "Создать заявку",
147
147
  "add": "Добавить",
148
148
  "addRelative": "Добавить родственника",
149
+ "addRiskPoint": "Добавить уровень риска",
149
150
  "deleteAML": "Исключить",
150
151
  "deleteRelative": "Исключить родственника",
151
152
  "editRelative": "Изменить родственника",
@@ -478,7 +479,14 @@
478
479
  "contracts": "Контракты",
479
480
  "contragents": "Контрагенты",
480
481
  "stateRegistrationDate": "Дата государственной регистрации",
481
- "numberRegistration": "Номер государственной регистрации"
482
+ "numberRegistration": "Номер государственной регистрации",
483
+ "id": "ID",
484
+ "sum": "Минимальная сумма",
485
+ "changes": "Кол-во изменений",
486
+ "termDays": "Срок договора в днях",
487
+ "termYears": "Срок договора в годах",
488
+ "notResident": "Не резидент",
489
+ "uploadExcel": "Загрузить excel файл"
482
490
  },
483
491
  "agent": {
484
492
  "currency": "Валюта",
@@ -750,7 +758,8 @@
750
758
  "noResidentOffline": "Обратитесь в филиал для оффлайн оформления нерезидента",
751
759
  "calculationPreliminary": "Расчет предварительный. Требуется заполнить все необходимые данные",
752
760
  "planDate": "Дата должна превышать сегодняшнюю дату",
753
- "iik": "ИИК должен состоять из 20 символов"
761
+ "iik": "ИИК должен состоять из 20 символов",
762
+ "dataInPast": "Указанная дата осталась в прошлом"
754
763
  },
755
764
  "code": "КЭС",
756
765
  "fontSize": "Размер шрифта",
@@ -888,7 +897,8 @@
888
897
  "clients": {
889
898
  "listInsured": "Список Застрахованных",
890
899
  "templateInsured": "Шаблон для заполнения данных Застрахованных",
891
- "sendListToFill": "Отправить список Страхователю для заполнения",
900
+ "sendListToFill": "Скачать или Отправить список Страхователю для заполнения",
901
+ "sendDeclarationToFill": "Скачать или Отправить декларацию Страхователю для заполнения",
892
902
  "completedListInsured": "Заполненный список Застрахованных",
893
903
  "selectInsSum": "Выберите страховую сумму",
894
904
  "isPolicyholderBeneficialOwner": "Является ли Страхователь Бенефициарным собственником",
@@ -902,6 +912,7 @@
902
912
  "documentsBeneficialOwner": "Документы Бенефициарного собственника",
903
913
  "coveragePeriod": "Период покрытия",
904
914
  "attachScansSignDocs": "Вложить сканы подписанных документов",
915
+ "declarationHealthInsured": "Декларация о здоровье Застрахованных",
905
916
  "form": {
906
917
  "calculation": "Расчеты",
907
918
  "paymentAmount": "Размер выплаты",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.9-beta.34",
3
+ "version": "0.0.9-beta.36",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -28,8 +28,8 @@
28
28
  "dev": "nuxt dev",
29
29
  "generate": "nuxt generate",
30
30
  "preview": "nuxt preview",
31
- "tk:all": "cd .. && cd amuletlife && yarn typecheck && cd .. && cd baiterek && yarn typecheck && cd .. && cd bolashak && yarn typecheck && cd .. && cd calculator && yarn typecheck && cd .. && cd daskamkorlyk && yarn typecheck && cd .. && cd efo && yarn typecheck && cd .. && cd gons && yarn typecheck && cd .. && cd kazyna && yarn typecheck && cd .. && cd lifebusiness && yarn typecheck && cd .. && cd liferenta && yarn typecheck && cd .. && cd lifetrip && yarn typecheck && cd .. && cd core",
32
- "i:all": "cd .. && cd amuletlife && yarn && cd .. && cd baiterek && yarn && cd .. && cd bolashak && yarn && cd .. && cd calculator && yarn && cd .. && cd daskamkorlyk && yarn && cd .. && cd efo && yarn && cd .. && cd gons && yarn && cd .. && cd kazyna && yarn && cd .. && cd lifebusiness && yarn && cd .. && cd liferenta && yarn && cd .. && cd lifetrip && yarn && cd .. && cd core",
31
+ "tk:all": "cd .. && cd amuletlife && yarn typecheck && cd .. && cd baiterek && yarn typecheck && cd .. && cd bolashak && yarn typecheck && cd .. && cd calculator && yarn typecheck && cd .. && cd daskamkorlyk && yarn typecheck && cd .. && cd efo && yarn typecheck && cd .. && cd gons && yarn typecheck && cd .. && cd kazyna && yarn typecheck && cd .. && cd lifebusiness && yarn typecheck && cd .. && cd liferenta && yarn typecheck && cd .. && cd lifetrip && yarn typecheck && cd .. && cd pensionannuity && yarn typecheck && cd .. && cd core",
32
+ "i:all": "cd .. && cd amuletlife && yarn && cd .. && cd baiterek && yarn && cd .. && cd bolashak && yarn && cd .. && cd calculator && yarn && cd .. && cd daskamkorlyk && yarn && cd .. && cd efo && yarn && cd .. && cd gons && yarn && cd .. && cd kazyna && yarn && cd .. && cd lifebusiness && yarn && cd .. && cd liferenta && yarn && cd .. && cd lifetrip && yarn && cd .. && cd pensionannuity && yarn && cd .. && cd core",
33
33
  "update:core": "git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main",
34
34
  "update:aml": "cd ../../aml/aml && yarn && cd ../checkcontract && yarn && cd ../checkcontragent && yarn && cd.. && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd ../efo/core",
35
35
  "update:lka": "cd .. && cd lka && yarn && git checkout -b %npm_package_version% && git add . && git commit -m \"%npm_package_version%\" && git push && git checkout main && cd .. && cd core",
@@ -22,6 +22,7 @@ export const useDataStore = defineStore('data', {
22
22
  formStore: useFormStore(),
23
23
  // contragent: useContragentStore(),
24
24
  api: new ApiClass(),
25
+ rController: new AbortController(),
25
26
  yearEnding: (year: number) => yearEnding(year, constants.yearTitles, constants.yearCases),
26
27
  currentDate: () => new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1),
27
28
  showToaster: (type: 'success' | 'error' | 'warning' | 'info', msg: string, timeout?: number) =>
@@ -45,6 +46,7 @@ export const useDataStore = defineStore('data', {
45
46
  isGons: state => state.product === 'gons',
46
47
  isKazyna: state => state.product === 'halykkazyna',
47
48
  isDas: state => state.product === 'daskamkorlyk',
49
+ isPension: state => state.product === 'pensionannuity',
48
50
  isAmulet: state => state.product === 'amuletlife',
49
51
  isCalculator: state => state.product === 'calculator',
50
52
  isCheckContract: state => state.product === 'checkcontract',
@@ -77,6 +79,14 @@ export const useDataStore = defineStore('data', {
77
79
  childFrame.contentWindow.postMessage({ action: action, value: value }, '*');
78
80
  }
79
81
  },
82
+ abortRequests() {
83
+ try {
84
+ this.rController.abort();
85
+ this.rController = new AbortController();
86
+ } catch (err) {
87
+ console.log(err);
88
+ }
89
+ },
80
90
  async copyToClipboard(text: unknown) {
81
91
  if (typeof text === 'string' || typeof text === 'number') {
82
92
  if (navigator.clipboard && window.isSecureContext) {
@@ -206,6 +216,9 @@ export const useDataStore = defineStore('data', {
206
216
  isSupervisor() {
207
217
  return this.isRole(constants.roles.Supervisor);
208
218
  },
219
+ isHeadManager() {
220
+ return this.isRole(constants.roles.HeadManager);
221
+ },
209
222
  isProcessEditable(statusCode?: keyof typeof Statuses) {
210
223
  const getEditibleStatuses = () => {
211
224
  const defaultStatuses = constants.editableStatuses;
@@ -1232,31 +1245,80 @@ export const useDataStore = defineStore('data', {
1232
1245
  async getAdditionalTaxCountries() {
1233
1246
  return await this.getFromApi('addTaxCountries', 'getAdditionalTaxCountries');
1234
1247
  },
1235
- async getStates(key?: string, member?: Member) {
1248
+ async getStates(key?: string, member?: Member, keys?: { key?: string; deepKey?: string; subDeepKey?: string }) {
1236
1249
  await this.getFromApi('states', 'getStates');
1237
- //@ts-ignore
1238
- if (key && member[key] && member[key].ids !== null) return this.states.filter((i: Value) => i.code === member[key].ids);
1250
+ if (!!keys) {
1251
+ if (!!keys.key) {
1252
+ if (!!keys.deepKey) {
1253
+ if (!!keys.subDeepKey) {
1254
+ //@ts-ignore
1255
+ return this.states.filter(i => i.code === member[keys.key][keys.deepKey][keys.subDeepKey].ids);
1256
+ } else {
1257
+ //@ts-ignore
1258
+ return this.states.filter(i => i.code === member[keys.key][keys.deepKey].ids);
1259
+ }
1260
+ } else {
1261
+ //@ts-ignore
1262
+ return this.states.filter(i => i.code === member[keys.key].ids);
1263
+ }
1264
+ }
1265
+ } else {
1266
+ //@ts-ignore
1267
+ if (key && member[key] && member[key].ids !== null) return this.states.filter((i: Value) => i.code === member[key].ids);
1268
+ }
1239
1269
  return this.states;
1240
1270
  },
1241
- async getRegions(key?: string, member?: Member) {
1271
+ async getRegions(key?: string, member?: Member, keys?: { key?: string; deepKey?: string; subDeepKey?: string }) {
1242
1272
  await this.getFromApi('regions', 'getRegions');
1243
- //@ts-ignore
1244
- if (key && member[key] && member[key].ids !== null) return this.regions.filter((i: Value) => i.code === member[key].ids);
1245
- if (member && member.registrationProvince.ids !== null) {
1246
- return this.regions.filter((i: Value) => i.code === member.registrationProvince.ids);
1273
+ if (!!keys) {
1274
+ if (!!keys.key) {
1275
+ if (!!keys.deepKey) {
1276
+ if (!!keys.subDeepKey) {
1277
+ //@ts-ignore
1278
+ return this.regions.filter(i => i.code === member[keys.key][keys.deepKey][keys.subDeepKey].ids);
1279
+ } else {
1280
+ //@ts-ignore
1281
+ return this.regions.filter(i => i.code === member[keys.key][keys.deepKey].ids);
1282
+ }
1283
+ } else {
1284
+ //@ts-ignore
1285
+ return this.regions.filter(i => i.code === member[keys.key].ids);
1286
+ }
1287
+ }
1247
1288
  } else {
1248
- return this.regions;
1289
+ //@ts-ignore
1290
+ if (key && member[key] && member[key].ids !== null) return this.regions.filter((i: Value) => i.code === member[key].ids);
1291
+ if (member && member.registrationProvince.ids !== null) {
1292
+ return this.regions.filter((i: Value) => i.code === member.registrationProvince.ids);
1293
+ }
1249
1294
  }
1295
+ return this.regions;
1250
1296
  },
1251
- async getCities(key?: string, member?: Member) {
1297
+ async getCities(key?: string, member?: Member, keys?: { key?: string; deepKey?: string; subDeepKey?: string }) {
1252
1298
  await this.getFromApi('cities', 'getCities');
1253
- //@ts-ignore
1254
- if (key && member[key] && member[key].ids !== null) return this.cities.filter((i: Value) => i.code === member[key].ids);
1255
- if (member && member.registrationProvince.ids !== null) {
1256
- return this.cities.filter((i: Value) => i.code === member.registrationProvince.ids);
1299
+ if (!!keys) {
1300
+ if (!!keys.key) {
1301
+ if (!!keys.deepKey) {
1302
+ if (!!keys.subDeepKey) {
1303
+ //@ts-ignore
1304
+ return this.cities.filter(i => i.code === member[keys.key][keys.deepKey][keys.subDeepKey].ids);
1305
+ } else {
1306
+ //@ts-ignore
1307
+ return this.cities.filter(i => i.code === member[keys.key][keys.deepKey].ids);
1308
+ }
1309
+ } else {
1310
+ //@ts-ignore
1311
+ return this.cities.filter(i => i.code === member[keys.key].ids);
1312
+ }
1313
+ }
1257
1314
  } else {
1258
- return this.cities;
1315
+ //@ts-ignore
1316
+ if (key && member[key] && member[key].ids !== null) return this.cities.filter((i: Value) => i.code === member[key].ids);
1317
+ if (member && member.registrationProvince.ids !== null) {
1318
+ return this.cities.filter((i: Value) => i.code === member.registrationProvince.ids);
1319
+ }
1259
1320
  }
1321
+ return this.cities;
1260
1322
  },
1261
1323
  async getCitiesEfo(key?: string, member?: MemberV2, parentKey?: string) {
1262
1324
  if (this.isLifeBusiness) {
@@ -1810,22 +1872,7 @@ export const useDataStore = defineStore('data', {
1810
1872
  async calculatePrice(taskId?: string) {
1811
1873
  this.isLoading = true;
1812
1874
  try {
1813
- const priceForm: {
1814
- processInstanceId?: string | number | null;
1815
- id?: string | null;
1816
- addCoversDto?: AddCover[];
1817
- insuredAmountId?: string | number | null;
1818
- age?: string | number | null;
1819
- lifeTripCountries?: string[] | null;
1820
- tripPurposeId?: string | number | null;
1821
- workTypeId?: string | number | null;
1822
- sportsTypeId?: string | number | null;
1823
- singleTripDays?: number;
1824
- multipleTripMaxDays?: number;
1825
- tripInsurancePeriod?: number;
1826
- startDate?: string | null;
1827
- endDate?: string | null;
1828
- } = {};
1875
+ const priceForm: SetApplicationRequest = {};
1829
1876
  priceForm.insuredAmountId = this.formStore.productConditionsForm.calculatorForm.amount.id;
1830
1877
  priceForm.age = this.formStore.productConditionsForm.calculatorForm.age;
1831
1878
  priceForm.lifeTripCountries = this.formStore.productConditionsForm.calculatorForm.countries!.map(item => item.id as string);
@@ -1906,7 +1953,6 @@ export const useDataStore = defineStore('data', {
1906
1953
  this.formStore.ManagerPolicy.ids = applicationData.insisWorkDataApp.managerPolicy;
1907
1954
  this.formStore.SaleChanellPolicy.nameRu = applicationData.insisWorkDataApp.saleChanellPolicyName;
1908
1955
  this.formStore.SaleChanellPolicy.ids = applicationData.insisWorkDataApp.saleChanellPolicy;
1909
-
1910
1956
  this.formStore.AgentData.fullName = applicationData.insisWorkDataApp.agentName;
1911
1957
  this.formStore.AgentData.agentId = applicationData.insisWorkDataApp.agentId;
1912
1958
 
@@ -3047,8 +3093,8 @@ export const useDataStore = defineStore('data', {
3047
3093
  if (economySectorCode) member.economySectorCode = economySectorCode;
3048
3094
  },
3049
3095
  async startApplicationV2(data: any) {
3050
- const policyholder = data.clientData as MemberV2;
3051
- if (!policyholder.iin) return false;
3096
+ const policyholder = data.clientData;
3097
+ if (!policyholder.authoritedPerson.iin) return false;
3052
3098
  try {
3053
3099
  const response = await this.api.startApplication(data);
3054
3100
  this.sendToParent(constants.postActions.applicationCreated, response.processInstanceId);
@@ -3057,10 +3103,9 @@ export const useDataStore = defineStore('data', {
3057
3103
  return ErrorHandler(err);
3058
3104
  }
3059
3105
  },
3060
- async saveClient(policyholder: MemberV2) {
3106
+ async saveClient(policyholder: any) {
3061
3107
  try {
3062
- this.formStore.applicationData.clientApp.clientData = policyholder;
3063
- await this.api.saveClient(this.formStore.applicationData.processInstanceId, this.formStore.lfb.clientId, this.formStore.applicationData.clientApp);
3108
+ await this.api.saveClient(this.formStore.applicationData.processInstanceId, this.formStore.lfb.clientId, policyholder);
3064
3109
  } catch (err) {
3065
3110
  return ErrorHandler(err);
3066
3111
  }
@@ -3098,18 +3143,21 @@ export const useDataStore = defineStore('data', {
3098
3143
  const clientId = applicationData.clientApp.id;
3099
3144
 
3100
3145
  this.formStore.applicationData.processInstanceId = applicationData.processInstanceId;
3101
- this.formStore.lfb.policyholder = clientData;
3102
- this.formStore.lfb.policyholder.iin = reformatIin(clientData.iin);
3146
+ this.formStore.lfb.policyholder.isIpdl = applicationData.clientApp.isIpdl;
3147
+ this.formStore.lfb.policyholder.clientData.company = clientData;
3148
+ this.formStore.lfb.policyholder.clientData.authoritedPerson = clientData.authoritedPerson;
3149
+ this.formStore.lfb.policyholder.clientData.company.iin = reformatIin(clientData.iin);
3150
+ this.formStore.lfb.policyholder.clientData.authoritedPerson.iin = reformatIin(clientData.authoritedPerson.iin);
3103
3151
  this.formStore.lfb.clientId = clientId;
3104
- this.formStore.lfb.policyholder.authorityDetails.date = reformatDate(clientData.authorityDetails.date);
3152
+ this.formStore.lfb.policyholder.clientData.company.authorityDetails.date = reformatDate(clientData.authorityDetails.date);
3105
3153
 
3106
- if (clientData && clientData.organizationInfo.activityTypes !== null) {
3107
- this.formStore.lfb.policyholderActivities = clientData.organizationInfo.activityTypes;
3154
+ if (clientData && clientData.activityTypes !== null) {
3155
+ this.formStore.lfb.policyholderActivities = clientData.activityTypes;
3108
3156
  }
3109
3157
 
3110
3158
  if (beneficialOwnerApp && beneficialOwnerApp.length) {
3111
3159
  this.formStore.lfb.beneficialOwners = beneficialOwnerApp;
3112
- this.formStore.lfb.isPolicyholderBeneficialOwner = clientData.iin.replace(/-/g, '') === beneficialOwnerApp[0].beneficialOwnerData.iin ? true : false;
3160
+ this.formStore.lfb.isPolicyholderBeneficialOwner = clientData.authoritedPerson.iin.replace(/-/g, '') === beneficialOwnerApp[0].beneficialOwnerData.iin ? true : false;
3113
3161
  this.formStore.lfb.beneficialOwners.forEach(beneficial => {
3114
3162
  beneficial.beneficialOwnerData.identityDocument!.validUntil = reformatDate(beneficial.beneficialOwnerData.identityDocument!.validUntil as string);
3115
3163
  beneficial.beneficialOwnerData.iin = reformatIin(beneficial.beneficialOwnerData.iin as string);
@@ -3270,7 +3318,7 @@ export const useDataStore = defineStore('data', {
3270
3318
  }
3271
3319
  }
3272
3320
 
3273
- if (this.formStore.applicationData.clientApp.clientData.organizationInfo.activityTypes === null) {
3321
+ if (this.formStore.applicationData.clientApp.clientData.activityTypes === null) {
3274
3322
  this.showToaster('error', this.t('toaster.notSavedMember', { text: 'деятельности Страхователя' }), 3000);
3275
3323
  return false;
3276
3324
  }
package/store/rules.ts CHANGED
@@ -48,14 +48,14 @@ export const rules = {
48
48
  return t('rules.required');
49
49
  },
50
50
  ],
51
- cyrillic: [(v: any) => v === null || /^[\u0400-\u04FF ]+$/.test(v) || t('rules.cyrillic')],
51
+ cyrillic: [(v: any) => v === null || /^[\u0400-\u04FF -]+$/.test(v) || t('rules.cyrillic')],
52
52
  latin: [(v: any) => v === null || /^[a-zA-Z]+$/.test(v) || t('rules.latin')],
53
53
  latinAndNumber: [(v: any) => v === null || /^[0-9a-zA-Z]+$/.test(v) || t('rules.latinAndNumber')],
54
54
  cyrillicNonRequired: [
55
55
  (v: any) => {
56
56
  if (!v) return true;
57
57
  else {
58
- return /^[\u0400-\u04FF ]+$/.test(v) || t('rules.cyrillic');
58
+ return /^[\u0400-\u04FF -]+$/.test(v) || t('rules.cyrillic');
59
59
  }
60
60
  },
61
61
  ],
@@ -212,6 +212,17 @@ export const rules = {
212
212
  ],
213
213
  policyholderAgeLimit: [(v: any) => v >= 18 || t('rules.policyholderAgeLimit')],
214
214
  beneficiaryAgeLimit: [(v: any) => v <= 15 || t('rules.beneficiaryAgeLimit')],
215
+ dateInPast: [
216
+ (v: any) => {
217
+ const givenDate = new Date(formatDate(v)!);
218
+ const currentDate = new Date();
219
+ if (givenDate.getTime() < currentDate.getTime()) {
220
+ return t('rules.dataInPast');
221
+ } else {
222
+ return true;
223
+ }
224
+ },
225
+ ],
215
226
  guaranteedPeriodLimit(v: any, termAnnuityPayments: any) {
216
227
  if (Number(v) > Number(termAnnuityPayments)) {
217
228
  return t('rules.guaranteedPeriodLimit');
package/types/enum.ts CHANGED
@@ -52,6 +52,7 @@ export enum Roles {
52
52
  ManagerHalykBank = 'ManagerHalykBank',
53
53
  ServiceManager = 'ServiceManager',
54
54
  DRNSJ = 'DRNSJ',
55
+ HeadManager = 'HeadManager',
55
56
  }
56
57
 
57
58
  export enum Statuses {
@@ -67,6 +68,9 @@ export enum Statuses {
67
68
  WaitingInsurancePremiumForm = 'WaitingInsurancePremiumForm',
68
69
  CheckFinCenterForm = 'CheckFinCenterForm',
69
70
  RegistryFinCenterForm = 'RegistryFinCenterForm',
71
+ DocumentsSignedClientFrom = 'DocumentsSignedClientFrom',
72
+ InputDataForm = 'InputDataForm',
73
+ ApproveForm = 'ApproveForm',
70
74
  }
71
75
 
72
76
  export enum MemberCodes {
package/types/index.ts CHANGED
@@ -24,6 +24,7 @@ declare global {
24
24
  | 'checkcontragent'
25
25
  | 'daskamkorlyk'
26
26
  | 'amuletlife'
27
+ | 'pensionannuity'
27
28
  | 'dso'
28
29
  | 'uu';
29
30
  type MemberKeys = keyof ReturnType<typeof useFormStore>;
@@ -323,6 +324,8 @@ declare global {
323
324
  coverPeriodName?: string;
324
325
  coverPeriodCode?: string;
325
326
  calculatorValue?: number;
327
+ coverTypeNameRu?: string;
328
+ coverTypeNameKz?: string;
326
329
  }
327
330
 
328
331
  type SignUrlType = {
@@ -621,6 +624,64 @@ declare global {
621
624
  tripInsurancePeriod?: number;
622
625
  startDate?: string | null;
623
626
  endDate?: string | null;
627
+ policyId?: number;
628
+ policyNumber?: string;
629
+ contractDate?: string;
630
+ contractEndDate?: string;
631
+ amount?: number;
632
+ premium?: number;
633
+ mainCoverPremium?: number;
634
+ currency?: string;
635
+ isSpokesman?: boolean;
636
+ coverPeriod?: number;
637
+ payPeriod?: number;
638
+ indexRateId?: string;
639
+ indexRateCode?: string;
640
+ indexRateName?: string;
641
+ paymentPeriodId?: string;
642
+ paymentPeriodName?: string;
643
+ lifeMultiply?: number;
644
+ lifeAdditive?: number;
645
+ adbMultiply?: number;
646
+ adbAdditive?: number;
647
+ disabilityMultiply?: number;
648
+ disabilityAdditive?: number;
649
+ documentSignTypeId?: string;
650
+ documentSignTypeCode?: string;
651
+ documentSignTypeName?: string;
652
+ isDocumentsSigned?: boolean;
653
+ paymentTypeId?: string;
654
+ paymentTypeName?: string;
655
+ isPayed?: boolean;
656
+ underwritingType?: number;
657
+ calcDirect?: number;
658
+ tariffId?: string;
659
+ tariffName?: string;
660
+ riskGroup?: number;
661
+ riskGroup2?: number;
662
+ lifeMultiplyClient?: number;
663
+ lifeAdditiveClient?: number;
664
+ annuityTypeId?: string;
665
+ annuityTypeName?: string;
666
+ annuityPaymentPeriodId?: string;
667
+ annuityPaymentPeriodName?: string;
668
+ guaranteedPaymentPeriod?: number;
669
+ paymentPeriod?: number;
670
+ annuityMonthPay?: number;
671
+ annuityPaymentBeginDate?: string;
672
+ annuityPaymentEndDate?: string;
673
+ calcDate?: string;
674
+ guaranteedPaymentBeginDate?: string;
675
+ guaranteedPaymentEndDate?: string;
676
+ annuityPaymentAmount?: number;
677
+ countPay?: number;
678
+ guaranteedPeriod?: number;
679
+ dateFirstPay?: string;
680
+ effectiveAnnualpercentage?: number;
681
+ factorCurrentValueGP?: number;
682
+ alfa?: number;
683
+ gamma?: number;
684
+ mrpPayment?: number;
624
685
  };
625
686
 
626
687
  type KGDResponse = {