hl-core 0.0.7 → 0.0.8-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.
Files changed (64) hide show
  1. package/.prettierrc +2 -1
  2. package/api/index.ts +548 -0
  3. package/api/interceptors.ts +38 -0
  4. package/components/Button/Btn.vue +57 -0
  5. package/components/Button/BtnIcon.vue +47 -0
  6. package/components/Button/ScrollButtons.vue +6 -0
  7. package/components/Button/SortArrow.vue +21 -0
  8. package/components/Complex/Content.vue +5 -0
  9. package/components/Complex/ContentBlock.vue +5 -0
  10. package/components/Complex/Page.vue +43 -0
  11. package/components/Dialog/Dialog.vue +76 -0
  12. package/components/Dialog/FamilyDialog.vue +39 -0
  13. package/components/Form/FormBlock.vue +114 -0
  14. package/components/Form/FormSection.vue +18 -0
  15. package/components/Form/FormTextSection.vue +20 -0
  16. package/components/Form/FormToggle.vue +52 -0
  17. package/components/Form/ProductConditionsBlock.vue +68 -0
  18. package/components/Input/EmptyFormField.vue +5 -0
  19. package/components/Input/FileInput.vue +71 -0
  20. package/components/Input/FormInput.vue +171 -0
  21. package/components/Input/PanelInput.vue +133 -0
  22. package/components/Input/RoundedInput.vue +143 -0
  23. package/components/Layout/Drawer.vue +45 -0
  24. package/components/Layout/Header.vue +48 -0
  25. package/components/Layout/Loader.vue +35 -0
  26. package/components/Layout/SettingsPanel.vue +48 -0
  27. package/components/List/ListEmpty.vue +22 -0
  28. package/components/Menu/MenuNav.vue +108 -0
  29. package/components/Menu/MenuNavItem.vue +37 -0
  30. package/components/Pages/Anketa.vue +333 -0
  31. package/components/Pages/Auth.vue +91 -0
  32. package/components/Pages/Documents.vue +108 -0
  33. package/components/Pages/MemberForm.vue +1134 -0
  34. package/components/Pages/ProductAgreement.vue +18 -0
  35. package/components/Pages/ProductConditions.vue +360 -0
  36. package/components/Panel/PanelHandler.vue +231 -0
  37. package/components/Panel/PanelItem.vue +5 -0
  38. package/components/Panel/PanelSelectItem.vue +20 -0
  39. package/components/Transitions/FadeTransition.vue +5 -0
  40. package/components/Transitions/SlideTransition.vue +5 -0
  41. package/composables/axios.ts +11 -0
  42. package/composables/classes.ts +1129 -0
  43. package/composables/constants.ts +65 -0
  44. package/composables/index.ts +168 -2
  45. package/composables/styles.ts +43 -8
  46. package/layouts/clear.vue +3 -0
  47. package/layouts/default.vue +75 -0
  48. package/layouts/full.vue +6 -0
  49. package/nuxt.config.ts +27 -5
  50. package/package.json +23 -11
  51. package/pages/500.vue +85 -0
  52. package/plugins/helperFunctionsPlugins.ts +14 -2
  53. package/plugins/storePlugin.ts +6 -7
  54. package/plugins/vuetifyPlugin.ts +10 -0
  55. package/store/data.store.js +2482 -6
  56. package/store/form.store.ts +8 -0
  57. package/store/member.store.ts +291 -0
  58. package/store/messages.ts +160 -37
  59. package/store/rules.js +26 -28
  60. package/tailwind.config.js +10 -0
  61. package/types/index.ts +303 -0
  62. package/app.vue +0 -3
  63. package/components/Button/GreenBtn.vue +0 -33
  64. package/store/app.store.js +0 -12
package/.prettierrc CHANGED
@@ -5,5 +5,6 @@
5
5
  "trailingComma": "all",
6
6
  "bracketSpacing": true,
7
7
  "arrowParens": "avoid",
