hl-core 0.0.7 → 0.0.8-beta.10

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 (70) hide show
  1. package/.prettierrc +2 -1
  2. package/api/index.ts +562 -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 +139 -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/ManagerAttachment.vue +196 -0
  18. package/components/Form/ProductConditionsBlock.vue +72 -0
  19. package/components/Input/Datepicker.vue +41 -0
  20. package/components/Input/EmptyFormField.vue +5 -0
  21. package/components/Input/FileInput.vue +71 -0
  22. package/components/Input/FormInput.vue +183 -0
  23. package/components/Input/PanelInput.vue +133 -0
  24. package/components/Input/RoundedInput.vue +143 -0
  25. package/components/Layout/Drawer.vue +45 -0
  26. package/components/Layout/Header.vue +48 -0
  27. package/components/Layout/Loader.vue +35 -0
  28. package/components/Layout/SettingsPanel.vue +48 -0
  29. package/components/List/ListEmpty.vue +22 -0
  30. package/components/Menu/MenuNav.vue +108 -0
  31. package/components/Menu/MenuNavItem.vue +37 -0
  32. package/components/Pages/Anketa.vue +341 -0
  33. package/components/Pages/Auth.vue +91 -0
  34. package/components/Pages/Documents.vue +108 -0
  35. package/components/Pages/MemberForm.vue +1229 -0
  36. package/components/Pages/ProductAgreement.vue +18 -0
  37. package/components/Pages/ProductConditions.vue +659 -0
  38. package/components/Panel/PanelHandler.vue +233 -0
  39. package/components/Panel/PanelItem.vue +5 -0
  40. package/components/Panel/PanelSelectItem.vue +20 -0
  41. package/components/Transitions/FadeTransition.vue +5 -0
  42. package/components/Transitions/SlideTransition.vue +5 -0
  43. package/composables/axios.ts +11 -0
  44. package/composables/classes.ts +1179 -0
  45. package/composables/constants.ts +71 -0
  46. package/composables/index.ts +168 -2
  47. package/composables/styles.ts +48 -8
  48. package/configs/i18n.ts +19 -0
  49. package/layouts/clear.vue +3 -0
  50. package/layouts/default.vue +75 -0
  51. package/layouts/full.vue +6 -0
  52. package/locales/en.json +403 -0
  53. package/locales/kz.json +403 -0
  54. package/locales/ru.json +403 -0
  55. package/nuxt.config.ts +39 -5
  56. package/package.json +28 -10
  57. package/pages/500.vue +85 -0
  58. package/plugins/helperFunctionsPlugins.ts +19 -2
  59. package/plugins/storePlugin.ts +5 -7
  60. package/plugins/vuetifyPlugin.ts +15 -0
  61. package/store/data.store.js +2291 -8
  62. package/store/form.store.ts +8 -0
  63. package/store/member.store.ts +381 -0
  64. package/store/rules.js +52 -39
  65. package/tailwind.config.js +10 -0
  66. package/types/index.ts +317 -0
  67. package/app.vue +0 -3
  68. package/components/Button/GreenBtn.vue +0 -33
  69. package/store/app.store.js +0 -12
  70. package/store/messages.ts +0 -310
