hl-core 0.0.9-beta.11 → 0.0.9-beta.12
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 +617 -0
- package/api/efo.api.ts +27 -0
- package/api/index.ts +3 -620
- package/components/Input/FileInput.vue +8 -3
- package/components/Pages/MemberForm.vue +1 -1
- package/components/Pages/ProductConditions.vue +86 -22
- package/components/Panel/PanelHandler.vue +48 -12
- package/composables/constants.ts +1 -0
- package/locales/ru.json +37 -9
- package/package.json +3 -3
- package/store/data.store.ts +18 -17
- package/types/enum.ts +6 -0
- package/types/index.ts +10 -3
package/store/data.store.ts
CHANGED
|
@@ -44,6 +44,7 @@ export const useDataStore = defineStore('data', {
|
|
|
44
44
|
isLiferenta: state => state.product === 'liferenta',
|
|
45
45
|
isGons: state => state.product === 'gons',
|
|
46
46
|
isKazyna: state => state.product === 'halykkazyna',
|
|
47
|
+
isDas: state => state.product === 'daskamkorlyk',
|
|
47
48
|
isCalculator: state => state.product === 'calculator',
|
|
48
49
|
isCheckContract: state => state.product === 'checkcontract',
|
|
49
50
|
isCheckContragent: state => state.product === 'checkcontragent',
|
|
@@ -2274,11 +2275,10 @@ export const useDataStore = defineStore('data', {
|
|
|
2274
2275
|
const areMembersValid = await this.validateAllMembers(taskId);
|
|
2275
2276
|
if (areMembersValid) {
|
|
2276
2277
|
if (!!this.formStore.productConditionsForm.insurancePremiumPerMonth && !!this.formStore.productConditionsForm.requestedSumInsured) {
|
|
2277
|
-
const hasCritical = this.formStore.additionalInsuranceTerms?.find(cover => cover.coverTypeName
|
|
2278
|
-
if (hasCritical && hasCritical.coverSumName.match(new RegExp('не включено', 'i'))) {
|
|
2278
|
+
const hasCritical = this.formStore.additionalInsuranceTerms?.find(cover => cover.coverTypeName.match(new RegExp('Критическое заболевание Застрахованного', 'i'))) ?? null;
|
|
2279
|
+
if (hasCritical === null || (hasCritical && hasCritical.coverSumName.match(new RegExp('не включено', 'i')))) {
|
|
2279
2280
|
await Promise.allSettled([
|
|
2280
2281
|
this.getQuestionList('health', this.formStore.applicationData.processInstanceId, this.formStore.applicationData.insuredApp[0].id, 'surveyByHealthBase'),
|
|
2281
|
-
this.getQuestionList('critical', this.formStore.applicationData.processInstanceId, this.formStore.applicationData.insuredApp[0].id, 'surveyByCriticalBase'),
|
|
2282
2282
|
this.isClientAnketaCondition &&
|
|
2283
2283
|
this.getQuestionList(
|
|
2284
2284
|
'health',
|
|
@@ -2287,30 +2287,26 @@ export const useDataStore = defineStore('data', {
|
|
|
2287
2287
|
'surveyByHealthBasePolicyholder',
|
|
2288
2288
|
'policyholder',
|
|
2289
2289
|
),
|
|
2290
|
+
,
|
|
2290
2291
|
]);
|
|
2291
2292
|
this.isClientAnketaCondition
|
|
2292
2293
|
? await Promise.allSettled([
|
|
2293
2294
|
...this.formStore.surveyByHealthBase!.body.map(async question => {
|
|
2294
2295
|
await this.definedAnswers(question.first.id, 'surveyByHealthBase');
|
|
2295
2296
|
}),
|
|
2296
|
-
...this.formStore.surveyByCriticalBase!.body.map(async question => {
|
|
2297
|
-
await this.definedAnswers(question.first.id, 'surveyByCriticalBase');
|
|
2298
|
-
}),
|
|
2299
2297
|
...this.formStore.surveyByHealthBasePolicyholder!.body.map(async question => {
|
|
2300
2298
|
await this.definedAnswers(question.first.id, 'surveyByHealthBasePolicyholder');
|
|
2301
2299
|
}),
|
|
2302
2300
|
])
|
|
2303
|
-
: await Promise.allSettled(
|
|
2304
|
-
|
|
2301
|
+
: await Promise.allSettled(
|
|
2302
|
+
this.formStore.surveyByHealthBase!.body.map(async question => {
|
|
2305
2303
|
await this.definedAnswers(question.first.id, 'surveyByHealthBase');
|
|
2306
2304
|
}),
|
|
2307
|
-
|
|
2308
|
-
await this.definedAnswers(question.first.id, 'surveyByCriticalBase');
|
|
2309
|
-
}),
|
|
2310
|
-
]);
|
|
2305
|
+
);
|
|
2311
2306
|
} else {
|
|
2312
2307
|
await Promise.allSettled([
|
|
2313
2308
|
this.getQuestionList('health', this.formStore.applicationData.processInstanceId, this.formStore.applicationData.insuredApp[0].id, 'surveyByHealthBase'),
|
|
2309
|
+
this.getQuestionList('critical', this.formStore.applicationData.processInstanceId, this.formStore.applicationData.insuredApp[0].id, 'surveyByCriticalBase'),
|
|
2314
2310
|
this.isClientAnketaCondition &&
|
|
2315
2311
|
this.getQuestionList(
|
|
2316
2312
|
'health',
|
|
@@ -2319,26 +2315,31 @@ export const useDataStore = defineStore('data', {
|
|
|
2319
2315
|
'surveyByHealthBasePolicyholder',
|
|
2320
2316
|
'policyholder',
|
|
2321
2317
|
),
|
|
2322
|
-
,
|
|
2323
2318
|
]);
|
|
2324
2319
|
this.isClientAnketaCondition
|
|
2325
2320
|
? await Promise.allSettled([
|
|
2326
2321
|
...this.formStore.surveyByHealthBase!.body.map(async question => {
|
|
2327
2322
|
await this.definedAnswers(question.first.id, 'surveyByHealthBase');
|
|
2328
2323
|
}),
|
|
2324
|
+
...this.formStore.surveyByCriticalBase!.body.map(async question => {
|
|
2325
|
+
await this.definedAnswers(question.first.id, 'surveyByCriticalBase');
|
|
2326
|
+
}),
|
|
2329
2327
|
...this.formStore.surveyByHealthBasePolicyholder!.body.map(async question => {
|
|
2330
2328
|
await this.definedAnswers(question.first.id, 'surveyByHealthBasePolicyholder');
|
|
2331
2329
|
}),
|
|
2332
2330
|
])
|
|
2333
|
-
: await Promise.allSettled(
|
|
2334
|
-
this.formStore.surveyByHealthBase!.body.map(async question => {
|
|
2331
|
+
: await Promise.allSettled([
|
|
2332
|
+
...this.formStore.surveyByHealthBase!.body.map(async question => {
|
|
2335
2333
|
await this.definedAnswers(question.first.id, 'surveyByHealthBase');
|
|
2336
2334
|
}),
|
|
2337
|
-
|
|
2335
|
+
...this.formStore.surveyByCriticalBase!.body.map(async question => {
|
|
2336
|
+
await this.definedAnswers(question.first.id, 'surveyByCriticalBase');
|
|
2337
|
+
}),
|
|
2338
|
+
]);
|
|
2338
2339
|
}
|
|
2339
2340
|
if (this.validateAnketa('surveyByHealthBase')) {
|
|
2340
2341
|
let hasCriticalAndItsValid = null;
|
|
2341
|
-
if (hasCritical && hasCritical.coverSumName
|
|
2342
|
+
if (hasCritical && hasCritical.coverSumName.match(new RegExp('не включено', 'i')) === null) {
|
|
2342
2343
|
if (this.validateAnketa('surveyByCriticalBase')) {
|
|
2343
2344
|
hasCriticalAndItsValid = true;
|
|
2344
2345
|
} else {
|
package/types/enum.ts
CHANGED
|
@@ -17,6 +17,7 @@ export enum Actions {
|
|
|
17
17
|
register = 'register',
|
|
18
18
|
send = 'send',
|
|
19
19
|
affiliate = 'affiliate',
|
|
20
|
+
template = 'template',
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
export enum PostActions {
|
|
@@ -81,3 +82,8 @@ export enum MemberAppCodes {
|
|
|
81
82
|
beneficialOwnerApp = 'beneficialOwnerApp',
|
|
82
83
|
spokesmanApp = 'spokesmanApp',
|
|
83
84
|
}
|
|
85
|
+
|
|
86
|
+
export enum Methods {
|
|
87
|
+
GET = 'GET',
|
|
88
|
+
POST = 'POST',
|
|
89
|
+
}
|
package/types/index.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { RouteLocationNormalizedLoaded, RouteLocationNormalized } from 'vue-router';
|
|
2
|
+
import { AxiosRequestConfig } from 'axios';
|
|
3
|
+
import { Methods } from './enum';
|
|
2
4
|
|
|
3
5
|
export {};
|
|
4
6
|
|
|
@@ -18,7 +20,8 @@ declare global {
|
|
|
18
20
|
| 'lka'
|
|
19
21
|
| 'mycar'
|
|
20
22
|
| 'checkcontract'
|
|
21
|
-
| 'checkcontragent'
|
|
23
|
+
| 'checkcontragent'
|
|
24
|
+
| 'daskamkorlyk';
|
|
22
25
|
type MemberKeys = keyof ReturnType<typeof useFormStore>;
|
|
23
26
|
type MemberFormTypes = 'policyholderForm' | 'insuredForm' | 'beneficiaryForm' | 'beneficialOwnerForm' | 'policyholdersRepresentativeForm' | 'productConditionsForm';
|
|
24
27
|
type SingleMember = 'policyholderForm' | 'policyholdersRepresentativeForm';
|
|
@@ -262,7 +265,7 @@ declare global {
|
|
|
262
265
|
annuityMonthPay: string | number | null;
|
|
263
266
|
};
|
|
264
267
|
|
|
265
|
-
|
|
268
|
+
interface AddCover {
|
|
266
269
|
id: string | null;
|
|
267
270
|
processInstanceId: string;
|
|
268
271
|
coverTypeId: string;
|
|
@@ -274,7 +277,7 @@ declare global {
|
|
|
274
277
|
amount: number;
|
|
275
278
|
premium: number;
|
|
276
279
|
isMigrate: boolean;
|
|
277
|
-
}
|
|
280
|
+
}
|
|
278
281
|
|
|
279
282
|
type SignUrlType = {
|
|
280
283
|
uri: string;
|
|
@@ -522,4 +525,8 @@ declare global {
|
|
|
522
525
|
managerPolicyName?: string;
|
|
523
526
|
insuranceProgramType?: string;
|
|
524
527
|
};
|
|
528
|
+
|
|
529
|
+
interface AxiosRequestLocalConfig extends AxiosRequestConfig {
|
|
530
|
+
method: Methods | keyof typeof Methods;
|
|
531
|
+
}
|
|
525
532
|
}
|