hl-core 0.0.10-beta.36 → 0.0.10-beta.38

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
@@ -1039,6 +1039,16 @@ export class ApiClass {
1039
1039
  });
1040
1040
  }
1041
1041
 
1042
+ async getParentApplication(bin: string) {
1043
+ return await this.axiosCall<any>({
1044
+ method: Methods.GET,
1045
+ url: `/${this.productUrl}/api/Application/GetParentApplication`,
1046
+ params: {
1047
+ bin,
1048
+ },
1049
+ });
1050
+ }
1051
+
1042
1052
  pensionannuityNew = {
1043
1053
  base: '/pensionannuityNew',
1044
1054
  getEnpfRedirectUrl: async (id: string) => {
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <v-textarea
3
+ class="form-input"
4
+ :label="label"
5
+ :model-value="modelValue"
6
+ :disabled="disabled"
7
+ :variant="variant"
8
+ :readonly="props.readonly"
9
+ :color="color"
10
+ :rows="rows"
11
+ @update:modelValue="$emit('update:modelValue', $event)"
12
+ auto-grow
13
+ ></v-textarea>
14
+ </template>
15
+
16
+ <script lang="ts">
17
+ import type { InputVariants } from '../../types';
18
+
19
+ export default defineComponent({
20
+ props: {
21
+ modelValue: {
22
+ required: false,
23
+ },
24
+ label: {
25
+ type: String,
26
+ default: '',
27
+ },
28
+ disabled: {
29
+ type: Boolean,
30
+ default: false,
31
+ },
32
+ variant: {
33
+ type: String as PropType<InputVariants>,
34
+ default: 'solo',
35
+ },
36
+ readonly: {
37
+ type: Boolean,
38
+ default: false,
39
+ },
40
+ color: {
41
+ type: String,
42
+ default: '#009c73',
43
+ },
44
+ rows: {
45
+ type: Number,
46
+ default: 5,
47
+ },
48
+ },
49
+ emits: ['update:modelValue'],
50
+
51
+ setup(props, { emit }) {
52
+ return {
53
+ props,
54
+ };
55
+ },
56
+ });
57
+ </script>
58
+
59
+ <style>
60
+ .form-input input:focus {
61
+ border: none !important;
62
+ outline: none !important;
63
+ }
64
+ .form-input .v-field {
65
+ box-shadow: none;
66
+ font-size: 14px;
67
+ }
68
+ .form-input .v-label.v-field-label {
69
+ top: 20px;
70
+ }
71
+ </style>
@@ -422,7 +422,7 @@ export default defineComponent({
422
422
  if (firstQuestionList.value) {
423
423
  if (answerToAll.value) {
424
424
  firstQuestionList.value.forEach((question: AnketaBody, index: number) => {
425
- if (question.first.answerType === 'T') {
425
+ if (question.first.answerType === 'T' || question.first.answerType === 'D') {
426
426
  firstQuestionList.value![index].first.answerName = 'Нет' as AnswerName;
427
427
  }
428
428
  });
@@ -432,7 +432,7 @@ export default defineComponent({
432
432
  }
433
433
  } else {
434
434
  firstQuestionList.value.forEach((question: AnketaBody, index: number) => {
435
- if (question.first.answerType === 'T') {
435
+ if (question.first.answerType === 'T' || question.first.answerType === 'D') {
436
436
  firstQuestionList.value![index].first.answerName = null;
437
437
  }
438
438
  });
@@ -208,7 +208,7 @@
208
208
  v-if="$dataStore.isPension && (whichForm === formStore.insuredFormKey || $route.query.tab === 'slaveInsuredForm')"
209
209
  :title="$dataStore.t('pension.disabilityInfo')"
210
210
  >
211
- <base-form-toggle v-model="member.isDisability" :title="$dataStore.t('pension.ifHasDisability')" :disabled="isDisabled" :has-border="false" />
211
+ <base-form-toggle v-model="member.isDisability" :title="$dataStore.t('pension.ifHasDisabilityAlways')" :disabled="isDisabled" :has-border="false" />
212
212
  <base-animation>
213
213
  <base-panel-input
214
214
  v-if="member.isDisability"
@@ -1676,7 +1676,7 @@ export default {
1676
1676
  });
1677
1677
  if (data.slave)
1678
1678
  pensionKeysWithSpace.forEach(key => {
1679
- if (/\s/g.test(data.slave[key]) === true) data.slave[key] = dataStore.getNumberWithSpaces(data.slave[key]);
1679
+ if (/\s/g.test(data.slave[key]) === true) data.slave[key] = formatSpacedNumber(data.slave[key]);
1680
1680
  });
1681
1681
  const isApplicationSaved = await dataStore.setApplication(data);
1682
1682
  if (!isNewApplication) dataStore.showToaster('info', dataStore.t('toaster.needToRecalculate'), 5000);
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <section class="flex flex-col gap-4 px-[10px]" :class="[$styles.scrollPage]">
2
+ <section v-if="!isLoading" class="flex flex-col gap-4 px-[10px]" :class="[$styles.scrollPage]">
3
3
  <v-form ref="vForm" @submit="submitForm">
4
4
  <base-message-block
5
5
  v-if="isCalculator"
@@ -526,7 +526,7 @@
526
526
  :readonly="isDisabled || formStore.applicationData.processCode !== 25"
527
527
  :label="$dataStore.t('pension.pensionAmount')"
528
528
  />
529
- <base-form-input :value="pensionPayment" :active="true" readonly :label="$dataStore.t('pension.pensionPayment')" />
529
+ <base-form-input :value="$dataStore.getNumberWithSpaces(pensionForm.payment)" :active="true" readonly :label="$dataStore.t('pension.pensionPayment')" />
530
530
  </base-form-section>
531
531
  </section>
532
532
  <base-form-section v-if="hasAnnuityPayments" :title="$dataStore.t('calculationAnnuityPayments')">
@@ -843,6 +843,7 @@
843
843
  </div>
844
844
  </Teleport>
845
845
  </section>
846
+ <div v-if="isLoading" class="w-full h-[80dvh] flex items-center justify-center"><base-loader :size="50" /></div>
846
847
  </template>
847
848
 
848
849
  <script lang="ts">
@@ -882,6 +883,7 @@ export default defineComponent({
882
883
  const isPanelLoading = ref<boolean>(false);
883
884
  const isPanelOpen = ref<boolean>(false);
884
885
  const isTermsPanelOpen = ref<boolean>(false);
886
+ const isLoading = ref<boolean>(false);
885
887
  const panelValue = ref<Value>(new Value());
886
888
  const termValue = ref<AddCover>();
887
889
  const subTermValue = ref<string>('');
@@ -1320,7 +1322,6 @@ export default defineComponent({
1320
1322
  const totalInsPremium = computed(() =>
1321
1323
  dataStore.getNumberWithSpaces(formatSpacedNumber(formStore.pensionApp?.amount) + formatSpacedNumber(formStore.pensionApp.slave?.amount)),
1322
1324
  );
1323
- const pensionPayment = computed(() => dataStore.getNumberWithSpaces(pensionForm.value.payment));
1324
1325
 
1325
1326
  const getContragent = async () => {
1326
1327
  const data = await dataStore.api.getContragentById(
@@ -1920,7 +1921,6 @@ export default defineComponent({
1920
1921
  await dataStore.setApplication(data, true);
1921
1922
  }
1922
1923
  await dataStore.getApplicationData(String(route.params.taskId), false, false, false, true);
1923
- pensionForm.value.payment = formStore.applicationData.pensionApp?.payment ?? 0;
1924
1924
  dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
1925
1925
  } else {
1926
1926
  if (whichSum.value === 'requestedSumInsured') {
@@ -1997,7 +1997,9 @@ export default defineComponent({
1997
1997
  recalculationData.riskGroup = productConditionsForm.riskGroup?.id ? productConditionsForm.riskGroup.id : 1;
1998
1998
  isCalculating.value = true;
1999
1999
  if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
2000
- await dataStore.calculate(route.params.taskId as string);
2000
+ const setApplicationData = dataStore.getConditionsData();
2001
+ const hasSetApplication = await dataStore.setApplication(setApplicationData);
2002
+ if (hasSetApplication) await dataStore.calculate(route.params.taskId as string);
2001
2003
  additionalTerms.value = formStore.additionalInsuranceTerms;
2002
2004
  } else {
2003
2005
  await dataStore.reCalculate(formStore.applicationData.processInstanceId, recalculationData, route.params.taskId as string, whichSum.value);
@@ -2058,92 +2060,99 @@ export default defineComponent({
2058
2060
  };
2059
2061
 
2060
2062
  onMounted(async () => {
2061
- if (hasContragentData.value) await getContragent();
2062
- if (props.isCalculator === true) {
2063
+ try {
2064
+ if (hasContragentData.value) await getContragent();
2065
+ if (props.isCalculator === true) {
2066
+ isLoading.value = true;
2067
+ if (dataStore.isCalculator) {
2068
+ clearFields();
2069
+ }
2070
+ if (whichProduct.value === 'gons') {
2071
+ formStore.isDisabled.productConditionsForm = false;
2072
+ dataStore.setFormsDisabled(false);
2073
+ }
2074
+ if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuitynew') {
2075
+ if (
2076
+ (dataStore.isCalculator || route.params.taskId === '0' || fromIndexPage.value) &&
2077
+ productConditionsForm.requestedSumInsured === null &&
2078
+ productConditionsForm.insurancePremiumPerMonth === null
2079
+ ) {
2080
+ // @ts-ignore
2081
+ const defaultData = await dataStore.getDefaultCalculationData(true, whichProduct.value);
2082
+ if (!defaultData) {
2083
+ dataStore.showToaster('error', 'Отсутствуют базовые данные');
2084
+ return;
2085
+ }
2086
+ formStore.additionalInsuranceTermsWithout = defaultData.addCovers;
2087
+ productConditionsForm.requestedSumInsured = defaultData.amount;
2088
+ productConditionsForm.insurancePremiumPerMonth = defaultData.premium;
2089
+ const indexRate = dataStore.processIndexRate.find(i => i.id === defaultData.indexRateId);
2090
+ if (indexRate) productConditionsForm.processIndexRate = indexRate;
2091
+ const paymendPeriod = dataStore.processPaymentPeriod.find(i => i.id === defaultData.paymentPeriodId);
2092
+ if (paymendPeriod) productConditionsForm.paymentPeriod = paymendPeriod;
2093
+ if (defaultData.signDate) {
2094
+ productConditionsForm.signDate = reformatDate(defaultData.signDate);
2095
+ }
2096
+ if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
2097
+ productConditionsForm.coverPeriod = defaultData.insTermInMonth ?? null;
2098
+ productConditionsForm.insurancePremiumPerMonth = null;
2099
+ }
2100
+ }
2101
+ }
2102
+ }
2103
+ additionalTerms.value = props.isCalculator ? formStore.additionalInsuranceTermsWithout : formStore.additionalInsuranceTerms;
2104
+ if (!!productConditionsForm.insurancePremiumPerMonth) {
2105
+ whichSum.value = 'insurancePremiumPerMonth';
2106
+ }
2107
+ if (!!productConditionsForm.requestedSumInsured) {
2108
+ whichSum.value = 'requestedSumInsured';
2109
+ }
2110
+ if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && !productConditionsForm.requestedSumInsured) {
2111
+ whichSum.value = 'requestedSumInsured';
2112
+ }
2063
2113
  if (dataStore.isCalculator) {
2064
- clearFields();
2114
+ dataStore.processCode = constants.products[whichProduct.value as keyof typeof constants.products];
2115
+ await dataStore.getProcessPaymentPeriod();
2065
2116
  }
2066
- if (whichProduct.value === 'gons') {
2067
- formStore.isDisabled.productConditionsForm = false;
2068
- dataStore.setFormsDisabled(false);
2117
+ if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
2118
+ await dataStore.getCurrencies();
2069
2119
  }
2070
- if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuitynew') {
2071
- if (
2072
- (dataStore.isCalculator || route.params.taskId === '0' || fromIndexPage.value) &&
2073
- productConditionsForm.requestedSumInsured === null &&
2074
- productConditionsForm.insurancePremiumPerMonth === null
2075
- ) {
2076
- // @ts-ignore
2077
- const defaultData = await dataStore.getDefaultCalculationData(true, whichProduct.value);
2078
- if (!defaultData) {
2079
- dataStore.showToaster('error', 'Отсутствуют базовые данные');
2080
- return;
2081
- }
2082
- formStore.additionalInsuranceTermsWithout = defaultData.addCovers;
2083
- productConditionsForm.requestedSumInsured = defaultData.amount;
2084
- productConditionsForm.insurancePremiumPerMonth = defaultData.premium;
2085
- const indexRate = dataStore.processIndexRate.find(i => i.id === defaultData.indexRateId);
2086
- if (indexRate) productConditionsForm.processIndexRate = indexRate;
2087
- const paymendPeriod = dataStore.processPaymentPeriod.find(i => i.id === defaultData.paymentPeriodId);
2088
- if (paymendPeriod) productConditionsForm.paymentPeriod = paymendPeriod;
2089
- if (defaultData.signDate) {
2090
- productConditionsForm.signDate = reformatDate(defaultData.signDate);
2091
- }
2092
- if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
2093
- productConditionsForm.coverPeriod = defaultData.insTermInMonth ?? null;
2094
- productConditionsForm.insurancePremiumPerMonth = null;
2095
- }
2096
- }
2120
+ if (whichProduct.value === 'halykkazyna') {
2121
+ const kazynaPaymentPeriod = dataStore.processPaymentPeriod.find(i => i.code === 'single');
2122
+ if (kazynaPaymentPeriod) productConditionsForm.paymentPeriod = kazynaPaymentPeriod;
2097
2123
  }
2098
- }
2099
- additionalTerms.value = props.isCalculator ? formStore.additionalInsuranceTermsWithout : formStore.additionalInsuranceTerms;
2100
- if (!!productConditionsForm.insurancePremiumPerMonth) {
2101
- whichSum.value = 'insurancePremiumPerMonth';
2102
- }
2103
- if (!!productConditionsForm.requestedSumInsured) {
2104
- whichSum.value = 'requestedSumInsured';
2105
- }
2106
- if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && !productConditionsForm.requestedSumInsured) {
2107
- whichSum.value = 'requestedSumInsured';
2108
- }
2109
- if (dataStore.isCalculator) {
2110
- dataStore.processCode = constants.products[whichProduct.value as keyof typeof constants.products];
2111
- await dataStore.getProcessPaymentPeriod();
2112
- }
2113
- if (whichProduct.value === 'halykkazyna' || whichProduct.value === 'gons') {
2114
- await dataStore.getCurrencies();
2115
- }
2116
- if (whichProduct.value === 'halykkazyna') {
2117
- const kazynaPaymentPeriod = dataStore.processPaymentPeriod.find(i => i.code === 'single');
2118
- if (kazynaPaymentPeriod) productConditionsForm.paymentPeriod = kazynaPaymentPeriod;
2119
- }
2120
- if (!formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
2121
- productConditionsForm.requestedSumInsured = dataStore.getNumberWithSpaces(
2122
- formStore.lfb.clients.reduce((sum: number, i: any) => {
2123
- return sum + Number(i.insSum);
2124
- }, 0),
2125
- );
2126
- }
2127
- if (whichProduct.value === 'pensionannuitynew') {
2128
- contractDate.value = reformatDate(pensionForm.value.contractDate ?? '');
2129
- dateOfBegin.value = reformatDate(pensionForm.value.dateOfBegin);
2130
- transferContractDate.value = reformatDate(pensionForm.value.transferContractDate);
2131
- transferContractFirstPaymentDate.value = reformatDate(pensionForm.value.transferContractFirstPaymentDate ?? '');
2132
- maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 19);
2133
- if (!transferContracts.value.length && pensionForm.value.transferContracts && pensionForm.value.transferContracts.length) {
2134
- pensionForm.value.transferContracts.forEach((contract: TransferContract) => {
2135
- transferContracts.value.push({
2136
- ...contract,
2137
- transferContractDate: constants.regex.isoDate.test(contract.transferContractDate) ? reformatDate(contract.transferContractDate)! : contract.transferContractDate,
2138
- transferContractFirstPaymentDate: constants.regex.isoDate.test(contract.transferContractFirstPaymentDate)
2139
- ? reformatDate(contract.transferContractFirstPaymentDate)!
2140
- : contract.transferContractFirstPaymentDate,
2141
- transferContractCompany:
2142
- typeof contract.transferContractCompany === 'string' ? ({ nameRu: contract.transferContractCompany } as any) : contract.transferContractCompany,
2143
- transferContractAmount: dataStore.getNumberWithSpaces(contract.transferContractAmount) ?? '',
2124
+ if (!formStore.lfb.add && (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns')) {
2125
+ productConditionsForm.requestedSumInsured = dataStore.getNumberWithSpaces(
2126
+ formStore.lfb.clients.reduce((sum: number, i: any) => {
2127
+ return sum + Number(i.insSum);
2128
+ }, 0),
2129
+ );
2130
+ }
2131
+ if (whichProduct.value === 'pensionannuitynew') {
2132
+ contractDate.value = reformatDate(pensionForm.value.contractDate ?? '');
2133
+ dateOfBegin.value = reformatDate(pensionForm.value.dateOfBegin);
2134
+ transferContractDate.value = reformatDate(pensionForm.value.transferContractDate);
2135
+ transferContractFirstPaymentDate.value = reformatDate(pensionForm.value.transferContractFirstPaymentDate ?? '');
2136
+ maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 19);
2137
+ if (!transferContracts.value.length && pensionForm.value.transferContracts && pensionForm.value.transferContracts.length) {
2138
+ pensionForm.value.transferContracts.forEach((contract: TransferContract) => {
2139
+ transferContracts.value.push({
2140
+ ...contract,
2141
+ transferContractDate: constants.regex.isoDate.test(contract.transferContractDate) ? reformatDate(contract.transferContractDate)! : contract.transferContractDate,
2142
+ transferContractFirstPaymentDate: constants.regex.isoDate.test(contract.transferContractFirstPaymentDate)
2143
+ ? reformatDate(contract.transferContractFirstPaymentDate)!
2144
+ : contract.transferContractFirstPaymentDate,
2145
+ transferContractCompany:
2146
+ typeof contract.transferContractCompany === 'string' ? ({ nameRu: contract.transferContractCompany } as any) : contract.transferContractCompany,
2147
+ transferContractAmount: dataStore.getNumberWithSpaces(contract.transferContractAmount) ?? '',
2148
+ });
2144
2149
  });
2145
- });
2150
+ }
2146
2151
  }
2152
+ } catch (err) {
2153
+ console.log(err);
2154
+ } finally {
2155
+ isLoading.value = false;
2147
2156
  }
2148
2157
  });
2149
2158
 
@@ -2310,6 +2319,7 @@ export default defineComponent({
2310
2319
  // State
2311
2320
  formStore,
2312
2321
  vForm,
2322
+ isLoading,
2313
2323
  whichProduct,
2314
2324
  productConditionsForm,
2315
2325
  additionalTerms,
@@ -2350,7 +2360,6 @@ export default defineComponent({
2350
2360
  // Computed
2351
2361
  isTask,
2352
2362
  isDisabled,
2353
- pensionPayment,
2354
2363
  disabilityGroup,
2355
2364
  totalInsPremium,
2356
2365
  isTermsDisabled,
@@ -58,7 +58,7 @@
58
58
  <base-file-input :label="$dataStore.t('labels.attachPowerOfAttorney')" @input.prevent="onFileChangeScans($event, 'attorney')" @onClear="onClearFile('attorney')" />
59
59
  </base-form-section>
60
60
  </div>
61
- <base-btn :text="$dataStore.t('buttons.sign')" :loading="$dataStore.isButtonsLoading" @click="isNewSign ? sendFilesNew() : sendFiles()" />
61
+ <base-btn :text="$dataStore.t('buttons.sign')" :loading="$dataStore.isButtonsLoading || loading" @click="isNewSign ? sendFilesNew() : sendFiles()" />
62
62
  <base-btn :text="$dataStore.t('buttons.cancel')" :btn="$styles.whiteBtn" @click="isScansDocuments = false" />
63
63
  </div>
64
64
  <div v-if="isQr" :class="[$styles.flexColNav]">
@@ -123,7 +123,7 @@
123
123
  </section>
124
124
  <section v-if="choosePayActions">
125
125
  <div v-if="!isEpayPay && !isOfflinePay" :class="[$styles.flexColNav]">
126
- <base-btn :text="$dataStore.t('buttons.payEpay')" :loading="loading" @click="handlePayAction('epay')" />
126
+ <base-btn v-if="hasEpayPay" :text="$dataStore.t('buttons.payEpay')" :loading="loading" @click="handlePayAction('epay')" />
127
127
  <base-btn :text="$dataStore.t('buttons.payOffline')" :loading="loading" @click="handlePayAction('offline')" />
128
128
  </div>
129
129
  <div v-if="isOfflinePay" :class="[$styles.flexColNav]">
@@ -449,6 +449,7 @@ export default defineComponent({
449
449
  };
450
450
 
451
451
  const sendFiles = async () => {
452
+ loading.value = true;
452
453
  if (scansFiles.value.length !== 4) {
453
454
  dataStore.showToaster('warning', dataStore.t('toaster.notAllDocumentsAttached'));
454
455
  return;
@@ -462,6 +463,7 @@ export default defineComponent({
462
463
  closePanel();
463
464
  dataStore.showToaster('success', dataStore.t('toaster.successOperation'));
464
465
  await dataStore.handleTask(constants.actions.signed, route.params.taskId as string, 'scans');
466
+ loading.value = false;
465
467
  };
466
468
  const submitForm = async () => {
467
469
  await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
@@ -647,6 +649,12 @@ export default defineComponent({
647
649
  const isSignatureDisabled = computed(() => {
648
650
  return true;
649
651
  });
652
+ const hasEpayPay = computed(() => {
653
+ if (dataStore.isLifeBusiness || dataStore.isGns) {
654
+ return false;
655
+ }
656
+ return true;
657
+ });
650
658
  const downloadTemplate = async (documentType: number, fileType: string) => {
651
659
  await dataStore.downloadTemplate(documentType, fileType, formStore.applicationData.processInstanceId);
652
660
  };
@@ -892,14 +900,19 @@ export default defineComponent({
892
900
  isQr.value = true;
893
901
  break;
894
902
  case CoreEnums.Sign.Types.nclayer:
895
- for (let sign of signOptions.value.signIds) {
896
- const response = await dataStore.nclayerSign(sign.id, signType, file[0].fileType === 43);
897
- if (response === null) {
898
- dataStore.showToaster('error', 'Ошибка при подписании документов через NCLayer', 10000);
899
- break;
903
+ for (let each of file.filter((i: any) => i.isSigned !== true)) {
904
+ const signingFile = signOptions.value.signIds.find((i: any) => Number(i.fileType) === Number(each.fileType));
905
+ if (signingFile) {
906
+ const response = await dataStore.nclayerSign(signingFile.id, signType, Number(each.fileType) === 43);
907
+ if (response === null) {
908
+ dataStore.showToaster('error', 'Ошибка при подключении к приложению «NCALayer». Убедитесь, что запустили приложение «NCALayer»', 10000);
909
+ break;
910
+ }
911
+ if (!response) break;
912
+ if (response === true) dataStore.showToaster('success', 'Подписание прошло успешно');
913
+ } else {
914
+ dataStore.showToaster('error', 'Не найдены данные для подписания файла');
900
915
  }
901
- if (!response) break;
902
- if (response === true) dataStore.showToaster('success', 'Подписание прошло успешно');
903
916
  }
904
917
  break;
905
918
  default:
@@ -1003,6 +1016,7 @@ export default defineComponent({
1003
1016
  getFileNew,
1004
1017
  inSigningOrder,
1005
1018
  isNewSign,
1019
+ hasEpayPay,
1006
1020
  };
1007
1021
  },
1008
1022
  });
@@ -1564,6 +1564,7 @@ export class FormStoreClass {
1564
1564
  export class Address {
1565
1565
  country: Value;
1566
1566
  region: Value;
1567
+ state: Value;
1567
1568
  regionType: Value;
1568
1569
  city: Value;
1569
1570
  square: string | null;
@@ -1577,6 +1578,7 @@ export class Address {
1577
1578
  constructor() {
1578
1579
  this.country = new Value();
1579
1580
  this.region = new Value();
1581
+ this.state = new Value();
1580
1582
  this.regionType = new Value();
1581
1583
  this.city = new Value();
1582
1584
  this.square = null;
@@ -806,6 +806,9 @@ export class RoleController {
806
806
  isDsoDirector = () => {
807
807
  return this.isRole(constants.roles.DsoDirector);
808
808
  };
809
+ isArchivist = () => {
810
+ return this.isRole(constants.roles.Archivist);
811
+ };
809
812
  isAccountantDirector = () => {
810
813
  return this.isRole(constants.roles.AccountantDirector);
811
814
  };
@@ -826,7 +829,6 @@ export class RoleController {
826
829
  toUU: this.isServiceManager() || this.isAccountant() || this.isAdjuster() || this.isHeadAdjuster() || baseAccessRoles,
827
830
  toDSO:
828
831
  this.isDsuio() ||
829
- this.isManager() ||
830
832
  this.isActuary() ||
831
833
  this.isHeadOfDso() ||
832
834
  this.isAccountant() ||
package/locales/ru.json CHANGED
@@ -560,6 +560,7 @@
560
560
  "paymentsDate": "Дата начала аннуитетных выплат",
561
561
  "paymentsPeriod": "Период страховых выплат",
562
562
  "ifHasDisability": "Включите, если у Страхователя есть инвалидность",
563
+ "ifHasDisabilityAlways": "Включите, если у Страхователя бессрочная инвалидность",
563
564
  "disabilityInfo": "Данные об инвалидности",
564
565
  "disabilityGroup": "Группа инвалидности",
565
566
  "compulsoryContractAmount": "Обязательные пенсионные взносы, в тенге",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.36",
3
+ "version": "0.0.10-beta.38",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -3,7 +3,7 @@ import { rules } from './rules';
3
3
  import { i18n } from '../configs/i18n';
4
4
  import { Toast, Types as ToastTypes, Positions, ToastOptions } from './toast';
5
5
  import { isValidGUID, yearEnding, jwtDecode, ErrorHandler, getKeyWithPattern, getNumber, getAgeByBirthDate, RoleController, ProcessController, sanitize } from '../composables';
6
- import { DataStoreClass, DocumentItem, Member, Value, CountryValue, PolicyholderActivity, BeneficialOwner, PolicyholderClass } from '../composables/classes';
6
+ import { DataStoreClass, DocumentItem, Member, Value, CountryValue, PolicyholderActivity, BeneficialOwner, PolicyholderClass, GroupMember } from '../composables/classes';
7
7
  import { ApiClass } from '../api';
8
8
  import { useFormStore } from './form.store';
9
9
  import { AxiosError } from 'axios';
@@ -3689,12 +3689,6 @@ export const useDataStore = defineStore('data', {
3689
3689
  this.formStore.applicationData = applicationData;
3690
3690
  this.formStore.regNumber = applicationData.regNumber;
3691
3691
  this.formStore.additionalInsuranceTerms = applicationData.addCoverDto;
3692
-
3693
- if (localStorage.getItem('add') === 'true' || this.formStore.applicationData.parentPolicyDto !== null) {
3694
- this.formStore.lfb.add = true;
3695
- this.formStore.lfb.policyholder.clientData.iin = localStorage.getItem('bin') as string;
3696
- }
3697
-
3698
3692
  this.formStore.canBeClaimed = await this.api.isClaimTask(taskId);
3699
3693
  this.formStore.applicationTaskId = taskId;
3700
3694
  this.formStore.RegionPolicy.nameRu = applicationData.insisWorkDataApp.regionPolicyName;
@@ -3715,17 +3709,8 @@ export const useDataStore = defineStore('data', {
3715
3709
 
3716
3710
  this.formStore.applicationData.processInstanceId = applicationData.processInstanceId;
3717
3711
  this.formStore.lfb.policyholder.isIpdl = applicationData.clientApp.isIpdl;
3718
- this.formStore.lfb.policyholder.clientData = clientData;
3719
- this.formStore.lfb.policyholder.clientData.authoritedPerson = clientData.authoritedPerson;
3720
- this.formStore.lfb.policyholder.clientData.iin = reformatIin(clientData.iin);
3721
- this.formStore.lfb.policyholder.clientData.authoritedPerson.iin = reformatIin(clientData.authoritedPerson.iin);
3722
3712
  this.formStore.lfb.clientId = clientId;
3723
- this.formStore.lfb.policyholder.clientData.authoritedPerson.authorityDetails.date = reformatDate(clientData.authoritedPerson.authorityDetails.date);
3724
- this.formStore.lfb.policyholder.clientData.authoritedPerson.birthDate = reformatDate(clientData.authoritedPerson.birthDate) ?? '';
3725
- this.formStore.lfb.policyholder.clientData.authoritedPerson.identityDocument.issuedOn = reformatDate(clientData.authoritedPerson.identityDocument.issuedOn) ?? '';
3726
- this.formStore.lfb.policyholder.clientData.authoritedPerson.identityDocument.validUntil = reformatDate(clientData.authoritedPerson.identityDocument.validUntil) ?? '';
3727
- const gender = this.gender.find((i: Value) => i.id === clientData.authoritedPerson.gender);
3728
- this.formStore.lfb.policyholder.clientData.authoritedPerson.gender = gender ? gender : new Value();
3713
+ this.getClientData(clientData);
3729
3714
 
3730
3715
  if (clientData && clientData.activityTypes !== null) {
3731
3716
  this.formStore.lfb.policyholderActivities = clientData.activityTypes;
@@ -4123,6 +4108,28 @@ export const useDataStore = defineStore('data', {
4123
4108
  return ErrorHandler(err);
4124
4109
  }
4125
4110
  },
4111
+ getClientData(clientData: GroupMember) {
4112
+ this.formStore.lfb.policyholder.clientData = clientData;
4113
+ this.formStore.lfb.policyholder.clientData.authoritedPerson = clientData.authoritedPerson;
4114
+ this.formStore.lfb.policyholder.clientData.iin = reformatIin(clientData.iin);
4115
+ this.formStore.lfb.policyholder.clientData.authoritedPerson.iin = reformatIin(clientData.authoritedPerson.iin);
4116
+ this.formStore.lfb.policyholder.clientData.authoritedPerson.authorityDetails.date = reformatDate(clientData.authoritedPerson.authorityDetails.date as string);
4117
+ this.formStore.lfb.policyholder.clientData.authoritedPerson.birthDate = reformatDate(clientData.authoritedPerson.birthDate) ?? '';
4118
+ this.formStore.lfb.policyholder.clientData.authoritedPerson.identityDocument.issuedOn = reformatDate(clientData.authoritedPerson.identityDocument.issuedOn) ?? '';
4119
+ this.formStore.lfb.policyholder.clientData.authoritedPerson.identityDocument.validUntil = reformatDate(clientData.authoritedPerson.identityDocument.validUntil) ?? '';
4120
+ const gender = this.gender.find((i: Value) => i.id === Number(clientData.authoritedPerson.gender));
4121
+ this.formStore.lfb.policyholder.clientData.authoritedPerson.gender = gender ? gender : new Value();
4122
+ },
4123
+ async getParentApplication(bin: string) {
4124
+ try {
4125
+ const response = await this.api.getParentApplication(bin);
4126
+ if (response) {
4127
+ this.getClientData(response.clientApp.clientData);
4128
+ }
4129
+ } catch (err) {
4130
+ return ErrorHandler(err);
4131
+ }
4132
+ },
4126
4133
  hasJobSection(whichForm: keyof typeof StoreMembers) {
4127
4134
  if (this.isLifetrip || this.isPension || this.isBalam) return false;
4128
4135
  switch (whichForm) {
package/store/rules.ts CHANGED
@@ -6,6 +6,7 @@ const t = i18n.t;
6
6
  export const rules = {
7
7
  recalculationMultiply: [(v: any) => (v !== null && v !== '' && v >= 100) || t('toaster.valueShouldBeHigher', { text: '100' })],
8
8
  recalculationMultiplyBetween: [(v: any) => (v !== null && v !== '' && v >= 100 && v <= 200) || t('toaster.recalculationMultiplyBetween', { floor: '100', ceil: '200' })],
9
+ recalculationMultiplyBetween50And200: [(v: any) => (v !== null && v !== '' && v >= 50 && v <= 200) || t('toaster.recalculationMultiplyBetween', { floor: '50', ceil: '200' })],
9
10
  recalculationAdditive: [(v: any) => (v !== null && v !== '' && v <= 100 && v >= 0) || t('toaster.valueShouldBeBetween', { floor: '0', ceil: '100' })],
10
11
  required: [(v: any) => !!v || t('rules.required')],
11
12
  notZero: [(v: any) => Number(v) !== 0 || 'Не может быть равно нулю'],
package/types/enum.ts CHANGED
@@ -62,7 +62,7 @@ export enum Actions {
62
62
  annulmentCustom = 'annulmentCustom',
63
63
 
64
64
  otrs = 'otrs',
65
- otrsCustom = 'otrsCustom'
65
+ otrsCustom = 'otrsCustom',
66
66
  }
67
67
 
68
68
  export enum PostActions {
@@ -112,6 +112,7 @@ export enum Roles {
112
112
  SettlementLosses = 'SettlementLosses',
113
113
  HeadSettlementLosses = 'HeadSettlementLosses',
114
114
  DsoDirector = 'DsoDirector',
115
+ Archivist = 'Archivist',
115
116
  AccountantDirector = 'AccountantDirector',
116
117
  ManagerAuletti = 'ManagerAuletti',
117
118
  HeadOfDso = 'HeadOfDso',