hl-core 0.0.8 → 0.0.9-beta.2

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.
Files changed (63) hide show
  1. package/api/index.ts +142 -101
  2. package/api/interceptors.ts +17 -13
  3. package/components/Button/Btn.vue +1 -1
  4. package/components/Button/ScrollButtons.vue +2 -2
  5. package/components/Complex/MessageBlock.vue +26 -0
  6. package/components/Complex/Page.vue +1 -1
  7. package/components/Dialog/Dialog.vue +9 -39
  8. package/components/Dialog/FamilyDialog.vue +7 -4
  9. package/components/Form/FormBlock.vue +90 -42
  10. package/components/Form/FormSection.vue +4 -1
  11. package/components/Form/FormToggle.vue +1 -2
  12. package/components/Form/ManagerAttachment.vue +197 -0
  13. package/components/Form/ProductConditionsBlock.vue +68 -14
  14. package/components/Input/Datepicker.vue +45 -0
  15. package/components/Input/FileInput.vue +2 -3
  16. package/components/Input/FormInput.vue +31 -7
  17. package/components/Input/PanelInput.vue +7 -2
  18. package/components/Input/RoundedInput.vue +2 -2
  19. package/components/Input/RoundedSelect.vue +137 -0
  20. package/components/Layout/Drawer.vue +4 -2
  21. package/components/Layout/Header.vue +40 -4
  22. package/components/Layout/Loader.vue +1 -1
  23. package/components/Layout/SettingsPanel.vue +51 -13
  24. package/components/Menu/MenuHover.vue +30 -0
  25. package/components/Menu/MenuNav.vue +29 -13
  26. package/components/Menu/MenuNavItem.vue +6 -3
  27. package/components/Pages/Anketa.vue +59 -33
  28. package/components/Pages/Auth.vue +139 -46
  29. package/components/Pages/Documents.vue +7 -7
  30. package/components/Pages/InvoiceInfo.vue +30 -0
  31. package/components/Pages/MemberForm.vue +544 -293
  32. package/components/Pages/ProductAgreement.vue +4 -2
  33. package/components/Pages/ProductConditions.vue +673 -75
  34. package/components/Panel/PanelHandler.vue +304 -0
  35. package/components/Panel/PanelSelectItem.vue +1 -1
  36. package/components/Transitions/SlideTransition.vue +5 -0
  37. package/components/Utilities/Chip.vue +27 -0
  38. package/components/Utilities/JsonViewer.vue +27 -0
  39. package/composables/axios.ts +1 -1
  40. package/composables/classes.ts +223 -101
  41. package/composables/constants.ts +26 -51
  42. package/composables/index.ts +80 -2
  43. package/composables/styles.ts +15 -3
  44. package/configs/i18n.ts +17 -0
  45. package/layouts/default.vue +6 -6
  46. package/locales/kz.json +585 -0
  47. package/locales/ru.json +587 -0
  48. package/nuxt.config.ts +13 -1
  49. package/package.json +43 -11
  50. package/pages/500.vue +2 -2
  51. package/pages/Token.vue +51 -0
  52. package/plugins/helperFunctionsPlugins.ts +6 -0
  53. package/plugins/storePlugin.ts +0 -1
  54. package/plugins/vuetifyPlugin.ts +8 -1
  55. package/store/data.store.ts +2649 -0
  56. package/store/form.store.ts +1 -1
  57. package/store/member.store.ts +164 -52
  58. package/store/{rules.js → rules.ts} +65 -34
  59. package/types/enum.ts +83 -0
  60. package/types/env.d.ts +10 -0
  61. package/types/index.ts +262 -5
  62. package/store/data.store.js +0 -2482
  63. package/store/messages.ts +0 -429
