hl-core 0.0.10-beta.63 → 0.0.10-beta.64
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 +7 -0
- package/components/Pages/ProductConditions.vue +41 -5
- package/components/Panel/PanelHandler.vue +1 -1
- package/composables/constants.ts +1 -0
- package/composables/index.ts +14 -2
- package/locales/kz.json +2 -1
- package/locales/ru.json +1 -0
- package/package.json +1 -1
- package/store/data.store.ts +1 -0
- package/store/rules.ts +7 -0
- package/types/enum.ts +3 -0
package/api/base.api.ts
CHANGED
|
@@ -859,6 +859,13 @@ export class ApiClass {
|
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
861
|
|
|
862
|
+
async getCloseDate() {
|
|
863
|
+
return await this.axiosCall<string>({
|
|
864
|
+
method: Methods.GET,
|
|
865
|
+
url: `/${this.productUrl}/api/Application/GetCloseDate`,
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
|
|
862
869
|
async getProcessGfot(processCode: string | number) {
|
|
863
870
|
return await this.axiosCall<Value[]>({
|
|
864
871
|
method: Methods.GET,
|
|
@@ -179,7 +179,8 @@
|
|
|
179
179
|
:readonly="isDisabledInsStartDate"
|
|
180
180
|
:clearable="!isDisabledInsStartDate"
|
|
181
181
|
:label="$dataStore.t('labels.insuranceStartDate')"
|
|
182
|
-
:rules="$rules.
|
|
182
|
+
:rules="[...$rules.required, formStore.lfb.add ? [] : $rules.checkDateIsAfterOrSame(productConditionsForm.calcDate, closeDate)]"
|
|
183
|
+
:min-date="closeDate ?? undefined"
|
|
183
184
|
append-inner-icon="mdi mdi-calendar-blank-outline"
|
|
184
185
|
/>
|
|
185
186
|
<base-form-input
|
|
@@ -1116,6 +1117,7 @@ export default defineComponent({
|
|
|
1116
1117
|
const transferSum = ref<number>(0);
|
|
1117
1118
|
const firstAmount = ref<boolean>(true);
|
|
1118
1119
|
const isHalykBank = formStore.lfb.policyholder.clientData.iin.replace(/-/g, '') === '940140000385';
|
|
1120
|
+
const closeDate = ref<any>('');
|
|
1119
1121
|
|
|
1120
1122
|
const checkTransferContractDate = (val: any) => {
|
|
1121
1123
|
if (val) {
|
|
@@ -2174,10 +2176,12 @@ export default defineComponent({
|
|
|
2174
2176
|
if (!isParentValid || !isSlaveValid) {
|
|
2175
2177
|
return;
|
|
2176
2178
|
}
|
|
2177
|
-
await dataStore.setApplication(data, true);
|
|
2179
|
+
const isApplicationSaved = await dataStore.setApplication(data, true);
|
|
2180
|
+
if (isApplicationSaved === false) return;
|
|
2178
2181
|
customPension.value = false;
|
|
2179
2182
|
} else {
|
|
2180
|
-
await dataStore.setApplication(data, true);
|
|
2183
|
+
const isApplicationSaved = await dataStore.setApplication(data, true);
|
|
2184
|
+
if (isApplicationSaved === false) return;
|
|
2181
2185
|
}
|
|
2182
2186
|
await dataStore.getApplicationData(String(route.params.taskId), false, false, false, true);
|
|
2183
2187
|
dateOfBegin.value = reformatDate(formStore.applicationData.pensionApp.dateOfBegin);
|
|
@@ -2417,8 +2421,15 @@ export default defineComponent({
|
|
|
2417
2421
|
if (!!productConditionsForm.requestedSumInsured) {
|
|
2418
2422
|
whichSum.value = 'requestedSumInsured';
|
|
2419
2423
|
}
|
|
2420
|
-
if (
|
|
2421
|
-
|
|
2424
|
+
if (whichProduct.value === 'lifebusiness' || whichProduct.value === 'gns') {
|
|
2425
|
+
if (!productConditionsForm.requestedSumInsured) {
|
|
2426
|
+
whichSum.value = 'requestedSumInsured';
|
|
2427
|
+
}
|
|
2428
|
+
if (!formStore.lfb.add) {
|
|
2429
|
+
const apiDate = await dataStore.api.getCloseDate();
|
|
2430
|
+
const minDate = new Date(apiDate);
|
|
2431
|
+
closeDate.value = minDate.setDate(minDate.getDate() + 1);
|
|
2432
|
+
}
|
|
2422
2433
|
}
|
|
2423
2434
|
if (dataStore.isCalculator) {
|
|
2424
2435
|
dataStore.processCode = constants.products[whichProduct.value as keyof typeof constants.products];
|
|
@@ -2476,6 +2487,27 @@ export default defineComponent({
|
|
|
2476
2487
|
isLoading.value = false;
|
|
2477
2488
|
}
|
|
2478
2489
|
});
|
|
2490
|
+
watch(isSlavePensionForm, newVal => {
|
|
2491
|
+
if (newVal) {
|
|
2492
|
+
transferContracts.value = formStore.pensionApp.slave.transferContracts;
|
|
2493
|
+
} else {
|
|
2494
|
+
transferContracts.value = formStore.pensionApp.transferContracts;
|
|
2495
|
+
}
|
|
2496
|
+
});
|
|
2497
|
+
|
|
2498
|
+
watch(
|
|
2499
|
+
transferContracts,
|
|
2500
|
+
newVal => {
|
|
2501
|
+
if (!isDisabled.value) {
|
|
2502
|
+
if (isSlavePensionForm.value) {
|
|
2503
|
+
formStore.pensionApp.slave.transferContracts = newVal;
|
|
2504
|
+
} else {
|
|
2505
|
+
formStore.pensionApp.transferContracts = newVal;
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
},
|
|
2509
|
+
{ deep: true },
|
|
2510
|
+
);
|
|
2479
2511
|
|
|
2480
2512
|
watch(
|
|
2481
2513
|
() => pensionForm.value?.amount,
|
|
@@ -2539,6 +2571,9 @@ export default defineComponent({
|
|
|
2539
2571
|
formattedStartDate?.setFullYear(formattedStartDate?.getFullYear() + 1);
|
|
2540
2572
|
formattedStartDate?.setDate(formattedStartDate?.getDate() - 1);
|
|
2541
2573
|
productConditionsForm.contractEndDate = reformatDate(String(formattedStartDate));
|
|
2574
|
+
if (formStore.applicationData.policyAppDto?.mainPremiumWithCommission !== 0) {
|
|
2575
|
+
dataStore.showToaster('error', dataStore.t('toaster.needToRecalculate'), 2000);
|
|
2576
|
+
}
|
|
2542
2577
|
}
|
|
2543
2578
|
},
|
|
2544
2579
|
);
|
|
@@ -2648,6 +2683,7 @@ export default defineComponent({
|
|
|
2648
2683
|
formStore,
|
|
2649
2684
|
vForm,
|
|
2650
2685
|
locale,
|
|
2686
|
+
closeDate,
|
|
2651
2687
|
isLoading,
|
|
2652
2688
|
whichProduct,
|
|
2653
2689
|
productConditionsForm,
|
|
@@ -749,7 +749,7 @@ export default defineComponent({
|
|
|
749
749
|
urlCopy.value = `https://egovbusiness.page.link/?link=${linkToCopy.value}?mgovSign&apn=kz.mobile.mgov.business&isi=1597880144&ibi=kz.mobile.mgov.business`;
|
|
750
750
|
} else {
|
|
751
751
|
//для физ лиц
|
|
752
|
-
urlCopy.value = `https://
|
|
752
|
+
urlCopy.value = `https://m.egov.kz/mobileSign/?link=${encodeURIComponent(linkToCopy.value)}?mgovSign`;
|
|
753
753
|
}
|
|
754
754
|
|
|
755
755
|
await startConnection(uuidV4, groupId);
|
package/composables/constants.ts
CHANGED
package/composables/index.ts
CHANGED
|
@@ -821,9 +821,12 @@ export class RoleController {
|
|
|
821
821
|
if (dataStore.isCritical || product === 'criticalillness') return this.isBranchDirector();
|
|
822
822
|
return false;
|
|
823
823
|
})();
|
|
824
|
-
return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti() || hasAccessByProduct;
|
|
824
|
+
return this.isManager() || this.isSalesManager() || this.isChiefSalesManager() || this.isChiefManagerNSZH() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti() || hasAccessByProduct;
|
|
825
825
|
};
|
|
826
826
|
isManager = () => this.isRole(constants.roles.Manager);
|
|
827
|
+
isSalesManager = () => this.isRole(constants.roles.SalesManager);
|
|
828
|
+
isChiefSalesManager = () => this.isRole(constants.roles.ChiefSalesManager);
|
|
829
|
+
isChiefManagerNSZH = () => this.isRole(constants.roles.ChiefManagerNSZH);
|
|
827
830
|
isCompliance = () => this.isRole(constants.roles.Compliance);
|
|
828
831
|
isAdmin = () => this.isRole(constants.roles.Admin);
|
|
829
832
|
isJurist = () => this.isRole(constants.roles.Jurist);
|
|
@@ -890,7 +893,13 @@ export class RoleController {
|
|
|
890
893
|
this.isSecurity() ||
|
|
891
894
|
baseAccessRoles,
|
|
892
895
|
toReinsurance: this.isReInsurer() || this.isAdjuster() || this.isHeadAdjuster() || baseAccessRoles,
|
|
893
|
-
toReporting:
|
|
896
|
+
toReporting:
|
|
897
|
+
this.isServiceManager() ||
|
|
898
|
+
this.isManager() ||
|
|
899
|
+
this.isSalesManager() ||
|
|
900
|
+
this.isChiefSalesManager() ||
|
|
901
|
+
this.isChiefManagerNSZH() ||
|
|
902
|
+
baseAccessRoles,
|
|
894
903
|
toDSO:
|
|
895
904
|
this.isUsns() ||
|
|
896
905
|
this.isDsuio() ||
|
|
@@ -906,6 +915,9 @@ export class RoleController {
|
|
|
906
915
|
baseAccessRoles,
|
|
907
916
|
toEFO:
|
|
908
917
|
this.isManager() ||
|
|
918
|
+
this.isSalesManager() ||
|
|
919
|
+
this.isChiefSalesManager() ||
|
|
920
|
+
this.isChiefManagerNSZH() ||
|
|
909
921
|
this.isAgent() ||
|
|
910
922
|
this.isAgentMycar() ||
|
|
911
923
|
this.isManagerHalykBank() ||
|
package/locales/kz.json
CHANGED
|
@@ -915,7 +915,8 @@
|
|
|
915
915
|
"searchQueryLen": "Лауазымды іздеу кем дегенде {len} таңбаларының сұранысы бойынша жүргізілуі керек",
|
|
916
916
|
"fixInsSumLimit": "Тіркелген сома {sum}теңгеден аспауы тиіс",
|
|
917
917
|
"invalidKazakhPassport": "Паспорт нөмері дұрыс емес",
|
|
918
|
-
"lengthLimit": "Таңбалар шегі асып кетті. Ұзындығы {len} таңбадан аспайтын мәтінді енгізіңіз"
|
|
918
|
+
"lengthLimit": "Таңбалар шегі асып кетті. Ұзындығы {len} таңбадан аспайтын мәтінді енгізіңіз",
|
|
919
|
+
"dateIncorrect": "Күн дұрыс емес"
|
|
919
920
|
},
|
|
920
921
|
"code": "КЭС",
|
|
921
922
|
"fontSize": "Қаріп өлшемі",
|
package/locales/ru.json
CHANGED
|
@@ -900,6 +900,7 @@
|
|
|
900
900
|
"age": "Поле должно быть только числом",
|
|
901
901
|
"exceedDate": "Дата не должна превышать сегодняшнюю дату",
|
|
902
902
|
"coverPeriod": "Минимальный срок страхования 5 лет",
|
|
903
|
+
"dateIncorrect": "Дата некорректна",
|
|
903
904
|
"fillData": "Заполните данные",
|
|
904
905
|
"requestedSumInsuredMycar": "Максимальная сумма не должна превышать 60 млн",
|
|
905
906
|
"ageMycar": "Пороговое значение по возрасту с 21 по 65",
|
package/package.json
CHANGED
package/store/data.store.ts
CHANGED
|
@@ -2949,6 +2949,7 @@ export const useDataStore = defineStore('data', {
|
|
|
2949
2949
|
link.href = url;
|
|
2950
2950
|
switch (documentType) {
|
|
2951
2951
|
case constants.documentTypes.insuredsList:
|
|
2952
|
+
case constants.documentTypes.insuredsListDopik:
|
|
2952
2953
|
link.setAttribute('download', 'РФ-ДС-028 Список застрахованных ГССЖ_ГНС, изд.1.xls');
|
|
2953
2954
|
break;
|
|
2954
2955
|
case constants.documentTypes.statement:
|
package/store/rules.ts
CHANGED
|
@@ -335,4 +335,11 @@ export const rules = {
|
|
|
335
335
|
}
|
|
336
336
|
return true;
|
|
337
337
|
},
|
|
338
|
+
checkDateIsAfterOrSame(v: any, minDate: string) {
|
|
339
|
+
if (!v || !minDate) return true;
|
|
340
|
+
const [d, m, y] = v.split('.');
|
|
341
|
+
const entered = new Date(Number(y), Number(m) - 1, Number(d));
|
|
342
|
+
const minNewDate = new Date(minDate);
|
|
343
|
+
return entered >= minNewDate || t('rules.dateIncorrect');
|
|
344
|
+
},
|
|
338
345
|
};
|
package/types/enum.ts
CHANGED
|
@@ -85,6 +85,9 @@ export enum PostActions {
|
|
|
85
85
|
|
|
86
86
|
export enum Roles {
|
|
87
87
|
Manager = 'Manager',
|
|
88
|
+
SalesManager = 'SalesManager',
|
|
89
|
+
ChiefSalesManager = 'ChiefSalesManager',
|
|
90
|
+
ChiefManagerNSZH = 'ChiefManagerNSZH',
|
|
88
91
|
Admin = 'Admin',
|
|
89
92
|
Jurist = 'Jurist',
|
|
90
93
|
Underwriter = 'Underwriter',
|