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