package/api/index.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { useAxios } from '@/composables/axios';
2
- import { Value, IDocument } from '@/composables/classes';
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 {
@@ -11,15 +12,9 @@ export class ApiClass {
11
12
  private readonly baseURL: string = import.meta.env.VITE_BASE_URL as string;
12
13
  private readonly productUrl: string = import.meta.env.VITE_PRODUCT_URL as string;
13
14
 
14
- private async axiosCall(config: AxiosRequestConfig) {
15
- const dataStore = useDataStore();
16
- if ((dataStore.isEFO && this.baseURL) || (!dataStore.isEFO && this.baseURL && this.productUrl)) {
17
- const { data } = await useAxios(this.baseURL as string).request(config);
18
- return data;
19
- } else {
20
- console.error('No Axios baseURL or productURL');
21
- return null;
22
- }
15
+ private async axiosCall<T>(config: AxiosRequestConfig): Promise<T> {
16
+ const { data } = await useAxios(this.baseURL).request<T>(config);
17
+ return data;
23
18
  }
24
19
 
25
20
  async loginUser(data: { login: string; password: string; numAttempt: number }): Promise<{ refreshToken: string; accessToken: string }> {
@@ -41,146 +36,168 @@ export class ApiClass {
41
36
  });
42
37
  }
43
38
 
44
- // Страна
45
- async getCountries() {
39
+ async getCountries(): Promise<Value[]> {
46
40
  return this.axiosCall({
47
41
  method: Methods.GET,
48
42
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Country',
49
43
  });
50
44
  }
51
45
 
52
- // Страна гражданства
53
- async getCitizenshipCountries() {
46
+ async getCitizenshipCountries(): Promise<Value[]> {
54
47
  return this.axiosCall({
55
48
  method: Methods.GET,
56
49
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500012',
57
50
  });
58
51
  }
59
52
 
60
- // Страна налогового резидетства
61
- async getTaxCountries() {
53
+ async getTaxCountries(): Promise<Value[]> {
62
54
  return this.axiosCall({
63
55
  method: Methods.GET,
64
56
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500014',
65
57
  });
66
58
  }
67
59
 
68
- async getAdditionalTaxCountries() {
60
+ async getAdditionalTaxCountries(): Promise<Value[]> {
69
61
  return this.axiosCall({
70
62
  method: Methods.GET,
71
63
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=507777',
72
64
  });
73
65
  }
74
66
 
75
- // Область
76
- async getStates() {
67
+ async getStates(): Promise<Value[]> {
77
68
  return this.axiosCall({
78
69
  method: Methods.GET,
79
70
  url: '/Ekk/api/Contragentinsis/DictionaryItems/State',
80
71
  });
81
72
  }
82
73
 
83
- // Регион
84
- async getRegions() {
74
+ async getRegions(): Promise<Value[]> {
85
75
  return this.axiosCall({
86
76
  method: Methods.GET,
87
77
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Region',
88
78
  });
89
79
  }
90
80
 
91
- // Город
92
- async getCities() {
81
+ async getCities(): Promise<Value[]> {
93
82
  return this.axiosCall({
94
83
  method: Methods.GET,
95
84
  url: '/Ekk/api/Contragentinsis/DictionaryItems/CityVillage',
96
85
  });
97
86
  }
98
87
 
99
- // Вид населенного пункта
100
- async getLocalityTypes() {
88
+ async getLocalityTypes(): Promise<Value[]> {
101
89
  return this.axiosCall({
102
90
  method: Methods.GET,
103
91
  url: '/Ekk/api/Contragentinsis/DictionaryItems/LocalityType',
104
92
  });
105
93
  }
106
94
 
107
- // Тип документа
108
- async getDocumentTypes() {
95
+ async getDocumentTypes(): Promise<Value[]> {
109
96
  return this.axiosCall({
110
97
  method: Methods.GET,
111
98
  url: '/Ekk/api/Contragentinsis/DictionaryItems/DocumentTypePhys',
112
99
  });
113
100
  }
114
101
 
115
- // Кем выдано
116
- async getDocumentIssuers() {
102
+ async getDocumentIssuers(): Promise<Value[]> {
117
103
  return this.axiosCall({
118
104
  method: Methods.GET,
119
105
  url: '/Ekk/api/Contragentinsis/DictionaryItems/DocIssuer',
120
106
  });
121
107
  }
122
108
 
123
- // Признак резидентства
124
- async getResidents() {
109
+ async getResidents(): Promise<Value[]> {
125
110
  return this.axiosCall({
126
111
  method: Methods.GET,
127
112
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500011',
128
113
  });
129
114
  }
130
115
 
131
- // Код сектора экономики
132
- async getSectorCode() {
116
+ async getSectorCode(): Promise<Value[]> {
133
117
  return this.axiosCall({
134
118
  method: Methods.GET,
135
119
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500003',
136
120
  });
137
121
  }
138
122
 
139
- // Семейное положение
140
- async getFamilyStatuses() {
123
+ async getFamilyStatuses(): Promise<Value[]> {
141
124
  return this.axiosCall({
142
125
  method: Methods.GET,
143
126
  url: '/Arm/api/Dictionary/GetDictionaryItems/DicFamilyStatus',
144
127
  });
145
128
  }
146
129
 
147
- // Степень родства
148
- async getRelationTypes() {
130
+ async getRelationTypes(): Promise<Value[]> {
149
131
  return this.axiosCall({
150
132
  method: Methods.GET,
151
133
  url: '/Ekk/api/Contragentinsis/DictionaryItems/Relation',
152
134
  });
153
135
  }
154
136
 
155
- async getContragent(queryData: any) {
137
+ async getDicAnnuityTypeList(): Promise<Value[]> {
156
138
  return this.axiosCall({
157
139
  method: Methods.GET,
158
- url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName${queryData.middleName}`,
140
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicAnnuityType',
159
141
  });
160
142
  }
161
143
 
162
- async getQuestionList(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaFirst> {
144
+ async getCurrencies(): Promise<{ eur: number; usd: number }> {
163
145
  return this.axiosCall({
164
146
  method: Methods.GET,
165
- url: `/Baiterek/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
147
+ url: '/Ekk/api/Currency/GetExchange',
166
148
  });
167
149
  }
168
150
 
169
- async getQuestionListSecond(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaSecond[]> {
151
+ async getContragent(queryData: GetContragentRequest): Promise<GetContragentResponse> {
170
152
  return this.axiosCall({
171
153
  method: Methods.GET,
172
- url: `/Baiterek/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
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}`,
173
190
  });
174
191
  }
175
192
 
176
193
  async definedAnswers(filter: string) {
177
194
  return this.axiosCall({
178
195
  method: Methods.GET,
179
- url: `/ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
196
+ url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
180
197
  });
181
198
  }
182
199
 
183
- async setSurvey(surveyData: AnketaFirst) {
200
+ async setSurvey(surveyData: AnketaFirst): Promise<string> {
184
201
  return this.axiosCall({
185
202
  method: Methods.POST,
186
203
  data: surveyData,
@@ -202,7 +219,7 @@ export class ApiClass {
202
219
  });
203
220
  }
204
221
 
205
- async getAdditionalInsuranceTermsAnswers(processCode: string | number, questionId: string) {
222
+ async getAdditionalInsuranceTermsAnswers(processCode: string | number, questionId: string): Promise<AddCoverAnswer[]> {
206
223
  return this.axiosCall({
207
224
  method: Methods.GET,
208
225
  url: `/Arm/api/Dictionary/ProcessCoverTypeSum/${processCode}/${questionId}`,
@@ -216,14 +233,27 @@ export class ApiClass {
216
233
  });
217
234
  }
218
235
 
219
- async getContragentById(id: any) {
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> {
220
244
  return this.axiosCall({
221
245
  method: Methods.GET,
222
246
  url: `/Ekk/api/Contragentinsis/Contragent?PersonId=${id}`,
223
247
  });
224
248
  }
225
249
 
226
- async saveContragent(data: any) {
250
+ async saveContragent(data: {
251
+ contragent: ContragentType;
252
+ questionaries: ContragentQuestionaries[];
253
+ contacts: ContragentContacts[];
254
+ documents: ContragentDocuments[];
255
+ addresses: ContragentAddress[];
256
+ }): Promise<number> {
227
257
  return this.axiosCall({
228
258
  method: Methods.POST,
229
259
  url: `/Ekk/api/Contragentinsis/SaveContragent`,
@@ -234,7 +264,7 @@ export class ApiClass {
234
264
  async getFile(id: string) {
235
265
  return await this.axiosCall({
236
266
  method: Methods.GET,
237
- url: `/Arm/api/File/DownloadFile/${id}`,
267
+ url: `/File/api/Data/DownloadFile/${id}`,
238
268
  responseType: 'arraybuffer',
239
269
  headers: {
240
270
  'Content-Type': 'application/pdf',
@@ -242,35 +272,35 @@ export class ApiClass {
242
272
  });
243
273
  }
244
274
 
245
- async getDicFileTypeList() {
275
+ async getDicFileTypeList(): Promise<Value[]> {
246
276
  return this.axiosCall({
247
277
  method: Methods.GET,
248
278
  url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
249
279
  });
250
280
  }
251
281
 
252
- async getContrAgentData(personId: string | number) {
282
+ async getContrAgentData(personId: string | number): Promise<ContragentQuestionaries[]> {
253
283
  return this.axiosCall({
254
284
  method: Methods.GET,
255
285
  url: `/Ekk/api/Contragentinsis/Questionaries?PersonId=${personId}`,
256
286
  });
257
287
  }
258
288
 
259
- async getContrAgentContacts(personId: string | number) {
289
+ async getContrAgentContacts(personId: string | number): Promise<ContragentContacts[]> {
260
290
  return this.axiosCall({
261
291
  method: Methods.GET,
262
292
  url: `/Ekk/api/Contragentinsis/Contacts?PersonId=${personId}`,
263
293
  });
264
294
  }
265
295
 
266
- async getContrAgentDocuments(personId: string | number) {
296
+ async getContrAgentDocuments(personId: string | number): Promise<ContragentDocuments[]> {
267
297
  return this.axiosCall({
268
298
  method: Methods.GET,
269
299
  url: `/Ekk/api/Contragentinsis/Documents?PersonId=${personId}`,
270
300
  });
271
301
  }
272
302
 
273
- async getContrAgentAddress(personId: string | number) {
303
+ async getContrAgentAddress(personId: string | number): Promise<ContragentAddress[]> {
274
304
  return this.axiosCall({
275
305
  method: Methods.GET,
276
306
  url: `/Ekk/api/Contragentinsis/Address?PersonId=${personId}`,
@@ -291,26 +321,26 @@ export class ApiClass {
291
321
  });
292
322
  }
293
323
 
294
- async sendSms(data: { phone: string; template: string; tempFlags: { url: string } }): Promise<void> {
324
+ async registerNumber(data: RegNumberDataType): Promise<string> {
295
325
  return this.axiosCall({
296
- baseURL: import.meta.env.VITE_SMS_SERVICE as string,
297
326
  method: Methods.POST,
298
- url: '/message',
327
+ url: `/${this.productUrl}/api/Application/FinCenterRegNumberSave`,
299
328
  data: data,
300
329
  });
301
330
  }
302
331
 
303
- async getUserGroups(): Promise<Item[]> {
332
+ async sendSms(data: SmsDataType): Promise<void> {
304
333
  return this.axiosCall({
305
- method: Methods.GET,
306
- url: '/Arm/api/Bpm/TaskGroups',
334
+ method: Methods.POST,
335
+ url: '/Arm/api/Otp/SmsText',
336
+ data: data,
307
337
  });
308
338
  }
309
339
 
310
- async getDictionaryItems(dictName: string) {
340
+ async getUserGroups(): Promise<Item[]> {
311
341
  return this.axiosCall({
312
342
  method: Methods.GET,
313
- url: `/ekk/api/ContragentInsis/DictionaryItems/${dictName}`,
343
+ url: '/Arm/api/Bpm/TaskGroups',
314
344
  });
315
345
  }
316
346
 
@@ -342,7 +372,6 @@ export class ApiClass {
342
372
  return this.axiosCall({
343
373
  method: Methods.GET,
344
374
  url: '/Arm/api/Bpm/ProcessList',
345
- timeout: 10000,
346
375
  });
347
376
  }
348
377
 
@@ -356,20 +385,20 @@ export class ApiClass {
356
385
  });
357
386
  }
358
387
 
359
- async getApplicationData(id: string) {
388
+ async getApplicationData(id: string): Promise<any> {
360
389
  return this.axiosCall({
361
390
  url: `/${this.productUrl}/api/Application/applicationData?Id=${id} `,
362
391
  });
363
392
  }
364
393
 
365
- async getCalculation(id: string) {
394
+ async getCalculation(id: string): Promise<Number> {
366
395
  return this.axiosCall({
367
396
  method: Methods.POST,
368
397
  url: `/${this.productUrl}/api/Application/Calculator?processInstanceId=${id}`,
369
398
  });
370
399
  }
371
400
 
372
- async setApplication(data: any) {
401
+ async setApplication(data: { policyAppDto: PolicyAppDto; addCoversDto: AddCover[] }): Promise<void> {
373
402
  return this.axiosCall({
374
403
  method: Methods.POST,
375
404
  url: `/${this.productUrl}/api/Application/SetApplicationData`,
@@ -378,19 +407,10 @@ export class ApiClass {
378
407
  });
379
408
  }
380
409
 
381
- async generatePdfDocument(data: any) {
382
- return await this.axiosCall({
383
- method: Methods.POST,
384
- url: `/Arm/api/Bpm/GeneratePdfDocument`,
385
- responseType: 'blob',
386
- data: data,
387
- });
388
- }
389
-
390
410
  async deleteFile(data: any) {
391
411
  return this.axiosCall({
392
412
  method: Methods.POST,
393
- url: '/Arm/api/File/DeleteFiles',
413
+ url: '/File/api/Data/DeleteFiles',
394
414
  data: data,
395
415
  });
396
416
  }
@@ -398,7 +418,7 @@ export class ApiClass {
398
418
  async uploadFiles(data: any) {
399
419
  return this.axiosCall({
400
420
  method: Methods.POST,
401
- url: '/Arm/api/File/UploadFiles',
421
+ url: '/File/api/Data/UploadFiles',
402
422
  headers: {
403
423
  'Content-Type': 'multipart/form-data',
404
424
  },
@@ -406,7 +426,7 @@ export class ApiClass {
406
426
  });
407
427
  }
408
428
 
409
- async sendTask(data: any) {
429
+ async sendTask(data: SendTask): Promise<void> {
410
430
  return this.axiosCall({
411
431
  method: Methods.POST,
412
432
  url: `/${this.productUrl}/api/Application/SendTask`,
@@ -414,7 +434,7 @@ export class ApiClass {
414
434
  });
415
435
  }
416
436
 
417
- async setMember(whichMember: string, data: any) {
437
+ async setMember(whichMember: keyof typeof MemberCodes, data: any) {
418
438
  return this.axiosCall({
419
439
  method: Methods.POST,
420
440
  url: `/Arm/api/BpmMembers/Set${whichMember}`,
@@ -422,62 +442,69 @@ export class ApiClass {
422
442
  });
423
443
  }
424
444
 
425
- async deleteMember(whichMember: string, id: number | string) {
445
+ async deleteMember(whichMember: keyof typeof MemberCodes, id: number | string) {
426
446
  return this.axiosCall({
427
447
  method: Methods.POST,
428
448
  url: `/Arm/api/BpmMembers/Delete${whichMember}/${id}`,
429
449
  });
430
450
  }
431
451
 
432
- async getInvoiceData(processInstanceId: string) {
452
+ async getInvoiceData(processInstanceId: string | number): Promise<EpayResponse> {
433
453
  return this.axiosCall({
434
454
  method: Methods.GET,
435
455
  url: `/Arm/api/Invoice/InvoiceData?processInstanceId=${processInstanceId}`,
436
456
  });
437
457
  }
438
458
 
439
- async createInvoice(processInstanceId: string, amount: number | string) {
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> {
440
467
  return this.axiosCall({
441
468
  method: Methods.POST,
442
469
  url: `/Arm/api/Invoice/CreateInvoice/${processInstanceId}/${amount}`,
443
470
  });
444
471
  }
445
472
 
446
- async sendToEpay(processInstanceId: string) {
473
+ async sendToEpay(processInstanceId: string | number): Promise<EpayShortResponse> {
447
474
  return this.axiosCall({
448
475
  method: Methods.POST,
449
476
  url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
450
477
  });
451
478
  }
452
479
 
453
- async signToDocument(data: any) {
480
+ async signDocument(data: SignDataType[]): Promise<SignUrlType[]> {
454
481
  return this.axiosCall({
455
482
  method: Methods.POST,
456
- url: '/Arm/api/Bpm/SignDocument',
483
+ url: '/File/api/Document/SignBts',
457
484
  data: data,
458
485
  });
459
486
  }
460
487
 
461
- async getSignedDocList(data: { processInstanceId: string }): Promise<IDocument[]> {
488
+ async getSignedDocList(data: { processInstanceId: string | number }): Promise<IDocument[]> {
462
489
  return this.axiosCall({
463
490
  method: Methods.POST,
464
- url: '/Arm/api/File/List',
491
+ url: '/File/api/Data/List',
465
492
  data: data,
466
493
  });
467
494
  }
468
495
 
469
- async calculateWithoutApplication(data: RecalculationDataType): Promise<RecalculationResponseType> {
496
+ async calculateWithoutApplication(data: RecalculationDataType, product: string | undefined | null = this.productUrl): Promise<RecalculationResponseType> {
470
497
  return this.axiosCall({
471
498
  method: Methods.POST,
472
- url: `/${this.productUrl}/api/Application/Calculate`,
499
+ url: `/${product}/api/Application/Calculate`,
473
500
  data: data,
474
501
  });
475
502
  }
476
503
 
477
- async getDefaultCalculationData(): Promise<RecalculationDataType> {
504
+ async getDefaultCalculationData(product: string | undefined | null = this.productUrl): Promise<RecalculationDataType> {
478
505
  return this.axiosCall({
479
506
  method: Methods.GET,
480
- url: `/${this.productUrl}/api/Application/DefaultCalculatorValues`,
507
+ url: `/${product}/api/Application/DefaultCalculatorValues`,
481
508
  });
482
509
  }
483
510
 
@@ -530,7 +557,7 @@ export class ApiClass {
530
557
  }
531
558
 
532
559
  async getProcessTariff(code: number | string = 5) {
533
- return this.axiosCall({ url: `/arm/api/Dictionary/ProcessTariff/${code}` });
560
+ return this.axiosCall({ url: `/Arm/api/Dictionary/ProcessTariff/${code}` });
534
561
  }
535
562
 
536
563
  async setConfirmation(data: any) {
@@ -548,33 +575,47 @@ export class ApiClass {
548
575
  });
549
576
  }
550
577
 
551
- async sendUnderwritingCouncilTask(data: any) {
578
+ async sendUnderwritingCouncilTask(data: Partial<SendTask>): Promise<void> {
552
579
  return this.axiosCall({
553
580
  method: Methods.POST,
554
- url: '/arm/api/UnderwritingCouncil/SendTask',
581
+ url: '/Arm/api/UnderwritingCouncil/SendTask',
555
582
  data: data,
556
583
  });
557
584
  }
558
585
 
559
- async filterManagerByRegion(dictName: string, filterName: string) {
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[]> {
560
594
  return this.axiosCall({
561
595
  method: Methods.GET,
562
- url: `/ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
596
+ url: `/Ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
563
597
  });
564
598
  }
565
599
 
566
- async setINSISWorkData(data: any) {
600
+ async setINSISWorkData(data: InsisWorkDataApp) {
567
601
  return this.axiosCall({
568
602
  method: Methods.POST,
569
- url: `/arm/api/Bpm/SetInsisWorkData`,
603
+ url: `/Arm/api/Bpm/SetInsisWorkData`,
570
604
  data: data,
571
605
  });
572
606
  }
573
607
 
574
- 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> {
575
616
  return this.axiosCall({
576
617
  method: Methods.GET,
577
- url: `/ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
618
+ url: `/${this.productUrl}/api/Application/IsCourseChanged?processInstanceId=${processInstanceId}`,
578
619
  });
579
620
  }
580
621
  }
@@ -4,7 +4,9 @@ export default function (axios: AxiosInstance) {
4
4
  axios.interceptors.request.use(
5
5
  request => {
6
6
  const dataStore = useDataStore();
7
- request.headers.Authorization = `Bearer ${dataStore.accessToken}`;
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
- const router = useRouter();
21
- if (error.response.status === 401) {
22
- dataStore.$reset();
23
- localStorage.clear();
24
- if (dataStore.isEFO) {
25
- router.push({ name: 'Auth', query: { error: 401 } });
26
- } else {
27
- dataStore.sendToParent(constants.postActions.Error401, 401);
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
- if (error.response.status >= 500) {
31
- if (router.currentRoute.value.name !== 'Auth') {
32
- dataStore.showToaster('error', error.stack, 5000);
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"></base-loader>
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" variant="outlined" icon="mdi mdi-arrow-up" @click="$emit('up')"></v-btn>
4
- <v-btn style="backdrop-filter: blur(5px)" color="#A0B3D8" variant="outlined" icon="mdi mdi-arrow-down" @click="$emit('down')"></v-btn>
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>
@@ -0,0 +1,26 @@
1
+ <template>
2
+ <div class="text-left p-6 mb-4" :class="[color, $libStyles.rounded]">
3
+ <v-icon :icon="icon" class="mr-4"></v-icon>
4
+ {{ text }}
5
+ </div>
6
+ </template>
7
+
8
+ <script lang="ts">
9
+ export default defineComponent({
10
+ name: 'BaseMessageBlock',
11
+ props: {
12
+ text: {
13
+ type: String,
14
+ default: '',
15
+ },
16
+ icon: {
17
+ type: String,
18
+ default: 'mdi-alert',
19
+ },
20
+ color: {
21
+ type: String,
22
+ default: 'bg-rose-500 text-white',
23
+ },
24
+ },
25
+ });
26
+ </script>