hl-core 0.0.8-beta.4 → 0.0.8-beta.40
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 +117 -44
- 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 +77 -33
- package/components/Form/FormSection.vue +4 -1
- package/components/Form/FormToggle.vue +2 -3
- package/components/Form/ManagerAttachment.vue +197 -0
- 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 +51 -33
- 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 +533 -292
- package/components/Pages/ProductAgreement.vue +4 -2
- package/components/Pages/ProductConditions.vue +509 -99
- package/components/Panel/PanelHandler.vue +93 -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 +217 -97
- package/composables/constants.ts +26 -52
- package/composables/index.ts +80 -2
- package/composables/styles.ts +8 -3
- package/configs/i18n.ts +17 -0
- package/layouts/default.vue +6 -6
- package/locales/kz.json +585 -0
- package/locales/ru.json +587 -0
- package/nuxt.config.ts +9 -1
- package/package.json +41 -11
- package/pages/500.vue +2 -2
- package/pages/Token.vue +51 -0
- package/plugins/helperFunctionsPlugins.ts +3 -0
- package/plugins/storePlugin.ts +0 -1
- package/plugins/vuetifyPlugin.ts +8 -1
- package/store/data.store.ts +2649 -0
- package/store/form.store.ts +1 -1
- package/store/member.store.ts +164 -52
- package/store/{rules.js → rules.ts} +63 -25
- package/types/enum.ts +83 -0
- package/types/env.d.ts +10 -0
- package/types/index.ts +211 -7
- package/store/data.store.js +0 -2508
- package/store/messages.ts +0 -434
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 && !this.baseURL) || (!dataStore.isEFO && (!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,31 +134,66 @@ 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 }> {
|
|
148
145
|
return this.axiosCall({
|
|
149
146
|
method: Methods.GET,
|
|
150
|
-
url:
|
|
147
|
+
url: '/Ekk/api/Currency/GetExchange',
|
|
151
148
|
});
|
|
152
149
|
}
|
|
153
150
|
|
|
154
|
-
async
|
|
151
|
+
async getContragent(queryData: GetContragentRequest): Promise<GetContragentResponse> {
|
|
155
152
|
return this.axiosCall({
|
|
156
153
|
method: Methods.GET,
|
|
157
|
-
url: `/
|
|
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> {
|
|
166
|
+
return this.axiosCall({
|
|
167
|
+
method: Methods.GET,
|
|
168
|
+
url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
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[]> {
|
|
180
|
+
return this.axiosCall({
|
|
181
|
+
method: Methods.GET,
|
|
182
|
+
url: `/${this.productUrl}/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
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}`,
|
|
158
190
|
});
|
|
159
191
|
}
|
|
160
192
|
|
|
161
193
|
async definedAnswers(filter: string) {
|
|
162
194
|
return this.axiosCall({
|
|
163
195
|
method: Methods.GET,
|
|
164
|
-
url: `/
|
|
196
|
+
url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
|
|
165
197
|
});
|
|
166
198
|
}
|
|
167
199
|
|
|
@@ -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`,
|
|
@@ -227,35 +272,35 @@ export class ApiClass {
|
|
|
227
272
|
});
|
|
228
273
|
}
|
|
229
274
|
|
|
230
|
-
async getDicFileTypeList() {
|
|
275
|
+
async getDicFileTypeList(): Promise<Value[]> {
|
|
231
276
|
return this.axiosCall({
|
|
232
277
|
method: Methods.GET,
|
|
233
278
|
url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
|
|
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
|
|
|
@@ -498,7 +557,7 @@ export class ApiClass {
|
|
|
498
557
|
}
|
|
499
558
|
|
|
500
559
|
async getProcessTariff(code: number | string = 5) {
|
|
501
|
-
return this.axiosCall({ url: `/
|
|
560
|
+
return this.axiosCall({ url: `/Arm/api/Dictionary/ProcessTariff/${code}` });
|
|
502
561
|
}
|
|
503
562
|
|
|
504
563
|
async setConfirmation(data: any) {
|
|
@@ -516,33 +575,47 @@ 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
|
-
url: '/
|
|
581
|
+
url: '/Arm/api/UnderwritingCouncil/SendTask',
|
|
523
582
|
data: data,
|
|
524
583
|
});
|
|
525
584
|
}
|
|
526
585
|
|
|
527
|
-
async
|
|
586
|
+
async getDictionaryItems(dictName: string): Promise<Value[]> {
|
|
587
|
+
return this.axiosCall({
|
|
588
|
+
method: Methods.GET,
|
|
589
|
+
url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}`,
|
|
590
|
+
});
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
async filterManagerByRegion(dictName: string, filterName: string): Promise<Value[]> {
|
|
528
594
|
return this.axiosCall({
|
|
529
595
|
method: Methods.GET,
|
|
530
|
-
url: `/
|
|
596
|
+
url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
|
|
531
597
|
});
|
|
532
598
|
}
|
|
533
599
|
|
|
534
|
-
async setINSISWorkData(data:
|
|
600
|
+
async setINSISWorkData(data: InsisWorkDataApp) {
|
|
535
601
|
return this.axiosCall({
|
|
536
602
|
method: Methods.POST,
|
|
537
|
-
url: `/
|
|
603
|
+
url: `/Arm/api/Bpm/SetInsisWorkData`,
|
|
538
604
|
data: data,
|
|
539
605
|
});
|
|
540
606
|
}
|
|
541
607
|
|
|
542
|
-
async searchAgentByName(name: string) {
|
|
608
|
+
async searchAgentByName(name: string): Promise<AgentData[]> {
|
|
609
|
+
return this.axiosCall({
|
|
610
|
+
method: Methods.GET,
|
|
611
|
+
url: `/Ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
async isCourseChanged(processInstanceId: string): Promise<boolean> {
|
|
543
616
|
return this.axiosCall({
|
|
544
617
|
method: Methods.GET,
|
|
545
|
-
url:
|
|
618
|
+
url: `/${this.productUrl}/api/Application/IsCourseChanged?processInstanceId=${processInstanceId}`,
|
|
546
619
|
});
|
|
547
620
|
}
|
|
548
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">
|