hl-core 0.0.9-beta.44 → 0.0.9-beta.45
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 +2 -1
- package/components/Form/FormData.vue +5 -9
- package/components/Pages/MemberForm.vue +6 -22
- package/components/Pages/ProductConditions.vue +105 -32
- package/components/Panel/PanelHandler.vue +55 -4
- package/components/Transitions/Animation.vue +1 -1
- package/composables/classes.ts +7 -0
- package/composables/constants.ts +36 -0
- package/composables/fields.ts +38 -1
- package/composables/index.ts +28 -8
- package/locales/ru.json +11 -4
- package/package.json +3 -3
- package/store/data.store.ts +28 -17
- package/types/enum.ts +3 -0
- package/types/index.ts +12 -1
package/api/base.api.ts
CHANGED
|
@@ -604,11 +604,12 @@ export class ApiClass {
|
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
606
|
|
|
607
|
-
async getKgd(data: { iinBin: string }) {
|
|
607
|
+
async getKgd(data: { iinBin: string }, timeout: number = 30000) {
|
|
608
608
|
return await this.axiosCall<KGDResponse>({
|
|
609
609
|
method: Methods.POST,
|
|
610
610
|
url: '/externalservices/api/ExternalServices/GetKgd',
|
|
611
611
|
data: data,
|
|
612
|
+
timeout: timeout,
|
|
612
613
|
});
|
|
613
614
|
}
|
|
614
615
|
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
<div class="flex items-center justify-between">
|
|
10
10
|
<p :class="[$styles.textTitle, $styles.greenText]">{{ block.title }}</p>
|
|
11
11
|
<div
|
|
12
|
-
v-if="typeof block.headerBtn === 'object'"
|
|
12
|
+
v-if="typeof block.headerBtn === 'object' ? (typeof block.headerBtn.showBtn === 'boolean' ? block.headerBtn.showBtn === true : true) : false"
|
|
13
13
|
:class="[$styles.blueBg, $styles.whiteText, $styles.textSimple, block.disabled ? $styles.disabled : 'cursor-pointer']"
|
|
14
14
|
class="hidden lg:flex transition-all rounded-lg h-[36px] items-center font-medium justify-center opacity-50 hover:opacity-90 w-[120px]"
|
|
15
|
-
@click="!block.disabled && block.headerBtn
|
|
15
|
+
@click="!block.disabled && block.headerBtn!.action()"
|
|
16
16
|
>
|
|
17
|
-
{{ block.headerBtn
|
|
17
|
+
{{ block.headerBtn!.text }}
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
<p v-if="block.subtitle" :class="[$styles.greyText, $styles.textSimple]">{{ block.subtitle }}</p>
|
|
@@ -27,16 +27,12 @@
|
|
|
27
27
|
</v-row>
|
|
28
28
|
<div v-if="hasBlockData(block.data)">
|
|
29
29
|
<v-row v-for="(row, index) in getBlockDataValue(block.data)" :key="index" class="min-h-[65px] max-w-[97%]">
|
|
30
|
-
<v-col
|
|
31
|
-
|
|
32
|
-
v-for="each of row.filter((_: any, i: number) => $display().lgAndUp.value ? true : block.labels[i].hideOnMobile === false)"
|
|
33
|
-
:key="each"
|
|
34
|
-
>
|
|
30
|
+
<v-col v-if="row.every((i: any) => !i)" :class="[$styles.textSimple, $styles.blueText]">{{ block.noValueText ?? $dataStore.t('clients.necessaryFillForm') }}</v-col>
|
|
31
|
+
<v-col v-else v-for="each of row.filter((_: any, i: number) => $display().lgAndUp.value ? true : block.labels[i].hideOnMobile === false)" :key="each">
|
|
35
32
|
<p :class="[$styles.textSimple]">
|
|
36
33
|
{{ each }}
|
|
37
34
|
</p>
|
|
38
35
|
</v-col>
|
|
39
|
-
<v-col v-else :class="[$styles.textSimple, $styles.blueText]">{{ block.noValueText ?? $dataStore.t('clients.necessaryFillForm') }}</v-col>
|
|
40
36
|
<base-animation type="fade">
|
|
41
37
|
<div
|
|
42
38
|
v-if="block.btn && !!block.btn.showBtn === true"
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="flex flex-col gap-4 px-[10px]">
|
|
3
3
|
<v-form v-if="member" ref="vForm" @submit="submitForm" class="max-h-[80svh] overflow-y-scroll">
|
|
4
|
-
<div
|
|
5
|
-
|
|
6
|
-
class="flex items-center mt-[14px] min-h-[54px]"
|
|
7
|
-
>
|
|
8
|
-
<div :class="[$styles.blueBgLight]" class="flex flex-wrap items-center gap-2 p-2 rounded-t-[8px] h-full">
|
|
4
|
+
<div v-if="memberSetting && memberSetting.has === true && memberSetting.isMultiple === true" class="flex items-center mt-[14px] min-h-[54px]">
|
|
5
|
+
<div :class="[$styles.blueBgLight]" class="flex flex-wrap items-center gap-2 p-1 rounded-t-[8px] h-full">
|
|
9
6
|
<div
|
|
10
7
|
v-for="(each, index) of formStore[whichForm]"
|
|
11
8
|
:key="index"
|
|
12
|
-
class="rounded-[8px] cursor-pointer flex items-center"
|
|
13
|
-
:class="[Number(whichIndex) === index ? `${$styles.blueBg} ${$styles.whiteText}` : '', $styles.textSimple
|
|
9
|
+
class="pl-3 pr-1 py-1 rounded-[8px] cursor-pointer flex items-center"
|
|
10
|
+
:class="[Number(whichIndex) === index ? `${$styles.blueBg} ${$styles.whiteText}` : '', $styles.textSimple]"
|
|
14
11
|
@click.self="index !== Number(whichIndex) ? selectMember(index) : null"
|
|
15
12
|
>
|
|
16
13
|
{{ `${$dataStore.menu.selectedItem.title} ${index + 1}` }}
|
|
17
14
|
<v-btn
|
|
18
|
-
v-if="!isDisabled"
|
|
19
15
|
icon="mdi-close !text-[20px]"
|
|
20
16
|
size="x-small"
|
|
21
17
|
:disabled="!memberStore.canMemberDeleted(whichForm, index) && !memberStore.canMemberCleared(whichForm, index)"
|
|
@@ -25,23 +21,11 @@
|
|
|
25
21
|
/>
|
|
26
22
|
</div>
|
|
27
23
|
</div>
|
|
28
|
-
<v-btn
|
|
29
|
-
v-if="!isDisabled && memberSetting.isMultiple === true"
|
|
30
|
-
class="ml-2"
|
|
31
|
-
icon="mdi-plus !text-[24px]"
|
|
32
|
-
@click="memberStore.addMember(whichForm)"
|
|
33
|
-
size="small"
|
|
34
|
-
color="#A0B3D8"
|
|
35
|
-
variant="tonal"
|
|
36
|
-
/>
|
|
24
|
+
<v-btn class="ml-2" icon="mdi-plus !text-[24px]" @click="memberStore.addMember(whichForm)" size="small" color="#A0B3D8" variant="tonal" />
|
|
37
25
|
</div>
|
|
38
26
|
<base-form-section
|
|
39
27
|
:title="$dataStore.t('form.personalData')"
|
|
40
|
-
:class="[
|
|
41
|
-
memberSetting && memberSetting.has === true && whichForm !== 'policyholderForm' && whichForm !== 'policyholdersRepresentativeForm'
|
|
42
|
-
? 'rounded-t-0 !mt-[-5px]'
|
|
43
|
-
: 'mt-[14px]',
|
|
44
|
-
]"
|
|
28
|
+
:class="[memberSetting && memberSetting.has === true && memberSetting.isMultiple === true ? 'rounded-t-0 !mt-[-5px]' : 'mt-[14px]']"
|
|
45
29
|
>
|
|
46
30
|
<base-panel-input
|
|
47
31
|
v-if="$dataStore.isLifetrip"
|
|
@@ -32,7 +32,10 @@
|
|
|
32
32
|
<base-form-input v-model="formStore.policyholderForm.age" :label="$dataStore.t('form.age')" :readonly="true" />
|
|
33
33
|
<base-form-input v-model="formStore.policyholderForm.gender.nameRu" class="mb-4" :label="$dataStore.t('form.gender')" :readonly="true" />
|
|
34
34
|
</base-form-section>
|
|
35
|
-
<base-form-section
|
|
35
|
+
<base-form-section
|
|
36
|
+
v-if="isUnderwriterRole && $dataStore.members.insuredApp.has === true && whichProduct !== 'lifebusiness' && whichProduct !== 'gns'"
|
|
37
|
+
:title="$dataStore.t('insuredForm')"
|
|
38
|
+
>
|
|
36
39
|
<div v-for="(insured, index) of formStore.insuredForm" :key="index">
|
|
37
40
|
<base-form-input v-model="insured.longName" :label="$dataStore.t('labels.insurerLongName')" :readonly="true" />
|
|
38
41
|
<base-form-input v-model="insured.job" :label="$dataStore.t('form.job')" :readonly="true" />
|
|
@@ -42,7 +45,7 @@
|
|
|
42
45
|
<base-form-input v-model="insured.gender.nameRu" class="mb-4" :label="$dataStore.t('form.gender')" :readonly="true" />
|
|
43
46
|
</div>
|
|
44
47
|
</base-form-section>
|
|
45
|
-
<base-form-section v-if="isUnderwriterRole && whichProduct !== 'lifebusiness'" :title="$dataStore.t('recalculationInfo')">
|
|
48
|
+
<base-form-section v-if="isUnderwriterRole && whichProduct !== 'lifebusiness' && whichProduct !== 'gns'" :title="$dataStore.t('recalculationInfo')">
|
|
46
49
|
<base-form-input
|
|
47
50
|
v-model="productConditionsForm.lifeMultiply"
|
|
48
51
|
:maska="$maska.numbers"
|
|
@@ -104,7 +107,7 @@
|
|
|
104
107
|
@append="openPanel($dataStore.t('productConditionsForm.riskGroup'), $dataStore.riskGroup, 'riskGroup')"
|
|
105
108
|
/>
|
|
106
109
|
</base-form-section>
|
|
107
|
-
<base-form-section v-if="hasDefault" :title="
|
|
110
|
+
<base-form-section v-if="hasDefault" :title="defaultText">
|
|
108
111
|
<div v-if="isCalculator && ($route.params.taskId === '0' || $dataStore.isCalculator)">
|
|
109
112
|
<base-form-input
|
|
110
113
|
v-model="productConditionsForm.signDate"
|
|
@@ -166,6 +169,16 @@
|
|
|
166
169
|
append-inner-icon="mdi mdi-chevron-right"
|
|
167
170
|
@append="openPanel($dataStore.t('productConditionsForm.processIndexRate'), $dataStore.processIndexRate, 'processIndexRate', $dataStore.getProcessIndexRate)"
|
|
168
171
|
/>
|
|
172
|
+
<base-form-input
|
|
173
|
+
v-if="hasFixInsSum"
|
|
174
|
+
v-model="productConditionsForm.fixInsSum"
|
|
175
|
+
:readonly="isDisabledFixInsSum"
|
|
176
|
+
:clearable="!isDisabled"
|
|
177
|
+
:rules="fixInsSumRule"
|
|
178
|
+
:label="$dataStore.t('productConditionsForm.fixInsSum')"
|
|
179
|
+
:suffix="$constants.currencySymbols.kzt"
|
|
180
|
+
@input="onInputFixInsSum"
|
|
181
|
+
/>
|
|
169
182
|
<base-form-input
|
|
170
183
|
v-model="productConditionsForm.requestedSumInsured"
|
|
171
184
|
:readonly="isDisabledSum"
|
|
@@ -446,6 +459,9 @@
|
|
|
446
459
|
/>
|
|
447
460
|
<base-form-input v-model="calculatorForm.price" :readonly="true" :label="isCalculator ? $dataStore.t('calculatorForm.premium') : $dataStore.t('calculatorForm.price')" />
|
|
448
461
|
</base-form-section>
|
|
462
|
+
<base-form-section v-if="hasDeathInsFromNS" :title="$dataStore.t('generalConditions')">
|
|
463
|
+
<base-form-input v-model="deathInsFromNS" :readonly="true" :clearable="false" :label="$dataStore.t('form.deathInsFromNS')" />
|
|
464
|
+
</base-form-section>
|
|
449
465
|
<base-form-section v-if="isShownAdditionalTerms && additionalTerms && additionalTerms.length" :title="$dataStore.t('productConditionsForm.additional')">
|
|
450
466
|
<div v-for="(term, index) of additionalTerms" :key="index">
|
|
451
467
|
<base-panel-input
|
|
@@ -457,7 +473,7 @@
|
|
|
457
473
|
:label="coverTypeName(term)"
|
|
458
474
|
append-inner-icon="mdi mdi-chevron-right"
|
|
459
475
|
:suffix="
|
|
460
|
-
whichProduct === 'lifebusiness' && term.coverTypeCode === 6
|
|
476
|
+
(whichProduct === 'lifebusiness' || whichProduct === 'gns') && term.coverTypeCode === 6
|
|
461
477
|
? String(term.coverPeriodName ?? '')
|
|
462
478
|
: !!term.amount
|
|
463
479
|
? `${formatTermValue(term.amount)} ${currencySymbolsAddTerm}`
|
|
@@ -523,7 +539,7 @@
|
|
|
523
539
|
<base-rounded-input v-model.trim="searchQuery" :label="$dataStore.t('labels.search')" class="w-full p-2" :hide-details="true" />
|
|
524
540
|
<div v-if="panelList && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
|
|
525
541
|
<div v-for="(item, index) of panelList.filter(i => i.nameRu && (i.nameRu as string).match(new RegExp(searchQuery, 'i')))">
|
|
526
|
-
<v-expansion-panels v-if="panelCodeList.includes(String(item.code)) && whichProduct === 'lifebusiness'" variant="accordion">
|
|
542
|
+
<v-expansion-panels v-if="panelCodeList.includes(String(item.code)) && (whichProduct === 'lifebusiness' || whichProduct === 'gns')" variant="accordion">
|
|
527
543
|
<v-expansion-panel class="hover:bg-[#f5f8fd]" elevation="0" bg-color="#F3F6FC">
|
|
528
544
|
<v-expansion-panel-title @click="pickTermValue(item)">
|
|
529
545
|
{{ item.nameRu }}
|
|
@@ -580,6 +596,7 @@ export default defineComponent({
|
|
|
580
596
|
const searchQuery = ref<string>('');
|
|
581
597
|
const whichSum = ref<'insurancePremiumPerMonth' | 'requestedSumInsured' | ''>('');
|
|
582
598
|
const panelCodeList = ['processcovertypesum', 'fixedinssum'];
|
|
599
|
+
const deathInsFromNS = 'Включено';
|
|
583
600
|
|
|
584
601
|
const additionalTerms = ref<AddCover[]>([]);
|
|
585
602
|
|
|
@@ -608,7 +625,7 @@ export default defineComponent({
|
|
|
608
625
|
if (whichProduct.value === 'gons') {
|
|
609
626
|
return true;
|
|
610
627
|
}
|
|
611
|
-
if (whichProduct.value === 'lifebusiness' && dataStore.isUnderwriter()) {
|
|
628
|
+
if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && dataStore.isUnderwriter()) {
|
|
612
629
|
return false;
|
|
613
630
|
}
|
|
614
631
|
return isDisabled.value;
|
|
@@ -618,7 +635,7 @@ export default defineComponent({
|
|
|
618
635
|
const isUnderwriterRole = computed(() => dataStore.isUnderwriter() || dataStore.isAdmin() || dataStore.isSupport());
|
|
619
636
|
const insurancePremiumPerMonthRule = computed(() => (!!productConditionsForm.insurancePremiumPerMonth ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
620
637
|
const insurancePremiumPerMonthDisabled = computed(() => {
|
|
621
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
638
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
622
639
|
return true;
|
|
623
640
|
}
|
|
624
641
|
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
@@ -627,9 +644,10 @@ export default defineComponent({
|
|
|
627
644
|
return isDisabled.value;
|
|
628
645
|
});
|
|
629
646
|
const requestedSumInsuredRule = computed(() => (!!productConditionsForm.requestedSumInsured ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
647
|
+
const fixInsSumRule = computed(() => (!!productConditionsForm.fixInsSum ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
630
648
|
const amountAnnuityPayments = computed(() => (!!productConditionsForm.amountAnnuityPayments ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
631
649
|
const hasCalculated = computed(() => {
|
|
632
|
-
if (whichProduct.value === 'lifebusiness' && productConditionsForm.requestedSumInsured === null) {
|
|
650
|
+
if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && productConditionsForm.requestedSumInsured === null) {
|
|
633
651
|
return !!productConditionsForm.insurancePremiumPerMonth;
|
|
634
652
|
}
|
|
635
653
|
return !!productConditionsForm.requestedSumInsured && !!productConditionsForm.insurancePremiumPerMonth;
|
|
@@ -640,7 +658,8 @@ export default defineComponent({
|
|
|
640
658
|
whichProduct.value === 'halykkazyna' ||
|
|
641
659
|
whichProduct.value === 'liferenta' ||
|
|
642
660
|
whichProduct.value === 'lifebusiness' ||
|
|
643
|
-
whichProduct.value === 'amuletlife'
|
|
661
|
+
whichProduct.value === 'amuletlife' ||
|
|
662
|
+
whichProduct.value === 'gns'
|
|
644
663
|
) {
|
|
645
664
|
return false;
|
|
646
665
|
}
|
|
@@ -713,25 +732,25 @@ export default defineComponent({
|
|
|
713
732
|
return false;
|
|
714
733
|
});
|
|
715
734
|
const hasBirthDate = computed(() => {
|
|
716
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
735
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
717
736
|
return false;
|
|
718
737
|
}
|
|
719
738
|
return true;
|
|
720
739
|
});
|
|
721
740
|
const hasGender = computed(() => {
|
|
722
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
741
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
723
742
|
return false;
|
|
724
743
|
}
|
|
725
744
|
return true;
|
|
726
745
|
});
|
|
727
746
|
const hasAgencyPart = computed(() => {
|
|
728
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
747
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
729
748
|
return true;
|
|
730
749
|
}
|
|
731
750
|
return false;
|
|
732
751
|
});
|
|
733
752
|
const hasProcessGfot = computed(() => {
|
|
734
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
753
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
735
754
|
return true;
|
|
736
755
|
}
|
|
737
756
|
return false;
|
|
@@ -756,7 +775,7 @@ export default defineComponent({
|
|
|
756
775
|
if (whichProduct.value === 'halykkazyna') {
|
|
757
776
|
return dataStore.t('productConditionsForm.requestedSumInsuredInTenge');
|
|
758
777
|
}
|
|
759
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
778
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
760
779
|
return dataStore.t('productConditionsForm.totalRequestedSumInsured');
|
|
761
780
|
}
|
|
762
781
|
return dataStore.t('productConditionsForm.requestedSumInsured');
|
|
@@ -765,22 +784,31 @@ export default defineComponent({
|
|
|
765
784
|
if (whichProduct.value === 'gons') {
|
|
766
785
|
return dataStore.t('productConditionsForm.coverPeriodFrom3to20');
|
|
767
786
|
}
|
|
768
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
787
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
769
788
|
return dataStore.t('productConditionsForm.coverPeriodMonth');
|
|
770
789
|
}
|
|
771
790
|
return dataStore.t('productConditionsForm.coverPeriod');
|
|
772
791
|
});
|
|
773
792
|
const insurancePremiumPerMonthLabel = computed(() => {
|
|
774
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
775
|
-
return dataStore.t('productConditionsForm.
|
|
793
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
794
|
+
return dataStore.t('productConditionsForm.totalInsurancePremiumAmountWithCommission');
|
|
776
795
|
}
|
|
777
796
|
return dataStore.t('productConditionsForm.insurancePremiumAmount');
|
|
778
797
|
});
|
|
798
|
+
const isDisabledFixInsSum = computed(() => {
|
|
799
|
+
if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && productConditionsForm.processGfot.id !== null) {
|
|
800
|
+
return true;
|
|
801
|
+
}
|
|
802
|
+
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
803
|
+
return false;
|
|
804
|
+
}
|
|
805
|
+
return isDisabled.value;
|
|
806
|
+
});
|
|
779
807
|
const isDisabledSum = computed(() => {
|
|
780
808
|
if (whichProduct.value === 'halykkazyna') {
|
|
781
809
|
return true;
|
|
782
810
|
}
|
|
783
|
-
if (whichProduct.value === 'lifebusiness'
|
|
811
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
784
812
|
return true;
|
|
785
813
|
}
|
|
786
814
|
if (dataStore.isUnderwriter() && !isRecalculationDisabled.value) {
|
|
@@ -805,7 +833,7 @@ export default defineComponent({
|
|
|
805
833
|
return message.slice(0, -2);
|
|
806
834
|
});
|
|
807
835
|
const isDisabledCoverPeriod = computed(() => {
|
|
808
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
836
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
809
837
|
return true;
|
|
810
838
|
}
|
|
811
839
|
return isDisabled.value;
|
|
@@ -817,7 +845,7 @@ export default defineComponent({
|
|
|
817
845
|
return true;
|
|
818
846
|
});
|
|
819
847
|
const isDisabledProcessGfot = computed(() => {
|
|
820
|
-
if (whichProduct.value === 'lifebusiness' && !!productConditionsForm.
|
|
848
|
+
if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && !!productConditionsForm.fixInsSum) {
|
|
821
849
|
return true;
|
|
822
850
|
}
|
|
823
851
|
if (dataStore.isUnderwriter()) {
|
|
@@ -826,17 +854,36 @@ export default defineComponent({
|
|
|
826
854
|
return isDisabled.value;
|
|
827
855
|
});
|
|
828
856
|
const isDisabledAgentCommission = computed(() => {
|
|
829
|
-
if (whichProduct.value === 'lifebusiness' || dataStore.isUnderwriter()) {
|
|
857
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns' || dataStore.isUnderwriter()) {
|
|
830
858
|
return false;
|
|
831
859
|
}
|
|
832
860
|
return isDisabled.value;
|
|
833
861
|
});
|
|
834
862
|
const hasCalcSum = computed(() => {
|
|
835
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
863
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
836
864
|
return false;
|
|
837
865
|
}
|
|
838
866
|
return true;
|
|
839
867
|
});
|
|
868
|
+
const hasFixInsSum = computed(() => {
|
|
869
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
870
|
+
return true;
|
|
871
|
+
}
|
|
872
|
+
return false;
|
|
873
|
+
});
|
|
874
|
+
const hasDeathInsFromNS = computed(() => {
|
|
875
|
+
if (whichProduct.value === 'gns') {
|
|
876
|
+
return true;
|
|
877
|
+
}
|
|
878
|
+
return false;
|
|
879
|
+
});
|
|
880
|
+
const defaultText = computed(() => {
|
|
881
|
+
if (whichProduct.value === 'gns') {
|
|
882
|
+
return dataStore.t('clients.form.calculation');
|
|
883
|
+
}
|
|
884
|
+
return dataStore.t('generalConditions');
|
|
885
|
+
});
|
|
886
|
+
|
|
840
887
|
const formatTermValue = (term: number) => {
|
|
841
888
|
if (term !== null) {
|
|
842
889
|
const termNumber = Number(term);
|
|
@@ -847,7 +894,7 @@ export default defineComponent({
|
|
|
847
894
|
|
|
848
895
|
const toStatement = async () => {
|
|
849
896
|
const statementItem = dataStore.menuItems.find(i => i.id === 'statement');
|
|
850
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
897
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
851
898
|
await router.push({ name: 'taskId-NewApp', params: route.params, query: { tab: 'statement' } });
|
|
852
899
|
return;
|
|
853
900
|
}
|
|
@@ -911,7 +958,7 @@ export default defineComponent({
|
|
|
911
958
|
}
|
|
912
959
|
if (typeof currentIndex.value !== 'number') return;
|
|
913
960
|
|
|
914
|
-
if (whichProduct.value === 'lifebusiness' && item.code === 'processcovertypesum') {
|
|
961
|
+
if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && item.code === 'processcovertypesum') {
|
|
915
962
|
if (item.id !== additionalTerms.value[currentIndex.value].coverSumId) {
|
|
916
963
|
additionalTerms.value[currentIndex.value].coverPeriodCode = null;
|
|
917
964
|
additionalTerms.value[currentIndex.value].coverPeriodId = null;
|
|
@@ -922,9 +969,13 @@ export default defineComponent({
|
|
|
922
969
|
additionalTerms.value[currentIndex.value].coverSumId = item.id as string;
|
|
923
970
|
additionalTerms.value[currentIndex.value].coverSumName = item.nameRu as string;
|
|
924
971
|
|
|
925
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
972
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
926
973
|
if (termValue.value && item.code === 'fixedinssum') {
|
|
927
|
-
|
|
974
|
+
if (termValue.value.coverTypeCode === 11) {
|
|
975
|
+
subPanelList.value = constants.fixInsAmount.slice(0, 5);
|
|
976
|
+
} else {
|
|
977
|
+
subPanelList.value = constants.fixInsAmount;
|
|
978
|
+
}
|
|
928
979
|
subTermValue.value = String(termValue.value.amount);
|
|
929
980
|
} else {
|
|
930
981
|
additionalTerms.value[currentIndex.value].amount = 0;
|
|
@@ -1029,7 +1080,7 @@ export default defineComponent({
|
|
|
1029
1080
|
};
|
|
1030
1081
|
|
|
1031
1082
|
const openTermPanel = async (title: string, asyncFunction: Function, questionId: string, index: number) => {
|
|
1032
|
-
if (!isDisabled.value || (whichProduct.value === 'lifebusiness' && dataStore.isUnderwriter())) {
|
|
1083
|
+
if (!isDisabled.value || ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && dataStore.isUnderwriter())) {
|
|
1033
1084
|
searchQuery.value = '';
|
|
1034
1085
|
currentIndex.value = index;
|
|
1035
1086
|
isPanelOpen.value = false;
|
|
@@ -1132,6 +1183,15 @@ export default defineComponent({
|
|
|
1132
1183
|
}
|
|
1133
1184
|
};
|
|
1134
1185
|
|
|
1186
|
+
const onInputFixInsSum = (event: Event) => {
|
|
1187
|
+
if (event.target && 'value' in event.target && event.target.value) {
|
|
1188
|
+
const calculatedFixInsSum = getNumber(event.target.value as string);
|
|
1189
|
+
if (calculatedFixInsSum) {
|
|
1190
|
+
productConditionsForm.fixInsSum = dataStore.getNumberWithSpaces(productConditionsForm.fixInsSum);
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
};
|
|
1194
|
+
|
|
1135
1195
|
const onInputSumDollar = (event: Event) => {
|
|
1136
1196
|
if (event.target && 'value' in event.target && event.target.value && dataStore.currencies.usd) {
|
|
1137
1197
|
whichSum.value = 'requestedSumInsured';
|
|
@@ -1185,7 +1245,7 @@ export default defineComponent({
|
|
|
1185
1245
|
};
|
|
1186
1246
|
|
|
1187
1247
|
const coverTypeName = (term: AddCover) => {
|
|
1188
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
1248
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
1189
1249
|
return String(term.coverTypeNameRu);
|
|
1190
1250
|
}
|
|
1191
1251
|
return term.coverTypeName;
|
|
@@ -1281,7 +1341,7 @@ export default defineComponent({
|
|
|
1281
1341
|
recalculationData.premium = Number((productConditionsForm.insurancePremiumPerMonth as string)?.replace(/\s/g, ''));
|
|
1282
1342
|
recalculationData.riskGroup = productConditionsForm.riskGroup?.id ? productConditionsForm.riskGroup.id : 1;
|
|
1283
1343
|
isCalculating.value = true;
|
|
1284
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
1344
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
1285
1345
|
await dataStore.calculate(route.params.taskId as string);
|
|
1286
1346
|
additionalTerms.value = formStore.additionalInsuranceTerms;
|
|
1287
1347
|
} else {
|
|
@@ -1351,9 +1411,8 @@ export default defineComponent({
|
|
|
1351
1411
|
if (defaultData.signDate) {
|
|
1352
1412
|
productConditionsForm.signDate = reformatDate(defaultData.signDate);
|
|
1353
1413
|
}
|
|
1354
|
-
if (whichProduct.value === 'lifebusiness') {
|
|
1414
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
1355
1415
|
productConditionsForm.coverPeriod = defaultData.insTermInMonth ?? null;
|
|
1356
|
-
productConditionsForm.requestedSumInsured = null;
|
|
1357
1416
|
productConditionsForm.insurancePremiumPerMonth = null;
|
|
1358
1417
|
}
|
|
1359
1418
|
}
|
|
@@ -1366,7 +1425,7 @@ export default defineComponent({
|
|
|
1366
1425
|
if (!!productConditionsForm.requestedSumInsured) {
|
|
1367
1426
|
whichSum.value = 'requestedSumInsured';
|
|
1368
1427
|
}
|
|
1369
|
-
if (whichProduct.value === 'lifebusiness' && !productConditionsForm.requestedSumInsured) {
|
|
1428
|
+
if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && !productConditionsForm.requestedSumInsured) {
|
|
1370
1429
|
whichSum.value = 'requestedSumInsured';
|
|
1371
1430
|
}
|
|
1372
1431
|
if (dataStore.isCalculator) {
|
|
@@ -1378,6 +1437,13 @@ export default defineComponent({
|
|
|
1378
1437
|
if (kazynaPaymentPeriod) productConditionsForm.paymentPeriod = kazynaPaymentPeriod;
|
|
1379
1438
|
await dataStore.getCurrencies();
|
|
1380
1439
|
}
|
|
1440
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
1441
|
+
productConditionsForm.requestedSumInsured = dataStore.getNumberWithSpaces(
|
|
1442
|
+
formStore.lfb.clients.reduce((sum: number, i: any) => {
|
|
1443
|
+
return sum + Number(i.insSum);
|
|
1444
|
+
}, 0),
|
|
1445
|
+
);
|
|
1446
|
+
}
|
|
1381
1447
|
});
|
|
1382
1448
|
|
|
1383
1449
|
watch(
|
|
@@ -1485,6 +1551,7 @@ export default defineComponent({
|
|
|
1485
1551
|
subPanelList,
|
|
1486
1552
|
subTermValue,
|
|
1487
1553
|
panelCodeList,
|
|
1554
|
+
deathInsFromNS,
|
|
1488
1555
|
|
|
1489
1556
|
// Computed
|
|
1490
1557
|
isTask,
|
|
@@ -1527,9 +1594,14 @@ export default defineComponent({
|
|
|
1527
1594
|
isShownAdditionalTerms,
|
|
1528
1595
|
hasCalcSum,
|
|
1529
1596
|
isDisabledAgentCommission,
|
|
1597
|
+
hasFixInsSum,
|
|
1598
|
+
isDisabledFixInsSum,
|
|
1599
|
+
defaultText,
|
|
1600
|
+
hasDeathInsFromNS,
|
|
1530
1601
|
|
|
1531
1602
|
// Rules
|
|
1532
1603
|
coverPeriodRule,
|
|
1604
|
+
fixInsSumRule,
|
|
1533
1605
|
|
|
1534
1606
|
// Functions
|
|
1535
1607
|
submitForm,
|
|
@@ -1555,6 +1627,7 @@ export default defineComponent({
|
|
|
1555
1627
|
selectOption,
|
|
1556
1628
|
coverTypeName,
|
|
1557
1629
|
pickSubTermValue,
|
|
1630
|
+
onInputFixInsSum,
|
|
1558
1631
|
};
|
|
1559
1632
|
},
|
|
1560
1633
|
});
|
|
@@ -61,6 +61,12 @@
|
|
|
61
61
|
</base-form-section>
|
|
62
62
|
</div>
|
|
63
63
|
</section>
|
|
64
|
+
<section v-if="choosePayActions">
|
|
65
|
+
<div v-if="!isEpayPay" :class="[$styles.flexColNav]">
|
|
66
|
+
<base-btn :text="$dataStore.t('buttons.payEpay')" :loading="loading" @click="handlePayAction('epay')" />
|
|
67
|
+
<base-btn :text="$dataStore.t('buttons.payOffline')" :loading="loading" @click="handlePayAction('offline')" />
|
|
68
|
+
</div>
|
|
69
|
+
</section>
|
|
64
70
|
<section v-if="signingActions" class="relative">
|
|
65
71
|
<base-fade-transition>
|
|
66
72
|
<div v-if="!isSendNumberOpen" :class="[$styles.flexColNav]">
|
|
@@ -171,6 +177,7 @@ export default defineComponent({
|
|
|
171
177
|
const connection = ref<any>(null);
|
|
172
178
|
const isQrLoading = ref<boolean>(false);
|
|
173
179
|
const urlCopy = ref<string>('');
|
|
180
|
+
const isEpayPay = ref<boolean>(false);
|
|
174
181
|
|
|
175
182
|
const vForm = ref<any>();
|
|
176
183
|
const isSendNumberOpen = ref<boolean>(false);
|
|
@@ -325,7 +332,7 @@ export default defineComponent({
|
|
|
325
332
|
|
|
326
333
|
const onInit = async () => {
|
|
327
334
|
if (dataStore.controls.hasChooseSign) {
|
|
328
|
-
if (dataStore.isGons || dataStore.isLifeBusiness) {
|
|
335
|
+
if (dataStore.isGons || dataStore.isLifeBusiness || dataStore.isGns) {
|
|
329
336
|
isElectronicContract.value = false;
|
|
330
337
|
}
|
|
331
338
|
}
|
|
@@ -383,11 +390,12 @@ export default defineComponent({
|
|
|
383
390
|
const payingActions = computed(() => dataStore.panelAction === constants.actions.pay);
|
|
384
391
|
const affiliateActions = computed(() => dataStore.panelAction === constants.actions.affiliate);
|
|
385
392
|
const chooseSignActions = computed(() => dataStore.controls.hasChooseSign && dataStore.panelAction === constants.actions.chooseSign);
|
|
393
|
+
const choosePayActions = computed(() => dataStore.controls.hasChoosePay && dataStore.panelAction === constants.actions.choosePay);
|
|
386
394
|
|
|
387
395
|
const paymentPeriod = computed(() => formStore.productConditionsForm.paymentPeriod.nameRu);
|
|
388
396
|
const insurancePremiumPerMonth = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.insurancePremiumPerMonth));
|
|
389
397
|
const requestedSumInsured = computed(() => {
|
|
390
|
-
if (dataStore.isLifeBusiness && formStore.productConditionsForm.requestedSumInsured === null) {
|
|
398
|
+
if ((dataStore.isLifeBusiness || dataStore.isGns) && formStore.productConditionsForm.requestedSumInsured === null) {
|
|
391
399
|
return dataStore.getNumberWithSpaces(formStore.applicationData.policyAppDto!.mainInsSum);
|
|
392
400
|
}
|
|
393
401
|
return dataStore.getNumberWithSpaces(formStore.productConditionsForm.requestedSumInsured);
|
|
@@ -422,7 +430,7 @@ export default defineComponent({
|
|
|
422
430
|
return false;
|
|
423
431
|
});
|
|
424
432
|
const isQrDisabled = computed(() => {
|
|
425
|
-
if (dataStore.isLifeBusiness) {
|
|
433
|
+
if (dataStore.isLifeBusiness || dataStore.isGns) {
|
|
426
434
|
return false;
|
|
427
435
|
}
|
|
428
436
|
return true;
|
|
@@ -455,13 +463,20 @@ export default defineComponent({
|
|
|
455
463
|
loading.value = false;
|
|
456
464
|
};
|
|
457
465
|
|
|
466
|
+
const handlePayAction = async (type: 'epay' | 'offline') => {
|
|
467
|
+
loading.value = true;
|
|
468
|
+
if (type === 'epay') {
|
|
469
|
+
await payEpay();
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
|
|
458
473
|
// TODO Рефактор QR c npm
|
|
459
474
|
const generateQR = async (groupId: string) => {
|
|
460
475
|
const uuidV4 = uuid.v4();
|
|
461
476
|
const qrValue = `${getValuePerEnv('qrGenUrl')}/${uuidV4}/${groupId}`;
|
|
462
477
|
qrUrl.value = `https://api.qrserver.com/v1/create-qr-code/?size=135x135&data=${qrValue}`;
|
|
463
478
|
|
|
464
|
-
if (dataStore.isLifeBusiness) {
|
|
479
|
+
if (dataStore.isLifeBusiness || dataStore.isGns) {
|
|
465
480
|
//для юр лиц
|
|
466
481
|
urlCopy.value = `https://egovbusiness.page.link/?link=${qrValue}?mgovSign&apn=kz.mobile.mgov.business&isi=1597880144&ibi=kz.mobile.mgov.business`;
|
|
467
482
|
} else {
|
|
@@ -515,6 +530,38 @@ export default defineComponent({
|
|
|
515
530
|
await dataStore.generateDocument();
|
|
516
531
|
};
|
|
517
532
|
|
|
533
|
+
const payEpay = async () => {
|
|
534
|
+
const invoiceData = await dataStore.getInvoiceData(formStore.applicationData.processInstanceId);
|
|
535
|
+
if (invoiceData === false || invoiceData.status === 3 || invoiceData.status === 0) {
|
|
536
|
+
if (invoiceData === false || invoiceData.status === 3) {
|
|
537
|
+
const created = await dataStore.createInvoice();
|
|
538
|
+
if (created) {
|
|
539
|
+
const ePayData = await dataStore.sendToEpay();
|
|
540
|
+
if (!ePayData) return;
|
|
541
|
+
formStore.epayLink = dataStore.sanitize(ePayData.link);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
if (!!invoiceData && invoiceData.status === 0) {
|
|
545
|
+
const ePayData = await dataStore.sendToEpay();
|
|
546
|
+
if (!ePayData) return;
|
|
547
|
+
formStore.epayLink = dataStore.sanitize(ePayData.link);
|
|
548
|
+
}
|
|
549
|
+
} else {
|
|
550
|
+
if (invoiceData.paymentLink) {
|
|
551
|
+
formStore.epayLink = dataStore.sanitize(invoiceData.paymentLink);
|
|
552
|
+
} else {
|
|
553
|
+
dataStore.showToaster('error', dataStore.t('toaster.noUrl'));
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
if (!formStore.epayLink) {
|
|
557
|
+
dataStore.showToaster('error', dataStore.t('toaster.noUrl'));
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
loading.value = false;
|
|
561
|
+
isEpayPay.value = true;
|
|
562
|
+
dataStore.panelAction = constants.actions.pay;
|
|
563
|
+
};
|
|
564
|
+
|
|
518
565
|
return {
|
|
519
566
|
// State
|
|
520
567
|
formStore,
|
|
@@ -531,6 +578,7 @@ export default defineComponent({
|
|
|
531
578
|
scansFiles,
|
|
532
579
|
isQrLoading,
|
|
533
580
|
urlCopy,
|
|
581
|
+
isEpayPay,
|
|
534
582
|
|
|
535
583
|
// Functions
|
|
536
584
|
closePanel,
|
|
@@ -544,6 +592,8 @@ export default defineComponent({
|
|
|
544
592
|
sendFiles,
|
|
545
593
|
onClearFile,
|
|
546
594
|
closeQrPanel,
|
|
595
|
+
handlePayAction,
|
|
596
|
+
payEpay,
|
|
547
597
|
|
|
548
598
|
// Computed
|
|
549
599
|
buttonText,
|
|
@@ -567,6 +617,7 @@ export default defineComponent({
|
|
|
567
617
|
isElectronicDisabled,
|
|
568
618
|
isScansDisabled,
|
|
569
619
|
isQrDisabled,
|
|
620
|
+
choosePayActions,
|
|
570
621
|
};
|
|
571
622
|
},
|
|
572
623
|
});
|
package/composables/classes.ts
CHANGED
|
@@ -755,6 +755,8 @@ export class ProductConditions {
|
|
|
755
755
|
statePremium7: number | string | null;
|
|
756
756
|
calculatorForm: CalculatorForm;
|
|
757
757
|
agentCommission: number | null;
|
|
758
|
+
fixInsSum: number | string | null;
|
|
759
|
+
|
|
758
760
|
constructor(
|
|
759
761
|
insuranceCase = null,
|
|
760
762
|
coverPeriod = null,
|
|
@@ -798,6 +800,7 @@ export class ProductConditions {
|
|
|
798
800
|
statePremium7 = null,
|
|
799
801
|
calculatorForm = new CalculatorForm(),
|
|
800
802
|
agentCommission = null,
|
|
803
|
+
fixInsSum = null,
|
|
801
804
|
) {
|
|
802
805
|
this.requestedSumInsuredInDollar = null;
|
|
803
806
|
this.insurancePremiumPerMonthInDollar = null;
|
|
@@ -846,6 +849,7 @@ export class ProductConditions {
|
|
|
846
849
|
this.statePremium7 = statePremium7;
|
|
847
850
|
this.calculatorForm = calculatorForm;
|
|
848
851
|
this.agentCommission = agentCommission;
|
|
852
|
+
this.fixInsSum = fixInsSum;
|
|
849
853
|
}
|
|
850
854
|
getSingleTripDays() {
|
|
851
855
|
if (this.calculatorForm.startDate && this.calculatorForm.endDate) {
|
|
@@ -914,6 +918,8 @@ export class DataStoreClass {
|
|
|
914
918
|
hasAffiliation: boolean;
|
|
915
919
|
// Выбор метода подписания
|
|
916
920
|
hasChooseSign: boolean;
|
|
921
|
+
// Выбор метода оплаты
|
|
922
|
+
hasChoosePay: boolean;
|
|
917
923
|
};
|
|
918
924
|
members: {
|
|
919
925
|
clientApp: MemberSettings;
|
|
@@ -1078,6 +1084,7 @@ export class DataStoreClass {
|
|
|
1078
1084
|
hasAttachment: true,
|
|
1079
1085
|
hasAffiliation: true,
|
|
1080
1086
|
hasChooseSign: false,
|
|
1087
|
+
hasChoosePay: false,
|
|
1081
1088
|
};
|
|
1082
1089
|
this.iframeLoading = false;
|
|
1083
1090
|
this.hasLayoutMargins = true;
|
package/composables/constants.ts
CHANGED
|
@@ -14,6 +14,7 @@ export const constants = Object.freeze({
|
|
|
14
14
|
daskamkorlyk: 13,
|
|
15
15
|
lifebusiness: 14,
|
|
16
16
|
amuletlife: 15,
|
|
17
|
+
gns: 16,
|
|
17
18
|
},
|
|
18
19
|
amlProducts: {
|
|
19
20
|
checkcontragent: 1,
|
|
@@ -104,5 +105,40 @@ export const constants = Object.freeze({
|
|
|
104
105
|
nameRu: '2 500 000',
|
|
105
106
|
ids: '',
|
|
106
107
|
},
|
|
108
|
+
{
|
|
109
|
+
code: '3000000',
|
|
110
|
+
id: '6',
|
|
111
|
+
nameKz: '3 000 000',
|
|
112
|
+
nameRu: '3 000 000',
|
|
113
|
+
ids: '',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
code: '3500000',
|
|
117
|
+
id: '7',
|
|
118
|
+
nameKz: '3 500 000',
|
|
119
|
+
nameRu: '3 500 000',
|
|
120
|
+
ids: '',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
code: '4000000',
|
|
124
|
+
id: '8',
|
|
125
|
+
nameKz: '4 000 000',
|
|
126
|
+
nameRu: '4 000 000',
|
|
127
|
+
ids: '',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
code: '4500000',
|
|
131
|
+
id: '8',
|
|
132
|
+
nameKz: '4 500 000',
|
|
133
|
+
nameRu: '4 500 000',
|
|
134
|
+
ids: '',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
code: '5000000',
|
|
138
|
+
id: '9',
|
|
139
|
+
nameKz: '5 000 000',
|
|
140
|
+
nameRu: '5 000 000',
|
|
141
|
+
ids: '',
|
|
142
|
+
},
|
|
107
143
|
],
|
|
108
144
|
});
|
package/composables/fields.ts
CHANGED
|
@@ -221,6 +221,7 @@ export class FormBlock {
|
|
|
221
221
|
headerBtn?: {
|
|
222
222
|
text: string;
|
|
223
223
|
action: () => void;
|
|
224
|
+
showBtn?: ComputedRef;
|
|
224
225
|
};
|
|
225
226
|
labels: FormBlockLabel[];
|
|
226
227
|
data: ComputedRefWithControl<any> | string[][];
|
|
@@ -236,7 +237,7 @@ export class FormBlock {
|
|
|
236
237
|
title: string;
|
|
237
238
|
subtitle?: string;
|
|
238
239
|
noValueText?: string;
|
|
239
|
-
headerBtn?: { text: string; action: () => void };
|
|
240
|
+
headerBtn?: { text: string; action: () => void; showBtn?: ComputedRef };
|
|
240
241
|
labels: FormBlockLabel[];
|
|
241
242
|
data: ComputedRefWithControl<any> | string[][];
|
|
242
243
|
shrinkLabels?: boolean;
|
|
@@ -289,3 +290,39 @@ export const getFormDataFrom = <T>(
|
|
|
289
290
|
() => getData(),
|
|
290
291
|
);
|
|
291
292
|
};
|
|
293
|
+
|
|
294
|
+
export const getFormDataDefaults = () => {
|
|
295
|
+
const dataStore = useDataStore();
|
|
296
|
+
const baseFormData = {
|
|
297
|
+
membersLabels: [
|
|
298
|
+
new FormBlockLabel({
|
|
299
|
+
text: dataStore.t('form.fullName'),
|
|
300
|
+
}),
|
|
301
|
+
new FormBlockLabel({
|
|
302
|
+
text: dataStore.t('form.iin'),
|
|
303
|
+
}),
|
|
304
|
+
new FormBlockLabel({
|
|
305
|
+
text: dataStore.t('form.birthDate'),
|
|
306
|
+
}),
|
|
307
|
+
new FormBlockLabel({
|
|
308
|
+
text: dataStore.t('form.gender'),
|
|
309
|
+
hideOnMobile: true,
|
|
310
|
+
}),
|
|
311
|
+
new FormBlockLabel({
|
|
312
|
+
text: dataStore.t('form.Country'),
|
|
313
|
+
hideOnMobile: true,
|
|
314
|
+
}),
|
|
315
|
+
new FormBlockLabel({
|
|
316
|
+
text: dataStore.t('code'),
|
|
317
|
+
hideOnMobile: true,
|
|
318
|
+
}),
|
|
319
|
+
],
|
|
320
|
+
modifiers: {
|
|
321
|
+
longName: (longName: any) => getFullNameShorted(longName),
|
|
322
|
+
gender: (gender: any) => gender[0],
|
|
323
|
+
birthPlace: (birthPlace: any) => birthPlace.substring(0, 3),
|
|
324
|
+
economySectorCode: (economySectorCode: any) => economySectorCode[0],
|
|
325
|
+
},
|
|
326
|
+
};
|
|
327
|
+
return { ...baseFormData };
|
|
328
|
+
};
|
package/composables/index.ts
CHANGED
|
@@ -30,7 +30,7 @@ export class Masks {
|
|
|
30
30
|
date: string = '##.##.####';
|
|
31
31
|
post: string = '######';
|
|
32
32
|
threeDigit: string = '###';
|
|
33
|
-
iik: string = '
|
|
33
|
+
iik: string = 'KZXXXXXXXXXXXXXXXXXX';
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export const useMask = () => new Masks();
|
|
@@ -184,13 +184,15 @@ export const ESBDMessage = (ESBDObject: any, initialPoint: any) => {
|
|
|
184
184
|
|
|
185
185
|
export const ErrorHandler = (err: unknown, errorText?: string) => {
|
|
186
186
|
console.log(err);
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
if (
|
|
190
|
-
if ('
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
187
|
+
if (useDataStore) {
|
|
188
|
+
const dataStore = useDataStore();
|
|
189
|
+
if (err instanceof AxiosError) {
|
|
190
|
+
if ('response' in err && err.response && err.response.data) {
|
|
191
|
+
if ('status' in err.response && err.response.status === 403) {
|
|
192
|
+
dataStore.showToaster('error', dataStore.t('toaster.noPermission'), 10000);
|
|
193
|
+
} else if (err.response.data) {
|
|
194
|
+
dataStore.showToaster('error', errorText ? errorText : err.response.data, 10000);
|
|
195
|
+
}
|
|
194
196
|
}
|
|
195
197
|
}
|
|
196
198
|
}
|
|
@@ -317,3 +319,21 @@ export const getMainPageRoute = () => {
|
|
|
317
319
|
}
|
|
318
320
|
return 'index';
|
|
319
321
|
};
|
|
322
|
+
|
|
323
|
+
export const keyDeleter = <T extends object>(data: T, keys: Array<NestedKeyOf<T>>) => {
|
|
324
|
+
if (typeof data === 'object' && !!data && keys && Array.isArray(keys) && keys.length) {
|
|
325
|
+
keys.forEach(key => {
|
|
326
|
+
if (key) {
|
|
327
|
+
if (String(key).includes('.')) {
|
|
328
|
+
const childKey = String(key).substring(0, String(key).indexOf('.'));
|
|
329
|
+
const keyChain = [String(key).substring(String(key).indexOf('.') + 1)];
|
|
330
|
+
// @ts-ignore
|
|
331
|
+
keyDeleter(data[childKey], keyChain);
|
|
332
|
+
} else {
|
|
333
|
+
//@ts-ignore
|
|
334
|
+
delete data[key];
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
};
|
package/locales/ru.json
CHANGED
|
@@ -217,7 +217,10 @@
|
|
|
217
217
|
"downloadStatement": "Скачать заявление",
|
|
218
218
|
"downloadApplication": "Скачать приложение №1",
|
|
219
219
|
"downloadPowerOfAttorney": "Скачать доверенность",
|
|
220
|
-
"sendEgovMob": "Отправить на подпись через Egov Mobile"
|
|
220
|
+
"sendEgovMob": "Отправить на подпись через Egov Mobile",
|
|
221
|
+
"sendToPay": "Отправить на оплату",
|
|
222
|
+
"payEpay": "Оплатить через EPAY",
|
|
223
|
+
"payOffline": "Оплатить офлайн"
|
|
221
224
|
},
|
|
222
225
|
"dialog": {
|
|
223
226
|
"title": "Подтверждение",
|
|
@@ -252,7 +255,8 @@
|
|
|
252
255
|
"familyMember": "Выберите члена семьи",
|
|
253
256
|
"register": "Вы действительно хотите добавить в реестр данного ребенка?",
|
|
254
257
|
"toApprove": "Вы действительно хотите отправить на согласование?",
|
|
255
|
-
"affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?"
|
|
258
|
+
"affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?",
|
|
259
|
+
"choosePay": "Вы действительно хотите выбрать метод оплаты?"
|
|
256
260
|
},
|
|
257
261
|
"sign": {
|
|
258
262
|
"chooseDoc": "Выберите документы для подписание",
|
|
@@ -375,6 +379,7 @@
|
|
|
375
379
|
"coverPeriodMonth": "Срок страхования (в месяцах)",
|
|
376
380
|
"totalRequestedSumInsured": "Общая страховая сумма",
|
|
377
381
|
"totalInsurancePremiumAmount": "Общая страховая премия",
|
|
382
|
+
"totalInsurancePremiumAmountWithCommission": "Общая страховая премия с комиссией",
|
|
378
383
|
"agencyPart": "Агентская переменная часть, %",
|
|
379
384
|
"processGfot": "Кратность страховой суммы к ГФОТ-у",
|
|
380
385
|
"annuiteStartDate": "Дата расчета",
|
|
@@ -384,7 +389,8 @@
|
|
|
384
389
|
"factorCurrentValueGP": "Фактор текущей стоимости с учетом гарантированных выплат",
|
|
385
390
|
"alfa": "Расходы от премии, в %",
|
|
386
391
|
"gamma": "Расходы от выплат, в %",
|
|
387
|
-
"mrpPayment": "Выплата на погребение (в тенге)"
|
|
392
|
+
"mrpPayment": "Выплата на погребение (в тенге)",
|
|
393
|
+
"fixInsSum": "Фиксированная сумма"
|
|
388
394
|
},
|
|
389
395
|
"calculatorForm": {
|
|
390
396
|
"selectedCountries": "Выбранные страны",
|
|
@@ -886,7 +892,8 @@
|
|
|
886
892
|
"registrationPlaceOfContactPerson": "Место жительства или регистрации Контактного лица Застрахованного",
|
|
887
893
|
"identityCardOfContactPerson": "Документ удостоверяющий личность Контактного лица Застрахованного",
|
|
888
894
|
"recipientDocs": "Документы Получателя",
|
|
889
|
-
"recipientData": "Сведения о Получателе"
|
|
895
|
+
"recipientData": "Сведения о Получателе",
|
|
896
|
+
"deathInsFromNS": "Страхование от смерти от НС"
|
|
890
897
|
},
|
|
891
898
|
"bankDetailsForm": {
|
|
892
899
|
"title": "Банковские реквизиты",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl-core",
|
|
3
|
-
"version": "0.0.9-beta.
|
|
3
|
+
"version": "0.0.9-beta.45",
|
|
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
|
|
32
|
-
"i:all": "cd .. && cd amuletlife && yarn && cd .. && cd baiterek && yarn && cd .. && cd bolashak && yarn && cd .. && cd
|
|
31
|
+
"tk:all": "cd .. && cd amuletlife && yarn typecheck && cd .. && cd baiterek && yarn typecheck && cd .. && cd bolashak && yarn typecheck && cd .. && cd calc && yarn typecheck && cd .. && cd daskamkorlyk && yarn typecheck && cd .. && cd efo && yarn typecheck && cd .. && cd gons && yarn typecheck && cd .. && cd halykkazyna && yarn typecheck && cd .. && cd lifebusiness && yarn typecheck && cd .. && cd gns && 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 calc && yarn && cd .. && cd daskamkorlyk && yarn && cd .. && cd efo && yarn && cd .. && cd gons && yarn && cd .. && cd halykkazyna && yarn && cd .. && cd lifebusiness && yarn && cd .. && cd gns && 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",
|
package/store/data.store.ts
CHANGED
|
@@ -59,6 +59,7 @@ export const useDataStore = defineStore('data', {
|
|
|
59
59
|
isDas: state => state.product === 'daskamkorlyk',
|
|
60
60
|
isPension: state => state.product === 'pensionannuity',
|
|
61
61
|
isAmulet: state => state.product === 'amuletlife',
|
|
62
|
+
isGns: state => state.product === 'gns',
|
|
62
63
|
isCalculator: state => state.product === 'calculator',
|
|
63
64
|
isCheckContract: state => state.product === 'checkcontract',
|
|
64
65
|
isCheckContragent: state => state.product === 'checkcontragent',
|
|
@@ -394,7 +395,7 @@ export const useDataStore = defineStore('data', {
|
|
|
394
395
|
this.isLoading = false;
|
|
395
396
|
}
|
|
396
397
|
},
|
|
397
|
-
async getContragent(member: Member, load: boolean = true) {
|
|
398
|
+
async getContragent(member: Member, load: boolean = true, showToaster: boolean = true) {
|
|
398
399
|
this.isLoading = load;
|
|
399
400
|
if (!member.iin) return;
|
|
400
401
|
try {
|
|
@@ -416,7 +417,7 @@ export const useDataStore = defineStore('data', {
|
|
|
416
417
|
}
|
|
417
418
|
member.gotFromInsis = true;
|
|
418
419
|
} else {
|
|
419
|
-
this.showToaster('error', this.t('toaster.notFoundUser'));
|
|
420
|
+
if (showToaster) this.showToaster('error', this.t('toaster.notFoundUser'));
|
|
420
421
|
}
|
|
421
422
|
} catch (err) {
|
|
422
423
|
ErrorHandler(err);
|
|
@@ -1046,9 +1047,10 @@ export const useDataStore = defineStore('data', {
|
|
|
1046
1047
|
conditionsData.policyAppDto.paymentPeriod = Number(this.formStore.productConditionsForm.termAnnuityPayments);
|
|
1047
1048
|
conditionsData.policyAppDto.annuityPaymentPeriodId = (this.formStore.productConditionsForm.periodAnnuityPayment.id as string) ?? undefined;
|
|
1048
1049
|
}
|
|
1049
|
-
if (this.isLifeBusiness) {
|
|
1050
|
+
if (this.isLifeBusiness || this.isGns) {
|
|
1050
1051
|
conditionsData.policyAppDto.insTermInMonth = Number(this.formStore.productConditionsForm.coverPeriod);
|
|
1051
|
-
conditionsData.policyAppDto.fixInsSum = getNumber(String(this.formStore.productConditionsForm.
|
|
1052
|
+
conditionsData.policyAppDto.fixInsSum = getNumber(String(this.formStore.productConditionsForm.fixInsSum));
|
|
1053
|
+
conditionsData.policyAppDto.mainInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
|
|
1052
1054
|
conditionsData.policyAppDto.agentCommission = Number(this.formStore.productConditionsForm.agentCommission);
|
|
1053
1055
|
conditionsData.policyAppDto.processDefinitionFgotId = (this.formStore.productConditionsForm.processGfot.id as string) ?? undefined;
|
|
1054
1056
|
}
|
|
@@ -1332,7 +1334,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1332
1334
|
return this.cities;
|
|
1333
1335
|
},
|
|
1334
1336
|
async getCitiesEfo(key?: string, member?: any, parentKey?: string) {
|
|
1335
|
-
if (this.isLifeBusiness) {
|
|
1337
|
+
if (this.isLifeBusiness || this.isGns) {
|
|
1336
1338
|
await this.getFromApi('cities', 'getCities');
|
|
1337
1339
|
//@ts-ignore
|
|
1338
1340
|
if (key && member[parentKey][key] && member[parentKey][key].ids !== null) return this.cities.filter(i => i.code === member[parentKey][key].ids);
|
|
@@ -1372,7 +1374,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1372
1374
|
return await this.getFromApi('economySectorCode', 'getSectorCode');
|
|
1373
1375
|
},
|
|
1374
1376
|
async getEconomicActivityType() {
|
|
1375
|
-
if (this.isLifeBusiness || this.isDas || this.isUU) return await this.getFromApi('economicActivityType', 'getEconomicActivityType');
|
|
1377
|
+
if (this.isLifeBusiness || this.isGns || this.isDas || this.isUU) return await this.getFromApi('economicActivityType', 'getEconomicActivityType');
|
|
1376
1378
|
},
|
|
1377
1379
|
async getFamilyStatuses() {
|
|
1378
1380
|
return await this.getFromApi('familyStatuses', 'getFamilyStatuses');
|
|
@@ -1381,7 +1383,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1381
1383
|
return await this.getFromApi('relations', 'getRelationTypes');
|
|
1382
1384
|
},
|
|
1383
1385
|
async getBanks() {
|
|
1384
|
-
if (this.isLifeBusiness || this.isDas || this.isUU) return await this.getFromApi('banks', 'getBanks');
|
|
1386
|
+
if (this.isLifeBusiness || this.isGns || this.isDas || this.isUU) return await this.getFromApi('banks', 'getBanks');
|
|
1385
1387
|
},
|
|
1386
1388
|
async getProcessIndexRate() {
|
|
1387
1389
|
if (this.processCode) {
|
|
@@ -1432,7 +1434,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1432
1434
|
return this.gender;
|
|
1433
1435
|
},
|
|
1434
1436
|
async getAuthorityBasis() {
|
|
1435
|
-
if (this.isDas || this.isLifeBusiness || this.isUU) return await this.getFromApi('authorityBasis', 'getArmDicts', 'DicAuthorityBasis');
|
|
1437
|
+
if (this.isDas || this.isLifeBusiness || this.isGns || this.isUU) return await this.getFromApi('authorityBasis', 'getArmDicts', 'DicAuthorityBasis');
|
|
1436
1438
|
},
|
|
1437
1439
|
async getAllFormsData() {
|
|
1438
1440
|
await Promise.allSettled([
|
|
@@ -1790,11 +1792,12 @@ export const useDataStore = defineStore('data', {
|
|
|
1790
1792
|
calculationData.paymentPeriod = Number(this.formStore.productConditionsForm.termAnnuityPayments);
|
|
1791
1793
|
calculationData.annuityPaymentPeriodId = (this.formStore.productConditionsForm.periodAnnuityPayment.id as string) ?? undefined;
|
|
1792
1794
|
}
|
|
1793
|
-
if (this.isLifeBusiness || product === 'lifebusiness') {
|
|
1795
|
+
if (this.isLifeBusiness || product === 'lifebusiness' || this.isGns || product === 'gns') {
|
|
1794
1796
|
calculationData.clients = this.formStore.lfb.clients;
|
|
1795
1797
|
calculationData.insrCount = this.formStore.lfb.clients.length;
|
|
1796
1798
|
calculationData.insTermInMonth = Number(this.formStore.productConditionsForm.coverPeriod);
|
|
1797
|
-
calculationData.fixInsSum = getNumber(String(this.formStore.productConditionsForm.
|
|
1799
|
+
calculationData.fixInsSum = getNumber(String(this.formStore.productConditionsForm.fixInsSum));
|
|
1800
|
+
calculationData.mainInsSum = getNumber(String(this.formStore.productConditionsForm.requestedSumInsured));
|
|
1798
1801
|
calculationData.agentCommission = Number(this.formStore.productConditionsForm.agentCommission);
|
|
1799
1802
|
calculationData.processDefinitionFgotId = this.formStore.productConditionsForm.processGfot.id;
|
|
1800
1803
|
}
|
|
@@ -1818,9 +1821,9 @@ export const useDataStore = defineStore('data', {
|
|
|
1818
1821
|
this.formStore.productConditionsForm.statePremium5 = this.getNumberWithSpaces(calculationResponse.statePremium5);
|
|
1819
1822
|
this.formStore.productConditionsForm.statePremium7 = this.getNumberWithSpaces(calculationResponse.statePremium7);
|
|
1820
1823
|
}
|
|
1821
|
-
if (this.isLifeBusiness || product === 'lifebusiness') {
|
|
1822
|
-
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(calculationResponse.
|
|
1823
|
-
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.
|
|
1824
|
+
if (this.isLifeBusiness || product === 'lifebusiness' || this.isGns || product === 'gns') {
|
|
1825
|
+
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(calculationResponse.mainPremiumWithCommission);
|
|
1826
|
+
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(calculationResponse.mainInsSum === 0 ? null : calculationResponse.mainInsSum);
|
|
1824
1827
|
this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
|
|
1825
1828
|
if (calculationResponse.agentCommission) {
|
|
1826
1829
|
this.formStore.productConditionsForm.agentCommission = calculationResponse.agentCommission;
|
|
@@ -1873,7 +1876,7 @@ export const useDataStore = defineStore('data', {
|
|
|
1873
1876
|
this.formStore.productConditionsForm.statePremium5 = this.getNumberWithSpaces(govPremiums.statePremium5 === null ? null : govPremiums.statePremium5);
|
|
1874
1877
|
this.formStore.productConditionsForm.statePremium7 = this.getNumberWithSpaces(govPremiums.statePremium7 === null ? null : govPremiums.statePremium7);
|
|
1875
1878
|
}
|
|
1876
|
-
if (this.isLifeBusiness) {
|
|
1879
|
+
if (this.isLifeBusiness || this.isGns) {
|
|
1877
1880
|
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(result.value);
|
|
1878
1881
|
if (applicationData.insuredApp && applicationData.insuredApp.length) {
|
|
1879
1882
|
const res = await this.newInsuredList(applicationData.insuredApp);
|
|
@@ -2976,7 +2979,7 @@ export const useDataStore = defineStore('data', {
|
|
|
2976
2979
|
member.resetMember(false);
|
|
2977
2980
|
}
|
|
2978
2981
|
member.gosPersonData = person;
|
|
2979
|
-
await this.getContragent(member, false);
|
|
2982
|
+
await this.getContragent(member, false, false);
|
|
2980
2983
|
member.verifyDate = responseInfo.responseDate;
|
|
2981
2984
|
member.verifyType = 'GBDFL';
|
|
2982
2985
|
await this.saveInStoreUserGBDFL(person, member);
|
|
@@ -3146,9 +3149,16 @@ export const useDataStore = defineStore('data', {
|
|
|
3146
3149
|
this.preparePersonData(policyholder);
|
|
3147
3150
|
delete policyholder.clientData.beneficalOwnerQuest;
|
|
3148
3151
|
delete policyholder.clientData.identityDocument;
|
|
3149
|
-
delete policyholder.clientData.authoritedPerson.identityDocument;
|
|
3150
3152
|
delete policyholder.clientData.activityTypes;
|
|
3151
3153
|
delete policyholder.clientData.citizenship;
|
|
3154
|
+
delete policyholder.clientData.authoritedPerson.identityDocument;
|
|
3155
|
+
delete policyholder.clientData.authoritedPerson.actualAddress;
|
|
3156
|
+
delete policyholder.clientData.authoritedPerson.bankInfo;
|
|
3157
|
+
delete policyholder.clientData.authoritedPerson.economySectorCode;
|
|
3158
|
+
delete policyholder.clientData.authoritedPerson.legalAddress;
|
|
3159
|
+
delete policyholder.clientData.authoritedPerson.placeOfBirth;
|
|
3160
|
+
delete policyholder.clientData.authoritedPerson.resident;
|
|
3161
|
+
delete policyholder.clientData.authoritedPerson.taxResidentCountry;
|
|
3152
3162
|
if (!policyholder.clientData.iin) return false;
|
|
3153
3163
|
try {
|
|
3154
3164
|
const response = await this.api.startApplication(policyholder);
|
|
@@ -3236,10 +3246,11 @@ export const useDataStore = defineStore('data', {
|
|
|
3236
3246
|
}
|
|
3237
3247
|
|
|
3238
3248
|
this.formStore.productConditionsForm.agentCommission = applicationData.policyAppDto.agentCommission === 0 ? null : applicationData.policyAppDto.agentCommission;
|
|
3249
|
+
this.formStore.productConditionsForm.fixInsSum = this.getNumberWithSpaces(applicationData.policyAppDto.fixInsSum === 0 ? null : applicationData.policyAppDto.fixInsSum);
|
|
3239
3250
|
this.formStore.productConditionsForm.coverPeriod = 12;
|
|
3240
3251
|
this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(applicationData.policyAppDto.amount === 0 ? null : applicationData.policyAppDto.amount);
|
|
3241
3252
|
this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(
|
|
3242
|
-
applicationData.policyAppDto.
|
|
3253
|
+
applicationData.policyAppDto.mainPremiumWithCommission === 0 ? null : applicationData.policyAppDto.mainPremiumWithCommission,
|
|
3243
3254
|
);
|
|
3244
3255
|
const paymentPeriod = this.processPaymentPeriod.find(item => item.id == applicationData.policyAppDto.paymentPeriodId);
|
|
3245
3256
|
this.formStore.productConditionsForm.paymentPeriod = paymentPeriod ? paymentPeriod : new Value();
|
package/types/enum.ts
CHANGED
package/types/index.ts
CHANGED
|
@@ -24,6 +24,7 @@ declare global {
|
|
|
24
24
|
| 'checkcontragent'
|
|
25
25
|
| 'daskamkorlyk'
|
|
26
26
|
| 'amuletlife'
|
|
27
|
+
| 'gns'
|
|
27
28
|
| 'pensionannuity'
|
|
28
29
|
| 'dso'
|
|
29
30
|
| 'uu';
|
|
@@ -59,6 +60,14 @@ declare global {
|
|
|
59
60
|
| 'url'
|
|
60
61
|
| 'week';
|
|
61
62
|
|
|
63
|
+
type NestedKeyOf<ObjectType extends object> = {
|
|
64
|
+
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}` : Key;
|
|
65
|
+
}[keyof ObjectType & (string | number)];
|
|
66
|
+
|
|
67
|
+
type FinalNestedKeyOf<ObjectType extends object> = {
|
|
68
|
+
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? `${Key}.${NestedKeyOf<ObjectType[Key]>}` : Key;
|
|
69
|
+
}[keyof ObjectType & (string | number)];
|
|
70
|
+
|
|
62
71
|
interface AxiosRequestLocalConfig extends AxiosRequestConfig {
|
|
63
72
|
method: Methods | keyof typeof Methods;
|
|
64
73
|
}
|
|
@@ -308,6 +317,8 @@ declare global {
|
|
|
308
317
|
clients?: ClientV2[];
|
|
309
318
|
fixInsSum?: number | null;
|
|
310
319
|
agentCommission?: number | null;
|
|
320
|
+
mainInsSum?: number | null;
|
|
321
|
+
mainPremiumWithCommission?: number;
|
|
311
322
|
};
|
|
312
323
|
|
|
313
324
|
interface AddCover {
|
|
@@ -573,7 +584,7 @@ declare global {
|
|
|
573
584
|
tariffId?: string | null;
|
|
574
585
|
mainPremium?: number | string | null;
|
|
575
586
|
processDefinitionFgotId?: string | number;
|
|
576
|
-
mainInsSum?: number;
|
|
587
|
+
mainInsSum?: number | null;
|
|
577
588
|
agentCommission?: number | null;
|
|
578
589
|
};
|
|
579
590
|
|