hl-core 0.0.10-beta.60 → 0.0.10-beta.62

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
@@ -369,6 +369,10 @@ export class ApiClass {
369
369
  });
370
370
  }
371
371
 
372
+ async getMainParts() {
373
+ return this.axiosCall<Types.BpmMenuItem[]>({ method: Methods.GET, url: '/Arm/api/Bpm/MenuItem' });
374
+ }
375
+
372
376
  async getProcessHistory(id: string) {
373
377
  return await this.axiosCall<Types.TaskHistory[]>({
374
378
  method: Methods.GET,
@@ -497,6 +501,13 @@ export class ApiClass {
497
501
  url: `/${this.productUrl}/api/Application/IsRecalculate?processInstanceId=${id}`,
498
502
  });
499
503
  }
504
+
505
+ async availableToAccureStartEducationalCapital(id: string | number) {
506
+ return await this.axiosCall<boolean>({
507
+ method: Methods.GET,
508
+ url: `/${this.productUrl}/api/Application/AvailableToAccureStartEducationalCapital?processInstanceId=${id}`,
509
+ });
510
+ }
500
511
  async checkCurrencyDate(id: string | number) {
501
512
  return await this.axiosCall<boolean>({
502
513
  method: Methods.GET,
@@ -1312,7 +1323,7 @@ export class ApiClass {
1312
1323
  data: data,
1313
1324
  });
1314
1325
  },
1315
- getSignedDocList: async (data: { processInstanceId: string | number }) => {
1326
+ getSignedDocList: async (data: { processInstanceId: string | number | undefined }) => {
1316
1327
  return await this.axiosCall<IDocument[]>({
1317
1328
  method: Methods.POST,
1318
1329
  url: `${this.file.base}/api/Data/List`,
@@ -2140,7 +2140,7 @@ export default {
2140
2140
  searchQuery.value = '';
2141
2141
  }
2142
2142
  });
2143
- if (dataStore.isLifetrip) {
2143
+ if (dataStore.isLifetrip && whichForm.value === 'insuredForm') {
2144
2144
  watch(
2145
2145
  () => member.value.age,
2146
2146
  val => {
@@ -121,6 +121,14 @@
121
121
  @append="openPanel($dataStore.t('productConditionsForm.riskGroup'), $dataStore.riskGroup, 'riskGroup')"
122
122
  />
123
123
  </base-form-section>
124
+ <base-form-section v-if="hasEduCapitalConsent">
125
+ <base-form-toggle
126
+ v-model="productConditionsForm.accureStartEducationCapital"
127
+ :disabled="isDisabled"
128
+ :has-border="false"
129
+ :title="$dataStore.t('form.educationFundConsent')"
130
+ />
131
+ </base-form-section>
124
132
  <base-form-section v-if="hasDefault" :title="defaultText">
125
133
  <div v-if="isCalculator && ($route.params.taskId === '0' || $dataStore.isCalculator || fromIndexPage)">
126
134
  <base-form-input
@@ -1041,6 +1049,7 @@ export default defineComponent({
1041
1049
  const amountRefunded = ref<string | number | null>(null);
1042
1050
  const amountPaid = ref<string | number | null>(null);
1043
1051
  const deletionDialog = ref<boolean>(false);
1052
+ const hasEduCapitalConsent = ref<boolean>(false);
1044
1053
 
1045
1054
  const additionalTerms = ref<AddCover[]>([]);
1046
1055
 
@@ -1091,7 +1100,7 @@ export default defineComponent({
1091
1100
  return disabilityGroup;
1092
1101
  }
1093
1102
  });
1094
- const enpfNoteFile = computed(() => formStore.signedDocumentList.find(i => i.fileTypeCode === '8'));
1103
+ const enpfNoteFile = computed(() => formStore.signedDocumentList.find(i => i.fileTypeCode === '8' && i.iin === contragentData.value?.iin));
1095
1104
  const isEnpfSum = pensionForm.value?.isEnpfSum ?? false;
1096
1105
 
1097
1106
  const transferContracts = ref<TransferContract[]>([]);
@@ -2317,10 +2326,13 @@ export default defineComponent({
2317
2326
  if (file.type !== constants.fileTypes.pdf) {
2318
2327
  return dataStore.showToaster('error', dataStore.t('toaster.onlyPDF'), 6000);
2319
2328
  }
2320
- const result = await dataStore.setOppvCount({ file });
2329
+ const result = await dataStore.setOppvCount(
2330
+ { file },
2331
+ isSlavePensionForm.value ? formStore.applicationData.slave.processInstanceId : formStore.applicationData.processInstanceId,
2332
+ );
2321
2333
  if (typeof result === 'number') {
2322
2334
  pensionForm.value.compulsoryProfMonthCount = result;
2323
- await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
2335
+ await dataStore.getSignedDocList(formStore.applicationData.processInstanceId, formStore.applicationData.slave?.processInstanceId);
2324
2336
  dataStore.showToaster('success', dataStore.t('toaster.successOperation'));
2325
2337
  }
2326
2338
  }
@@ -2353,7 +2365,7 @@ export default defineComponent({
2353
2365
  dataStore.rightPanel.open = false;
2354
2366
  dataStore.panelAction = null;
2355
2367
  pensionForm.value.compulsoryProfMonthCount = '';
2356
- await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
2368
+ await dataStore.getSignedDocList(formStore.applicationData.processInstanceId, formStore.applicationData.slave?.processInstanceId);
2357
2369
  }
2358
2370
  };
2359
2371
 
@@ -2430,6 +2442,9 @@ export default defineComponent({
2430
2442
  }, 0),
2431
2443
  );
2432
2444
  }
2445
+ if (whichProduct.value === 'gons') {
2446
+ hasEduCapitalConsent.value = await dataStore.api.availableToAccureStartEducationalCapital(formStore.applicationData.processInstanceId);
2447
+ }
2433
2448
  if (whichProduct.value === 'pensionannuitynew') {
2434
2449
  contractDate.value = reformatDate(pensionForm.value.contractDate ?? '');
2435
2450
  dateOfBegin.value = reformatDate(pensionForm.value.dateOfBegin);
@@ -2667,6 +2682,7 @@ export default defineComponent({
2667
2682
  amountPaid,
2668
2683
  amountRefunded,
2669
2684
  transferMaxDate,
2685
+ hasEduCapitalConsent,
2670
2686
  guaranteedPeriodList,
2671
2687
  isFileActionsPanelOpen,
2672
2688
  isEnpfSum,
@@ -545,8 +545,7 @@ export default defineComponent({
545
545
  if (dataStore.isPension) {
546
546
  if (formStore.applicationData.pensionApp) {
547
547
  const isOnlineEnpfAgreement = formStore.applicationData.pensionApp.isOnlineEnpfAgreement;
548
- isOnlineEnpf.value = isOnlineEnpfAgreement === null ? true : isOnlineEnpfAgreement;
549
- await dataStore.getSignedDocList(formStore.applicationData.processInstanceId);
548
+ isOnlineEnpf.value = formStore.hasRepresentative ? false : true;
550
549
  }
551
550
  }
552
551
  };
@@ -833,6 +833,7 @@ export class ProductConditions {
833
833
  calcDate: string | null;
834
834
  contractEndDate: string | null;
835
835
  currency: Value;
836
+ accureStartEducationCapital: boolean;
836
837
 
837
838
  constructor(
838
839
  insuranceCase = null,
@@ -883,6 +884,7 @@ export class ProductConditions {
883
884
  calcDate = null,
884
885
  contractEndDate = null,
885
886
  currency = new Value(),
887
+ accureStartEducationCapital = false,
886
888
  ) {
887
889
  this.requestedSumInsuredInDollar = null;
888
890
  this.insurancePremiumPerMonthInDollar = null;
@@ -937,6 +939,7 @@ export class ProductConditions {
937
939
  this.calcDate = calcDate;
938
940
  this.contractEndDate = contractEndDate;
939
941
  this.currency = currency;
942
+ this.accureStartEducationCapital = accureStartEducationCapital;
940
943
  }
941
944
 
942
945
  getSingleTripDays() {
@@ -27,6 +27,7 @@ export const constants = Object.freeze({
27
27
  gonsadd: 26,
28
28
  tumar: 27,
29
29
  criticalillness: 29,
30
+ gonsaddsec: 49,
30
31
  },
31
32
  amlProducts: {
32
33
  checkcontragent: 1,
@@ -816,8 +816,8 @@ export class RoleController {
816
816
  const hasAccessByProduct = (() => {
817
817
  const product = productFromExternal as Projects;
818
818
  if (dataStore.isLifetrip || product === 'lifetrip') return this.isBranchDirector() || this.isTravelAgent();
819
- if (dataStore.isPension || product === 'pensionannuitynew') return this.isBranchDirector() || this.isExecutor();
820
- if (dataStore.isLifeBusiness || product === 'lifebusiness') return this.isHeadManager() || this.isBranchDirector();
819
+ if (dataStore.isPension || product === 'pensionannuitynew') return this.isBranchDirector() || this.isExecutor() || this.isRegionDirector();
820
+ if (dataStore.isLifeBusiness || product === 'lifebusiness') return this.isHeadManager() || this.isBranchDirector() || this.isRegionDirector();
821
821
  if (dataStore.isCritical || product === 'criticalillness') return this.isBranchDirector();
822
822
  return false;
823
823
  })();
@@ -849,6 +849,7 @@ export class RoleController {
849
849
  isSupervisor = () => this.isRole(constants.roles.Supervisor);
850
850
  isHeadManager = () => this.isRole(constants.roles.HeadManager);
851
851
  isBranchDirector = () => this.isRole(constants.roles.BranchDirector);
852
+ isRegionDirector = () => this.isRole(constants.roles.RegionDirector);
852
853
  isUSNSACCINS = () => this.isRole(constants.roles.USNSACCINS);
853
854
  isDsuio = () => this.isRole(constants.roles.Dsuio);
854
855
  isHeadDso = () => this.isRole(constants.roles.HEADDSO);
@@ -922,6 +923,7 @@ export class RoleController {
922
923
  this.isJurist() ||
923
924
  this.isAccountant() ||
924
925
  this.isBranchDirector() ||
926
+ this.isRegionDirector() ||
925
927
  this.isUSNSACCINS() ||
926
928
  this.isDsuio() ||
927
929
  this.isAdjuster() ||
package/locales/kz.json CHANGED
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "error": {
23
23
  "title": "Қате 404",
24
- "description": "Сіз сұраған бет жоқ немесе ескірген.",
24
+ "description": "Сіз сұраған бет жоқ немесе ескірген",
25
25
  "connectionLost": "Интернет байланысы жоқ",
26
26
  "checkConnection": "Байланысты тексеріңіз",
27
27
  "noOtpResponse": "OTP кодын жіберген кезде жауап жоқ",
@@ -167,7 +167,7 @@
167
167
  "deleteAML": "Алып тасталсын",
168
168
  "deleteRelative": "Туысын алып тастау",
169
169
  "editRelative": "Туысқанды өзгерту",
170
- "userLogin": "Кіру",
170
+ "userLogin": "Логин",
171
171
  "password": "Пароль",
172
172
  "login": "Жүйеге кіру",
173
173
  "exit": "Шығу",
@@ -759,12 +759,12 @@
759
759
  "premiumSum": "Сыйлықақы сомасы",
760
760
  "department": "Департамент",
761
761
  "fromDate": "Бастап күні",
762
- "toDate": "БҚ күні",
762
+ "toDate": "Аяқталған күні",
763
763
  "newVersion": "Жаңа нұсқа",
764
764
  "code": "Код",
765
765
  "codes": "Кодтар",
766
766
  "listType": "Тізім түрі",
767
- "editDate": "Түзету күні",
767
+ "editDate": "Өзгертілген күні",
768
768
  "addDate": "Қосылған күні",
769
769
  "type": "Түрі",
770
770
  "number": "Нөмір",
@@ -877,25 +877,25 @@
877
877
  "password": "Пароль"
878
878
  },
879
879
  "rules": {
880
- "required": "Өріс міндетті",
880
+ "required": "Толтыру міндетті",
881
881
  "fileRequired": "Файл міндетті",
882
- "cyrillic": "Өрісте тек кириллица таңбалары болуы керек",
883
- "latin": "Жолақта тек латын таңбалары болуы керек",
884
- "email": "Қате электрондық пошта мекенжайы",
885
- "numbers": "Өрісте тек сандар болуы керек",
886
- "latinAndNumber": "Жолақта тек сандар мен латын таңбалары болуы керек",
887
- "latinNumberSymbol": "Өріс тек сандар мен латын әріптерін, таңбаларды(/,-) қамтуы керек",
888
- "numbersSymbols": "Жолақта сандар болуы керек",
889
- "ageExceeds": "Бір жыл 50 жылдан аспауы керек",
882
+ "cyrillic": "Тек кириллица таңбалары болуы керек",
883
+ "latin": "Тек латын таңбалары болуы керек",
884
+ "email": "Қате электрондық пошта",
885
+ "numbers": "Тек сандар болуы керек",
886
+ "latinAndNumber": "Тек сандар мен латын таңбалары болуы керек",
887
+ "latinNumberSymbol": "Тек сандар мен латын әріптерін, таңбаларды(/,-) қамтуы керек",
888
+ "numbersSymbols": "Сандар болуы керек",
889
+ "ageExceeds": "Жасы 50 жастан аспауы керек",
890
890
  "ageExceeds80": "Жасы 80 жастан аспауы керек",
891
891
  "age18": "Контрагент кәмелетке толған болуы керек",
892
- "sums": "Өрісте тек сандар болуы керек",
892
+ "sums": "Тек сандар болуы керек",
893
893
  "iinRight": "ЖСН/БСН 12 цифрдан тұруы тиіс",
894
- "onlySymbols": "Өрісте нөмір болмауы керек",
894
+ "onlySymbols": "Нөмір болмауы керек",
895
895
  "phoneFormat": "Телефон нөмірі 11 нөмірден тұруы керек",
896
896
  "date": "Күннің форматы дұрыс емес",
897
- "age": "Өріс тек сан болуы керек",
898
- "exceedDate": "Күн бүгінгі күннен аспауы керек",
897
+ "age": "Тек сан болуы керек",
898
+ "exceedDate": "Дата бүгінгі күннен аспауы керек",
899
899
  "coverPeriod": "Сақтандырудың ең төменгі мерзімі 5 жыл",
900
900
  "fillData": "Мәліметтерді толтырыңыз",
901
901
  "requestedSumInsuredMycar": "Максималды сома 60 миллионнан аспауы керек",
@@ -906,7 +906,7 @@
906
906
  "guaranteedPeriodLimit": "Кепілдендірілген мерзім аннуитеттік төлемдер мерзімінен аспауы керек",
907
907
  "noResidentOffline": "Резидент еместі оффлайн рәсімдеу үшін филиалға хабарласыңыз",
908
908
  "calculationPreliminary": "Есептеу алдын ала. Барлық қажетті деректерді толтыру қажет",
909
- "planDate": "Күн бүгінгі күннен асуы керек",
909
+ "planDate": "Дата бүгінгі күннен асуы керек",
910
910
  "iik": "ЖСК 20 таңбадан тұруы керек",
911
911
  "dataInPast": "Құжаттың қолданылу мерзімі аяқталды",
912
912
  "agentCommission": "Агенттік комиссия 50-ден аспауы тиіс",
@@ -914,7 +914,7 @@
914
914
  "checkDate": "Дұрыс күнді көрсетіңіз",
915
915
  "searchQueryLen": "Лауазымды іздеу кем дегенде {len} таңбаларының сұранысы бойынша жүргізілуі керек",
916
916
  "fixInsSumLimit": "Тіркелген сома {sum}теңгеден аспауы тиіс",
917
- "invalidKazakhPassport": "Неверный номер паспорта",
917
+ "invalidKazakhPassport": "Паспорт нөмері дұрыс емес",
918
918
  "lengthLimit": "Таңбалар шегі асып кетті. Ұзындығы {len} таңбадан аспайтын мәтінді енгізіңіз"
919
919
  },
920
920
  "code": "КЭС",
@@ -1055,7 +1055,8 @@
1055
1055
  "individualOwnerData": "ЖК иесінің деректері",
1056
1056
  "chooseChild": "Баланы таңдаңыз",
1057
1057
  "addChild": "Баланы қосу",
1058
- "addBeneficiary": "Бенефициарды қосу"
1058
+ "addBeneficiary": "Бенефициарды қосу",
1059
+ "educationFundConsent": "Бастапқы білім беру капиталының есептелуіне келісемін"
1059
1060
  },
1060
1061
  "bankDetailsForm": {
1061
1062
  "title": "Банктік деректемелер",
package/locales/ru.json CHANGED
@@ -872,7 +872,8 @@
872
872
  "searchType": "Тип поиска",
873
873
  "eventType": "Тип СС",
874
874
  "eventDate": "Дата СС",
875
- "typePolicyholder": "Тип страхователя"
875
+ "typePolicyholder": "Тип страхователя",
876
+ "efoMenuItems": "Основные разделы ЕФО"
876
877
  },
877
878
  "placeholders": {
878
879
  "login": "Логин",
@@ -1060,7 +1061,8 @@
1060
1061
  "individualOwnerData": "Данные владельца ИП",
1061
1062
  "chooseChild": "Выберите ребёнка",
1062
1063
  "addChild": "Добавить ребёнка",
1063
- "addBeneficiary": "Добавить выгодоприобретателя"
1064
+ "addBeneficiary": "Добавить выгодоприобретателя",
1065
+ "educationFundConsent": "Согласен на начисление стартового образовательного капитала",
1064
1066
  },
1065
1067
  "bankDetailsForm": {
1066
1068
  "title": "Банковские реквизиты",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.60",
3
+ "version": "0.0.10-beta.62",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -1146,6 +1146,7 @@ export const useDataStore = defineStore('data', {
1146
1146
  if (isNaN(String(this.formStore.productConditionsForm.insurancePremiumPerMonth).replace(/\s/g, ''))) {
1147
1147
  conditionsData.policyAppDto.premium = parseFloat(String(this.formStore.productConditionsForm.insurancePremiumPerMonth).replace(/\s/g, '').replace(',', '.'));
1148
1148
  }
1149
+ conditionsData.policyAppDto.accureStartEducationCapital = this.formStore.productConditionsForm.accureStartEducationCapital;
1149
1150
  }
1150
1151
  if (this.isLiferenta) {
1151
1152
  conditionsData.policyAppDto.guaranteedPaymentPeriod = this.formStore.productConditionsForm.guaranteedPeriod || 0;
@@ -2125,10 +2126,10 @@ export const useDataStore = defineStore('data', {
2125
2126
  this.isLoading = false;
2126
2127
  }
2127
2128
  },
2128
- async setOppvCount(data: any) {
2129
+ async setOppvCount(data: any, processInstanceId: string) {
2129
2130
  this.isLoading = true;
2130
2131
  try {
2131
- const response = await this.api.pensionannuityNew.setOppvCount(this.formStore.applicationData.processInstanceId as string, data);
2132
+ const response = await this.api.pensionannuityNew.setOppvCount(processInstanceId, data);
2132
2133
  if (response.oppvCount === 0 && response.errocCode !== 0) {
2133
2134
  return ErrorHandler(response.errorMsg);
2134
2135
  } else {
@@ -2520,6 +2521,7 @@ export const useDataStore = defineStore('data', {
2520
2521
  this.formStore.productConditionsForm.statePremium7 = this.getNumberWithSpaces(govPremiums.statePremium7 === null ? null : govPremiums.statePremium7);
2521
2522
  const currency = constants.currencyList.find(item => item.code === applicationData.policyAppDto.currency);
2522
2523
  this.formStore.productConditionsForm.currency = currency ? currency : new Value();
2524
+ this.formStore.productConditionsForm.accureStartEducationCapital = applicationData.policyAppDto.accureStartEducationCapital;
2523
2525
  }
2524
2526
 
2525
2527
  if (this.isKazyna || this.isGons) {
@@ -3084,15 +3086,17 @@ export const useDataStore = defineStore('data', {
3084
3086
  this.isLoading = false;
3085
3087
  }
3086
3088
  },
3087
- async getSignedDocList(processInstanceId: string | number) {
3088
- if (processInstanceId !== 0) {
3089
- try {
3090
- this.formStore.signedDocumentList = await this.api.file.getSignedDocList({
3091
- processInstanceId: processInstanceId,
3092
- });
3093
- } catch (err) {
3094
- console.log(err);
3089
+ async getSignedDocList(...processInstanceIds: (string | number | undefined)[]) {
3090
+ const validIds = processInstanceIds.filter(id => id && id !== 0);
3091
+ try {
3092
+ for (const id of validIds) {
3093
+ const result = await this.api.file.getSignedDocList({ processInstanceId: id });
3094
+ const existingIds = new Set(this.formStore.signedDocumentList.map(doc => doc.id));
3095
+ const newDocs = result.filter(doc => !existingIds.has(doc.id));
3096
+ this.formStore.signedDocumentList.push(...newDocs);
3095
3097
  }
3098
+ } catch (err) {
3099
+ console.log(err);
3096
3100
  }
3097
3101
  },
3098
3102
  setFormsDisabled(isDisabled: boolean) {
package/types/enum.ts CHANGED
@@ -108,6 +108,7 @@ export enum Roles {
108
108
  USNSsanctioner = 'USNSsanctioner',
109
109
  Accountant = 'Accountant',
110
110
  BranchDirector = 'BranchDirector',
111
+ RegionDirector = 'RegionDirector',
111
112
  USNSACCINS = 'USNSACCINS',
112
113
  Dsuio = 'Dsuio',
113
114
  HEADDSO = 'HEADDSO',
package/types/index.ts CHANGED
@@ -124,6 +124,17 @@ export type Item = {
124
124
  itemName: string;
125
125
  };
126
126
 
127
+ export type BpmMenuItem = {
128
+ itemCode: string;
129
+ nameRu: string;
130
+ nameKz: string | null;
131
+ descrition: string;
132
+ order: number;
133
+ path: string | null;
134
+ icon: string | null;
135
+ hasChildren: boolean;
136
+ };
137
+
127
138
  export type AnketaBody = {
128
139
  first: EachAnketa;
129
140
  second: AnketaSecond[] | null;
@@ -574,6 +585,7 @@ export type PolicyAppDto = {
574
585
  agentCommission?: number | null;
575
586
  calcDate?: string;
576
587
  mainPremiumWithCommission?: number;
588
+ accureStartEducationCapital?: boolean;
577
589
  };
578
590
 
579
591
  export type InsisWorkDataApp = {