hl-core 0.0.8-beta.9 → 0.0.9-beta.1
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/index.ts +100 -34
- package/api/interceptors.ts +17 -13
- package/components/Button/Btn.vue +1 -1
- package/components/Button/ScrollButtons.vue +2 -2
- package/components/Complex/Page.vue +1 -1
- package/components/Dialog/Dialog.vue +9 -39
- package/components/Dialog/FamilyDialog.vue +7 -4
- package/components/Form/FormBlock.vue +51 -28
- package/components/Form/FormSection.vue +4 -1
- package/components/Form/FormToggle.vue +2 -3
- package/components/Form/ManagerAttachment.vue +21 -20
- package/components/Form/ProductConditionsBlock.vue +60 -10
- package/components/Input/Datepicker.vue +6 -2
- package/components/Input/FileInput.vue +2 -2
- package/components/Input/FormInput.vue +29 -7
- package/components/Input/PanelInput.vue +7 -2
- package/components/Input/RoundedInput.vue +2 -2
- package/components/Input/RoundedSelect.vue +137 -0
- package/components/Layout/Drawer.vue +3 -2
- package/components/Layout/Header.vue +40 -4
- package/components/Layout/Loader.vue +1 -1
- package/components/Layout/SettingsPanel.vue +51 -13
- package/components/Menu/MenuHover.vue +30 -0
- package/components/Menu/MenuNav.vue +29 -13
- package/components/Menu/MenuNavItem.vue +6 -3
- package/components/Pages/Anketa.vue +49 -31
- package/components/Pages/Auth.vue +139 -46
- package/components/Pages/Documents.vue +6 -6
- package/components/Pages/InvoiceInfo.vue +30 -0
- package/components/Pages/MemberForm.vue +503 -343
- package/components/Pages/ProductAgreement.vue +4 -2
- package/components/Pages/ProductConditions.vue +494 -95
- package/components/Panel/PanelHandler.vue +91 -20
- package/components/Panel/PanelSelectItem.vue +1 -1
- package/components/Utilities/Chip.vue +27 -0
- package/components/Utilities/JsonViewer.vue +27 -0
- package/composables/axios.ts +1 -1
- package/composables/classes.ts +165 -81
- package/composables/constants.ts +25 -52
- package/composables/index.ts +80 -2
- package/composables/styles.ts +8 -3
- package/configs/i18n.ts +2 -4
- package/layouts/default.vue +6 -6
- package/locales/kz.json +532 -346
- package/locales/ru.json +210 -22
- package/nuxt.config.ts +1 -1
- package/package.json +38 -12
- package/pages/500.vue +2 -2
- package/pages/Token.vue +51 -0
- package/plugins/helperFunctionsPlugins.ts +2 -1
- package/plugins/vuetifyPlugin.ts +3 -1
- package/store/{data.store.js → data.store.ts} +1116 -752
- package/store/form.store.ts +1 -1
- package/store/member.store.ts +94 -72
- package/store/{rules.js → rules.ts} +54 -26
- package/types/enum.ts +83 -0
- package/types/env.d.ts +10 -0
- package/types/index.ts +197 -7
- package/locales/en.json +0 -399
package/api/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { MemberCodes } from '../types/enum';
|
|
2
|
+
import { useAxios } from '../composables/axios';
|
|
3
|
+
import { Value, IDocument } from '../composables/classes';
|
|
3
4
|
import { AxiosRequestConfig } from 'axios';
|
|
4
5
|
|
|
5
6
|
enum Methods {
|
|
@@ -12,10 +13,6 @@ export class ApiClass {
|
|
|
12
13
|
private readonly productUrl: string = import.meta.env.VITE_PRODUCT_URL as string;
|
|
13
14
|
|
|
14
15
|
private async axiosCall<T>(config: AxiosRequestConfig): Promise<T> {
|
|
15
|
-
const dataStore = useDataStore();
|
|
16
|
-
if (((dataStore.isEFO || dataStore.isAML) && !this.baseURL) || (!dataStore.isEFO && !dataStore.isAML && (!this.baseURL || !this.productUrl))) {
|
|
17
|
-
console.error('No Axios baseURL or productURL');
|
|
18
|
-
}
|
|
19
16
|
const { data } = await useAxios(this.baseURL).request<T>(config);
|
|
20
17
|
return data;
|
|
21
18
|
}
|
|
@@ -137,27 +134,62 @@ export class ApiClass {
|
|
|
137
134
|
});
|
|
138
135
|
}
|
|
139
136
|
|
|
140
|
-
async
|
|
137
|
+
async getDicAnnuityTypeList(): Promise<Value[]> {
|
|
141
138
|
return this.axiosCall({
|
|
142
139
|
method: Methods.GET,
|
|
143
|
-
url:
|
|
140
|
+
url: '/Arm/api/Dictionary/GetDictionaryItems/DicAnnuityType',
|
|
144
141
|
});
|
|
145
142
|
}
|
|
146
143
|
|
|
147
|
-
async
|
|
144
|
+
async getCurrencies(): Promise<{ eur: number; usd: number }> {
|
|
145
|
+
return this.axiosCall({
|
|
146
|
+
method: Methods.GET,
|
|
147
|
+
url: '/Ekk/api/Currency/GetExchange',
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
async getContragent(queryData: GetContragentRequest): Promise<GetContragentResponse> {
|
|
152
|
+
return this.axiosCall({
|
|
153
|
+
method: Methods.GET,
|
|
154
|
+
url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName=${queryData.middleName}`,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
async getInsurancePay(): Promise<Value[]> {
|
|
159
|
+
return this.axiosCall({
|
|
160
|
+
method: Methods.GET,
|
|
161
|
+
url: '/Arm/api/Dictionary/GetDictionaryItems/DicBeneficiaryInsurancePay',
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
async getQuestionList(surveyType: string, processInstanceId: string | number, insuredId: number | string): Promise<AnketaFirst> {
|
|
148
166
|
return this.axiosCall({
|
|
149
167
|
method: Methods.GET,
|
|
150
168
|
url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
151
169
|
});
|
|
152
170
|
}
|
|
153
171
|
|
|
154
|
-
async
|
|
172
|
+
async getClientQuestionList(surveyType: string, processInstanceId: string | number, insuredId: number | string): Promise<AnketaFirst> {
|
|
173
|
+
return this.axiosCall({
|
|
174
|
+
method: Methods.GET,
|
|
175
|
+
url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
async getQuestionListSecond(surveyType: string, processInstanceId: string | number, insuredId: number | string): Promise<AnketaSecond[]> {
|
|
155
180
|
return this.axiosCall({
|
|
156
181
|
method: Methods.GET,
|
|
157
182
|
url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
158
183
|
});
|
|
159
184
|
}
|
|
160
185
|
|
|
186
|
+
async getClientQuestionListSecond(surveyType: string, processInstanceId: string | number, insuredId: number | string): Promise<AnketaSecond[]> {
|
|
187
|
+
return this.axiosCall({
|
|
188
|
+
method: Methods.GET,
|
|
189
|
+
url: `/${this.productUrl}/api/Application/AnketaClient/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
|
|
161
193
|
async definedAnswers(filter: string) {
|
|
162
194
|
return this.axiosCall({
|
|
163
195
|
method: Methods.GET,
|
|
@@ -187,7 +219,7 @@ export class ApiClass {
|
|
|
187
219
|
});
|
|
188
220
|
}
|
|
189
221
|
|
|
190
|
-
async getAdditionalInsuranceTermsAnswers(processCode: string | number, questionId: string) {
|
|
222
|
+
async getAdditionalInsuranceTermsAnswers(processCode: string | number, questionId: string): Promise<AddCoverAnswer[]> {
|
|
191
223
|
return this.axiosCall({
|
|
192
224
|
method: Methods.GET,
|
|
193
225
|
url: `/Arm/api/Dictionary/ProcessCoverTypeSum/${processCode}/${questionId}`,
|
|
@@ -201,14 +233,27 @@ export class ApiClass {
|
|
|
201
233
|
});
|
|
202
234
|
}
|
|
203
235
|
|
|
204
|
-
async
|
|
236
|
+
async getProcessAnnuityPaymentPeriod(processCode: string | number) {
|
|
237
|
+
return this.axiosCall({
|
|
238
|
+
method: Methods.GET,
|
|
239
|
+
url: `/Arm/api/Dictionary/ProcessAnnuityPaymentPeriod/${processCode}`,
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
async getContragentById(id: number): Promise<GetContragentResponse> {
|
|
205
244
|
return this.axiosCall({
|
|
206
245
|
method: Methods.GET,
|
|
207
246
|
url: `/Ekk/api/Contragentinsis/Contragent?PersonId=${id}`,
|
|
208
247
|
});
|
|
209
248
|
}
|
|
210
249
|
|
|
211
|
-
async saveContragent(data:
|
|
250
|
+
async saveContragent(data: {
|
|
251
|
+
contragent: ContragentType;
|
|
252
|
+
questionaries: ContragentQuestionaries[];
|
|
253
|
+
contacts: ContragentContacts[];
|
|
254
|
+
documents: ContragentDocuments[];
|
|
255
|
+
addresses: ContragentAddress[];
|
|
256
|
+
}): Promise<number> {
|
|
212
257
|
return this.axiosCall({
|
|
213
258
|
method: Methods.POST,
|
|
214
259
|
url: `/Ekk/api/Contragentinsis/SaveContragent`,
|
|
@@ -234,28 +279,28 @@ export class ApiClass {
|
|
|
234
279
|
});
|
|
235
280
|
}
|
|
236
281
|
|
|
237
|
-
async getContrAgentData(personId: string | number) {
|
|
282
|
+
async getContrAgentData(personId: string | number): Promise<ContragentQuestionaries[]> {
|
|
238
283
|
return this.axiosCall({
|
|
239
284
|
method: Methods.GET,
|
|
240
285
|
url: `/Ekk/api/Contragentinsis/Questionaries?PersonId=${personId}`,
|
|
241
286
|
});
|
|
242
287
|
}
|
|
243
288
|
|
|
244
|
-
async getContrAgentContacts(personId: string | number) {
|
|
289
|
+
async getContrAgentContacts(personId: string | number): Promise<ContragentContacts[]> {
|
|
245
290
|
return this.axiosCall({
|
|
246
291
|
method: Methods.GET,
|
|
247
292
|
url: `/Ekk/api/Contragentinsis/Contacts?PersonId=${personId}`,
|
|
248
293
|
});
|
|
249
294
|
}
|
|
250
295
|
|
|
251
|
-
async getContrAgentDocuments(personId: string | number) {
|
|
296
|
+
async getContrAgentDocuments(personId: string | number): Promise<ContragentDocuments[]> {
|
|
252
297
|
return this.axiosCall({
|
|
253
298
|
method: Methods.GET,
|
|
254
299
|
url: `/Ekk/api/Contragentinsis/Documents?PersonId=${personId}`,
|
|
255
300
|
});
|
|
256
301
|
}
|
|
257
302
|
|
|
258
|
-
async getContrAgentAddress(personId: string | number) {
|
|
303
|
+
async getContrAgentAddress(personId: string | number): Promise<ContragentAddress[]> {
|
|
259
304
|
return this.axiosCall({
|
|
260
305
|
method: Methods.GET,
|
|
261
306
|
url: `/Ekk/api/Contragentinsis/Address?PersonId=${personId}`,
|
|
@@ -276,6 +321,14 @@ export class ApiClass {
|
|
|
276
321
|
});
|
|
277
322
|
}
|
|
278
323
|
|
|
324
|
+
async registerNumber(data: RegNumberDataType): Promise<string> {
|
|
325
|
+
return this.axiosCall({
|
|
326
|
+
method: Methods.POST,
|
|
327
|
+
url: `/${this.productUrl}/api/Application/FinCenterRegNumberSave`,
|
|
328
|
+
data: data,
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
|
|
279
332
|
async sendSms(data: SmsDataType): Promise<void> {
|
|
280
333
|
return this.axiosCall({
|
|
281
334
|
method: Methods.POST,
|
|
@@ -319,7 +372,6 @@ export class ApiClass {
|
|
|
319
372
|
return this.axiosCall({
|
|
320
373
|
method: Methods.GET,
|
|
321
374
|
url: '/Arm/api/Bpm/ProcessList',
|
|
322
|
-
timeout: 10000,
|
|
323
375
|
});
|
|
324
376
|
}
|
|
325
377
|
|
|
@@ -333,20 +385,20 @@ export class ApiClass {
|
|
|
333
385
|
});
|
|
334
386
|
}
|
|
335
387
|
|
|
336
|
-
async getApplicationData(id: string) {
|
|
388
|
+
async getApplicationData(id: string): Promise<any> {
|
|
337
389
|
return this.axiosCall({
|
|
338
390
|
url: `/${this.productUrl}/api/Application/applicationData?Id=${id} `,
|
|
339
391
|
});
|
|
340
392
|
}
|
|
341
393
|
|
|
342
|
-
async getCalculation(id: string) {
|
|
394
|
+
async getCalculation(id: string): Promise<Number> {
|
|
343
395
|
return this.axiosCall({
|
|
344
396
|
method: Methods.POST,
|
|
345
397
|
url: `/${this.productUrl}/api/Application/Calculator?processInstanceId=${id}`,
|
|
346
398
|
});
|
|
347
399
|
}
|
|
348
400
|
|
|
349
|
-
async setApplication(data:
|
|
401
|
+
async setApplication(data: { policyAppDto: PolicyAppDto; addCoversDto: AddCover[] }): Promise<void> {
|
|
350
402
|
return this.axiosCall({
|
|
351
403
|
method: Methods.POST,
|
|
352
404
|
url: `/${this.productUrl}/api/Application/SetApplicationData`,
|
|
@@ -382,7 +434,7 @@ export class ApiClass {
|
|
|
382
434
|
});
|
|
383
435
|
}
|
|
384
436
|
|
|
385
|
-
async setMember(whichMember:
|
|
437
|
+
async setMember(whichMember: keyof typeof MemberCodes, data: any) {
|
|
386
438
|
return this.axiosCall({
|
|
387
439
|
method: Methods.POST,
|
|
388
440
|
url: `/Arm/api/BpmMembers/Set${whichMember}`,
|
|
@@ -390,28 +442,35 @@ export class ApiClass {
|
|
|
390
442
|
});
|
|
391
443
|
}
|
|
392
444
|
|
|
393
|
-
async deleteMember(whichMember:
|
|
445
|
+
async deleteMember(whichMember: keyof typeof MemberCodes, id: number | string) {
|
|
394
446
|
return this.axiosCall({
|
|
395
447
|
method: Methods.POST,
|
|
396
448
|
url: `/Arm/api/BpmMembers/Delete${whichMember}/${id}`,
|
|
397
449
|
});
|
|
398
450
|
}
|
|
399
451
|
|
|
400
|
-
async getInvoiceData(processInstanceId: string): Promise<EpayResponse> {
|
|
452
|
+
async getInvoiceData(processInstanceId: string | number): Promise<EpayResponse> {
|
|
401
453
|
return this.axiosCall({
|
|
402
454
|
method: Methods.GET,
|
|
403
455
|
url: `/Arm/api/Invoice/InvoiceData?processInstanceId=${processInstanceId}`,
|
|
404
456
|
});
|
|
405
457
|
}
|
|
406
458
|
|
|
407
|
-
async
|
|
459
|
+
async getProcessHistoryLog(historyId: string) {
|
|
460
|
+
return this.axiosCall({
|
|
461
|
+
method: Methods.GET,
|
|
462
|
+
url: `/Arm/api/Bpm/ProcessHistoryLog/${historyId}`,
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
async createInvoice(processInstanceId: string | number, amount: number | string): Promise<string> {
|
|
408
467
|
return this.axiosCall({
|
|
409
468
|
method: Methods.POST,
|
|
410
469
|
url: `/Arm/api/Invoice/CreateInvoice/${processInstanceId}/${amount}`,
|
|
411
470
|
});
|
|
412
471
|
}
|
|
413
472
|
|
|
414
|
-
async sendToEpay(processInstanceId: string): Promise<EpayShortResponse> {
|
|
473
|
+
async sendToEpay(processInstanceId: string | number): Promise<EpayShortResponse> {
|
|
415
474
|
return this.axiosCall({
|
|
416
475
|
method: Methods.POST,
|
|
417
476
|
url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
|
|
@@ -426,7 +485,7 @@ export class ApiClass {
|
|
|
426
485
|
});
|
|
427
486
|
}
|
|
428
487
|
|
|
429
|
-
async getSignedDocList(data: { processInstanceId: string }): Promise<IDocument[]> {
|
|
488
|
+
async getSignedDocList(data: { processInstanceId: string | number }): Promise<IDocument[]> {
|
|
430
489
|
return this.axiosCall({
|
|
431
490
|
method: Methods.POST,
|
|
432
491
|
url: '/File/api/Data/List',
|
|
@@ -434,18 +493,18 @@ export class ApiClass {
|
|
|
434
493
|
});
|
|
435
494
|
}
|
|
436
495
|
|
|
437
|
-
async calculateWithoutApplication(data: RecalculationDataType): Promise<RecalculationResponseType> {
|
|
496
|
+
async calculateWithoutApplication(data: RecalculationDataType, product: string | undefined | null = this.productUrl): Promise<RecalculationResponseType> {
|
|
438
497
|
return this.axiosCall({
|
|
439
498
|
method: Methods.POST,
|
|
440
|
-
url: `/${
|
|
499
|
+
url: `/${product}/api/Application/Calculate`,
|
|
441
500
|
data: data,
|
|
442
501
|
});
|
|
443
502
|
}
|
|
444
503
|
|
|
445
|
-
async getDefaultCalculationData(): Promise<RecalculationDataType> {
|
|
504
|
+
async getDefaultCalculationData(product: string | undefined | null = this.productUrl): Promise<RecalculationDataType> {
|
|
446
505
|
return this.axiosCall({
|
|
447
506
|
method: Methods.GET,
|
|
448
|
-
url: `/${
|
|
507
|
+
url: `/${product}/api/Application/DefaultCalculatorValues`,
|
|
449
508
|
});
|
|
450
509
|
}
|
|
451
510
|
|
|
@@ -516,7 +575,7 @@ export class ApiClass {
|
|
|
516
575
|
});
|
|
517
576
|
}
|
|
518
577
|
|
|
519
|
-
async sendUnderwritingCouncilTask(data:
|
|
578
|
+
async sendUnderwritingCouncilTask(data: Partial<SendTask>): Promise<void> {
|
|
520
579
|
return this.axiosCall({
|
|
521
580
|
method: Methods.POST,
|
|
522
581
|
url: '/Arm/api/UnderwritingCouncil/SendTask',
|
|
@@ -531,14 +590,14 @@ export class ApiClass {
|
|
|
531
590
|
});
|
|
532
591
|
}
|
|
533
592
|
|
|
534
|
-
async filterManagerByRegion(dictName: string, filterName: string) {
|
|
593
|
+
async filterManagerByRegion(dictName: string, filterName: string): Promise<Value[]> {
|
|
535
594
|
return this.axiosCall({
|
|
536
595
|
method: Methods.GET,
|
|
537
596
|
url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
|
|
538
597
|
});
|
|
539
598
|
}
|
|
540
599
|
|
|
541
|
-
async setINSISWorkData(data:
|
|
600
|
+
async setINSISWorkData(data: InsisWorkDataApp) {
|
|
542
601
|
return this.axiosCall({
|
|
543
602
|
method: Methods.POST,
|
|
544
603
|
url: `/Arm/api/Bpm/SetInsisWorkData`,
|
|
@@ -552,4 +611,11 @@ export class ApiClass {
|
|
|
552
611
|
url: `/Ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
|
|
553
612
|
});
|
|
554
613
|
}
|
|
614
|
+
|
|
615
|
+
async isCourseChanged(processInstanceId: string): Promise<boolean> {
|
|
616
|
+
return this.axiosCall({
|
|
617
|
+
method: Methods.GET,
|
|
618
|
+
url: `/${this.productUrl}/api/Application/IsCourseChanged?processInstanceId=${processInstanceId}`,
|
|
619
|
+
});
|
|
620
|
+
}
|
|
555
621
|
}
|
package/api/interceptors.ts
CHANGED
|
@@ -4,7 +4,9 @@ export default function (axios: AxiosInstance) {
|
|
|
4
4
|
axios.interceptors.request.use(
|
|
5
5
|
request => {
|
|
6
6
|
const dataStore = useDataStore();
|
|
7
|
-
|
|
7
|
+
if (dataStore.accessToken) {
|
|
8
|
+
request.headers.Authorization = `Bearer ${dataStore.accessToken}`;
|
|
9
|
+
}
|
|
8
10
|
return request;
|
|
9
11
|
},
|
|
10
12
|
error => {
|
|
@@ -17,19 +19,21 @@ export default function (axios: AxiosInstance) {
|
|
|
17
19
|
},
|
|
18
20
|
error => {
|
|
19
21
|
const dataStore = useDataStore();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
if (!dataStore.isCalculator) {
|
|
23
|
+
const router = useRouter();
|
|
24
|
+
if (error.response.status === 401) {
|
|
25
|
+
dataStore.$reset();
|
|
26
|
+
localStorage.clear();
|
|
27
|
+
if (dataStore.isBridge) {
|
|
28
|
+
router.push({ name: 'Auth', query: { error: 401 } });
|
|
29
|
+
} else {
|
|
30
|
+
dataStore.sendToParent(constants.postActions.Error401, 401);
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
if (error.response.status >= 500) {
|
|
34
|
+
if (router.currentRoute.value.name !== 'Auth') {
|
|
35
|
+
dataStore.showToaster('error', error.stack, 5000);
|
|
36
|
+
}
|
|
33
37
|
}
|
|
34
38
|
}
|
|
35
39
|
return Promise.reject(error);
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
$libStyles[`btnH${$capitalize(size)}` as keyof typeof $libStyles],
|
|
12
12
|
]"
|
|
13
13
|
>
|
|
14
|
-
<base-loader v-if="loading" :size="24" color="#FFF" bg-color="" :width="2"
|
|
14
|
+
<base-loader v-if="loading" :size="24" color="#FFF" bg-color="" :width="2" />
|
|
15
15
|
<span v-if="!loading">{{ text }}</span>
|
|
16
16
|
</button>
|
|
17
17
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="absolute bottom-[12%] right-1 flex flex-col gap-4">
|
|
3
|
-
<v-btn style="backdrop-filter: blur(5px)" color="#A0B3D8"
|
|
4
|
-
<v-btn style="backdrop-filter: blur(5px)" color="#A0B3D8"
|
|
3
|
+
<v-btn style="backdrop-filter: blur(5px)" color="#A0B3D8" variant="outlined" icon="mdi mdi-arrow-up" @click="$emit('up')" />
|
|
4
|
+
<v-btn style="backdrop-filter: blur(5px)" color="#A0B3D8" variant="outlined" icon="mdi mdi-arrow-down" @click="$emit('down')" />
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-dialog
|
|
2
|
+
<v-dialog :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)" :persistent="true">
|
|
3
3
|
<v-card class="self-center w-full sm:w-3/4 md:w-2/3 lg:w-2/4 xl:w-[600px] rounded-lg !p-2">
|
|
4
4
|
<v-card-title>
|
|
5
5
|
<slot v-if="!title" name="title"></slot>
|
|
6
6
|
{{ title }}
|
|
7
|
+
<v-btn class="!absolute top-2 right-3" icon="mdi mdi-window-close" variant="plain" @click="$emit('update:modelValue', null)" />
|
|
7
8
|
</v-card-title>
|
|
8
9
|
<v-card-subtitle>
|
|
9
10
|
<slot v-if="!subtitle" name="subtitle"></slot>
|
|
10
11
|
{{ subtitle }}
|
|
11
12
|
</v-card-subtitle>
|
|
12
|
-
<v-card-actions class="gap-[16px]">
|
|
13
|
-
<base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$t('confirm.yes')" :btn="$libStyles.blueBtn" @click="$emit('yes')"
|
|
14
|
-
<base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$t('confirm.no')" :btn="$libStyles.blueBtn" @click="$emit('no')" />
|
|
13
|
+
<v-card-actions class="gap-[16px] m-2">
|
|
14
|
+
<base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$dataStore.t('confirm.yes')" :btn="$libStyles.blueBtn" @click="$emit('yes')" />
|
|
15
|
+
<base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$dataStore.t('confirm.no')" :btn="$libStyles.blueBtn" @click="$emit('no')" />
|
|
15
16
|
<slot v-if="actions !== 'default'" name="actions"></slot>
|
|
16
17
|
</v-card-actions>
|
|
17
18
|
</v-card>
|
|
@@ -27,7 +28,9 @@ export default defineComponent({
|
|
|
27
28
|
},
|
|
28
29
|
title: {
|
|
29
30
|
type: String,
|
|
30
|
-
default
|
|
31
|
+
default() {
|
|
32
|
+
return useDataStore().t('dialog.title');
|
|
33
|
+
},
|
|
31
34
|
},
|
|
32
35
|
subtitle: {
|
|
33
36
|
type: String,
|
|
@@ -38,39 +41,6 @@ export default defineComponent({
|
|
|
38
41
|
default: 'default',
|
|
39
42
|
},
|
|
40
43
|
},
|
|
41
|
-
emits: ['update:modelValue', '
|
|
42
|
-
setup(props, { emit }) {
|
|
43
|
-
const fieldModel = ref(props.modelValue);
|
|
44
|
-
|
|
45
|
-
const updateValue = (event: boolean) => {
|
|
46
|
-
fieldModel.value = event;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const submitted = (event: any) => {
|
|
50
|
-
emit('submitted', event);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
watch(
|
|
54
|
-
fieldModel,
|
|
55
|
-
() => {
|
|
56
|
-
emit('update:modelValue', fieldModel.value);
|
|
57
|
-
},
|
|
58
|
-
{ immediate: true },
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
watch(
|
|
62
|
-
() => props.modelValue,
|
|
63
|
-
() => {
|
|
64
|
-
fieldModel.value = props.modelValue;
|
|
65
|
-
},
|
|
66
|
-
{ immediate: true },
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
fieldModel,
|
|
71
|
-
submitted,
|
|
72
|
-
updateValue,
|
|
73
|
-
};
|
|
74
|
-
},
|
|
44
|
+
emits: ['update:modelValue', 'yes', 'no'],
|
|
75
45
|
});
|
|
76
46
|
</script>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-list lines="two" v-if="formStore.birthInfos && formStore.birthInfos.length" class="w-full !py-0">
|
|
3
|
-
<v-list-item
|
|
4
|
-
|
|
3
|
+
<v-list-item
|
|
4
|
+
@click="$emit('reset')"
|
|
5
|
+
:append-icon="selected && Object.keys(selected).length === 0 ? `mdi-radiobox-marked ${$libStyles.greenText}` : 'mdi-radiobox-blank text-[#636363]'"
|
|
6
|
+
>
|
|
7
|
+
<v-list-item-title :class="[$libStyles.greenText, $libStyles.textTitle]">{{ $dataStore.t('form.notChosen') }}</v-list-item-title>
|
|
5
8
|
</v-list-item>
|
|
6
9
|
<v-list-item
|
|
7
10
|
v-for="familyMember of formStore.birthInfos"
|
|
@@ -13,12 +16,12 @@
|
|
|
13
16
|
`${familyMember.childSurName} ${familyMember.childName} ${familyMember.childPatronymic ? familyMember.childPatronymic : ''}`
|
|
14
17
|
}}</v-list-item-title>
|
|
15
18
|
<v-list-item-subtitle :class="[$libStyles.textSimple]"
|
|
16
|
-
><span>{{ `${$t('form.iin')}:` }}</span
|
|
19
|
+
><span>{{ `${$dataStore.t('form.iin')}:` }}</span
|
|
17
20
|
>{{ ` ${$reformatIin(familyMember.childIIN!)}` }}</v-list-item-subtitle
|
|
18
21
|
>
|
|
19
22
|
</v-list-item>
|
|
20
23
|
</v-list>
|
|
21
|
-
<base-list-empty class="w-full" v-else
|
|
24
|
+
<base-list-empty class="w-full" v-else />
|
|
22
25
|
</template>
|
|
23
26
|
|
|
24
27
|
<script lang="ts">
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="pt-3 rounded-lg border-[1px]" :class="[$libStyles.whiteBg, disabled && $libStyles.disabled]">
|
|
3
3
|
<div class="ml-5">
|
|
4
|
-
<
|
|
4
|
+
<div class="flex justify-between mr-5">
|
|
5
|
+
<p :class="[$libStyles.textTitle, $libStyles.greenText]">{{ title }}</p>
|
|
6
|
+
<div
|
|
7
|
+
v-if="isMultiple && more && !isShort && isActionsAvailable"
|
|
8
|
+
:class="[$libStyles.blueBg, $libStyles.whiteText, $libStyles.textSimple, disabled ? $libStyles.disabled : 'cursor-pointer']"
|
|
9
|
+
class="lg:flex transition-all rounded-lg h-[36px] flex items-center font-medium justify-center opacity-50 hover:opacity-90 w-[120px]"
|
|
10
|
+
@click="!disabled && memberStore.addMember(whichForm)"
|
|
11
|
+
>
|
|
12
|
+
{{ $dataStore.t('buttons.add') }}
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
5
15
|
<p v-if="!!subtitle" :class="[$libStyles.greyText, $libStyles.textSimple]">{{ subtitle }}</p>
|
|
6
16
|
</div>
|
|
7
17
|
<div
|
|
8
18
|
class="ml-5 mt-6 grid auto-rows-fr items-center"
|
|
9
19
|
:class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2 mb-6' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7 ']"
|
|
10
20
|
>
|
|
11
|
-
<span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('form.fullName') }}</span>
|
|
12
|
-
<span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('form.iin') }}</span>
|
|
13
|
-
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $t('form.gender') }}</span>
|
|
14
|
-
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium"> {{ $t('form.birthDate') }} </span>
|
|
15
|
-
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('form.Country') }} </span>
|
|
16
|
-
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $t('code') }}</span>
|
|
21
|
+
<span :class="[$libStyles.textSimple]" class="font-medium">{{ $dataStore.t('form.fullName') }}</span>
|
|
22
|
+
<span :class="[$libStyles.textSimple]" class="font-medium">{{ $dataStore.t('form.iin') }}</span>
|
|
23
|
+
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $dataStore.t('form.gender') }}</span>
|
|
24
|
+
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium"> {{ $dataStore.t('form.birthDate') }} </span>
|
|
25
|
+
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $dataStore.t('form.Country') }} </span>
|
|
26
|
+
<span v-if="!isShort" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block"> {{ $dataStore.t('code') }}</span>
|
|
17
27
|
</div>
|
|
18
|
-
<div v-if="isMultiple" class="ml-5 flex flex-col" :class="[isShort ? 'mb-6' : '']">
|
|
28
|
+
<div v-if="isMultiple && multipleMember !== null" class="ml-5 flex flex-col" :class="[isShort ? 'mb-6' : '']">
|
|
19
29
|
<div
|
|
20
|
-
v-for="(each, index) of
|
|
30
|
+
v-for="(each, index) of multipleMember"
|
|
21
31
|
:key="index"
|
|
22
32
|
class="grid auto-rows-fr items-center relative"
|
|
23
33
|
:class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7']"
|
|
@@ -34,43 +44,50 @@
|
|
|
34
44
|
:class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover, disabled ? $libStyles.disabled : 'cursor-pointer']"
|
|
35
45
|
@click="!disabled && $emit('onMore', { whichForm, index })"
|
|
36
46
|
>
|
|
37
|
-
<i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"
|
|
47
|
+
<i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"></i>
|
|
38
48
|
</div>
|
|
39
49
|
</div>
|
|
40
50
|
</div>
|
|
41
51
|
<div
|
|
42
|
-
v-
|
|
52
|
+
v-if="singleMember !== null"
|
|
43
53
|
class="ml-5 grid auto-rows-fr items-center relative"
|
|
44
54
|
:class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7']"
|
|
45
55
|
>
|
|
46
|
-
<span :class="[getMemberInfo(
|
|
47
|
-
<span :class="[getMemberInfo(
|
|
48
|
-
<span v-if="!isShort" :class="[getMemberInfo(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<span v-if="!isShort" :class="[getMemberInfo(
|
|
56
|
+
<span :class="[getMemberInfo(singleMember).fullName === null && $libStyles.emptyBlockCol]">{{ getMemberInfo(singleMember).fullName }}</span>
|
|
57
|
+
<span :class="[getMemberInfo(singleMember).iin === null && $libStyles.emptyBlockCol]">{{ getMemberInfo(singleMember).iin }}</span>
|
|
58
|
+
<span v-if="!isShort" :class="[getMemberInfo(singleMember).gender === null && $libStyles.emptyBlockCol]" class="hidden lg:block"
|
|
59
|
+
>{{ getMemberInfo(singleMember).gender }}
|
|
60
|
+
</span>
|
|
61
|
+
<span v-if="!isShort" :class="[getMemberInfo(singleMember).birthDate === null && $libStyles.emptyBlockCol]"> {{ getMemberInfo(singleMember).birthDate }} </span>
|
|
62
|
+
<span v-if="!isShort" :class="[getMemberInfo(singleMember).birthPlace === null && $libStyles.emptyBlockCol]" class="hidden lg:block">
|
|
63
|
+
{{ getMemberInfo(singleMember).birthPlace }}
|
|
64
|
+
</span>
|
|
65
|
+
<span v-if="!isShort" :class="[getMemberInfo(singleMember).sectorCode === null && $libStyles.emptyBlockCol]" class="hidden lg:block">
|
|
66
|
+
{{ getMemberInfo(singleMember).sectorCode }}
|
|
67
|
+
</span>
|
|
52
68
|
<div
|
|
53
69
|
v-if="!isShort"
|
|
54
70
|
class="rounded-br-lg transition-all h-[70px] w-[60px] place-self-end"
|
|
55
71
|
:class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover, disabled ? $libStyles.disabled : 'cursor-pointer']"
|
|
56
72
|
@click="!disabled && $emit('onMore', { whichForm })"
|
|
57
73
|
>
|
|
58
|
-
<i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"
|
|
74
|
+
<i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"></i>
|
|
59
75
|
</div>
|
|
60
76
|
</div>
|
|
61
77
|
<div
|
|
62
|
-
v-if="isMultiple && more && !isShort"
|
|
78
|
+
v-if="isMultiple && more && !isShort && isActionsAvailable"
|
|
63
79
|
:class="[$libStyles.blueBg, $libStyles.whiteText, $libStyles.textSimple, disabled ? $libStyles.disabled : 'cursor-pointer']"
|
|
64
|
-
class="rounded-b-lg h-[36px] flex items-center font-medium justify-center"
|
|
80
|
+
class="lg:hidden transition-all rounded-b-lg h-[36px] flex items-center font-medium justify-center opacity-50 hover:opacity-90"
|
|
65
81
|
@click="!disabled && memberStore.addMember(whichForm)"
|
|
66
82
|
>
|
|
67
|
-
{{ $t('buttons.add') }}
|
|
83
|
+
{{ $dataStore.t('buttons.add') }}
|
|
68
84
|
</div>
|
|
69
85
|
</div>
|
|
70
86
|
</template>
|
|
71
87
|
|
|
72
88
|
<script lang="ts">
|
|
73
|
-
import {
|
|
89
|
+
import { StoreMembers } from '../../types/enum';
|
|
90
|
+
import { Member } from '../../composables/classes';
|
|
74
91
|
|
|
75
92
|
export default defineComponent({
|
|
76
93
|
props: {
|
|
@@ -83,7 +100,7 @@ export default defineComponent({
|
|
|
83
100
|
default: '',
|
|
84
101
|
},
|
|
85
102
|
whichForm: {
|
|
86
|
-
type: String as PropType<
|
|
103
|
+
type: String as PropType<keyof typeof StoreMembers>,
|
|
87
104
|
default: '',
|
|
88
105
|
},
|
|
89
106
|
more: {
|
|
@@ -101,14 +118,18 @@ export default defineComponent({
|
|
|
101
118
|
},
|
|
102
119
|
emits: ['onMore', 'addMember'],
|
|
103
120
|
setup(props) {
|
|
104
|
-
const dataStore = useDataStore();
|
|
105
121
|
const formStore = useFormStore();
|
|
106
122
|
const memberStore = useMemberStore();
|
|
107
|
-
const
|
|
108
|
-
const
|
|
109
|
-
|
|
123
|
+
const isMultiple = computed(() => [StoreMembers.insuredForm, StoreMembers.beneficiaryForm, StoreMembers.beneficialOwnerForm].includes(props.whichForm as StoreMembers));
|
|
124
|
+
const singleMember: Member | null =
|
|
125
|
+
props.whichForm === StoreMembers.policyholderForm || props.whichForm === StoreMembers.policyholdersRepresentativeForm ? formStore[props.whichForm] : null;
|
|
126
|
+
const multipleMember: Member[] | null =
|
|
127
|
+
props.whichForm === StoreMembers.insuredForm || props.whichForm === StoreMembers.beneficiaryForm || props.whichForm === StoreMembers.beneficialOwnerForm
|
|
128
|
+
? formStore[props.whichForm]
|
|
129
|
+
: null;
|
|
110
130
|
|
|
111
131
|
const isShort = computed(() => props.type === 'short');
|
|
132
|
+
const isActionsAvailable = computed(() => memberStore.isStatementEditible(props.whichForm));
|
|
112
133
|
|
|
113
134
|
const getMemberInfo = (memberData: Member) => {
|
|
114
135
|
return {
|
|
@@ -125,11 +146,13 @@ export default defineComponent({
|
|
|
125
146
|
// State
|
|
126
147
|
formStore,
|
|
127
148
|
memberStore,
|
|
128
|
-
|
|
149
|
+
singleMember,
|
|
150
|
+
multipleMember,
|
|
129
151
|
isMultiple,
|
|
130
152
|
|
|
131
153
|
// Computed
|
|
132
154
|
isShort,
|
|
155
|
+
isActionsAvailable,
|
|
133
156
|
|
|
134
157
|
// Functions
|
|
135
158
|
getMemberInfo,
|