8
- "endOfLine": "auto"
8
+ "endOfLine": "auto",
9
+ "printWidth": 180
9
10
  }
package/api/index.ts ADDED
@@ -0,0 +1,548 @@
1
+ import { useAxios } from '@/composables/axios';
2
+ import { Value, IDocument } from '@/composables/classes';
3
+ import { AxiosRequestConfig } from 'axios';
4
+
5
+ enum Methods {
6
+ GET = 'GET',
7
+ POST = 'POST',
8
+ }
9
+
10
+ export class ApiClass {
11
+ private readonly baseURL: string = import.meta.env.VITE_BASE_URL as string;
12
+ private readonly productUrl: string = import.meta.env.VITE_PRODUCT_URL as string;
13
+
14
+ 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
+ const { data } = await useAxios(this.baseURL).request<T>(config);
20
+ return data;
21
+ }
22
+
23
+ async loginUser(data: { login: string; password: string; numAttempt: number }): Promise<{ refreshToken: string; accessToken: string }> {
24
+ return this.axiosCall({
25
+ method: Methods.POST,
26
+ url: '/identity/api/Account/login',
27
+ data: data,
28
+ });
29
+ }
30
+
31
+ async getNewAccessToken({ refreshToken, accessToken }: { refreshToken: string; accessToken: string }): Promise<{ refreshToken: string; accessToken: string }> {
32
+ return this.axiosCall({
33
+ method: Methods.POST,
34
+ url: '/identity/api/Account/refresh',
35
+ headers: {
36
+ 'X-Refresh-Token': refreshToken,
37
+ 'X-Access-Token': accessToken,
38
+ },
39
+ });
40
+ }
41
+
42
+ async getCountries(): Promise<Value[]> {
43
+ return this.axiosCall({
44
+ method: Methods.GET,
45
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/Country',
46
+ });
47
+ }
48
+
49
+ async getCitizenshipCountries(): Promise<Value[]> {
50
+ return this.axiosCall({
51
+ method: Methods.GET,
52
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500012',
53
+ });
54
+ }
55
+
56
+ async getTaxCountries(): Promise<Value[]> {
57
+ return this.axiosCall({
58
+ method: Methods.GET,
59
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500014',
60
+ });
61
+ }
62
+
63
+ async getAdditionalTaxCountries(): Promise<Value[]> {
64
+ return this.axiosCall({
65
+ method: Methods.GET,
66
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=507777',
67
+ });
68
+ }
69
+
70
+ async getStates(): Promise<Value[]> {
71
+ return this.axiosCall({
72
+ method: Methods.GET,
73
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/State',
74
+ });
75
+ }
76
+
77
+ async getRegions(): Promise<Value[]> {
78
+ return this.axiosCall({
79
+ method: Methods.GET,
80
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/Region',
81
+ });
82
+ }
83
+
84
+ async getCities(): Promise<Value[]> {
85
+ return this.axiosCall({
86
+ method: Methods.GET,
87
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/CityVillage',
88
+ });
89
+ }
90
+
91
+ async getLocalityTypes(): Promise<Value[]> {
92
+ return this.axiosCall({
93
+ method: Methods.GET,
94
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/LocalityType',
95
+ });
96
+ }
97
+
98
+ async getDocumentTypes(): Promise<Value[]> {
99
+ return this.axiosCall({
100
+ method: Methods.GET,
101
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/DocumentTypePhys',
102
+ });
103
+ }
104
+
105
+ async getDocumentIssuers(): Promise<Value[]> {
106
+ return this.axiosCall({
107
+ method: Methods.GET,
108
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/DocIssuer',
109
+ });
110
+ }
111
+
112
+ async getResidents(): Promise<Value[]> {
113
+ return this.axiosCall({
114
+ method: Methods.GET,
115
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500011',
116
+ });
117
+ }
118
+
119
+ async getSectorCode(): Promise<Value[]> {
120
+ return this.axiosCall({
121
+ method: Methods.GET,
122
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500003',
123
+ });
124
+ }
125
+
126
+ async getFamilyStatuses(): Promise<Value[]> {
127
+ return this.axiosCall({
128
+ method: Methods.GET,
129
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicFamilyStatus',
130
+ });
131
+ }
132
+
133
+ async getRelationTypes(): Promise<Value[]> {
134
+ return this.axiosCall({
135
+ method: Methods.GET,
136
+ url: '/Ekk/api/Contragentinsis/DictionaryItems/Relation',
137
+ });
138
+ }
139
+
140
+ async getContragent(queryData: any) {
141
+ return this.axiosCall({
142
+ method: Methods.GET,
143
+ url: `/Ekk/api/Contragentinsis/Contragent?Iin=${queryData.iin}&FirstName=${queryData.firstName}&LastName=${queryData.lastName}&MiddleName${queryData.middleName}`,
144
+ });
145
+ }
146
+
147
+ async getQuestionList(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaFirst> {
148
+ return this.axiosCall({
149
+ method: Methods.GET,
150
+ url: `/Baiterek/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
151
+ });
152
+ }
153
+
154
+ async getQuestionListSecond(surveyType: string, processInstanceId: string, insuredId: number | string): Promise<AnketaSecond[]> {
155
+ return this.axiosCall({
156
+ method: Methods.GET,
157
+ url: `/Baiterek/api/Application/Anketa/${surveyType}/${processInstanceId}/${insuredId}`,
158
+ });
159
+ }
160
+
161
+ async definedAnswers(filter: string) {
162
+ return this.axiosCall({
163
+ method: Methods.GET,
164
+ url: `/ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${filter}`,
165
+ });
166
+ }
167
+
168
+ async setSurvey(surveyData: AnketaFirst) {
169
+ return this.axiosCall({
170
+ method: Methods.POST,
171
+ data: surveyData,
172
+ url: `/${this.productUrl}/api/Application/SetAnketa`,
173
+ });
174
+ }
175
+
176
+ async getQuestionRefs(id: string | number): Promise<Value[]> {
177
+ return this.axiosCall({
178
+ method: Methods.GET,
179
+ url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${id}`,
180
+ });
181
+ }
182
+
183
+ async getProcessIndexRate(processCode: string | number) {
184
+ return this.axiosCall({
185
+ method: Methods.GET,
186
+ url: `/Arm/api/Dictionary/ProcessIndexRate/${processCode}`,
187
+ });
188
+ }
189
+
190
+ async getAdditionalInsuranceTermsAnswers(processCode: string | number, questionId: string) {
191
+ return this.axiosCall({
192
+ method: Methods.GET,
193
+ url: `/Arm/api/Dictionary/ProcessCoverTypeSum/${processCode}/${questionId}`,
194
+ });
195
+ }
196
+
197
+ async getProcessPaymentPeriod(processCode: string | number) {
198
+ return this.axiosCall({
199
+ method: Methods.GET,
200
+ url: `/Arm/api/Dictionary/ProcessPaymentPeriod/${processCode}`,
201
+ });
202
+ }
203
+
204
+ async getContragentById(id: any) {
205
+ return this.axiosCall({
206
+ method: Methods.GET,
207
+ url: `/Ekk/api/Contragentinsis/Contragent?PersonId=${id}`,
208
+ });
209
+ }
210
+
211
+ async saveContragent(data: any) {
212
+ return this.axiosCall({
213
+ method: Methods.POST,
214
+ url: `/Ekk/api/Contragentinsis/SaveContragent`,
215
+ data: data,
216
+ });
217
+ }
218
+
219
+ async getFile(id: string) {
220
+ return await this.axiosCall({
221
+ method: Methods.GET,
222
+ url: `/File/api/Data/DownloadFile/${id}`,
223
+ responseType: 'arraybuffer',
224
+ headers: {
225
+ 'Content-Type': 'application/pdf',
226
+ },
227
+ });
228
+ }
229
+
230
+ async getDicFileTypeList() {
231
+ return this.axiosCall({
232
+ method: Methods.GET,
233
+ url: '/Arm/api/Dictionary/GetDictionaryItems/DicFileType',
234
+ });
235
+ }
236
+
237
+ async getContrAgentData(personId: string | number) {
238
+ return this.axiosCall({
239
+ method: Methods.GET,
240
+ url: `/Ekk/api/Contragentinsis/Questionaries?PersonId=${personId}`,
241
+ });
242
+ }
243
+
244
+ async getContrAgentContacts(personId: string | number) {
245
+ return this.axiosCall({
246
+ method: Methods.GET,
247
+ url: `/Ekk/api/Contragentinsis/Contacts?PersonId=${personId}`,
248
+ });
249
+ }
250
+
251
+ async getContrAgentDocuments(personId: string | number) {
252
+ return this.axiosCall({
253
+ method: Methods.GET,
254
+ url: `/Ekk/api/Contragentinsis/Documents?PersonId=${personId}`,
255
+ });
256
+ }
257
+
258
+ async getContrAgentAddress(personId: string | number) {
259
+ return this.axiosCall({
260
+ method: Methods.GET,
261
+ url: `/Ekk/api/Contragentinsis/Address?PersonId=${personId}`,
262
+ });
263
+ }
264
+
265
+ async getTaskList(data: any): Promise<{ items: TaskListItem[]; totalItems: number }> {
266
+ return this.axiosCall({
267
+ method: Methods.POST,
268
+ url: `/Arm/api/Bpm/TaskList`,
269
+ data: data,
270
+ });
271
+ }
272
+
273
+ async getProcessHistory(id: string): Promise<TaskHistory[]> {
274
+ return this.axiosCall({
275
+ url: `/Arm/api/Bpm/GetProcessHistory?processInstanceId=${id}`,
276
+ });
277
+ }
278
+
279
+ async sendSms(data: SmsDataType): Promise<void> {
280
+ return this.axiosCall({
281
+ method: Methods.POST,
282
+ url: '/Arm/api/Otp/SmsText',
283
+ data: data,
284
+ });
285
+ }
286
+
287
+ async getUserGroups(): Promise<Item[]> {
288
+ return this.axiosCall({
289
+ method: Methods.GET,
290
+ url: '/Arm/api/Bpm/TaskGroups',
291
+ });
292
+ }
293
+
294
+ async getOtpStatus(data: OtpDataType): Promise<boolean> {
295
+ return this.axiosCall({
296
+ method: Methods.POST,
297
+ url: '/Arm/api/Otp/OtpLifeStatus',
298
+ data: data,
299
+ });
300
+ }
301
+
302
+ async sendOtp(data: OtpDataType): Promise<SendOtpResponse> {
303
+ return this.axiosCall({
304
+ method: Methods.POST,
305
+ url: '/Arm/api/Otp/Get',
306
+ data: data,
307
+ });
308
+ }
309
+
310
+ async checkOtp(data: { tokenId: string; phoneNumber: string; code: string }): Promise<SendOtpResponse> {
311
+ return this.axiosCall({
312
+ method: Methods.POST,
313
+ url: '/Arm/api/Otp/Check',
314
+ data: data,
315
+ });
316
+ }
317
+
318
+ async getProcessList(): Promise<Item[]> {
319
+ return this.axiosCall({
320
+ method: Methods.GET,
321
+ url: '/Arm/api/Bpm/ProcessList',
322
+ timeout: 10000,
323
+ });
324
+ }
325
+
326
+ async startApplication(data: StartApplicationType): Promise<{
327
+ processInstanceId: string;
328
+ }> {
329
+ return this.axiosCall({
330
+ method: Methods.POST,
331
+ url: `/${this.productUrl}/api/Application/StartApplication`,
332
+ data: data,
333
+ });
334
+ }
335
+
336
+ async getApplicationData(id: string) {
337
+ return this.axiosCall({
338
+ url: `/${this.productUrl}/api/Application/applicationData?Id=${id} `,
339
+ });
340
+ }
341
+
342
+ async getCalculation(id: string) {
343
+ return this.axiosCall({
344
+ method: Methods.POST,
345
+ url: `/${this.productUrl}/api/Application/Calculator?processInstanceId=${id}`,
346
+ });
347
+ }
348
+
349
+ async setApplication(data: any) {
350
+ return this.axiosCall({
351
+ method: Methods.POST,
352
+ url: `/${this.productUrl}/api/Application/SetApplicationData`,
353
+ data,
354
+ responseType: 'blob',
355
+ });
356
+ }
357
+
358
+ async deleteFile(data: any) {
359
+ return this.axiosCall({
360
+ method: Methods.POST,
361
+ url: '/File/api/Data/DeleteFiles',
362
+ data: data,
363
+ });
364
+ }
365
+
366
+ async uploadFiles(data: any) {
367
+ return this.axiosCall({
368
+ method: Methods.POST,
369
+ url: '/File/api/Data/UploadFiles',
370
+ headers: {
371
+ 'Content-Type': 'multipart/form-data',
372
+ },
373
+ data: data,
374
+ });
375
+ }
376
+
377
+ async sendTask(data: SendTask): Promise<void> {
378
+ return this.axiosCall({
379
+ method: Methods.POST,
380
+ url: `/${this.productUrl}/api/Application/SendTask`,
381
+ data: data,
382
+ });
383
+ }
384
+
385
+ async setMember(whichMember: string, data: any) {
386
+ return this.axiosCall({
387
+ method: Methods.POST,
388
+ url: `/Arm/api/BpmMembers/Set${whichMember}`,
389
+ data: data,
390
+ });
391
+ }
392
+
393
+ async deleteMember(whichMember: string, id: number | string) {
394
+ return this.axiosCall({
395
+ method: Methods.POST,
396
+ url: `/Arm/api/BpmMembers/Delete${whichMember}/${id}`,
397
+ });
398
+ }
399
+
400
+ async getInvoiceData(processInstanceId: string): Promise<EpayResponse> {
401
+ return this.axiosCall({
402
+ method: Methods.GET,
403
+ url: `/Arm/api/Invoice/InvoiceData?processInstanceId=${processInstanceId}`,
404
+ });
405
+ }
406
+
407
+ async createInvoice(processInstanceId: string, amount: number | string): Promise<string> {
408
+ return this.axiosCall({
409
+ method: Methods.POST,
410
+ url: `/Arm/api/Invoice/CreateInvoice/${processInstanceId}/${amount}`,
411
+ });
412
+ }
413
+
414
+ async sendToEpay(processInstanceId: string): Promise<EpayShortResponse> {
415
+ return this.axiosCall({
416
+ method: Methods.POST,
417
+ url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
418
+ });
419
+ }
420
+
421
+ async signDocument(data: SignDataType[]): Promise<SignUrlType[]> {
422
+ return this.axiosCall({
423
+ method: Methods.POST,
424
+ url: '/File/api/Document/SignBts',
425
+ data: data,
426
+ });
427
+ }
428
+
429
+ async getSignedDocList(data: { processInstanceId: string }): Promise<IDocument[]> {
430
+ return this.axiosCall({
431
+ method: Methods.POST,
432
+ url: '/File/api/Data/List',
433
+ data: data,
434
+ });
435
+ }
436
+
437
+ async calculateWithoutApplication(data: RecalculationDataType): Promise<RecalculationResponseType> {
438
+ return this.axiosCall({
439
+ method: Methods.POST,
440
+ url: `/${this.productUrl}/api/Application/Calculate`,
441
+ data: data,
442
+ });
443
+ }
444
+
445
+ async getDefaultCalculationData(): Promise<RecalculationDataType> {
446
+ return this.axiosCall({
447
+ method: Methods.GET,
448
+ url: `/${this.productUrl}/api/Application/DefaultCalculatorValues`,
449
+ });
450
+ }
451
+
452
+ async reCalculate(data: any) {
453
+ return this.axiosCall({
454
+ method: Methods.POST,
455
+ url: `/${this.productUrl}/api/Application/Recalculate`,
456
+ data: data,
457
+ });
458
+ }
459
+
460
+ async getValidateClientESBD(data: ESBDValidationType): Promise<ESBDResponseType> {
461
+ return this.axiosCall({
462
+ method: Methods.POST,
463
+ url: '/externalservices/api/ExternalServices/GetValidateClientEsbd',
464
+ data: data,
465
+ });
466
+ }
467
+
468
+ async isClaimTask(taskId: string): Promise<boolean> {
469
+ return this.axiosCall({
470
+ method: Methods.POST,
471
+ url: '/Arm/api/Bpm/IsClaimTask',
472
+ params: { TaskId: taskId },
473
+ });
474
+ }
475
+
476
+ async claimTask(taskId: string) {
477
+ return this.axiosCall({
478
+ method: Methods.POST,
479
+ url: '/Arm/api/Bpm/ClaimTaskUser',
480
+ params: { TaskId: taskId },
481
+ });
482
+ }
483
+
484
+ async getContragentFromGBDFL(data: { iin: string; phoneNumber: string }): Promise<GBDFLResponse> {
485
+ return this.axiosCall({
486
+ method: Methods.POST,
487
+ url: '/externalservices/api/ExternalServices/GetGbdflToken',
488
+ data: data,
489
+ });
490
+ }
491
+
492
+ async getFamilyInfo(data: { iin: string; phoneNumber: string }): Promise<FamilyInfoGKB> {
493
+ return this.axiosCall({
494
+ method: Methods.POST,
495
+ url: '/externalservices/api/ExternalServices/GetFamilyInfoToken',
496
+ data: data,
497
+ });
498
+ }
499
+
500
+ async getProcessTariff(code: number | string = 5) {
501
+ return this.axiosCall({ url: `/arm/api/Dictionary/ProcessTariff/${code}` });
502
+ }
503
+
504
+ async setConfirmation(data: any) {
505
+ return this.axiosCall({
506
+ method: Methods.POST,
507
+ url: '/Arm/api/UnderwritingCouncil/SetConfirmation',
508
+ data: data,
509
+ });
510
+ }
511
+
512
+ async getUnderwritingCouncilData(id: string | number) {
513
+ return this.axiosCall({
514
+ method: Methods.GET,
515
+ url: `/Arm/api/UnderwritingCouncil/ApplicationData?Id=${id}`,
516
+ });
517
+ }
518
+
519
+ async sendUnderwritingCouncilTask(data: any) {
520
+ return this.axiosCall({
521
+ method: Methods.POST,
522
+ url: '/arm/api/UnderwritingCouncil/SendTask',
523
+ data: data,
524
+ });
525
+ }
526
+
527
+ async filterManagerByRegion(dictName: string, filterName: string) {
528
+ return this.axiosCall({
529
+ method: Methods.GET,
530
+ url: `/ekk/api/ContragentInsis/DictionaryItems/${dictName}?filter=${filterName}`,
531
+ });
532
+ }
533
+
534
+ async setINSISWorkData(data: any) {
535
+ return this.axiosCall({
536
+ method: Methods.POST,
537
+ url: `/arm/api/Bpm/SetInsisWorkData`,
538
+ data: data,
539
+ });
540
+ }
541
+
542
+ async searchAgentByName(name: string) {
543
+ return this.axiosCall({
544
+ method: Methods.GET,
545
+ url: `/ekk/api/ContragentInsis/AgentByName?fullName=${name}`,
546
+ });
547
+ }
548
+ }
@@ -0,0 +1,38 @@
1
+ import { AxiosInstance } from 'axios';
2
+
3
+ export default function (axios: AxiosInstance) {
4
+ axios.interceptors.request.use(
5
+ request => {
6
+ const dataStore = useDataStore();
7
+ request.headers.Authorization = `Bearer ${dataStore.accessToken}`;
8
+ return request;
9
+ },
10
+ error => {
11
+ return Promise.reject(error);
12
+ },
13
+ );
14
+ axios.interceptors.response.use(
15
+ response => {
16
+ return response;
17
+ },
18
+ error => {
19
+ 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);
28
+ }
29
+ }
30
+ if (error.response.status >= 500) {
31
+ if (router.currentRoute.value.name !== 'Auth') {
32
+ dataStore.showToaster('error', error.stack, 5000);
33
+ }
34
+ }
35
+ return Promise.reject(error);
36
+ },
37
+ );
38
+ }
@@ -0,0 +1,57 @@
1
+ <template>
2
+ <button
3
+ type="button"
4
+ class="transition-all"
5
+ @click="$emit('clicked')"
6
+ :disabled="disabled || loading"
7
+ :class="[
8
+ disabled ? 'disabled' : '',
9
+ classes,
10
+ btn,
11
+ $libStyles[`btnH${$capitalize(size)}` as keyof typeof $libStyles],
12
+ ]"
13
+ >
14
+ <base-loader v-if="loading" :size="24" color="#FFF" bg-color="" :width="2"></base-loader>
15
+ <span v-if="!loading">{{ text }}</span>
16
+ </button>
17
+ </template>
18
+
19
+ <script lang="ts">
20
+ export default defineComponent({
21
+ name: 'BaseBtn',
22
+ props: {
23
+ text: {
24
+ type: String,
25
+ default: 'Кнопка',
26
+ },
27
+ size: {
28
+ type: String,
29
+ default: 'md',
30
+ },
31
+ classes: {
32
+ type: String,
33
+ default: '',
34
+ },
35
+ disabled: {
36
+ type: Boolean,
37
+ default: false,
38
+ },
39
+ loading: {
40
+ type: Boolean,
41
+ default: false,
42
+ },
43
+ btn: {
44
+ type: String,
45
+ default: new Styles().blueBtn,
46
+ },
47
+ },
48
+
49
+ setup(props) {},
50
+ });
51
+ </script>
52
+
53
+ <style scoped>
54
+ .disabled {
55
+ opacity: 0.3;
56
+ }
57
+ </style>
@@ -0,0 +1,47 @@
1
+ <template>
2
+ <button
3
+ type="button"
4
+ class="transition-all"
5
+ @click="$emit('clicked')"
6
+ :disabled="disabled"
7
+ :class="[
8
+ disabled ? 'disabled' : '',
9
+ classes,
10
+ btn,
11
+ $libStyles[`btnH${$capitalize(size)}` as keyof typeof $libStyles],
12
+ ]"
13
+ >
14
+ <i class="mdi" :class="icon"></i>
15
+ </button>
16
+ </template>
17
+
18
+ <script lang="ts">
19
+ export default defineComponent({
20
+ name: 'BaseBtnIcon',
21
+ props: {
22
+ icon: { type: String, default: 'mdi-arrow-right-variant' },
23
+ size: {
24
+ type: String,
25
+ default: 'md',
26
+ },
27
+ classes: {
28
+ type: String,
29
+ default: '',
30
+ },
31
+ disabled: {
32
+ type: Boolean,
33
+ default: false,
34
+ },
35
+ btn: {
36
+ type: String,
37
+ default: new Styles().blueBtn,
38
+ },
39
+ },
40
+ });
41
+ </script>
42
+
43
+ <style scoped>
44
+ .disabled {
45
+ opacity: 0.3;
46
+ }
47
+ </style>
@@ -0,0 +1,6 @@
1
+ <template>
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>
5
+ </div>
6
+ </template>