@@ -0,0 +1,1179 @@
1
+ import { formatDate } from '.';
2
+ import { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-router';
3
+
4
+ type LinkType = Partial<RouteLocationNormalized> | Partial<RouteLocationNormalizedLoaded> | string | null | boolean;
5
+
6
+ class MenuItemConfig {
7
+ id: any;
8
+ title: string | null;
9
+ link?: LinkType;
10
+ hasLine?: boolean;
11
+ description?: string | null;
12
+ url?: string | null;
13
+ initial?: any | null;
14
+ icon?: string | null;
15
+ action?: Function | void;
16
+ disabled?: ComputedRef;
17
+ color?: string;
18
+ show?: ComputedRef;
19
+
20
+ constructor(
21
+ id: any = null,
22
+ title: string | null = null,
23
+ link?: LinkType,
24
+ hasLine?: boolean,
25
+ description?: string | null,
26
+ url?: string | null,
27
+ initial?: any | null,
28
+ icon?: string | null,
29
+ action?: Function | void,
30
+ disabled?: ComputedRef,
31
+ color?: string,
32
+ show?: ComputedRef,
33
+ ) {
34
+ this.id = id;
35
+ this.title = title;
36
+ this.link = link;
37
+ this.hasLine = hasLine;
38
+ this.description = description;
39
+ this.url = url;
40
+ this.initial = initial;
41
+ this.icon = icon;
42
+ this.action = action;
43
+ this.disabled = disabled;
44
+ this.color = color;
45
+ this.show = show;
46
+ }
47
+ }
48
+
49
+ export class MenuItem extends MenuItemConfig {
50
+ constructor({ id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show }: MenuItemConfig = new MenuItemConfig()) {
51
+ super(id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show);
52
+ }
53
+ }
54
+
55
+ export class Value {
56
+ id: string | number | null;
57
+ code: string | number | null;
58
+ nameRu: string | number | null;
59
+ nameKz: string | number | null;
60
+ ids: string | number | null;
61
+
62
+ constructor(id: string | number | null = null, nameRu: string | null = null, nameKz: string | null = null, code: string | null = null, ids: string | null = null) {
63
+ this.id = id;
64
+ this.code = code;
65
+ this.nameRu = nameRu;
66
+ this.nameKz = nameKz;
67
+ this.ids = ids;
68
+ }
69
+ }
70
+
71
+ export class IDocument {
72
+ id?: string;
73
+ processInstanceId?: string;
74
+ iin?: string;
75
+ fileTypeId?: string;
76
+ fileTypeName?: string;
77
+ fileId?: string;
78
+ page?: number;
79
+ fileName?: string;
80
+ fileTypeCode?: string;
81
+ sharedId?: string | null;
82
+ signed?: boolean | null;
83
+ signId?: string | null;
84
+ certificateDate?: string | null;
85
+ constructor(
86
+ id?: string,
87
+ processInstanceId?: string,
88
+ iin?: string,
89
+ fileTypeId?: string,
90
+ fileTypeName?: string,
91
+ fileId?: string,
92
+ page?: number,
93
+ fileName?: string,
94
+ fileTypeCode?: string,
95
+ sharedId?: string | null,
96
+ signed?: boolean | null,
97
+ signId?: string | null,
98
+ certificateDate?: string | null,
99
+ ) {
100
+ this.id = id;
101
+ this.processInstanceId = processInstanceId;
102
+ this.iin = iin;
103
+ this.fileTypeId = fileTypeId;
104
+ this.fileTypeName = fileTypeName;
105
+ this.fileId = fileId;
106
+ this.page = page;
107
+ this.fileName = fileName;
108
+ this.fileTypeCode = fileTypeCode;
109
+ this.sharedId = sharedId;
110
+ this.signed = signed;
111
+ this.signId = signId;
112
+ this.certificateDate = certificateDate;
113
+ }
114
+ }
115
+
116
+ export class DocumentItem extends IDocument {
117
+ constructor(
118
+ { id, processInstanceId, iin, fileTypeId, fileTypeName, fileId, page, fileName, fileTypeCode, sharedId, signed, signId, certificateDate }: IDocument = new IDocument(),
119
+ ) {
120
+ super(id, processInstanceId, iin, fileTypeId, fileTypeName, fileId, page, fileName, fileTypeCode, sharedId, signed, signId, certificateDate);
121
+ }
122
+ }
123
+
124
+ export class MenuOption {
125
+ text: string | null;
126
+ subtitle: string | null;
127
+ icon: string | null;
128
+ variant: string | null;
129
+ size: string | null;
130
+
131
+ constructor(text = 'Text', subtitle = 'Subtitle', icon = 'mdi-content-copy', variant = 'text', size = 'small') {
132
+ this.text = text;
133
+ this.subtitle = subtitle;
134
+ this.icon = icon;
135
+ this.variant = variant;
136
+ this.size = size;
137
+ }
138
+ }
139
+
140
+ export const InitialColumns = () => {
141
+ return {
142
+ addRegNumber: null,
143
+ number: null,
144
+ iin: null,
145
+ longName: null,
146
+ userName: null,
147
+ processCodeTitle: null,
148
+ historyStatusTitle: null,
149
+ dateCreated: null,
150
+ };
151
+ };
152
+
153
+ export class User {
154
+ login: string | null;
155
+ password: string | null;
156
+ roles: string[];
157
+ id: string | null;
158
+ fullName: string | null;
159
+
160
+ constructor(login: string | null = null, password: string | null = null, roles: string[] = [], id: string | null = null, fullName: string | null = null) {
161
+ this.login = login;
162
+ this.password = password;
163
+ this.roles = roles;
164
+ this.id = id;
165
+ this.fullName = fullName;
166
+ }
167
+
168
+ resetUser() {
169
+ this.login = null;
170
+ this.password = null;
171
+ this.roles = [];
172
+ this.id = null;
173
+ this.fullName = null;
174
+ }
175
+ }
176
+
177
+ class Person {
178
+ id: string | number | null;
179
+ type: string | number | null;
180
+ iin: string | null;
181
+ longName: string | null;
182
+ lastName: string | null;
183
+ firstName: string | null;
184
+ middleName: string | null;
185
+ birthDate: string | null;
186
+ gender: Value;
187
+ genderName: string | null;
188
+ birthPlace: Value;
189
+ age: string | null;
190
+ registrationDate: string;
191
+
192
+ constructor(
193
+ id = 0,
194
+ type = 1,
195
+ iin = null,
196
+ longName = null,
197
+ lastName = null,
198
+ firstName = null,
199
+ middleName = null,
200
+ birthDate = null,
201
+ gender = new Value(),
202
+ genderName = null,
203
+ birthPlace = new Value(),
204
+ age = null,
205
+ ) {
206
+ this.id = id;
207
+ this.type = type;
208
+ this.iin = iin;
209
+ this.longName = !!lastName && !!firstName && !!middleName ? (((((lastName as string) + firstName) as string) + middleName) as string) : longName;
210
+ this.lastName = lastName;
211
+ this.firstName = firstName;
212
+ this.middleName = middleName;
213
+ this.birthDate = birthDate;
214
+ this.gender = gender;
215
+ this.genderName = gender && gender.nameRu !== null ? (gender.nameRu as string) : genderName;
216
+ this.birthPlace = birthPlace;
217
+ this.age = age;
218
+ this.registrationDate = new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1);
219
+ }
220
+
221
+ resetPerson(clearIinAndPhone: boolean = true) {
222
+ this.id = 0;
223
+ this.type = 1;
224
+ if (clearIinAndPhone === true) {
225
+ this.iin = null;
226
+ }
227
+ this.longName = null;
228
+ this.lastName = null;
229
+ this.firstName = null;
230
+ this.middleName = null;
231
+ this.birthDate = null;
232
+ this.gender = new Value();
233
+ this.genderName = null;
234
+ this.birthPlace = new Value();
235
+ this.age = null;
236
+ this.registrationDate = new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1);
237
+ }
238
+
239
+ formatDate(date: any): Date | null {
240
+ return formatDate(date);
241
+ }
242
+
243
+ getDateByKey(key: string): string | null {
244
+ const ctxKey = key as keyof typeof this;
245
+ if (this[ctxKey] && this[ctxKey] !== null) {
246
+ const formattedDate = this.formatDate(this[ctxKey]);
247
+ return formattedDate ? formattedDate.toISOString() : null;
248
+ } else {
249
+ return null;
250
+ }
251
+ }
252
+
253
+ getBirthDate() {
254
+ return this.getDateByKey('birthDate');
255
+ }
256
+
257
+ getDocumentExpireDate() {
258
+ return this.getDateByKey('documentExpire');
259
+ }
260
+
261
+ getDocumentDate() {
262
+ return this.getDateByKey('documentDate');
263
+ }
264
+
265
+ getAgeByBirthDate() {
266
+ const date = this.formatDate(this.birthDate);
267
+ if (date) {
268
+ const age = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
269
+ if (new Date(date) < new Date(Date.now()) && age > 0) {
270
+ return age.toString();
271
+ }
272
+ } else {
273
+ return null;
274
+ }
275
+ }
276
+ }
277
+
278
+ export class Contragent extends Person {
279
+ economySectorCode: Value;
280
+ countryOfCitizenship: Value;
281
+ countryOfTaxResidency: Value;
282
+ registrationCountry: Value;
283
+ registrationProvince: Value;
284
+ registrationRegion: Value;
285
+ registrationRegionType: Value;
286
+ registrationCity: Value;
287
+ registrationQuarter: string | null;
288
+ registrationMicroDistrict: string | null;
289
+ registrationStreet: string | null;
290
+ registrationNumberHouse: string | null;
291
+ registrationNumberApartment: string | null;
292
+ phoneNumber: string | null;
293
+ homePhone: string | null;
294
+ email: string | null;
295
+ signOfResidency: Value;
296
+ documentType: Value;
297
+ documentNumber: string | null;
298
+ documentIssuers: Value;
299
+ documentDate: string | null;
300
+ documentExpire: string | null;
301
+ verifyDate: string | null;
302
+ verifyType: string | null;
303
+ otpTokenId: string | null;
304
+ constructor(
305
+ economySectorCode = new Value(),
306
+ countryOfCitizenship = new Value(),
307
+ countryOfTaxResidency = new Value(),
308
+ registrationCountry = new Value(),
309
+ registrationProvince = new Value(),
310
+ registrationRegion = new Value(),
311
+ registrationRegionType = new Value(),
312
+ registrationCity = new Value(),
313
+ registrationQuarter = null,
314
+ registrationMicroDistrict = null,
315
+ registrationStreet = null,
316
+ registrationNumberHouse = null,
317
+ registrationNumberApartment = null,
318
+ phoneNumber = null,
319
+ homePhone = null,
320
+ email = null,
321
+ signOfResidency = new Value(),
322
+ documentType = new Value(),
323
+ documentNumber = null,
324
+ documentIssuers = new Value(),
325
+ documentDate = null,
326
+ documentExpire = null,
327
+ ...args: any
328
+ ) {
329
+ super(...args);
330
+ this.economySectorCode = economySectorCode;
331
+ this.countryOfCitizenship = countryOfCitizenship;
332
+ this.countryOfTaxResidency = countryOfTaxResidency;
333
+ this.registrationCountry = registrationCountry;
334
+ this.registrationProvince = registrationProvince;
335
+ this.registrationRegion = registrationRegion;
336
+ this.registrationRegionType = registrationRegionType;
337
+ this.registrationCity = registrationCity;
338
+ this.registrationQuarter = registrationQuarter;
339
+ this.registrationMicroDistrict = registrationMicroDistrict;
340
+ this.registrationStreet = registrationStreet;
341
+ this.registrationNumberHouse = registrationNumberHouse;
342
+ this.registrationNumberApartment = registrationNumberApartment;
343
+ this.phoneNumber = phoneNumber;
344
+ this.homePhone = homePhone;
345
+ this.email = email;
346
+ this.signOfResidency = signOfResidency;
347
+ this.documentType = documentType;
348
+ this.documentNumber = documentNumber;
349
+ this.documentIssuers = documentIssuers;
350
+ this.documentDate = documentDate;
351
+ this.documentExpire = documentExpire;
352
+ this.verifyDate = null;
353
+ this.verifyType = null;
354
+ this.otpTokenId = null;
355
+ }
356
+ }
357
+
358
+ export class Member extends Person {
359
+ response?: {
360
+ contragent?: any;
361
+ questionnaires?: any;
362
+ contacts?: any;
363
+ documents?: any;
364
+ addresses?: any;
365
+ };
366
+ verifyType: any;
367
+ verifyDate: any;
368
+ postIndex: string | null;
369
+ isPdl: boolean;
370
+ migrationCard: string | null;
371
+ migrationCardIssueDate: string | null;
372
+ migrationCardExpireDate: string | null;
373
+ confirmDocType: string | null;
374
+ confirmDocNumber: string | null;
375
+ confirmDocIssueDate: string | null;
376
+ confirmDocExpireDate: string | null;
377
+ notaryLongName: string | null;
378
+ notaryLicenseNumber: string | null;
379
+ notaryLicenseDate: string | null;
380
+ notaryLicenseIssuer: string | null;
381
+ jurLongName: string | null;
382
+ fullNameRod: string | null;
383
+ confirmDocTypeKz: string | null;
384
+ confirmDocTypeRod: string | null;
385
+ isNotary: boolean;
386
+ insurancePay: Value;
387
+ job: string | null;
388
+ jobPosition: string | null;
389
+ jobPlace: string | null;
390
+ registrationCountry: Value;
391
+ registrationProvince: Value;
392
+ registrationRegion: Value;
393
+ registrationRegionType: Value;
394
+ registrationCity: Value;
395
+ registrationQuarter: string | null;
396
+ registrationMicroDistrict: string | null;
397
+ registrationStreet: string | null;
398
+ registrationNumberHouse: string | null;
399
+ registrationNumberApartment: string | null;
400
+ birthRegion: Value;
401
+ documentType: Value;
402
+ documentNumber: string | null;
403
+ documentIssuers: Value;
404
+ documentDate: string | null;
405
+ documentExpire: string | null;
406
+ signOfResidency: Value;
407
+ signOfIPDL: Value;
408
+ countryOfCitizenship: Value;
409
+ countryOfTaxResidency: Value;
410
+ addTaxResidency: Value;
411
+ economySectorCode: Value;
412
+ phoneNumber: string | null;
413
+ homePhone: string | null;
414
+ email: string | null;
415
+ address: string | null;
416
+ familyStatus: Value;
417
+ isTerror: null;
418
+ relationDegree: Value;
419
+ isDisability: Value;
420
+ disabilityGroup: Value | null;
421
+ percentageOfPayoutAmount: string | number | null;
422
+ _cyrPattern: RegExp;
423
+ _numPattern: RegExp;
424
+ _phonePattern: RegExp;
425
+ _emailPattern: RegExp;
426
+ gotFromInsis: boolean | null;
427
+ gosPersonData: any;
428
+ hasAgreement: boolean | null;
429
+ otpTokenId: string | null;
430
+ otpCode: string | null;
431
+ constructor(
432
+ id = 0,
433
+ type = 1,
434
+ iin = null,
435
+ phoneNumber = null,
436
+ longName = null,
437
+ lastName = null,
438
+ firstName = null,
439
+ middleName = null,
440
+ birthDate = null,
441
+ gender = new Value(),
442
+ genderName = null,
443
+ birthPlace = new Value(),
444
+ age = null,
445
+ registrationDate = null,
446
+ job = null,
447
+ jobPosition = null,
448
+ jobPlace = null,
449
+ registrationCountry = new Value(),
450
+ registrationProvince = new Value(),
451
+ registrationRegion = new Value(),
452
+ registrationRegionType = new Value(),
453
+ registrationCity = new Value(),
454
+ registrationQuarter = null,
455
+ registrationMicroDistrict = null,
456
+ registrationStreet = null,
457
+ registrationNumberHouse = null,
458
+ registrationNumberApartment = null,
459
+ birthRegion = new Value(),
460
+ documentType = new Value(),
461
+ documentNumber = null,
462
+ documentIssuers = new Value(),
463
+ documentDate = null,
464
+ documentExpire = null,
465
+ signOfResidency = new Value(),
466
+ signOfIPDL = new Value(),
467
+ isTerror = null,
468
+ countryOfCitizenship = new Value(),
469
+ countryOfTaxResidency = new Value(),
470
+ addTaxResidency = new Value(),
471
+ economySectorCode = new Value(),
472
+ homePhone = null,
473
+ email = null,
474
+ address = null,
475
+ familyStatus = new Value(),
476
+ relationDegree = new Value(),
477
+ isDisability = new Value(),
478
+ disabilityGroupId = new Value(),
479
+ percentageOfPayoutAmount = null,
480
+ migrationCard = null,
481
+ migrationCardIssueDate = null,
482
+ migrationCardExpireDate = null,
483
+ confirmDocType = null,
484
+ confirmDocNumber = null,
485
+ confirmDocIssueDate = null,
486
+ confirmDocExpireDate = null,
487
+ notaryLongName = null,
488
+ notaryLicenseNumber = null,
489
+ notaryLicenseDate = null,
490
+ notaryLicenseIssuer = null,
491
+ jurLongName = null,
492
+ fullNameRod = null,
493
+ confirmDocTypeKz = null,
494
+ confirmDocTypeRod = null,
495
+ isNotary = false,
496
+ ) {
497
+ super(id, type, iin, longName, lastName, firstName, middleName, birthDate, gender, genderName, birthPlace, age);
498
+ this.postIndex = null;
499
+ this.isPdl = false;
500
+ this.migrationCard = migrationCard;
501
+ this.migrationCardIssueDate = migrationCardIssueDate;
502
+ this.migrationCardExpireDate = migrationCardExpireDate;
503
+ this.confirmDocType = confirmDocType;
504
+ this.confirmDocNumber = confirmDocNumber;
505
+ this.confirmDocIssueDate = confirmDocIssueDate;
506
+ this.confirmDocExpireDate = confirmDocExpireDate;
507
+ this.notaryLongName = notaryLongName;
508
+ this.notaryLicenseNumber = notaryLicenseNumber;
509
+ this.notaryLicenseDate = notaryLicenseDate;
510
+ this.notaryLicenseIssuer = notaryLicenseIssuer;
511
+ this.jurLongName = jurLongName;
512
+ this.fullNameRod = fullNameRod;
513
+ this.confirmDocTypeKz = confirmDocTypeKz;
514
+ this.confirmDocTypeRod = confirmDocTypeRod;
515
+ this.isNotary = isNotary;
516
+ this.insurancePay = new Value();
517
+ this.job = job;
518
+ this.jobPosition = jobPosition;
519
+ this.jobPlace = jobPlace;
520
+ this.registrationCountry = registrationCountry;
521
+ this.registrationProvince = registrationProvince;
522
+ this.registrationRegion = registrationRegion;
523
+ this.registrationRegionType = registrationRegionType;
524
+ this.registrationCity = registrationCity;
525
+ this.registrationQuarter = registrationQuarter;
526
+ this.registrationMicroDistrict = registrationMicroDistrict;
527
+ this.registrationStreet = registrationStreet;
528
+ this.registrationNumberHouse = registrationNumberHouse;
529
+ this.registrationNumberApartment = registrationNumberApartment;
530
+ this.birthRegion = birthRegion;
531
+ this.documentType = documentType;
532
+ this.documentNumber = documentNumber;
533
+ this.documentIssuers = documentIssuers;
534
+ this.documentDate = documentDate;
535
+ this.documentExpire = documentExpire;
536
+ this.signOfResidency = signOfResidency;
537
+ this.signOfIPDL = signOfIPDL;
538
+ this.countryOfCitizenship = countryOfCitizenship;
539
+ this.countryOfTaxResidency = countryOfTaxResidency;
540
+ this.addTaxResidency = addTaxResidency;
541
+ this.economySectorCode = economySectorCode;
542
+ this.phoneNumber = phoneNumber;
543
+ this.homePhone = homePhone;
544
+ this.email = email;
545
+ this.otpTokenId = null;
546
+ this.otpCode = null;
547
+ this.address = address;
548
+ this.familyStatus = familyStatus;
549
+ this.isTerror = isTerror;
550
+ this.relationDegree = relationDegree;
551
+ this.isDisability = isDisability;
552
+ this.disabilityGroup = disabilityGroupId;
553
+ this.percentageOfPayoutAmount = percentageOfPayoutAmount;
554
+ this._cyrPattern = /[\u0400-\u04FF]+/;
555
+ this._numPattern = /[0-9]+/;
556
+ this._phonePattern = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
557
+ this._emailPattern = /.+@.+\..+/;
558
+ this.gotFromInsis = true;
559
+ this.gosPersonData = null;
560
+ this.hasAgreement = null;
561
+ }
562
+
563
+ resetMember(clearIinAndPhone: boolean = true) {
564
+ super.resetPerson(clearIinAndPhone);
565
+ this.job = null;
566
+ this.jobPosition = null;
567
+ this.jobPlace = null;
568
+ this.registrationCountry = new Value();
569
+ this.registrationProvince = new Value();
570
+ this.registrationRegion = new Value();
571
+ this.registrationRegionType = new Value();
572
+ this.registrationCity = new Value();
573
+ this.registrationQuarter = null;
574
+ this.registrationMicroDistrict = null;
575
+ this.registrationStreet = null;
576
+ this.registrationNumberHouse = null;
577
+ this.registrationNumberApartment = null;
578
+ this.birthRegion = new Value();
579
+ this.documentType = new Value();
580
+ this.documentNumber = null;
581
+ this.documentIssuers = new Value();
582
+ this.documentDate = null;
583
+ this.documentExpire = null;
584
+ this.signOfResidency = new Value();
585
+ this.signOfIPDL = new Value();
586
+ this.countryOfCitizenship = new Value();
587
+ this.countryOfTaxResidency = new Value();
588
+ this.economySectorCode = new Value();
589
+ if (clearIinAndPhone === true) {
590
+ this.phoneNumber = null;
591
+ }
592
+ this.homePhone = null;
593
+ this.email = null;
594
+ this.address = null;
595
+ this.familyStatus = new Value();
596
+ this.isTerror = null;
597
+ this.relationDegree = new Value();
598
+ this.isDisability = new Value();
599
+ this.disabilityGroup = null;
600
+ this.percentageOfPayoutAmount = null;
601
+ this.gotFromInsis = true;
602
+ this.gosPersonData = null;
603
+ this.hasAgreement = null;
604
+ this.insurancePay = new Value();
605
+ this.migrationCard = null;
606
+ this.migrationCardIssueDate = null;
607
+ this.migrationCardExpireDate = null;
608
+ this.confirmDocType = null;
609
+ this.confirmDocNumber = null;
610
+ this.confirmDocIssueDate = null;
611
+ this.confirmDocExpireDate = null;
612
+ this.notaryLongName = null;
613
+ this.notaryLicenseNumber = null;
614
+ this.notaryLicenseDate = null;
615
+ this.notaryLicenseIssuer = null;
616
+ this.jurLongName = null;
617
+ this.fullNameRod = null;
618
+ this.confirmDocTypeKz = null;
619
+ this.confirmDocTypeRod = null;
620
+ this.isNotary = false;
621
+ }
622
+
623
+ getPattern(pattern: string) {
624
+ const key = `_${pattern}Pattern` as keyof typeof this;
625
+ return this[key];
626
+ }
627
+
628
+ validatedMessage(valid: any, msg = 'Обязательное поле') {
629
+ return {
630
+ error: valid,
631
+ msg,
632
+ };
633
+ }
634
+
635
+ validateFullName() {
636
+ return this.lastName !== null && this.firstName !== null;
637
+ }
638
+
639
+ getFullNameShorted() {
640
+ return this.validateFullName() ? `${this.lastName} ${this.firstName?.charAt(0)}. ${this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''}` : null;
641
+ }
642
+
643
+ getFullName() {
644
+ return this.validateFullName() ? (this.lastName + ' ' + this.firstName + ' ' + this.middleName != '' ? this.middleName?.charAt(0) : '') : null;
645
+ }
646
+ }
647
+
648
+ export class PolicyholderForm extends Member {
649
+ constructor(...args: any) {
650
+ super(...args);
651
+ }
652
+ }
653
+
654
+ export class InsuredForm extends Member {
655
+ constructor(...args: any) {
656
+ super(...args);
657
+ }
658
+ }
659
+
660
+ export class BeneficiaryForm extends Member {
661
+ constructor(...args: any) {
662
+ super(...args);
663
+ }
664
+ }
665
+
666
+ export class BeneficialOwnerForm extends Member {
667
+ constructor(...args: any) {
668
+ super(...args);
669
+ }
670
+ }
671
+
672
+ export class PolicyholdersRepresentativeForm extends Member {
673
+ constructor(...args: any) {
674
+ super(...args);
675
+ }
676
+ }
677
+
678
+ export class ProductConditions {
679
+ signDate: string | null;
680
+ birthDate: string | null;
681
+ gender: Value;
682
+ insuranceCase: string | null;
683
+ coverPeriod: string | null;
684
+ payPeriod: string | null;
685
+ termsOfInsurance: string | null;
686
+ annualIncome: string | null;
687
+ processIndexRate: Value;
688
+ requestedSumInsured: number | string | null;
689
+ requestedSumInsuredInDollar: number | string | null;
690
+ insurancePremiumPerMonth: number | string | null;
691
+ insurancePremiumPerMonthInDollar: number | string | null;
692
+ establishingGroupDisabilityFromThirdYear: string | null;
693
+ possibilityToChange: string | null;
694
+ deathOfInsuredDueToAccident: Value;
695
+ establishingGroupDisability: Value;
696
+ temporaryDisability: Value;
697
+ bodyInjury: Value;
698
+ criticalIllnessOfTheInsured: Value;
699
+ paymentPeriod: Value;
700
+ amountOfInsurancePremium: string | null;
701
+ lifeMultiply: string | null;
702
+ lifeAdditive: string | null;
703
+ lifeMultiplyClient: string | null;
704
+ lifeAdditiveClient: string | null;
705
+ adbMultiply: string | null;
706
+ adbAdditive: string | null;
707
+ disabilityMultiply: string | null;
708
+ disabilityAdditive: string | null;
709
+ processTariff: Value;
710
+ riskGroup: Value;
711
+ riskGroup2: Value;
712
+ constructor(
713
+ insuranceCase = null,
714
+ coverPeriod = null,
715
+ payPeriod = null,
716
+ termsOfInsurance = null,
717
+ annualIncome = null,
718
+ processIndexRate = new Value(),
719
+ requestedSumInsured = null,
720
+ insurancePremiumPerMonth = null,
721
+ establishingGroupDisabilityFromThirdYear = null,
722
+ possibilityToChange = null,
723
+ deathOfInsuredDueToAccident = new Value(),
724
+ establishingGroupDisability = new Value(),
725
+ temporaryDisability = new Value(),
726
+ bodyInjury = new Value(),
727
+ criticalIllnessOfTheInsured = new Value(),
728
+ paymentPeriod = new Value(),
729
+ amountOfInsurancePremium = null,
730
+ lifeMultiply = null,
731
+ lifeAdditive = null,
732
+ lifeMultiplyClient = null,
733
+ lifeAdditiveClient = null,
734
+ adbMultiply = null,
735
+ adbAdditive = null,
736
+ disabilityMultiply = null,
737
+ disabilityAdditive = null,
738
+ processTariff = new Value(),
739
+ riskGroup = new Value(),
740
+ riskGroup2 = new Value(),
741
+ ) {
742
+ this.requestedSumInsuredInDollar = null;
743
+ this.insurancePremiumPerMonthInDollar = null;
744
+ this.signDate = null;
745
+ this.birthDate = null;
746
+ this.gender = new Value();
747
+ this.insuranceCase = insuranceCase;
748
+ this.coverPeriod = coverPeriod;
749
+ this.payPeriod = payPeriod;
750
+ this.termsOfInsurance = termsOfInsurance;
751
+ this.annualIncome = annualIncome;
752
+ this.processIndexRate = processIndexRate;
753
+ this.requestedSumInsured = requestedSumInsured;
754
+ this.insurancePremiumPerMonth = insurancePremiumPerMonth;
755
+ this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
756
+ this.possibilityToChange = possibilityToChange;
757
+ this.deathOfInsuredDueToAccident = deathOfInsuredDueToAccident;
758
+ this.establishingGroupDisability = establishingGroupDisability;
759
+ this.temporaryDisability = temporaryDisability;
760
+ this.bodyInjury = bodyInjury;
761
+ this.criticalIllnessOfTheInsured = criticalIllnessOfTheInsured;
762
+ this.paymentPeriod = paymentPeriod;
763
+ this.amountOfInsurancePremium = amountOfInsurancePremium;
764
+ this.lifeMultiply = lifeMultiply;
765
+ this.lifeAdditive = lifeAdditive;
766
+ this.lifeMultiplyClient = lifeMultiplyClient;
767
+ this.lifeAdditiveClient = lifeAdditiveClient;
768
+ this.adbMultiply = adbMultiply;
769
+ this.adbAdditive = adbAdditive;
770
+ this.disabilityMultiply = disabilityMultiply;
771
+ this.disabilityAdditive = disabilityAdditive;
772
+ this.processTariff = processTariff;
773
+ this.riskGroup = riskGroup;
774
+ this.riskGroup2 = riskGroup2;
775
+ }
776
+ }
777
+
778
+ export class MemberSettings {
779
+ has?: boolean;
780
+ isMultiple?: boolean;
781
+ constructor(options?: { has?: boolean; isMultiple?: boolean }) {
782
+ if (options) {
783
+ this.has = options.has;
784
+ this.isMultiple = options.isMultiple;
785
+ }
786
+ }
787
+ }
788
+
789
+ export class DataStoreClass {
790
+ // IMP Контроллер фич
791
+ controls: {
792
+ // Проверка на роль при авторизации
793
+ onAuth: boolean;
794
+ // Согласие на главной странице
795
+ hasAgreement: boolean;
796
+ // Наличие анкеты
797
+ hasAnketa: boolean;
798
+ // Подтягивание с ГБДФЛ
799
+ hasGBDFL: boolean;
800
+ // Подтягивание с ГКБ
801
+ hasGKB: boolean;
802
+ // Подтягивание с ИНСИС
803
+ hasInsis: boolean;
804
+ // Калькулятор без ввода данных
805
+ hasCalculator: boolean;
806
+ // Блок прикрепления к менеджеру
807
+ hasAttachment: boolean;
808
+ };
809
+ members: {
810
+ clientApp: MemberSettings;
811
+ insuredApp: MemberSettings;
812
+ beneficiaryApp: MemberSettings;
813
+ beneficialOwnerApp: MemberSettings;
814
+ spokesmanApp: MemberSettings;
815
+ };
816
+ hasLayoutMargins: boolean;
817
+ readonly product: string | null;
818
+ showNav: boolean;
819
+ menuItems: MenuItem[];
820
+ menu: {
821
+ title: string;
822
+ hasBack: boolean;
823
+ loading: boolean;
824
+ backIcon: string;
825
+ onBack: any;
826
+ onLink: any;
827
+ selectedItem: MenuItem;
828
+ };
829
+ settings: {
830
+ open: boolean;
831
+ overlay: boolean;
832
+ items: MenuItem[];
833
+ };
834
+ buttons: MenuItem[];
835
+ isButtonsLoading: boolean;
836
+ panelAction: string | null;
837
+ panel: {
838
+ open: boolean;
839
+ overlay: boolean;
840
+ title: string;
841
+ clear: Function | void;
842
+ };
843
+ historyPageIndex: number;
844
+ historyPageSize: number;
845
+ historyTotalItems: number;
846
+ isColumnAsc = { ...InitialColumns() };
847
+ idleKey: number;
848
+ processList: Item[] | null;
849
+ countries: Value[];
850
+ citizenshipCountries: Value[];
851
+ taxCountries: Value[];
852
+ addTaxCountries: Value[];
853
+ states: Value[];
854
+ regions: Value[];
855
+ cities: Value[];
856
+ localityTypes: Value[];
857
+ dicFileTypeList: Value[];
858
+ documentTypes: Value[];
859
+ documentIssuers: Value[];
860
+ familyStatuses: Value[];
861
+ relations: Value[];
862
+ questionRefs: Value[];
863
+ residents: Value[];
864
+ ipdl: Value[];
865
+ economySectorCode: Value[];
866
+ gender: Value[];
867
+ fontSize: number;
868
+ isFontChangerOpen: boolean = false;
869
+ isLoading: boolean = false;
870
+ userNotFound: boolean = false;
871
+ user: User;
872
+ accessToken: string | null = null;
873
+ refreshToken: string | null = null;
874
+ processCoverTypeSum: Value[];
875
+ processIndexRate: Value[];
876
+ processPaymentPeriod: Value[];
877
+ taskList: TaskListItem[];
878
+ processHistory: TaskHistory[];
879
+ contragentList: any[];
880
+ contragentFormKey: string;
881
+ processCode: number | null;
882
+ groupCode: string;
883
+ userGroups: Item[];
884
+ onMainPage: boolean;
885
+ SaleChanellPolicy: Value[];
886
+ RegionPolicy: Value[];
887
+ ManagerPolicy: Value[];
888
+ AgentData: AgentData[];
889
+ riskGroup: Value[];
890
+ currencies: {
891
+ eur: number | null;
892
+ usd: number | null;
893
+ };
894
+ constructor() {
895
+ this.currencies = {
896
+ eur: null,
897
+ usd: null,
898
+ };
899
+ this.members = {
900
+ clientApp: new MemberSettings(),
901
+ insuredApp: new MemberSettings(),
902
+ beneficiaryApp: new MemberSettings(),
903
+ beneficialOwnerApp: new MemberSettings(),
904
+ spokesmanApp: new MemberSettings(),
905
+ };
906
+ this.controls = {
907
+ onAuth: false,
908
+ hasAnketa: true,
909
+ hasAgreement: true,
910
+ hasGBDFL: true,
911
+ hasGKB: false,
912
+ hasInsis: false,
913
+ hasCalculator: false,
914
+ hasAttachment: true,
915
+ };
916
+ this.hasLayoutMargins = true;
917
+ this.processIndexRate = [];
918
+ this.processPaymentPeriod = [];
919
+ this.questionRefs = [];
920
+ this.SaleChanellPolicy = [];
921
+ this.RegionPolicy = [];
922
+ this.ManagerPolicy = [];
923
+ this.AgentData = [];
924
+ this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as string) : null;
925
+ this.showNav = true;
926
+ this.menuItems = [];
927
+ this.menu = {
928
+ title: '',
929
+ hasBack: false,
930
+ loading: false,
931
+ backIcon: 'mdi-arrow-left',
932
+ onBack: {},
933
+ onLink: {},
934
+ selectedItem: new MenuItem(),
935
+ };
936
+ this.settings = {
937
+ open: false,
938
+ overlay: false,
939
+ items: [],
940
+ };
941
+ this.buttons = [];
942
+ this.isButtonsLoading = false;
943
+ this.panel = {
944
+ open: false,
945
+ overlay: false,
946
+ title: '',
947
+ clear: function () {
948
+ const panelActions = document.getElementById('panel-actions');
949
+ if (panelActions) {
950
+ panelActions.innerHTML = '';
951
+ }
952
+ },
953
+ };
954
+ this.panelAction = null;
955
+ this.historyPageIndex = 1;
956
+ this.historyPageSize = 10;
957
+ this.historyTotalItems = 0;
958
+ this.isColumnAsc = { ...InitialColumns() };
959
+ this.idleKey = 999;
960
+ this.processList = null;
961
+ this.countries = [];
962
+ this.citizenshipCountries = [];
963
+ this.taxCountries = [];
964
+ this.addTaxCountries = [];
965
+ this.states = [];
966
+ this.regions = [];
967
+ this.cities = [];
968
+ this.localityTypes = [];
969
+ this.dicFileTypeList = [];
970
+ this.documentTypes = [];
971
+ this.documentIssuers = [];
972
+ this.familyStatuses = [];
973
+ this.relations = [];
974
+ this.residents = [];
975
+ this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
976
+ this.economySectorCode = [];
977
+ this.gender = [new Value(0, null), new Value(1, 'Мужской'), new Value(2, 'Женский')];
978
+ this.fontSize = 14;
979
+ this.isFontChangerOpen = false;
980
+ this.isLoading = false;
981
+ this.userNotFound = false;
982
+ this.user = new User();
983
+ this.accessToken = null;
984
+ this.refreshToken = null;
985
+ this.processCoverTypeSum = [];
986
+ this.taskList = [];
987
+ this.processHistory = [];
988
+ this.contragentList = [];
989
+ this.contragentFormKey = 'contragentForm';
990
+ this.processCode = null;
991
+ this.groupCode = 'Work';
992
+ this.userGroups = [];
993
+ this.onMainPage = true;
994
+ this.riskGroup = [
995
+ {
996
+ id: '1',
997
+ nameKz: '',
998
+ nameRu: '1',
999
+ code: '',
1000
+ ids: '',
1001
+ },
1002
+ {
1003
+ id: '2',
1004
+ nameKz: '',
1005
+ nameRu: '2',
1006
+ code: '',
1007
+ ids: '',
1008
+ },
1009
+ {
1010
+ id: '3',
1011
+ nameKz: '',
1012
+ nameRu: '3',
1013
+ code: '',
1014
+ ids: '',
1015
+ },
1016
+ {
1017
+ id: '4',
1018
+ nameKz: '',
1019
+ nameRu: '4',
1020
+ code: '',
1021
+ ids: '',
1022
+ },
1023
+ {
1024
+ id: '5',
1025
+ nameKz: '',
1026
+ nameRu: '5',
1027
+ code: '',
1028
+ ids: '',
1029
+ },
1030
+ ];
1031
+ }
1032
+ }
1033
+
1034
+ export class FormStoreClass {
1035
+ additionalInsuranceTerms: AddCover[];
1036
+ additionalInsuranceTermsWithout: AddCover[];
1037
+ signUrls: SignUrlType[];
1038
+ epayLink: string | null;
1039
+ affilationResolution: {
1040
+ id: string | number | null;
1041
+ processInstanceId: string | number | null;
1042
+ number: string | number | null;
1043
+ date: string | number | null;
1044
+ };
1045
+ signedDocumentList: IDocument[];
1046
+ surveyByHealthBase: AnketaFirst | null;
1047
+ surveyByCriticalBase: AnketaFirst | null;
1048
+ surveyByHealthSecond: AnketaSecond[] | null;
1049
+ surveyByCriticalSecond: AnketaSecond[] | null;
1050
+ definedAnswersId: {
1051
+ surveyByHealthBase: any;
1052
+ surveyByCriticalBase: any;
1053
+ };
1054
+ birthInfos: BirthInfoGKB[];
1055
+ SaleChanellPolicy: Value;
1056
+ AgentData: AgentData;
1057
+ RegionPolicy: Value;
1058
+ ManagerPolicy: Value;
1059
+ isDisabled: {
1060
+ policyholderForm: boolean;
1061
+ beneficiaryForm: boolean;
1062
+ beneficialOwnerForm: boolean;
1063
+ insuredForm: boolean;
1064
+ policyholdersRepresentativeForm: boolean;
1065
+ productConditionsForm: boolean;
1066
+ recalculationForm: boolean;
1067
+ surveyByHealthBase: boolean;
1068
+ surveyByCriticalBase: boolean;
1069
+ surveyByHealthBasePolicyholder: boolean;
1070
+ surveyByCriticalBasePolicyholder: boolean;
1071
+ insuranceDocument: boolean;
1072
+ };
1073
+ isPolicyholderInsured: boolean = false;
1074
+ isPolicyholderBeneficiary: boolean = false;
1075
+ isActOwnBehalf: boolean = true;
1076
+ hasRepresentative: boolean = false;
1077
+ isPolicyholderIPDL: boolean = false;
1078
+ applicationData: {
1079
+ processInstanceId: number | string;
1080
+ statusCode?: string | null;
1081
+ clientApp?: any;
1082
+ insuredApp?: any;
1083
+ beneficiaryApp?: any;
1084
+ beneficialOwnerApp?: any;
1085
+ spokesmanApp?: any;
1086
+ isTask?: boolean | null;
1087
+ };
1088
+ policyholderForm: PolicyholderForm;
1089
+ policyholderFormKey: string;
1090
+ policyholdersRepresentativeForm: PolicyholdersRepresentativeForm;
1091
+ policyholdersRepresentativeFormKey: string;
1092
+ beneficiaryForm: BeneficiaryForm[];
1093
+ beneficiaryFormKey: string;
1094
+ beneficiaryFormIndex: number;
1095
+ beneficialOwnerForm: BeneficialOwnerForm[];
1096
+ beneficialOwnerFormIndex: number;
1097
+ beneficialOwnerFormKey: string;
1098
+ insuredForm: InsuredForm[];
1099
+ insuredFormKey: string;
1100
+ insuredFormIndex: number;
1101
+ productConditionsForm: ProductConditions;
1102
+ productConditionsFormKey: string;
1103
+ questionnaireByHealth: any;
1104
+ questionnaireByCritical: any[];
1105
+ canBeClaimed: boolean | null;
1106
+ applicationTaskId: string | null;
1107
+ constructor(procuctConditionsTitle?: string) {
1108
+ this.additionalInsuranceTerms = [];
1109
+ this.additionalInsuranceTermsWithout = [];
1110
+ this.signUrls = [];
1111
+ this.epayLink = null;
1112
+ this.affilationResolution = {
1113
+ id: null,
1114
+ processInstanceId: null,
1115
+ number: null,
1116
+ date: null,
1117
+ };
1118
+ this.signedDocumentList = [];
1119
+ this.surveyByHealthBase = null;
1120
+ this.surveyByCriticalBase = null;
1121
+ this.surveyByHealthSecond = null;
1122
+ this.surveyByCriticalSecond = null;
1123
+ this.definedAnswersId = {
1124
+ surveyByHealthBase: {},
1125
+ surveyByCriticalBase: {},
1126
+ };
1127
+ this.birthInfos = [];
1128
+ this.SaleChanellPolicy = new Value();
1129
+ this.AgentData = {
1130
+ agentId: null,
1131
+ manId: 0,
1132
+ fullName: '',
1133
+ officeId: null,
1134
+ officeCode: null,
1135
+ saleChannel: '',
1136
+ managerName: '',
1137
+ };
1138
+ this.RegionPolicy = new Value();
1139
+ this.ManagerPolicy = new Value();
1140
+ this.isDisabled = {
1141
+ policyholderForm: true,
1142
+ beneficiaryForm: true,
1143
+ beneficialOwnerForm: true,
1144
+ insuredForm: true,
1145
+ policyholdersRepresentativeForm: true,
1146
+ productConditionsForm: true,
1147
+ recalculationForm: true,
1148
+ surveyByHealthBase: true,
1149
+ surveyByCriticalBase: true,
1150
+ surveyByHealthBasePolicyholder: true,
1151
+ surveyByCriticalBasePolicyholder: true,
1152
+ insuranceDocument: true,
1153
+ };
1154
+ this.isPolicyholderInsured = false;
1155
+ this.isPolicyholderBeneficiary = false;
1156
+ this.isActOwnBehalf = true;
1157
+ this.hasRepresentative = false;
1158
+ this.applicationData = { processInstanceId: 0 };
1159
+ this.policyholderForm = new PolicyholderForm();
1160
+ this.policyholderFormKey = 'policyholderForm';
1161
+ this.policyholdersRepresentativeForm = new PolicyholdersRepresentativeForm();
1162
+ this.policyholdersRepresentativeFormKey = 'policyholdersRepresentativeForm';
1163
+ this.beneficiaryForm = [new BeneficiaryForm()];
1164
+ this.beneficiaryFormKey = 'beneficiaryForm';
1165
+ this.beneficiaryFormIndex = 0;
1166
+ this.beneficialOwnerForm = [new BeneficialOwnerForm()];
1167
+ this.beneficialOwnerFormIndex = 0;
1168
+ this.beneficialOwnerFormKey = 'beneficialOwnerForm';
1169
+ this.insuredForm = [new InsuredForm()];
1170
+ this.insuredFormKey = 'insuredForm';
1171
+ this.insuredFormIndex = 0;
1172
+ this.productConditionsForm = new ProductConditions();
1173
+ this.productConditionsFormKey = 'productConditionsForm';
1174
+ this.questionnaireByHealth = {};
1175
+ this.questionnaireByCritical = [];
1176
+ this.canBeClaimed = null;
1177
+ this.applicationTaskId = null;
1178
+ }
1179
+ }