hl-core 0.0.9-beta.54 → 0.0.9-beta.56
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 +66 -14
- package/api/interceptors.ts +1 -1
- package/components/Form/FormData.vue +2 -2
- package/components/Layout/SettingsPanel.vue +12 -5
- package/components/Menu/MenuNav.vue +1 -1
- package/components/Pages/Anketa.vue +38 -14
- package/components/Pages/Documents.vue +11 -4
- package/components/Pages/MemberForm.vue +96 -10
- package/components/Pages/ProductConditions.vue +39 -15
- package/components/Panel/PanelHandler.vue +27 -25
- package/components/Transitions/Animation.vue +2 -2
- package/components/Utilities/JsonViewer.vue +1 -1
- package/composables/classes.ts +10 -3
- package/composables/constants.ts +5 -2
- package/composables/fields.ts +3 -3
- package/composables/index.ts +3 -1
- package/configs/pwa.ts +49 -0
- package/layouts/clear.vue +21 -0
- package/layouts/default.vue +17 -0
- package/layouts/full.vue +21 -0
- package/locales/ru.json +12 -7
- package/nuxt.config.ts +1 -4
- package/package.json +2 -1
- package/store/data.store.ts +88 -42
- package/store/rules.ts +29 -0
- package/store/toast.ts +1 -1
- package/types/env.d.ts +1 -0
- package/types/index.ts +32 -8
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
/>
|
|
115
115
|
</base-form-section>
|
|
116
116
|
<base-form-section v-if="hasDefault" :title="defaultText">
|
|
117
|
-
<div v-if="isCalculator && ($route.params.taskId === '0' || $dataStore.isCalculator)">
|
|
117
|
+
<div v-if="isCalculator && ($route.params.taskId === '0' || $dataStore.isCalculator || fromIndexPage)">
|
|
118
118
|
<base-form-input
|
|
119
119
|
v-model="productConditionsForm.signDate"
|
|
120
120
|
:maska="$maska.date"
|
|
@@ -168,8 +168,8 @@
|
|
|
168
168
|
v-if="hasProcessIndexRate"
|
|
169
169
|
v-model="productConditionsForm.processIndexRate"
|
|
170
170
|
:value="productConditionsForm.processIndexRate?.nameRu"
|
|
171
|
-
:readonly="isDisabled"
|
|
172
|
-
:clearable="!isDisabled"
|
|
171
|
+
:readonly="isDisabled || productConditionsForm.paymentPeriod.code === 'single'"
|
|
172
|
+
:clearable="!isDisabled && !(productConditionsForm.paymentPeriod.code === 'single')"
|
|
173
173
|
:rules="$rules.objectRequired"
|
|
174
174
|
:label="$dataStore.t('productConditionsForm.processIndexRate')"
|
|
175
175
|
append-inner-icon="mdi mdi-chevron-right"
|
|
@@ -282,19 +282,20 @@
|
|
|
282
282
|
/>
|
|
283
283
|
</base-form-section>
|
|
284
284
|
<section v-if="whichProduct === 'pensionannuitynew'">
|
|
285
|
+
<base-btn v-if="formStore.applicationData.processCode === 19 && !isDisabled" :text="$dataStore.t('buttons.copyToClient')" class="mt-4" @click="copyRedirect" />
|
|
285
286
|
<base-form-section :title="$dataStore.t('pension.compulsoryAmount&Prof')">
|
|
286
287
|
<base-form-input
|
|
287
288
|
v-model="pensionCalculationParams.compulsoryContractAmount"
|
|
288
289
|
:maska="$maska.numbers"
|
|
289
|
-
:readonly="isDisabled"
|
|
290
|
-
:clearable="!isDisabled"
|
|
290
|
+
:readonly="isDisabled || isEnpfSum"
|
|
291
|
+
:clearable="!isDisabled && !isEnpfSum"
|
|
291
292
|
:label="$dataStore.t('pension.compulsoryContractAmount')"
|
|
292
293
|
/>
|
|
293
294
|
<base-form-input
|
|
294
295
|
v-model="pensionCalculationParams.compulsoryProfContractAmount"
|
|
295
296
|
:maska="$maska.numbers"
|
|
296
|
-
:readonly="isDisabled"
|
|
297
|
-
:clearable="!isDisabled"
|
|
297
|
+
:readonly="isDisabled || isEnpfSum"
|
|
298
|
+
:clearable="!isDisabled && !isEnpfSum"
|
|
298
299
|
:label="$dataStore.t('pension.compulsoryProfContractAmount')"
|
|
299
300
|
/>
|
|
300
301
|
<base-animation>
|
|
@@ -302,8 +303,8 @@
|
|
|
302
303
|
v-if="pensionCalculationParams.compulsoryProfContractAmount && pensionCalculationParams.compulsoryProfContractAmount != 0"
|
|
303
304
|
v-model="pensionForm.compulsoryProfMonthCount"
|
|
304
305
|
:maska="$maska.numbers"
|
|
305
|
-
:readonly="isDisabled"
|
|
306
|
-
:clearable="!isDisabled"
|
|
306
|
+
:readonly="isDisabled || isEnpfSum"
|
|
307
|
+
:clearable="!isDisabled && !isEnpfSum"
|
|
307
308
|
:label="$dataStore.t('pension.compulsoryProfMonthCount')"
|
|
308
309
|
/>
|
|
309
310
|
</base-animation>
|
|
@@ -337,8 +338,8 @@
|
|
|
337
338
|
:maska="$maska.date"
|
|
338
339
|
:label="$dataStore.t('pension.contractDate')"
|
|
339
340
|
:readonly="isDisabled"
|
|
340
|
-
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
341
341
|
:clearable="!isDisabled"
|
|
342
|
+
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
342
343
|
:rules="pensionForm.transferContractCompany?.ids ? $rules.required.concat($rules.date) : []"
|
|
343
344
|
/>
|
|
344
345
|
<base-form-input
|
|
@@ -731,12 +732,13 @@ export default defineComponent({
|
|
|
731
732
|
const transferContractFirstPaymentDate = ref();
|
|
732
733
|
const guaranteedPeriodList = Array.from(Array(35), (e, i) => i + 1);
|
|
733
734
|
const pensionForm = formStore.applicationData?.pensionApp ?? undefined;
|
|
735
|
+
const isEnpfSum = (formStore.applicationData?.isEnpfSum ?? false) && useEnv().isProduction;
|
|
734
736
|
|
|
735
737
|
const isMultiplePanelOpen = ref<boolean>(false);
|
|
736
738
|
const multiplePanelValue = ref<CountryValue>(new CountryValue());
|
|
737
739
|
const multiplePanelList = ref<CountryValue[]>([]);
|
|
738
740
|
const calculatorForm = productConditionsForm.calculatorForm;
|
|
739
|
-
|
|
741
|
+
const minInsSum = computed(() => formStore.lfb.clients && formStore.lfb.clients.reduce((min, item) => Math.min(min, item.insSum), Infinity));
|
|
740
742
|
const isShownAdditionalTerms = computed(() => {
|
|
741
743
|
if (whichProduct.value === 'gons') {
|
|
742
744
|
return false;
|
|
@@ -760,7 +762,8 @@ export default defineComponent({
|
|
|
760
762
|
}
|
|
761
763
|
return isDisabled.value;
|
|
762
764
|
});
|
|
763
|
-
const
|
|
765
|
+
const fromIndexPage = computed(() => whichProduct.value === 'gons' && route.name === 'index' && route.query.tab === 'calculator');
|
|
766
|
+
const isTask = computed(() => (route.params.taskId === '0' && props.isCalculator === true) || dataStore.isTask() || fromIndexPage.value);
|
|
764
767
|
const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm || formStore.canBeClaimed === true);
|
|
765
768
|
const isUnderwriterRole = computed(() => dataStore.isUnderwriter() || dataStore.isAdmin() || dataStore.isSupport());
|
|
766
769
|
const insurancePremiumPerMonthRule = computed(() => (!!productConditionsForm.insurancePremiumPerMonth ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
@@ -774,7 +777,11 @@ export default defineComponent({
|
|
|
774
777
|
return isDisabled.value;
|
|
775
778
|
});
|
|
776
779
|
const requestedSumInsuredRule = computed(() => (!!productConditionsForm.requestedSumInsured ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
777
|
-
const fixInsSumRule = computed(() =>
|
|
780
|
+
const fixInsSumRule = computed(() =>
|
|
781
|
+
!!productConditionsForm.fixInsSum
|
|
782
|
+
? dataStore.rules.required.concat(dataStore.rules.sums, dataStore.rules.fixInsSumLimit(getNumber(productConditionsForm.fixInsSum as string), minInsSum.value))
|
|
783
|
+
: [],
|
|
784
|
+
);
|
|
778
785
|
const amountAnnuityPayments = computed(() => (!!productConditionsForm.amountAnnuityPayments ? dataStore.rules.required.concat(dataStore.rules.sums) : []));
|
|
779
786
|
const hasCalculated = computed(() => {
|
|
780
787
|
if ((whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') && productConditionsForm.requestedSumInsured === null) {
|
|
@@ -1056,6 +1063,10 @@ export default defineComponent({
|
|
|
1056
1063
|
await router.push({ name: 'taskId-NewApp', params: route.params, query: { tab: 'statement' } });
|
|
1057
1064
|
return;
|
|
1058
1065
|
}
|
|
1066
|
+
if (whichProduct.value === 'gons') {
|
|
1067
|
+
await router.push({ name: 'taskId', params: { taskId: '0' }, query: { tab: 'statement' } });
|
|
1068
|
+
return;
|
|
1069
|
+
}
|
|
1059
1070
|
if (statementItem) {
|
|
1060
1071
|
dataStore.menu.selectedItem = statementItem;
|
|
1061
1072
|
await router.replace({
|
|
@@ -1085,6 +1096,10 @@ export default defineComponent({
|
|
|
1085
1096
|
} else {
|
|
1086
1097
|
// @ts-ignore
|
|
1087
1098
|
productConditionsForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
|
|
1099
|
+
if (currentPanel.value === 'paymentPeriod' && hasProcessIndexRate.value && item.code === 'single') {
|
|
1100
|
+
const defaultIndexRate = dataStore.processIndexRate.find((i: any) => i.isDefault === true);
|
|
1101
|
+
if (defaultIndexRate) productConditionsForm.processIndexRate = defaultIndexRate;
|
|
1102
|
+
}
|
|
1088
1103
|
}
|
|
1089
1104
|
};
|
|
1090
1105
|
const selectOption = (value: CountryValue) => {
|
|
@@ -1581,7 +1596,7 @@ export default defineComponent({
|
|
|
1581
1596
|
}
|
|
1582
1597
|
if (whichProduct.value !== 'lifetrip' && whichProduct.value !== 'pensionannuitynew') {
|
|
1583
1598
|
if (
|
|
1584
|
-
(dataStore.isCalculator || route.params.taskId === '0') &&
|
|
1599
|
+
(dataStore.isCalculator || route.params.taskId === '0' || fromIndexPage.value) &&
|
|
1585
1600
|
productConditionsForm.requestedSumInsured === null &&
|
|
1586
1601
|
productConditionsForm.insurancePremiumPerMonth === null
|
|
1587
1602
|
) {
|
|
@@ -1639,7 +1654,7 @@ export default defineComponent({
|
|
|
1639
1654
|
dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
|
|
1640
1655
|
transferContractDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractDate);
|
|
1641
1656
|
transferContractFirstPaymentDate.value = reformatDate(formStore.applicationData.pensionApp.transferContractFirstPaymentDate);
|
|
1642
|
-
maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ??
|
|
1657
|
+
maxDate.value = await dataStore.getVariableData(formStore.applicationData.processCode ?? 19);
|
|
1643
1658
|
}
|
|
1644
1659
|
});
|
|
1645
1660
|
|
|
@@ -1724,6 +1739,12 @@ export default defineComponent({
|
|
|
1724
1739
|
},
|
|
1725
1740
|
);
|
|
1726
1741
|
}
|
|
1742
|
+
|
|
1743
|
+
const copyRedirect = async () => {
|
|
1744
|
+
const url = await dataStore.api.getEnpfRedirectUrl(String(formStore.applicationData.processInstanceId));
|
|
1745
|
+
dataStore.copyToClipboard(url.redirectUrl);
|
|
1746
|
+
};
|
|
1747
|
+
|
|
1727
1748
|
return {
|
|
1728
1749
|
// State
|
|
1729
1750
|
formStore,
|
|
@@ -1756,6 +1777,7 @@ export default defineComponent({
|
|
|
1756
1777
|
enabled,
|
|
1757
1778
|
maxDate,
|
|
1758
1779
|
guaranteedPeriodList,
|
|
1780
|
+
isEnpfSum,
|
|
1759
1781
|
|
|
1760
1782
|
// Computed
|
|
1761
1783
|
isTask,
|
|
@@ -1805,6 +1827,7 @@ export default defineComponent({
|
|
|
1805
1827
|
pensionAmount,
|
|
1806
1828
|
pensionCalculationParams,
|
|
1807
1829
|
hasDeathInsAnyReason,
|
|
1830
|
+
fromIndexPage,
|
|
1808
1831
|
|
|
1809
1832
|
// Rules
|
|
1810
1833
|
coverPeriodRule,
|
|
@@ -1835,6 +1858,7 @@ export default defineComponent({
|
|
|
1835
1858
|
coverTypeName,
|
|
1836
1859
|
pickSubTermValue,
|
|
1837
1860
|
onInputFixInsSum,
|
|
1861
|
+
copyRedirect,
|
|
1838
1862
|
};
|
|
1839
1863
|
},
|
|
1840
1864
|
});
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<base-btn :text="$dataStore.t('buttons.sendOnPaper')" :disabled="isPaperDisabled" :loading="loading" @click="handleSignAction('paper')" />
|
|
34
34
|
<base-btn :text="$dataStore.t('buttons.sendElectronically')" :disabled="isElectronicDisabled" :loading="loading" @click="handleSignAction('electronic')" />
|
|
35
35
|
<base-btn :text="$dataStore.t('buttons.generatePrintedForms')" :disabled="isScansDisabled" :loading="loading" @click="handleSignAction('scans')" />
|
|
36
|
-
<base-btn :text="$dataStore.t('buttons.sendEgovMob')" :disabled="isQrDisabled" :loading="loading" @click="handleSignAction('qr')" />
|
|
36
|
+
<base-btn v-if="!useEnv().isProduction" :text="$dataStore.t('buttons.sendEgovMob')" :disabled="isQrDisabled" :loading="loading" @click="handleSignAction('qr')" />
|
|
37
37
|
<base-btn
|
|
38
38
|
v-if="$dataStore.isPension"
|
|
39
39
|
:text="$dataStore.t('buttons.signWithSignature')"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
@click="handleSignAction('signature')"
|
|
43
43
|
/>
|
|
44
44
|
<base-btn
|
|
45
|
-
v-if="$dataStore.isPension"
|
|
45
|
+
v-if="$dataStore.isPension && !useEnv().isProduction"
|
|
46
46
|
:text="$dataStore.t('buttons.signWithSignatureXML')"
|
|
47
47
|
:disabled="isQrXmlDisabled"
|
|
48
48
|
:loading="loading"
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
</base-form-section>
|
|
71
71
|
</div>
|
|
72
72
|
</div>
|
|
73
|
-
<div v-if="processCode == 2">
|
|
73
|
+
<div v-if="processCode == 2" class="flex flex-col gap-2">
|
|
74
74
|
<base-btn
|
|
75
75
|
:text="$dataStore.t('buttons.downloadPARefundStatement')"
|
|
76
76
|
:loading="$dataStore.isButtonsLoading"
|
|
@@ -178,6 +178,7 @@
|
|
|
178
178
|
</div>
|
|
179
179
|
</base-fade-transition>
|
|
180
180
|
<base-btn
|
|
181
|
+
v-if="$dataStore.isPension"
|
|
181
182
|
:text="$dataStore.t('buttons.cancel')"
|
|
182
183
|
:btn="$styles.whiteBtn"
|
|
183
184
|
@click="
|
|
@@ -278,14 +279,7 @@ export default defineComponent({
|
|
|
278
279
|
const selectedClient = ref<SignUrlType>();
|
|
279
280
|
const documentDict = computed(() => dataStore.dicFileTypeList.find(i => i.nameRu === 'Решение АС'));
|
|
280
281
|
const pensionForm = formStore.applicationData?.pensionApp ?? undefined;
|
|
281
|
-
const
|
|
282
|
-
() =>
|
|
283
|
-
formStore.applicationData.statusCode === 'ContractSignedFrom' &&
|
|
284
|
-
((pensionForm.compulsoryContractAmount && pensionForm.compulsoryContractAmount !== 0) ||
|
|
285
|
-
(pensionForm.compulsoryProfContractAmount && pensionForm.compulsoryProfContractAmount !== 0) ||
|
|
286
|
-
(pensionForm.voluntaryContractAmount && pensionForm.voluntaryContractAmount !== 0)),
|
|
287
|
-
);
|
|
288
|
-
const consentGiven = computed(() => !!formStore.signedDocumentList.find(i => i.fileTypeCode === '43')?.signed);
|
|
282
|
+
const consentGiven = computed(() => !!formStore.signedDocumentList.find(i => i.fileTypeCode === '43' && i.signed === true));
|
|
289
283
|
const affiliationDocument = computed(() => formStore.signedDocumentList.find((file: DocumentItem) => file.fileTypeName === 'Решение АС'));
|
|
290
284
|
const affiliationData = ref<{
|
|
291
285
|
processInstanceId: string | number;
|
|
@@ -337,6 +331,9 @@ export default defineComponent({
|
|
|
337
331
|
if (event.target) {
|
|
338
332
|
const files = (event.target as HTMLInputElement).files;
|
|
339
333
|
if (files && files.length) {
|
|
334
|
+
if (files[0].type !== 'application/pdf') {
|
|
335
|
+
return dataStore.showToaster('error', dataStore.t('toaster.onlyPDF'), 6000);
|
|
336
|
+
}
|
|
340
337
|
const doc = await selectedDocument(type);
|
|
341
338
|
const data = {
|
|
342
339
|
processInstanceId: formStore.applicationData.processInstanceId,
|
|
@@ -570,30 +567,29 @@ export default defineComponent({
|
|
|
570
567
|
if (dataStore.isGons) {
|
|
571
568
|
return true;
|
|
572
569
|
}
|
|
573
|
-
if (!consentGiven.value && dataStore.isPension) {
|
|
570
|
+
if ((!consentGiven.value || formStore.applicationData.statusCode === 'HeadManagerForm') && dataStore.isPension && processCode !== 2) {
|
|
574
571
|
return true;
|
|
575
572
|
}
|
|
576
573
|
return false;
|
|
577
574
|
});
|
|
578
575
|
const isQrDisabled = computed(() => {
|
|
579
|
-
if (dataStore.isPension) {
|
|
580
|
-
return
|
|
576
|
+
if (consentGiven.value && dataStore.isPension && processCode !== 2) {
|
|
577
|
+
return false;
|
|
581
578
|
}
|
|
582
579
|
return true;
|
|
583
580
|
});
|
|
584
581
|
const isQrXmlDisabled = computed(() => {
|
|
585
|
-
if (dataStore.isPension) {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
582
|
+
if (!consentGiven.value && dataStore.isPension && processCode !== 2) {
|
|
583
|
+
return false;
|
|
584
|
+
}
|
|
585
|
+
if (dataStore.isLifeBusiness || dataStore.isGns) {
|
|
586
|
+
return false;
|
|
589
587
|
}
|
|
590
588
|
return true;
|
|
591
589
|
});
|
|
592
590
|
const isSignatureDisabled = computed(() => {
|
|
593
|
-
if (dataStore.isPension) {
|
|
594
|
-
|
|
595
|
-
return false;
|
|
596
|
-
}
|
|
591
|
+
if ((!consentGiven.value || formStore.applicationData.statusCode === 'HeadManagerForm') && dataStore.isPension && processCode !== 2) {
|
|
592
|
+
return false;
|
|
597
593
|
}
|
|
598
594
|
return true;
|
|
599
595
|
});
|
|
@@ -668,7 +664,10 @@ export default defineComponent({
|
|
|
668
664
|
};
|
|
669
665
|
|
|
670
666
|
const startConnection = async (uuid: string, groupId?: string) => {
|
|
671
|
-
connection.value = new HubConnectionBuilder()
|
|
667
|
+
connection.value = new HubConnectionBuilder()
|
|
668
|
+
.withUrl(`${getStrValuePerEnv('qrHubUrl')}/${uuid}`)
|
|
669
|
+
.withAutomaticReconnect()
|
|
670
|
+
.build();
|
|
672
671
|
try {
|
|
673
672
|
await connection.value.start();
|
|
674
673
|
console.log('SignalR connection started.');
|
|
@@ -677,7 +676,11 @@ export default defineComponent({
|
|
|
677
676
|
isQrLoading.value = true;
|
|
678
677
|
} else if (message === 'Signed') {
|
|
679
678
|
isQrLoading.value = false;
|
|
680
|
-
|
|
679
|
+
if (dataStore.isPension) {
|
|
680
|
+
dataStore.showToaster('info', dataStore.t('pension.signInProcess'));
|
|
681
|
+
} else {
|
|
682
|
+
dataStore.showToaster('success', dataStore.t('sign.successQrSigned'));
|
|
683
|
+
}
|
|
681
684
|
qrUrl.value = '';
|
|
682
685
|
isQr.value = false;
|
|
683
686
|
dataStore.panel.open = false;
|
|
@@ -852,7 +855,6 @@ export default defineComponent({
|
|
|
852
855
|
isSignatureDisabled,
|
|
853
856
|
choosePayActions,
|
|
854
857
|
consentGiven,
|
|
855
|
-
needsAgreement,
|
|
856
858
|
};
|
|
857
859
|
},
|
|
858
860
|
});
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
<script setup lang="ts">
|
|
9
9
|
defineProps({
|
|
10
10
|
type: {
|
|
11
|
-
type: String as PropType<VuetifyAnimations>,
|
|
11
|
+
type: String as PropType<Utils.VuetifyAnimations>,
|
|
12
12
|
default: 'expand',
|
|
13
13
|
},
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
const vuetifyAnimations: { [key in VuetifyAnimations]: string } = {
|
|
16
|
+
const vuetifyAnimations: { [key in Utils.VuetifyAnimations]: string } = {
|
|
17
17
|
expand: 'v-expand-transition',
|
|
18
18
|
fab: 'v-fab-transition',
|
|
19
19
|
fade: 'v-fade-transition',
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<script lang="ts">
|
|
15
15
|
import VueJsonPretty from 'vue-json-pretty';
|
|
16
16
|
import 'vue-json-pretty/lib/styles.css';
|
|
17
|
-
import { JSONDataType } from 'vue-json-pretty/types/utils';
|
|
17
|
+
import { type JSONDataType } from 'vue-json-pretty/types/utils';
|
|
18
18
|
|
|
19
19
|
export default defineComponent({
|
|
20
20
|
components: { VueJsonPretty },
|
package/composables/classes.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Statuses, StoreMembers, MemberAppCodes } from '../types/enum';
|
|
2
2
|
import { formatDate } from '.';
|
|
3
|
-
import { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-router';
|
|
3
|
+
import type { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-router';
|
|
4
4
|
|
|
5
5
|
type LinkType = Partial<RouteLocationNormalized> | Partial<RouteLocationNormalizedLoaded> | string | null | boolean;
|
|
6
6
|
|
|
@@ -409,6 +409,7 @@ export class Member extends Person {
|
|
|
409
409
|
job: string | null;
|
|
410
410
|
jobPosition: string | null;
|
|
411
411
|
jobPlace: string | null;
|
|
412
|
+
positionCode: string | null;
|
|
412
413
|
registrationCountry: Value;
|
|
413
414
|
registrationProvince: Value;
|
|
414
415
|
registrationRegion: Value;
|
|
@@ -480,6 +481,7 @@ export class Member extends Person {
|
|
|
480
481
|
job = null,
|
|
481
482
|
jobPosition = null,
|
|
482
483
|
jobPlace = null,
|
|
484
|
+
positionCode = null,
|
|
483
485
|
registrationCountry = new Value(),
|
|
484
486
|
registrationProvince = new Value(),
|
|
485
487
|
registrationRegion = new Value(),
|
|
@@ -552,6 +554,7 @@ export class Member extends Person {
|
|
|
552
554
|
this.job = job;
|
|
553
555
|
this.jobPosition = jobPosition;
|
|
554
556
|
this.jobPlace = jobPlace;
|
|
557
|
+
this.positionCode = positionCode;
|
|
555
558
|
this.registrationCountry = registrationCountry;
|
|
556
559
|
this.registrationProvince = registrationProvince;
|
|
557
560
|
this.registrationRegion = registrationRegion;
|
|
@@ -610,6 +613,7 @@ export class Member extends Person {
|
|
|
610
613
|
this.job = null;
|
|
611
614
|
this.jobPosition = null;
|
|
612
615
|
this.jobPlace = null;
|
|
616
|
+
this.positionCode = null;
|
|
613
617
|
this.registrationCountry = new Value();
|
|
614
618
|
this.registrationProvince = new Value();
|
|
615
619
|
this.registrationRegion = new Value();
|
|
@@ -910,6 +914,7 @@ export class MemberSettings {
|
|
|
910
914
|
}
|
|
911
915
|
|
|
912
916
|
export class DataStoreClass {
|
|
917
|
+
projectConfig: Utils.ProjectConfig | null;
|
|
913
918
|
// IMP Контроллер фич
|
|
914
919
|
controls: {
|
|
915
920
|
// Cтавит значения по дефолту полям
|
|
@@ -1067,6 +1072,7 @@ export class DataStoreClass {
|
|
|
1067
1072
|
sportsTypes: Value[];
|
|
1068
1073
|
purposes: Value[];
|
|
1069
1074
|
constructor() {
|
|
1075
|
+
this.projectConfig = null;
|
|
1070
1076
|
this.filters = {
|
|
1071
1077
|
show: (item: MenuItem) => {
|
|
1072
1078
|
if (typeof item.show === 'boolean') {
|
|
@@ -1351,6 +1357,7 @@ export class FormStoreClass {
|
|
|
1351
1357
|
processCode?: number;
|
|
1352
1358
|
insuredApp?: any;
|
|
1353
1359
|
pensionApp?: any;
|
|
1360
|
+
isEnpfSum?: boolean;
|
|
1354
1361
|
beneficiaryApp?: any;
|
|
1355
1362
|
beneficialOwnerApp?: any;
|
|
1356
1363
|
spokesmanApp?: any;
|
|
@@ -1588,7 +1595,7 @@ export class PhysGroupClass extends BaseGroupClass {
|
|
|
1588
1595
|
birthDate: string;
|
|
1589
1596
|
gender: Value;
|
|
1590
1597
|
placeOfBirth: Value;
|
|
1591
|
-
workDetails: { workplace: string;
|
|
1598
|
+
workDetails: { workplace: string; positionRu: string; positionKz: string; jobDuties: string };
|
|
1592
1599
|
hasContactPerson: boolean;
|
|
1593
1600
|
authorityDetails: {
|
|
1594
1601
|
basis: Value;
|
|
@@ -1603,7 +1610,7 @@ export class PhysGroupClass extends BaseGroupClass {
|
|
|
1603
1610
|
this.birthDate = '';
|
|
1604
1611
|
this.gender = new Value();
|
|
1605
1612
|
this.placeOfBirth = new Value();
|
|
1606
|
-
this.workDetails = { workplace: '',
|
|
1613
|
+
this.workDetails = { workplace: '', positionRu: '', positionKz: '', jobDuties: '' };
|
|
1607
1614
|
this.hasContactPerson = false;
|
|
1608
1615
|
this.authorityDetails = {
|
|
1609
1616
|
basis: new Value(),
|
package/composables/constants.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { Actions, PostActions, Roles, Statuses } from '../types/enum';
|
|
|
3
3
|
export const constants = Object.freeze({
|
|
4
4
|
products: {
|
|
5
5
|
pensionannuity: 1,
|
|
6
|
-
|
|
7
|
-
pa_joint: 4,
|
|
6
|
+
pensionannuityrefund: 2,
|
|
8
7
|
baiterek: 3,
|
|
8
|
+
pensionannuityjoint: 4,
|
|
9
9
|
halykmycar: 5,
|
|
10
10
|
lifetrip: 7,
|
|
11
11
|
bolashak: 8,
|
|
@@ -87,6 +87,9 @@ export const constants = Object.freeze({
|
|
|
87
87
|
questionnaireInsured: 35,
|
|
88
88
|
invoicePayment: 36,
|
|
89
89
|
},
|
|
90
|
+
regex: {
|
|
91
|
+
isoDate: /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)((-(\d{2}):(\d{2})|Z)?)$/,
|
|
92
|
+
},
|
|
90
93
|
fixInsAmount: [
|
|
91
94
|
{
|
|
92
95
|
code: '500000',
|
package/composables/fields.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i18n } from '../configs/i18n';
|
|
2
2
|
import { FieldTypes } from '../types/form';
|
|
3
|
-
import { ComputedRefWithControl } from '@vueuse/core';
|
|
3
|
+
import { type ComputedRefWithControl } from '@vueuse/core';
|
|
4
4
|
|
|
5
5
|
const t = i18n.t;
|
|
6
6
|
|
|
@@ -205,9 +205,9 @@ export class BaseFields {
|
|
|
205
205
|
|
|
206
206
|
export class FormBlockLabel {
|
|
207
207
|
text: string;
|
|
208
|
-
size: LabelSize = 1;
|
|
208
|
+
size: Utils.LabelSize = 1;
|
|
209
209
|
hideOnMobile: boolean = false;
|
|
210
|
-
constructor(options: { text: string; size?: LabelSize; hideOnMobile?: boolean }) {
|
|
210
|
+
constructor(options: { text: string; size?: Utils.LabelSize; hideOnMobile?: boolean }) {
|
|
211
211
|
this.text = options.text;
|
|
212
212
|
if (typeof options.size === 'number') this.size = options.size;
|
|
213
213
|
if (typeof options.hideOnMobile === 'boolean') this.hideOnMobile = options.hideOnMobile;
|
package/composables/index.ts
CHANGED
|
@@ -423,7 +423,7 @@ export const getMainPageRoute = () => {
|
|
|
423
423
|
if (dataStore.isEFO || dataStore.isAULETTI) {
|
|
424
424
|
return 'Insurance-Product';
|
|
425
425
|
}
|
|
426
|
-
if (dataStore.isLKA) {
|
|
426
|
+
if (dataStore.isLKA || dataStore.isLKA_A) {
|
|
427
427
|
return 'Menu';
|
|
428
428
|
}
|
|
429
429
|
if (dataStore.isAML) {
|
|
@@ -544,3 +544,5 @@ export const validateResponseStructure = <T>(res: ResponseStructure<T>) => {
|
|
|
544
544
|
return null;
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
|
+
|
|
548
|
+
export class ApiError extends AxiosError<any, any> {}
|
package/configs/pwa.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ModuleOptions } from '@vite-pwa/nuxt';
|
|
2
|
+
|
|
3
|
+
export const pwaBaseConfig: Partial<ModuleOptions> = {
|
|
4
|
+
registerType: 'autoUpdate',
|
|
5
|
+
workbox: {
|
|
6
|
+
globPatterns: ['**/*.{js,css,html,txt,png,ico,svg}'],
|
|
7
|
+
navigateFallbackDenylist: [/^\/api\//],
|
|
8
|
+
navigateFallback: '/',
|
|
9
|
+
cleanupOutdatedCaches: true,
|
|
10
|
+
runtimeCaching: [
|
|
11
|
+
{
|
|
12
|
+
urlPattern: /^https:\/\/fonts.googleapis.com\/.*/i,
|
|
13
|
+
handler: 'CacheFirst',
|
|
14
|
+
options: {
|
|
15
|
+
cacheName: 'google-fonts-cache',
|
|
16
|
+
expiration: {
|
|
17
|
+
maxEntries: 10,
|
|
18
|
+
maxAgeSeconds: 60 * 60 * 24 * 365,
|
|
19
|
+
},
|
|
20
|
+
cacheableResponse: {
|
|
21
|
+
statuses: [0, 200],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
urlPattern: /^https:\/\/fonts.gstatic.com\/.*/i,
|
|
27
|
+
handler: 'CacheFirst',
|
|
28
|
+
options: {
|
|
29
|
+
cacheName: 'gstatic-fonts-cache',
|
|
30
|
+
expiration: {
|
|
31
|
+
maxEntries: 10,
|
|
32
|
+
maxAgeSeconds: 60 * 60 * 24 * 365,
|
|
33
|
+
},
|
|
34
|
+
cacheableResponse: {
|
|
35
|
+
statuses: [0, 200],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
registerWebManifestInRouteRules: true,
|
|
42
|
+
writePlugin: true,
|
|
43
|
+
devOptions: {
|
|
44
|
+
enabled: true,
|
|
45
|
+
suppressWarnings: true,
|
|
46
|
+
navigateFallback: '/',
|
|
47
|
+
type: 'module',
|
|
48
|
+
},
|
|
49
|
+
};
|
package/layouts/clear.vue
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="h-full w-full"><slot></slot></div>
|
|
3
3
|
</template>
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
const dataStore = useDataStore();
|
|
7
|
+
const { $pwa } = useNuxtApp();
|
|
8
|
+
|
|
9
|
+
const onInit = async () => {
|
|
10
|
+
const projectConfig = dataStore.projectConfig;
|
|
11
|
+
if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
|
|
12
|
+
const hasConfig = await dataStore.getProjectConfig();
|
|
13
|
+
if (hasConfig === true) {
|
|
14
|
+
const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
|
|
15
|
+
if (dataStore.projectConfig !== null && commitVersion !== dataStore.projectConfig.version) {
|
|
16
|
+
//@ts-ignore
|
|
17
|
+
await $pwa.updateServiceWorker(true);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
onInit();
|
|
24
|
+
</script>
|
package/layouts/default.vue
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
<script setup lang="ts">
|
|
36
36
|
import { MenuItem } from '../composables/classes';
|
|
37
37
|
const dataStore = useDataStore();
|
|
38
|
+
const { $pwa } = useNuxtApp();
|
|
38
39
|
|
|
39
40
|
const openSettings = async () => {
|
|
40
41
|
dataStore.settings.open = true;
|
|
@@ -49,6 +50,22 @@ const onBack = async (item: MenuItem) => {
|
|
|
49
50
|
if (dataStore.menu.onBack) await dataStore.menu.onBack(item);
|
|
50
51
|
};
|
|
51
52
|
|
|
53
|
+
const onInit = async () => {
|
|
54
|
+
const projectConfig = dataStore.projectConfig;
|
|
55
|
+
if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
|
|
56
|
+
const hasConfig = await dataStore.getProjectConfig();
|
|
57
|
+
if (hasConfig === true) {
|
|
58
|
+
const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
|
|
59
|
+
if (dataStore.projectConfig !== null && commitVersion !== dataStore.projectConfig.version) {
|
|
60
|
+
//@ts-ignore
|
|
61
|
+
await $pwa.updateServiceWorker(true);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
onInit();
|
|
68
|
+
|
|
52
69
|
watch(
|
|
53
70
|
() => dataStore.settings.open,
|
|
54
71
|
() => {
|
package/layouts/full.vue
CHANGED
|
@@ -4,3 +4,24 @@
|
|
|
4
4
|
<slot></slot>
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
const dataStore = useDataStore();
|
|
10
|
+
const { $pwa } = useNuxtApp();
|
|
11
|
+
|
|
12
|
+
const onInit = async () => {
|
|
13
|
+
const projectConfig = dataStore.projectConfig;
|
|
14
|
+
if (!useEnv().isProduction && process.env.NODE_ENV === 'production' && $pwa && projectConfig === null) {
|
|
15
|
+
const hasConfig = await dataStore.getProjectConfig();
|
|
16
|
+
if (hasConfig === true) {
|
|
17
|
+
const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION);
|
|
18
|
+
if (dataStore.projectConfig !== null && commitVersion !== dataStore.projectConfig.version) {
|
|
19
|
+
//@ts-ignore
|
|
20
|
+
await $pwa.updateServiceWorker(true);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
onInit();
|
|
27
|
+
</script>
|
package/locales/ru.json
CHANGED
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"errorSumOrPercentage": "Процент от суммы выплат не может быть меньше или больше 100",
|
|
43
43
|
"fileWasDeleted": "Файл успешно удален",
|
|
44
44
|
"attachManagerError": "Прикрепите заявку менеджеру",
|
|
45
|
+
"attachAgentError": "Нужно выбрать агента",
|
|
45
46
|
"viewErrorText": "Вы сейчас находитесь в режиме просмотра или у вас нет доступа",
|
|
46
47
|
"editModeText": "Вы перешли в режим редактирования",
|
|
47
48
|
"viewModeText": "Вы перешли в режим просмотра",
|
|
@@ -234,7 +235,8 @@
|
|
|
234
235
|
"generateConract": "Сгенерировать Договор",
|
|
235
236
|
"signContract": "Заключить Договор",
|
|
236
237
|
"sendDosie": "Отправить досье",
|
|
237
|
-
"downloadPaymentInvoice": "Скачать счет на оплату"
|
|
238
|
+
"downloadPaymentInvoice": "Скачать счет на оплату",
|
|
239
|
+
"copyToClient": "Скопировать ссылку для клиента"
|
|
238
240
|
},
|
|
239
241
|
"dialog": {
|
|
240
242
|
"title": "Подтверждение",
|
|
@@ -271,9 +273,9 @@
|
|
|
271
273
|
"toApprove": "Вы действительно хотите отправить на согласование?",
|
|
272
274
|
"affiliate": "Вы действительно хотите добавить решение андеррайтингового совета?",
|
|
273
275
|
"choosePay": "Вы действительно хотите выбрать метод оплаты?",
|
|
274
|
-
"searchBeneficiary":"Выполните поиск договоров по ИИН Выгодоприобретателя",
|
|
275
|
-
"searchFoundBeneficiary":"По данному ИИН уже имеется договор. Создание заявки по продукту “ГОНС” - невозможно.",
|
|
276
|
-
"searchNotFoundBeneficiary":"По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”"
|
|
276
|
+
"searchBeneficiary": "Выполните поиск договоров по ИИН Выгодоприобретателя",
|
|
277
|
+
"searchFoundBeneficiary": "По данному ИИН уже имеется договор. Создание заявки по продукту “ГОНС” - невозможно.",
|
|
278
|
+
"searchNotFoundBeneficiary": "По данному ИИН договор не найден. Нажмите “Создать” для создания новой заявки по продукту “ГОНС”"
|
|
277
279
|
},
|
|
278
280
|
"sign": {
|
|
279
281
|
"chooseDoc": "Выберите документы для подписание",
|
|
@@ -447,7 +449,7 @@
|
|
|
447
449
|
"factEndDate": "Дата завершения",
|
|
448
450
|
"decision": "Статус",
|
|
449
451
|
"userFullName": "Исполнитель",
|
|
450
|
-
"stage":"Этап"
|
|
452
|
+
"stage": "Этап"
|
|
451
453
|
},
|
|
452
454
|
"aml": {
|
|
453
455
|
"contractSignDate": "Дата заключение контракта",
|
|
@@ -572,7 +574,8 @@
|
|
|
572
574
|
"companyName": "Наименование компании по страхованию жизни",
|
|
573
575
|
"bankInvalid": "Некорректные банковские данные",
|
|
574
576
|
"globalId": "Уникальный номер договора (globalId)",
|
|
575
|
-
"oppvMonthsCheck": "ВНИМАНИЕ! НЕОБХОДИМО ПРОВЕРИТЬ НАЛИЧИЕ ОТЧИСЛЕНИЙ 60 МЕСЯЦЕВ ПО ПРИЗНАКУ 'ОППВ'"
|
|
577
|
+
"oppvMonthsCheck": "ВНИМАНИЕ! НЕОБХОДИМО ПРОВЕРИТЬ НАЛИЧИЕ ОТЧИСЛЕНИЙ 60 МЕСЯЦЕВ ПО ПРИЗНАКУ 'ОППВ'",
|
|
578
|
+
"signInProcess": "Документы в подписании - 1 минута"
|
|
576
579
|
},
|
|
577
580
|
"agent": {
|
|
578
581
|
"currency": "Валюта",
|
|
@@ -856,7 +859,9 @@
|
|
|
856
859
|
"dataInPast": "Срок действия документа истек",
|
|
857
860
|
"agentCommission": "Агентская комиссия не должно превышать 50",
|
|
858
861
|
"agePrePensionInsured": "Пороговое значение по возрасту с 55 по 63",
|
|
859
|
-
"checkDate": "Укажите корректную дату"
|
|
862
|
+
"checkDate": "Укажите корректную дату",
|
|
863
|
+
"searchQueryLen": "Поиск должности должен осуществляться по запросу не менее чем из {len} символов",
|
|
864
|
+
"fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг"
|
|
860
865
|
},
|
|
861
866
|
"code": "КСЭ",
|
|
862
867
|
"fontSize": "Размер шрифта",
|