hl-core 0.0.7-beta.9 → 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.
- package/.prettierrc +2 -1
- package/api/index.ts +94 -107
- package/api/interceptors.ts +4 -4
- package/components/Button/Btn.vue +7 -2
- package/components/Button/ScrollButtons.vue +6 -0
- package/components/Complex/ContentBlock.vue +5 -0
- package/components/{Layout → Dialog}/Dialog.vue +3 -27
- package/components/Dialog/FamilyDialog.vue +39 -0
- package/components/Form/FormBlock.vue +114 -0
- package/components/Form/FormSection.vue +18 -0
- package/components/Form/FormTextSection.vue +20 -0
- package/components/Form/FormToggle.vue +52 -0
- package/components/Form/ProductConditionsBlock.vue +68 -0
- package/components/Input/EmptyFormField.vue +5 -0
- package/components/Input/FileInput.vue +71 -0
- package/components/Input/FormInput.vue +171 -0
- package/components/Input/PanelInput.vue +133 -0
- package/components/Input/RoundedInput.vue +35 -36
- package/components/Layout/Drawer.vue +19 -16
- package/components/Layout/Header.vue +4 -18
- package/components/Layout/Loader.vue +1 -7
- package/components/Layout/SettingsPanel.vue +17 -37
- package/components/List/ListEmpty.vue +22 -0
- package/components/Menu/MenuNav.vue +22 -20
- package/components/Menu/MenuNavItem.vue +6 -6
- package/components/Pages/Anketa.vue +333 -0
- package/components/Pages/Auth.vue +91 -0
- package/components/Pages/Documents.vue +108 -0
- package/components/Pages/MemberForm.vue +1134 -0
- package/components/Pages/ProductAgreement.vue +18 -0
- package/components/Pages/ProductConditions.vue +360 -0
- package/components/Panel/PanelHandler.vue +231 -0
- package/components/Panel/PanelItem.vue +2 -4
- package/components/Panel/PanelSelectItem.vue +20 -0
- package/components/Transitions/FadeTransition.vue +5 -0
- package/components/Transitions/SlideTransition.vue +5 -0
- package/composables/classes.ts +301 -255
- package/composables/constants.ts +16 -9
- package/composables/index.ts +55 -60
- package/composables/styles.ts +33 -7
- package/layouts/default.vue +46 -26
- package/layouts/full.vue +2 -12
- package/nuxt.config.ts +3 -0
- package/package.json +13 -10
- package/pages/500.vue +40 -12
- package/plugins/helperFunctionsPlugins.ts +6 -2
- package/plugins/storePlugin.ts +6 -5
- package/store/data.store.js +865 -1942
- package/store/member.store.ts +291 -0
- package/store/messages.ts +70 -51
- package/store/rules.js +26 -28
- package/types/index.ts +303 -0
- package/composables/models.ts +0 -43
- /package/store/{form.store.js → form.store.ts} +0 -0
package/.prettierrc
CHANGED
package/api/index.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useAxios } from '@/composables/axios';
|
|
2
|
+
import { Value, IDocument } from '@/composables/classes';
|
|
2
3
|
import { AxiosRequestConfig } from 'axios';
|
|
3
4
|
|
|
4
5
|
enum Methods {
|
|
@@ -7,33 +8,19 @@ enum Methods {
|
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export class ApiClass {
|
|
10
|
-
baseURL: string
|
|
11
|
-
productUrl: string
|
|
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;
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
this.baseURL = baseURL;
|
|
15
|
-
this.productUrl = productUrl;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
private async axiosCall(config: AxiosRequestConfig) {
|
|
14
|
+
private async axiosCall<T>(config: AxiosRequestConfig): Promise<T> {
|
|
19
15
|
const dataStore = useDataStore();
|
|
20
|
-
if (
|
|
21
|
-
(dataStore.isEFO && this.baseURL) ||
|
|
22
|
-
(!dataStore.isEFO && this.baseURL && this.productUrl)
|
|
23
|
-
) {
|
|
24
|
-
const { data } = await useAxios(this.baseURL as string).request(config);
|
|
25
|
-
return data;
|
|
26
|
-
} else {
|
|
16
|
+
if ((dataStore.isEFO && !this.baseURL) || (!dataStore.isEFO && (!this.baseURL || !this.productUrl))) {
|
|
27
17
|
console.error('No Axios baseURL or productURL');
|
|
28
|
-
return null;
|
|
29
18
|
}
|
|
19
|
+
const { data } = await useAxios(this.baseURL).request<T>(config);
|
|
20
|
+
return data;
|
|
30
21
|
}
|
|
31
22
|
|
|
32
|
-
async loginUser(data: {
|
|
33
|
-
login: string;
|
|
34
|
-
password: string;
|
|
35
|
-
numAttempt: number;
|
|
36
|
-
}) {
|
|
23
|
+
async loginUser(data: { login: string; password: string; numAttempt: number }): Promise<{ refreshToken: string; accessToken: string }> {
|
|
37
24
|
return this.axiosCall({
|
|
38
25
|
method: Methods.POST,
|
|
39
26
|
url: '/identity/api/Account/login',
|
|
@@ -41,13 +28,7 @@ export class ApiClass {
|
|
|
41
28
|
});
|
|
42
29
|
}
|
|
43
30
|
|
|
44
|
-
async getNewAccessToken({
|
|
45
|
-
refreshToken,
|
|
46
|
-
accessToken,
|
|
47
|
-
}: {
|
|
48
|
-
refreshToken: string;
|
|
49
|
-
accessToken: string;
|
|
50
|
-
}) {
|
|
31
|
+
async getNewAccessToken({ refreshToken, accessToken }: { refreshToken: string; accessToken: string }): Promise<{ refreshToken: string; accessToken: string }> {
|
|
51
32
|
return this.axiosCall({
|
|
52
33
|
method: Methods.POST,
|
|
53
34
|
url: '/identity/api/Account/refresh',
|
|
@@ -58,111 +39,98 @@ export class ApiClass {
|
|
|
58
39
|
});
|
|
59
40
|
}
|
|
60
41
|
|
|
61
|
-
|
|
62
|
-
async getCountries() {
|
|
42
|
+
async getCountries(): Promise<Value[]> {
|
|
63
43
|
return this.axiosCall({
|
|
64
44
|
method: Methods.GET,
|
|
65
45
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/Country',
|
|
66
46
|
});
|
|
67
47
|
}
|
|
68
48
|
|
|
69
|
-
|
|
70
|
-
async getCitizenshipCountries() {
|
|
49
|
+
async getCitizenshipCountries(): Promise<Value[]> {
|
|
71
50
|
return this.axiosCall({
|
|
72
51
|
method: Methods.GET,
|
|
73
52
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500012',
|
|
74
53
|
});
|
|
75
54
|
}
|
|
76
55
|
|
|
77
|
-
|
|
78
|
-
async getTaxCountries() {
|
|
56
|
+
async getTaxCountries(): Promise<Value[]> {
|
|
79
57
|
return this.axiosCall({
|
|
80
58
|
method: Methods.GET,
|
|
81
59
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500014',
|
|
82
60
|
});
|
|
83
61
|
}
|
|
84
62
|
|
|
85
|
-
async getAdditionalTaxCountries() {
|
|
63
|
+
async getAdditionalTaxCountries(): Promise<Value[]> {
|
|
86
64
|
return this.axiosCall({
|
|
87
65
|
method: Methods.GET,
|
|
88
66
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=507777',
|
|
89
67
|
});
|
|
90
68
|
}
|
|
91
69
|
|
|
92
|
-
|
|
93
|
-
async getStates() {
|
|
70
|
+
async getStates(): Promise<Value[]> {
|
|
94
71
|
return this.axiosCall({
|
|
95
72
|
method: Methods.GET,
|
|
96
73
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/State',
|
|
97
74
|
});
|
|
98
75
|
}
|
|
99
76
|
|
|
100
|
-
|
|
101
|
-
async getRegions() {
|
|
77
|
+
async getRegions(): Promise<Value[]> {
|
|
102
78
|
return this.axiosCall({
|
|
103
79
|
method: Methods.GET,
|
|
104
80
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/Region',
|
|
105
81
|
});
|
|
106
82
|
}
|
|
107
83
|
|
|
108
|
-
|
|
109
|
-
async getCities() {
|
|
84
|
+
async getCities(): Promise<Value[]> {
|
|
110
85
|
return this.axiosCall({
|
|
111
86
|
method: Methods.GET,
|
|
112
87
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/CityVillage',
|
|
113
88
|
});
|
|
114
89
|
}
|
|
115
90
|
|
|
116
|
-
|
|
117
|
-
async getLocalityTypes() {
|
|
91
|
+
async getLocalityTypes(): Promise<Value[]> {
|
|
118
92
|
return this.axiosCall({
|
|
119
93
|
method: Methods.GET,
|
|
120
94
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/LocalityType',
|
|
121
95
|
});
|
|
122
96
|
}
|
|
123
97
|
|
|
124
|
-
|
|
125
|
-
async getDocumentTypes() {
|
|
98
|
+
async getDocumentTypes(): Promise<Value[]> {
|
|
126
99
|
return this.axiosCall({
|
|
127
100
|
method: Methods.GET,
|
|
128
101
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/DocumentTypePhys',
|
|
129
102
|
});
|
|
130
103
|
}
|
|
131
104
|
|
|
132
|
-
|
|
133
|
-
async getDocumentIssuers() {
|
|
105
|
+
async getDocumentIssuers(): Promise<Value[]> {
|
|
134
106
|
return this.axiosCall({
|
|
135
107
|
method: Methods.GET,
|
|
136
108
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/DocIssuer',
|
|
137
109
|
});
|
|
138
110
|
}
|
|
139
111
|
|
|
140
|
-
|
|
141
|
-
async getResidents() {
|
|
112
|
+
async getResidents(): Promise<Value[]> {
|
|
142
113
|
return this.axiosCall({
|
|
143
114
|
method: Methods.GET,
|
|
144
115
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500011',
|
|
145
116
|
});
|
|
146
117
|
}
|
|
147
118
|
|
|
148
|
-
|
|
149
|
-
async getSectorCode() {
|
|
119
|
+
async getSectorCode(): Promise<Value[]> {
|
|
150
120
|
return this.axiosCall({
|
|
151
121
|
method: Methods.GET,
|
|
152
122
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=500003',
|
|
153
123
|
});
|
|
154
124
|
}
|
|
155
125
|
|
|
156
|
-
|
|
157
|
-
async getFamilyStatuses() {
|
|
126
|
+
async getFamilyStatuses(): Promise<Value[]> {
|
|
158
127
|
return this.axiosCall({
|
|
159
128
|
method: Methods.GET,
|
|
160
129
|
url: '/Arm/api/Dictionary/GetDictionaryItems/DicFamilyStatus',
|
|
161
130
|
});
|
|
162
131
|
}
|
|
163
132
|
|
|
164
|
-
|
|
165
|
-
async getRelationTypes() {
|
|
133
|
+
async getRelationTypes(): Promise<Value[]> {
|
|
166
134
|
return this.axiosCall({
|
|
167
135
|
method: Methods.GET,
|
|
168
136
|
url: '/Ekk/api/Contragentinsis/DictionaryItems/Relation',
|
|
@@ -176,6 +144,20 @@ export class ApiClass {
|
|
|
176
144
|
});
|
|
177
145
|
}
|
|
178
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
|
+
|
|
179
161
|
async definedAnswers(filter: string) {
|
|
180
162
|
return this.axiosCall({
|
|
181
163
|
method: Methods.GET,
|
|
@@ -183,7 +165,7 @@ export class ApiClass {
|
|
|
183
165
|
});
|
|
184
166
|
}
|
|
185
167
|
|
|
186
|
-
async setSurvey(surveyData:
|
|
168
|
+
async setSurvey(surveyData: AnketaFirst) {
|
|
187
169
|
return this.axiosCall({
|
|
188
170
|
method: Methods.POST,
|
|
189
171
|
data: surveyData,
|
|
@@ -191,7 +173,7 @@ export class ApiClass {
|
|
|
191
173
|
});
|
|
192
174
|
}
|
|
193
175
|
|
|
194
|
-
async getQuestionRefs(id: string | number) {
|
|
176
|
+
async getQuestionRefs(id: string | number): Promise<Value[]> {
|
|
195
177
|
return this.axiosCall({
|
|
196
178
|
method: Methods.GET,
|
|
197
179
|
url: `/Ekk/api/Contragentinsis/DictionaryItems/Questionary?filter=${id}`,
|
|
@@ -205,10 +187,7 @@ export class ApiClass {
|
|
|
205
187
|
});
|
|
206
188
|
}
|
|
207
189
|
|
|
208
|
-
async getAdditionalInsuranceTermsAnswers(
|
|
209
|
-
processCode: string | number,
|
|
210
|
-
questionId: string,
|
|
211
|
-
) {
|
|
190
|
+
async getAdditionalInsuranceTermsAnswers(processCode: string | number, questionId: string) {
|
|
212
191
|
return this.axiosCall({
|
|
213
192
|
method: Methods.GET,
|
|
214
193
|
url: `/Arm/api/Dictionary/ProcessCoverTypeSum/${processCode}/${questionId}`,
|
|
@@ -237,10 +216,10 @@ export class ApiClass {
|
|
|
237
216
|
});
|
|
238
217
|
}
|
|
239
218
|
|
|
240
|
-
async getFile(id:
|
|
219
|
+
async getFile(id: string) {
|
|
241
220
|
return await this.axiosCall({
|
|
242
221
|
method: Methods.GET,
|
|
243
|
-
url: `/
|
|
222
|
+
url: `/File/api/Data/DownloadFile/${id}`,
|
|
244
223
|
responseType: 'arraybuffer',
|
|
245
224
|
headers: {
|
|
246
225
|
'Content-Type': 'application/pdf',
|
|
@@ -255,35 +234,35 @@ export class ApiClass {
|
|
|
255
234
|
});
|
|
256
235
|
}
|
|
257
236
|
|
|
258
|
-
async getContrAgentData(personId:
|
|
237
|
+
async getContrAgentData(personId: string | number) {
|
|
259
238
|
return this.axiosCall({
|
|
260
239
|
method: Methods.GET,
|
|
261
240
|
url: `/Ekk/api/Contragentinsis/Questionaries?PersonId=${personId}`,
|
|
262
241
|
});
|
|
263
242
|
}
|
|
264
243
|
|
|
265
|
-
async getContrAgentContacts(personId:
|
|
244
|
+
async getContrAgentContacts(personId: string | number) {
|
|
266
245
|
return this.axiosCall({
|
|
267
246
|
method: Methods.GET,
|
|
268
247
|
url: `/Ekk/api/Contragentinsis/Contacts?PersonId=${personId}`,
|
|
269
248
|
});
|
|
270
249
|
}
|
|
271
250
|
|
|
272
|
-
async getContrAgentDocuments(personId:
|
|
251
|
+
async getContrAgentDocuments(personId: string | number) {
|
|
273
252
|
return this.axiosCall({
|
|
274
253
|
method: Methods.GET,
|
|
275
254
|
url: `/Ekk/api/Contragentinsis/Documents?PersonId=${personId}`,
|
|
276
255
|
});
|
|
277
256
|
}
|
|
278
257
|
|
|
279
|
-
async getContrAgentAddress(personId:
|
|
258
|
+
async getContrAgentAddress(personId: string | number) {
|
|
280
259
|
return this.axiosCall({
|
|
281
260
|
method: Methods.GET,
|
|
282
261
|
url: `/Ekk/api/Contragentinsis/Address?PersonId=${personId}`,
|
|
283
262
|
});
|
|
284
263
|
}
|
|
285
264
|
|
|
286
|
-
async getTaskList(data: any) {
|
|
265
|
+
async getTaskList(data: any): Promise<{ items: TaskListItem[]; totalItems: number }> {
|
|
287
266
|
return this.axiosCall({
|
|
288
267
|
method: Methods.POST,
|
|
289
268
|
url: `/Arm/api/Bpm/TaskList`,
|
|
@@ -291,36 +270,28 @@ export class ApiClass {
|
|
|
291
270
|
});
|
|
292
271
|
}
|
|
293
272
|
|
|
294
|
-
async getProcessHistory(id:
|
|
273
|
+
async getProcessHistory(id: string): Promise<TaskHistory[]> {
|
|
295
274
|
return this.axiosCall({
|
|
296
275
|
url: `/Arm/api/Bpm/GetProcessHistory?processInstanceId=${id}`,
|
|
297
276
|
});
|
|
298
277
|
}
|
|
299
278
|
|
|
300
|
-
async sendSms(data:
|
|
279
|
+
async sendSms(data: SmsDataType): Promise<void> {
|
|
301
280
|
return this.axiosCall({
|
|
302
|
-
baseURL: import.meta.env.VITE_SMS_SERVICE as string,
|
|
303
281
|
method: Methods.POST,
|
|
304
|
-
url: '/
|
|
282
|
+
url: '/Arm/api/Otp/SmsText',
|
|
305
283
|
data: data,
|
|
306
284
|
});
|
|
307
285
|
}
|
|
308
286
|
|
|
309
|
-
async getUserGroups() {
|
|
287
|
+
async getUserGroups(): Promise<Item[]> {
|
|
310
288
|
return this.axiosCall({
|
|
311
289
|
method: Methods.GET,
|
|
312
290
|
url: '/Arm/api/Bpm/TaskGroups',
|
|
313
291
|
});
|
|
314
292
|
}
|
|
315
293
|
|
|
316
|
-
async
|
|
317
|
-
return this.axiosCall({
|
|
318
|
-
method: Methods.GET,
|
|
319
|
-
url: `/ekk/api/ContragentInsis/DictionaryItems/${dictName}`,
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
async getOtpStatus(data: any) {
|
|
294
|
+
async getOtpStatus(data: OtpDataType): Promise<boolean> {
|
|
324
295
|
return this.axiosCall({
|
|
325
296
|
method: Methods.POST,
|
|
326
297
|
url: '/Arm/api/Otp/OtpLifeStatus',
|
|
@@ -328,7 +299,7 @@ export class ApiClass {
|
|
|
328
299
|
});
|
|
329
300
|
}
|
|
330
301
|
|
|
331
|
-
async sendOtp(data:
|
|
302
|
+
async sendOtp(data: OtpDataType): Promise<SendOtpResponse> {
|
|
332
303
|
return this.axiosCall({
|
|
333
304
|
method: Methods.POST,
|
|
334
305
|
url: '/Arm/api/Otp/Get',
|
|
@@ -336,7 +307,7 @@ export class ApiClass {
|
|
|
336
307
|
});
|
|
337
308
|
}
|
|
338
309
|
|
|
339
|
-
async checkOtp(data:
|
|
310
|
+
async checkOtp(data: { tokenId: string; phoneNumber: string; code: string }): Promise<SendOtpResponse> {
|
|
340
311
|
return this.axiosCall({
|
|
341
312
|
method: Methods.POST,
|
|
342
313
|
url: '/Arm/api/Otp/Check',
|
|
@@ -344,7 +315,7 @@ export class ApiClass {
|
|
|
344
315
|
});
|
|
345
316
|
}
|
|
346
317
|
|
|
347
|
-
async getProcessList() {
|
|
318
|
+
async getProcessList(): Promise<Item[]> {
|
|
348
319
|
return this.axiosCall({
|
|
349
320
|
method: Methods.GET,
|
|
350
321
|
url: '/Arm/api/Bpm/ProcessList',
|
|
@@ -352,7 +323,9 @@ export class ApiClass {
|
|
|
352
323
|
});
|
|
353
324
|
}
|
|
354
325
|
|
|
355
|
-
async startApplication(data:
|
|
326
|
+
async startApplication(data: StartApplicationType): Promise<{
|
|
327
|
+
processInstanceId: string;
|
|
328
|
+
}> {
|
|
356
329
|
return this.axiosCall({
|
|
357
330
|
method: Methods.POST,
|
|
358
331
|
url: `/${this.productUrl}/api/Application/StartApplication`,
|
|
@@ -382,19 +355,10 @@ export class ApiClass {
|
|
|
382
355
|
});
|
|
383
356
|
}
|
|
384
357
|
|
|
385
|
-
async generatePdfDocument(data: any) {
|
|
386
|
-
return await this.axiosCall({
|
|
387
|
-
method: Methods.POST,
|
|
388
|
-
url: `/Arm/api/Bpm/GeneratePdfDocument`,
|
|
389
|
-
responseType: 'blob',
|
|
390
|
-
data: data,
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
|
|
394
358
|
async deleteFile(data: any) {
|
|
395
359
|
return this.axiosCall({
|
|
396
360
|
method: Methods.POST,
|
|
397
|
-
url: '/
|
|
361
|
+
url: '/File/api/Data/DeleteFiles',
|
|
398
362
|
data: data,
|
|
399
363
|
});
|
|
400
364
|
}
|
|
@@ -402,7 +366,7 @@ export class ApiClass {
|
|
|
402
366
|
async uploadFiles(data: any) {
|
|
403
367
|
return this.axiosCall({
|
|
404
368
|
method: Methods.POST,
|
|
405
|
-
url: '/
|
|
369
|
+
url: '/File/api/Data/UploadFiles',
|
|
406
370
|
headers: {
|
|
407
371
|
'Content-Type': 'multipart/form-data',
|
|
408
372
|
},
|
|
@@ -410,7 +374,7 @@ export class ApiClass {
|
|
|
410
374
|
});
|
|
411
375
|
}
|
|
412
376
|
|
|
413
|
-
async sendTask(data:
|
|
377
|
+
async sendTask(data: SendTask): Promise<void> {
|
|
414
378
|
return this.axiosCall({
|
|
415
379
|
method: Methods.POST,
|
|
416
380
|
url: `/${this.productUrl}/api/Application/SendTask`,
|
|
@@ -433,43 +397,58 @@ export class ApiClass {
|
|
|
433
397
|
});
|
|
434
398
|
}
|
|
435
399
|
|
|
436
|
-
async getInvoiceData(processInstanceId: string) {
|
|
400
|
+
async getInvoiceData(processInstanceId: string): Promise<EpayResponse> {
|
|
437
401
|
return this.axiosCall({
|
|
438
402
|
method: Methods.GET,
|
|
439
403
|
url: `/Arm/api/Invoice/InvoiceData?processInstanceId=${processInstanceId}`,
|
|
440
404
|
});
|
|
441
405
|
}
|
|
442
406
|
|
|
443
|
-
async createInvoice(processInstanceId: string, amount: number | string) {
|
|
407
|
+
async createInvoice(processInstanceId: string, amount: number | string): Promise<string> {
|
|
444
408
|
return this.axiosCall({
|
|
445
409
|
method: Methods.POST,
|
|
446
410
|
url: `/Arm/api/Invoice/CreateInvoice/${processInstanceId}/${amount}`,
|
|
447
411
|
});
|
|
448
412
|
}
|
|
449
413
|
|
|
450
|
-
async sendToEpay(processInstanceId: string) {
|
|
414
|
+
async sendToEpay(processInstanceId: string): Promise<EpayShortResponse> {
|
|
451
415
|
return this.axiosCall({
|
|
452
416
|
method: Methods.POST,
|
|
453
417
|
url: `/Arm/api/Invoice/SendToEpay/${processInstanceId}`,
|
|
454
418
|
});
|
|
455
419
|
}
|
|
456
420
|
|
|
457
|
-
async
|
|
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[]> {
|
|
458
430
|
return this.axiosCall({
|
|
459
431
|
method: Methods.POST,
|
|
460
|
-
url: '/
|
|
432
|
+
url: '/File/api/Data/List',
|
|
461
433
|
data: data,
|
|
462
434
|
});
|
|
463
435
|
}
|
|
464
436
|
|
|
465
|
-
async
|
|
437
|
+
async calculateWithoutApplication(data: RecalculationDataType): Promise<RecalculationResponseType> {
|
|
466
438
|
return this.axiosCall({
|
|
467
439
|
method: Methods.POST,
|
|
468
|
-
url:
|
|
440
|
+
url: `/${this.productUrl}/api/Application/Calculate`,
|
|
469
441
|
data: data,
|
|
470
442
|
});
|
|
471
443
|
}
|
|
472
444
|
|
|
445
|
+
async getDefaultCalculationData(): Promise<RecalculationDataType> {
|
|
446
|
+
return this.axiosCall({
|
|
447
|
+
method: Methods.GET,
|
|
448
|
+
url: `/${this.productUrl}/api/Application/DefaultCalculatorValues`,
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
|
|
473
452
|
async reCalculate(data: any) {
|
|
474
453
|
return this.axiosCall({
|
|
475
454
|
method: Methods.POST,
|
|
@@ -478,7 +457,7 @@ export class ApiClass {
|
|
|
478
457
|
});
|
|
479
458
|
}
|
|
480
459
|
|
|
481
|
-
async getValidateClientESBD(data:
|
|
460
|
+
async getValidateClientESBD(data: ESBDValidationType): Promise<ESBDResponseType> {
|
|
482
461
|
return this.axiosCall({
|
|
483
462
|
method: Methods.POST,
|
|
484
463
|
url: '/externalservices/api/ExternalServices/GetValidateClientEsbd',
|
|
@@ -486,7 +465,7 @@ export class ApiClass {
|
|
|
486
465
|
});
|
|
487
466
|
}
|
|
488
467
|
|
|
489
|
-
async isClaimTask(taskId: string) {
|
|
468
|
+
async isClaimTask(taskId: string): Promise<boolean> {
|
|
490
469
|
return this.axiosCall({
|
|
491
470
|
method: Methods.POST,
|
|
492
471
|
url: '/Arm/api/Bpm/IsClaimTask',
|
|
@@ -502,7 +481,7 @@ export class ApiClass {
|
|
|
502
481
|
});
|
|
503
482
|
}
|
|
504
483
|
|
|
505
|
-
async getContragentFromGBDFL(data:
|
|
484
|
+
async getContragentFromGBDFL(data: { iin: string; phoneNumber: string }): Promise<GBDFLResponse> {
|
|
506
485
|
return this.axiosCall({
|
|
507
486
|
method: Methods.POST,
|
|
508
487
|
url: '/externalservices/api/ExternalServices/GetGbdflToken',
|
|
@@ -510,6 +489,14 @@ export class ApiClass {
|
|
|
510
489
|
});
|
|
511
490
|
}
|
|
512
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
|
+
|
|
513
500
|
async getProcessTariff(code: number | string = 5) {
|
|
514
501
|
return this.axiosCall({ url: `/arm/api/Dictionary/ProcessTariff/${code}` });
|
|
515
502
|
}
|
package/api/interceptors.ts
CHANGED
|
@@ -19,19 +19,19 @@ export default function (axios: AxiosInstance) {
|
|
|
19
19
|
const dataStore = useDataStore();
|
|
20
20
|
const router = useRouter();
|
|
21
21
|
if (error.response.status === 401) {
|
|
22
|
+
dataStore.$reset();
|
|
23
|
+
localStorage.clear();
|
|
22
24
|
if (dataStore.isEFO) {
|
|
23
25
|
router.push({ name: 'Auth', query: { error: 401 } });
|
|
24
26
|
} else {
|
|
25
27
|
dataStore.sendToParent(constants.postActions.Error401, 401);
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
|
-
if (error.response.status
|
|
30
|
+
if (error.response.status >= 500) {
|
|
29
31
|
if (router.currentRoute.value.name !== 'Auth') {
|
|
30
|
-
|
|
32
|
+
dataStore.showToaster('error', error.stack, 5000);
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
|
-
dataStore.$reset();
|
|
34
|
-
localStorage.clear();
|
|
35
35
|
return Promise.reject(error);
|
|
36
36
|
},
|
|
37
37
|
);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
type="button"
|
|
4
4
|
class="transition-all"
|
|
5
5
|
@click="$emit('clicked')"
|
|
6
|
-
:disabled="disabled"
|
|
6
|
+
:disabled="disabled || loading"
|
|
7
7
|
:class="[
|
|
8
8
|
disabled ? 'disabled' : '',
|
|
9
9
|
classes,
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
$libStyles[`btnH${$capitalize(size)}` as keyof typeof $libStyles],
|
|
12
12
|
]"
|
|
13
13
|
>
|
|
14
|
-
|
|
14
|
+
<base-loader v-if="loading" :size="24" color="#FFF" bg-color="" :width="2"></base-loader>
|
|
15
|
+
<span v-if="!loading">{{ text }}</span>
|
|
15
16
|
</button>
|
|
16
17
|
</template>
|
|
17
18
|
|
|
@@ -35,6 +36,10 @@ export default defineComponent({
|
|
|
35
36
|
type: Boolean,
|
|
36
37
|
default: false,
|
|
37
38
|
},
|
|
39
|
+
loading: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
38
43
|
btn: {
|
|
39
44
|
type: String,
|
|
40
45
|
default: new Styles().blueBtn,
|
|
@@ -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>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-dialog v-model="fieldModel">
|
|
3
|
-
<v-card
|
|
4
|
-
class="self-center w-full sm:w-3/4 md:w-2/3 lg:w-2/4 xl:w-[600px] rounded-lg !p-2"
|
|
5
|
-
>
|
|
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">
|
|
6
4
|
<v-card-title>
|
|
7
5
|
<slot v-if="!title" name="title"></slot>
|
|
8
6
|
{{ title }}
|
|
@@ -11,27 +9,9 @@
|
|
|
11
9
|
<slot v-if="!subtitle" name="subtitle"></slot>
|
|
12
10
|
{{ subtitle }}
|
|
13
11
|
</v-card-subtitle>
|
|
14
|
-
<v-card-text>
|
|
15
|
-
<slot v-if="text" name="content"></slot>
|
|
16
|
-
{{ text }}
|
|
17
|
-
</v-card-text>
|
|
18
12
|
<v-card-actions class="gap-[16px]">
|
|
19
|
-
<base-btn
|
|
20
|
-
|
|
21
|
-
class="!w-fit px-6"
|
|
22
|
-
size="sm"
|
|
23
|
-
:text="$t('confirm.yes')"
|
|
24
|
-
:btn="$libStyles.blueBtn"
|
|
25
|
-
@click="$emit('yes')"
|
|
26
|
-
></base-btn>
|
|
27
|
-
<base-btn
|
|
28
|
-
v-if="actions === 'default'"
|
|
29
|
-
class="!w-fit px-6"
|
|
30
|
-
size="sm"
|
|
31
|
-
:text="$t('confirm.no')"
|
|
32
|
-
:btn="$libStyles.blueBtn"
|
|
33
|
-
@click="$emit('no')"
|
|
34
|
-
/>
|
|
13
|
+
<base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$t('confirm.yes')" :btn="$libStyles.blueBtn" @click="$emit('yes')"></base-btn>
|
|
14
|
+
<base-btn v-if="actions === 'default'" class="!w-fit px-6" size="sm" :text="$t('confirm.no')" :btn="$libStyles.blueBtn" @click="$emit('no')" />
|
|
35
15
|
<slot v-if="actions !== 'default'" name="actions"></slot>
|
|
36
16
|
</v-card-actions>
|
|
37
17
|
</v-card>
|
|
@@ -53,10 +33,6 @@ export default defineComponent({
|
|
|
53
33
|
type: String,
|
|
54
34
|
default: '',
|
|
55
35
|
},
|
|
56
|
-
text: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: '',
|
|
59
|
-
},
|
|
60
36
|
actions: {
|
|
61
37
|
type: String,
|
|
62
38
|
default: 'default',
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-list lines="two" v-if="formStore.birthInfos && formStore.birthInfos.length" class="w-full !py-0">
|
|
3
|
+
<v-list-item @click="$emit('reset')" :append-icon="selected && Object.keys(selected).length === 0 ? `mdi-radiobox-marked ${$libStyles.greenText}` : 'mdi-radiobox-blank text-[#636363]'">
|
|
4
|
+
<v-list-item-title :class="[$libStyles.greenText, $libStyles.textTitle]">{{ $t('form.notChosen') }}</v-list-item-title>
|
|
5
|
+
</v-list-item>
|
|
6
|
+
<v-list-item
|
|
7
|
+
v-for="familyMember of formStore.birthInfos"
|
|
8
|
+
:key="familyMember.childIIN"
|
|
9
|
+
@click="$emit('selectFamilyMember', familyMember)"
|
|
10
|
+
:append-icon="familyMember && selected && selected.childIIN === familyMember.childIIN ? `mdi-radiobox-marked ${$libStyles.greenText}` : 'mdi-radiobox-blank text-[#636363]'"
|
|
11
|
+
>
|
|
12
|
+
<v-list-item-title :class="[$libStyles.greenText, $libStyles.textTitle]">{{
|
|
13
|
+
`${familyMember.childSurName} ${familyMember.childName} ${familyMember.childPatronymic ? familyMember.childPatronymic : ''}`
|
|
14
|
+
}}</v-list-item-title>
|
|
15
|
+
<v-list-item-subtitle :class="[$libStyles.textSimple]"
|
|
16
|
+
><span>{{ `${$t('form.iin')}:` }}</span
|
|
17
|
+
>{{ ` ${$reformatIin(familyMember.childIIN!)}` }}</v-list-item-subtitle
|
|
18
|
+
>
|
|
19
|
+
</v-list-item>
|
|
20
|
+
</v-list>
|
|
21
|
+
<base-list-empty class="w-full" v-else></base-list-empty>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script lang="ts">
|
|
25
|
+
export default defineComponent({
|
|
26
|
+
props: {
|
|
27
|
+
selected: {
|
|
28
|
+
type: Object as PropType<BirthInfoGKB>,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
emits: ['selectFamilyMember', 'reset'],
|
|
32
|
+
setup() {
|
|
33
|
+
const formStore = useFormStore();
|
|
34
|
+
return {
|
|
35
|
+
formStore,
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
</script>
|