hl-core 0.0.7-beta.2 → 0.0.7-beta.21

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 (57) hide show
  1. package/.prettierrc +2 -1
  2. package/api/index.ts +323 -31
  3. package/api/interceptors.ts +10 -1
  4. package/components/Button/Btn.vue +7 -2
  5. package/components/Button/BtnIcon.vue +47 -0
  6. package/components/Button/ScrollButtons.vue +6 -0
  7. package/components/Complex/Content.vue +1 -1
  8. package/components/Complex/ContentBlock.vue +5 -0
  9. package/components/Complex/Page.vue +13 -2
  10. package/components/{Layout → Dialog}/Dialog.vue +7 -11
  11. package/components/Dialog/FamilyDialog.vue +39 -0
  12. package/components/Form/FormBlock.vue +114 -0
  13. package/components/Form/FormSection.vue +18 -0
  14. package/components/Form/FormTextSection.vue +20 -0
  15. package/components/Form/FormToggle.vue +52 -0
  16. package/components/Form/ProductConditionsBlock.vue +68 -0
  17. package/components/Input/EmptyFormField.vue +5 -0
  18. package/components/Input/FileInput.vue +71 -0
  19. package/components/Input/FormInput.vue +171 -0
  20. package/components/Input/PanelInput.vue +133 -0
  21. package/components/Input/RoundedInput.vue +40 -36
  22. package/components/Layout/Drawer.vue +44 -0
  23. package/components/Layout/Header.vue +26 -12
  24. package/components/Layout/Loader.vue +9 -6
  25. package/components/Layout/SettingsPanel.vue +48 -0
  26. package/components/List/ListEmpty.vue +22 -0
  27. package/components/Menu/MenuNav.vue +70 -30
  28. package/components/Menu/MenuNavItem.vue +8 -1
  29. package/components/Pages/Anketa.vue +333 -0
  30. package/components/Pages/Auth.vue +91 -0
  31. package/components/Pages/Documents.vue +108 -0
  32. package/components/Pages/MemberForm.vue +1138 -0
  33. package/components/Pages/ProductAgreement.vue +18 -0
  34. package/components/Pages/ProductConditions.vue +349 -0
  35. package/components/Panel/PanelItem.vue +5 -0
  36. package/components/Panel/PanelSelectItem.vue +20 -0
  37. package/components/Transitions/FadeTransition.vue +5 -0
  38. package/composables/classes.ts +413 -207
  39. package/composables/constants.ts +27 -12
  40. package/composables/index.ts +73 -35
  41. package/composables/styles.ts +31 -7
  42. package/layouts/clear.vue +1 -1
  43. package/layouts/default.vue +72 -6
  44. package/layouts/full.vue +6 -0
  45. package/nuxt.config.ts +5 -2
  46. package/package.json +17 -11
  47. package/pages/500.vue +85 -0
  48. package/plugins/helperFunctionsPlugins.ts +10 -2
  49. package/plugins/storePlugin.ts +6 -5
  50. package/store/data.store.js +1858 -527
  51. package/store/member.store.ts +291 -0
  52. package/store/messages.ts +152 -34
  53. package/store/rules.js +26 -28
  54. package/tailwind.config.js +10 -0
  55. package/types/index.ts +250 -0
  56. package/models/index.ts +0 -23
  57. /package/store/{form.store.js → form.store.ts} +0 -0
@@ -1,21 +1,54 @@
1
1
  import { formatDate } from '.';
2
- import {
3
- RouteLocationNormalized,
4
- RouteLocationNormalizedLoaded,
5
- } from 'vue-router';
2
+ import { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-router';
6
3
 
7
- export class MenuItem {
4
+ type LinkType = Partial<RouteLocationNormalized> | Partial<RouteLocationNormalizedLoaded> | string | null | boolean;
5
+
6
+ class MenuItemConfig {
8
7
  id: any;
9
8
  title: string | null;
10
- link?: RouteLocationNormalized | RouteLocationNormalizedLoaded;
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
+
11
20
  constructor(
12
21
  id: any = null,
13
22
  title: string | null = null,
14
- link?: RouteLocationNormalized | RouteLocationNormalizedLoaded,
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,
15
33
  ) {
16
34
  this.id = id;
17
35
  this.title = title;
18
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);
19
52
  }
20
53
  }
21
54
 
@@ -26,13 +59,7 @@ export class Value {
26
59
  nameKz: string | number | null;
27
60
  ids: string | number | null;
28
61
 
29
- constructor(
30
- id: string | number | null = null,
31
- nameRu: string | number | null = null,
32
- nameKz: string | number | null = null,
33
- code: string | number | null = null,
34
- ids: string | number | null = null,
35
- ) {
62
+ constructor(id: string | number | null = null, nameRu: string | null = null, nameKz: string | null = null, code: string | null = null, ids: string | null = null) {
36
63
  this.id = id;
37
64
  this.code = code;
38
65
  this.nameRu = nameRu;
@@ -41,6 +68,59 @@ export class Value {
41
68
  }
42
69
  }
43
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
+
44
124
  export class MenuOption {
45
125
  text: string | null;
46
126
  subtitle: string | null;
@@ -48,13 +128,7 @@ export class MenuOption {
48
128
  variant: string | null;
49
129
  size: string | null;
50
130
 
51
- constructor(
52
- text = 'Text',
53
- subtitle = 'Subtitle',
54
- icon = 'mdi-content-copy',
55
- variant = 'text',
56
- size = 'small',
57
- ) {
131
+ constructor(text = 'Text', subtitle = 'Subtitle', icon = 'mdi-content-copy', variant = 'text', size = 'small') {
58
132
  this.text = text;
59
133
  this.subtitle = subtitle;
60
134
  this.icon = icon;
@@ -79,17 +153,11 @@ export const InitialColumns = () => {
79
153
  export class User {
80
154
  login: string | null;
81
155
  password: string | null;
82
- roles: string[] | null;
156
+ roles: string[];
83
157
  id: string | null;
84
158
  fullName: string | null;
85
159
 
86
- constructor(
87
- login: string | null = null,
88
- password: string | null = null,
89
- roles: string[] = [],
90
- id: string | null = null,
91
- fullName: string | null = null,
92
- ) {
160
+ constructor(login: string | null = null, password: string | null = null, roles: string[] = [], id: string | null = null, fullName: string | null = null) {
93
161
  this.login = login;
94
162
  this.password = password;
95
163
  this.roles = roles;
@@ -138,28 +206,19 @@ class Person {
138
206
  this.id = id;
139
207
  this.type = type;
140
208
  this.iin = iin;
141
- this.longName =
142
- !!lastName && !!firstName && !!middleName
143
- ? (((((lastName as string) + firstName) as string) +
144
- middleName) as string)
145
- : longName;
209
+ this.longName = !!lastName && !!firstName && !!middleName ? (((((lastName as string) + firstName) as string) + middleName) as string) : longName;
146
210
  this.lastName = lastName;
147
211
  this.firstName = firstName;
148
212
  this.middleName = middleName;
149
213
  this.birthDate = birthDate;
150
214
  this.gender = gender;
151
- this.genderName =
152
- gender && gender.nameRu !== null ? (gender.nameRu as string) : genderName;
215
+ this.genderName = gender && gender.nameRu !== null ? (gender.nameRu as string) : genderName;
153
216
  this.birthPlace = birthPlace;
154
217
  this.age = age;
155
- this.registrationDate = new Date(
156
- Date.now() - new Date().getTimezoneOffset() * 60 * 1000,
157
- )
158
- .toISOString()
159
- .slice(0, -1);
218
+ this.registrationDate = new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1);
160
219
  }
161
220
 
162
- resetPerson(clearIinAndPhone = true) {
221
+ resetPerson(clearIinAndPhone: boolean = true) {
163
222
  this.id = 0;
164
223
  this.type = 1;
165
224
  if (clearIinAndPhone === true) {
@@ -174,11 +233,7 @@ class Person {
174
233
  this.genderName = null;
175
234
  this.birthPlace = new Value();
176
235
  this.age = null;
177
- this.registrationDate = new Date(
178
- Date.now() - new Date().getTimezoneOffset() * 60 * 1000,
179
- )
180
- .toISOString()
181
- .slice(0, -1);
236
+ this.registrationDate = new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1);
182
237
  }
183
238
 
184
239
  formatDate(date: any): Date | null {
@@ -210,14 +265,12 @@ class Person {
210
265
  getAgeByBirthDate() {
211
266
  const date = this.formatDate(this.birthDate);
212
267
  if (date) {
213
- const age = Math.abs(
214
- new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970,
215
- );
268
+ const age = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
216
269
  if (new Date(date) < new Date(Date.now()) && age > 0) {
217
- return age;
270
+ return age.toString();
218
271
  }
219
272
  } else {
220
- return '';
273
+ return null;
221
274
  }
222
275
  }
223
276
  }
@@ -302,7 +355,28 @@ export class Contragent extends Person {
302
355
  }
303
356
  }
304
357
 
305
- class Form extends Person {
358
+ export class Member extends Person {
359
+ verifyType: any;
360
+ verifyDate: any;
361
+ postIndex: string | null;
362
+ isPdl: boolean;
363
+ migrationCard: string | null;
364
+ migrationCardIssueDate: string | null;
365
+ migrationCardExpireDate: string | null;
366
+ confirmDocType: string | null;
367
+ confirmDocNumber: string | null;
368
+ confirmDocIssueDate: string | null;
369
+ confirmDocExpireDate: string | null;
370
+ notaryLongName: string | null;
371
+ notaryLicenseNumber: string | null;
372
+ notaryLicenseDate: string | null;
373
+ notaryLicenseIssuer: string | null;
374
+ jurLongName: string | null;
375
+ fullNameRod: string | null;
376
+ confirmDocTypeKz: string | null;
377
+ confirmDocTypeRod: string | null;
378
+ isNotary: boolean;
379
+ insurancePay: Value;
306
380
  job: string | null;
307
381
  jobPosition: string | null;
308
382
  jobPlace: string | null;
@@ -333,7 +407,7 @@ class Form extends Person {
333
407
  email: string | null;
334
408
  address: string | null;
335
409
  familyStatus: Value;
336
- isTerror: Value | null;
410
+ isTerror: null;
337
411
  relationDegree: Value;
338
412
  isDisability: Value;
339
413
  disabilityGroup: Value | null;
@@ -344,6 +418,9 @@ class Form extends Person {
344
418
  _emailPattern: RegExp;
345
419
  gotFromInsis: boolean | null;
346
420
  gosPersonData: any;
421
+ hasAgreement: boolean | null;
422
+ otpTokenId: string | null;
423
+ otpCode: string | null;
347
424
  constructor(
348
425
  id = 0,
349
426
  type = 1,
@@ -393,21 +470,43 @@ class Form extends Person {
393
470
  isDisability = new Value(),
394
471
  disabilityGroupId = new Value(),
395
472
  percentageOfPayoutAmount = null,
473
+ migrationCard = null,
474
+ migrationCardIssueDate = null,
475
+ migrationCardExpireDate = null,
476
+ confirmDocType = null,
477
+ confirmDocNumber = null,
478
+ confirmDocIssueDate = null,
479
+ confirmDocExpireDate = null,
480
+ notaryLongName = null,
481
+ notaryLicenseNumber = null,
482
+ notaryLicenseDate = null,
483
+ notaryLicenseIssuer = null,
484
+ jurLongName = null,
485
+ fullNameRod = null,
486
+ confirmDocTypeKz = null,
487
+ confirmDocTypeRod = null,
488
+ isNotary = false,
396
489
  ) {
397
- super(
398
- id,
399
- type,
400
- iin,
401
- longName,
402
- lastName,
403
- firstName,
404
- middleName,
405
- birthDate,
406
- gender,
407
- genderName,
408
- birthPlace,
409
- age,
410
- );
490
+ super(id, type, iin, longName, lastName, firstName, middleName, birthDate, gender, genderName, birthPlace, age);
491
+ this.postIndex = null;
492
+ this.isPdl = false;
493
+ this.migrationCard = migrationCard;
494
+ this.migrationCardIssueDate = migrationCardIssueDate;
495
+ this.migrationCardExpireDate = migrationCardExpireDate;
496
+ this.confirmDocType = confirmDocType;
497
+ this.confirmDocNumber = confirmDocNumber;
498
+ this.confirmDocIssueDate = confirmDocIssueDate;
499
+ this.confirmDocExpireDate = confirmDocExpireDate;
500
+ this.notaryLongName = notaryLongName;
501
+ this.notaryLicenseNumber = notaryLicenseNumber;
502
+ this.notaryLicenseDate = notaryLicenseDate;
503
+ this.notaryLicenseIssuer = notaryLicenseIssuer;
504
+ this.jurLongName = jurLongName;
505
+ this.fullNameRod = fullNameRod;
506
+ this.confirmDocTypeKz = confirmDocTypeKz;
507
+ this.confirmDocTypeRod = confirmDocTypeRod;
508
+ this.isNotary = isNotary;
509
+ this.insurancePay = new Value();
411
510
  this.job = job;
412
511
  this.jobPosition = jobPosition;
413
512
  this.jobPlace = jobPlace;
@@ -436,6 +535,8 @@ class Form extends Person {
436
535
  this.phoneNumber = phoneNumber;
437
536
  this.homePhone = homePhone;
438
537
  this.email = email;
538
+ this.otpTokenId = null;
539
+ this.otpCode = null;
439
540
  this.address = address;
440
541
  this.familyStatus = familyStatus;
441
542
  this.isTerror = isTerror;
@@ -449,9 +550,10 @@ class Form extends Person {
449
550
  this._emailPattern = /.+@.+\..+/;
450
551
  this.gotFromInsis = true;
451
552
  this.gosPersonData = null;
553
+ this.hasAgreement = null;
452
554
  }
453
555
 
454
- resetForm(clearIinAndPhone = true) {
556
+ resetMember(clearIinAndPhone: boolean = true) {
455
557
  super.resetPerson(clearIinAndPhone);
456
558
  this.job = null;
457
559
  this.jobPosition = null;
@@ -484,13 +586,31 @@ class Form extends Person {
484
586
  this.email = null;
485
587
  this.address = null;
486
588
  this.familyStatus = new Value();
487
- this.isTerror = new Value();
589
+ this.isTerror = null;
488
590
  this.relationDegree = new Value();
489
591
  this.isDisability = new Value();
490
592
  this.disabilityGroup = null;
491
593
  this.percentageOfPayoutAmount = null;
492
594
  this.gotFromInsis = true;
493
595
  this.gosPersonData = null;
596
+ this.hasAgreement = null;
597
+ this.insurancePay = new Value();
598
+ this.migrationCard = null;
599
+ this.migrationCardIssueDate = null;
600
+ this.migrationCardExpireDate = null;
601
+ this.confirmDocType = null;
602
+ this.confirmDocNumber = null;
603
+ this.confirmDocIssueDate = null;
604
+ this.confirmDocExpireDate = null;
605
+ this.notaryLongName = null;
606
+ this.notaryLicenseNumber = null;
607
+ this.notaryLicenseDate = null;
608
+ this.notaryLicenseIssuer = null;
609
+ this.jurLongName = null;
610
+ this.fullNameRod = null;
611
+ this.confirmDocTypeKz = null;
612
+ this.confirmDocTypeRod = null;
613
+ this.isNotary = false;
494
614
  }
495
615
 
496
616
  getPattern(pattern: string) {
@@ -510,133 +630,56 @@ class Form extends Person {
510
630
  }
511
631
 
512
632
  getFullNameShorted() {
513
- return this.validateFullName()
514
- ? `${this.lastName} ${this.firstName?.charAt(0)}. ${
515
- this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''
516
- }`
517
- : null;
633
+ return this.validateFullName() ? `${this.lastName} ${this.firstName?.charAt(0)}. ${this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''}` : null;
518
634
  }
519
635
 
520
636
  getFullName() {
521
- return this.validateFullName()
522
- ? this.lastName + ' ' + this.firstName + ' ' + this.middleName != ''
523
- ? this.middleName?.charAt(0)
524
- : ''
525
- : null;
637
+ return this.validateFullName() ? (this.lastName + ' ' + this.firstName + ' ' + this.middleName != '' ? this.middleName?.charAt(0) : '') : null;
526
638
  }
527
639
  }
528
640
 
529
- export class PolicyholderForm extends Form {
641
+ export class PolicyholderForm extends Member {
530
642
  constructor(...args: any) {
531
643
  super(...args);
532
644
  }
533
645
  }
534
646
 
535
- export class InsuredForm extends Form {
647
+ export class InsuredForm extends Member {
536
648
  constructor(...args: any) {
537
649
  super(...args);
538
650
  }
539
651
  }
540
652
 
541
- export class BeneficiaryForm extends Form {
542
- insurancePay: Value;
653
+ export class BeneficiaryForm extends Member {
543
654
  constructor(...args: any) {
544
655
  super(...args);
545
- this.insurancePay = new Value();
546
656
  }
547
657
  }
548
658
 
549
- export class BeneficialOwnerForm extends Form {
659
+ export class BeneficialOwnerForm extends Member {
550
660
  constructor(...args: any) {
551
661
  super(...args);
552
662
  }
553
663
  }
554
664
 
555
- export class PolicyholdersRepresentativeForm extends Form {
556
- migrationCard: string | null;
557
- migrationCardIssueDate: string | null;
558
- migrationCardExpireDate: string | null;
559
- confirmDocType: string | null;
560
- confirmDocNumber: string | null;
561
- confirmDocIssueDate: string | null;
562
- confirmDocExpireDate: string | null;
563
- notaryLongName: string | null;
564
- notaryLicenseNumber: string | null;
565
- notaryLicenseDate: string | null;
566
- notaryLicenseIssuer: string | null;
567
- jurLongName: string | null;
568
- fullNameRod: string | null;
569
- confirmDocTypeKz: string | null;
570
- confirmDocTypeRod: string | null;
571
- isNotary: boolean | null;
572
- constructor(
573
- migrationCard = null,
574
- migrationCardIssueDate = null,
575
- migrationCardExpireDate = null,
576
- confirmDocType = null,
577
- confirmDocNumber = null,
578
- confirmDocIssueDate = null,
579
- confirmDocExpireDate = null,
580
- notaryLongName = null,
581
- notaryLicenseNumber = null,
582
- notaryLicenseDate = null,
583
- notaryLicenseIssuer = null,
584
- jurLongName = null,
585
- fullNameRod = null,
586
- confirmDocTypeKz = null,
587
- confirmDocTypeRod = null,
588
- isNotary = false,
589
- ...args: any
590
- ) {
665
+ export class PolicyholdersRepresentativeForm extends Member {
666
+ constructor(...args: any) {
591
667
  super(...args);
592
- this.migrationCard = migrationCard;
593
- this.migrationCardIssueDate = migrationCardIssueDate;
594
- this.migrationCardExpireDate = migrationCardExpireDate;
595
- this.confirmDocType = confirmDocType;
596
- this.confirmDocNumber = confirmDocNumber;
597
- this.confirmDocIssueDate = confirmDocIssueDate;
598
- this.confirmDocExpireDate = confirmDocExpireDate;
599
- this.notaryLongName = notaryLongName;
600
- this.notaryLicenseNumber = notaryLicenseNumber;
601
- this.notaryLicenseDate = notaryLicenseDate;
602
- this.notaryLicenseIssuer = notaryLicenseIssuer;
603
- this.jurLongName = jurLongName;
604
- this.fullNameRod = fullNameRod;
605
- this.confirmDocTypeKz = confirmDocTypeKz;
606
- this.confirmDocTypeRod = confirmDocTypeRod;
607
- this.isNotary = isNotary;
608
- }
609
-
610
- resetMember(clearIinAndPhone = true) {
611
- super.resetForm(clearIinAndPhone);
612
- this.migrationCard = null;
613
- this.migrationCardIssueDate = null;
614
- this.migrationCardExpireDate = null;
615
- this.confirmDocType = null;
616
- this.confirmDocNumber = null;
617
- this.confirmDocIssueDate = null;
618
- this.confirmDocExpireDate = null;
619
- this.notaryLongName = null;
620
- this.notaryLicenseNumber = null;
621
- this.notaryLicenseDate = null;
622
- this.notaryLicenseIssuer = null;
623
- this.jurLongName = null;
624
- this.fullNameRod = null;
625
- this.confirmDocTypeKz = null;
626
- this.confirmDocTypeRod = null;
627
- this.isNotary = false;
628
668
  }
629
669
  }
630
670
 
631
671
  export class ProductConditions {
672
+ signDate: string | null;
673
+ birthDate: string | null;
674
+ gender: Value;
632
675
  insuranceCase: string | null;
633
676
  coverPeriod: string | null;
634
677
  payPeriod: string | null;
635
678
  termsOfInsurance: string | null;
636
679
  annualIncome: string | null;
637
680
  processIndexRate: Value;
638
- requestedSumInsured: string | null;
639
- insurancePremiumPerMonth: string | null;
681
+ requestedSumInsured: number | string | null;
682
+ insurancePremiumPerMonth: number | string | null;
640
683
  establishingGroupDisabilityFromThirdYear: string | null;
641
684
  possibilityToChange: string | null;
642
685
  deathOfInsuredDueToAccident: Value;
@@ -687,6 +730,9 @@ export class ProductConditions {
687
730
  riskGroup = new Value(),
688
731
  riskGroup2 = new Value(),
689
732
  ) {
733
+ this.signDate = null;
734
+ this.birthDate = null;
735
+ this.gender = new Value();
690
736
  this.insuranceCase = insuranceCase;
691
737
  this.coverPeriod = coverPeriod;
692
738
  this.payPeriod = payPeriod;
@@ -695,8 +741,7 @@ export class ProductConditions {
695
741
  this.processIndexRate = processIndexRate;
696
742
  this.requestedSumInsured = requestedSumInsured;
697
743
  this.insurancePremiumPerMonth = insurancePremiumPerMonth;
698
- this.establishingGroupDisabilityFromThirdYear =
699
- establishingGroupDisabilityFromThirdYear;
744
+ this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
700
745
  this.possibilityToChange = possibilityToChange;
701
746
  this.deathOfInsuredDueToAccident = deathOfInsuredDueToAccident;
702
747
  this.establishingGroupDisability = establishingGroupDisability;
@@ -720,15 +765,59 @@ export class ProductConditions {
720
765
  }
721
766
 
722
767
  export class DataStoreClass {
768
+ // IMP Контроллер фич
769
+ controls: {
770
+ // Проверка на роль при авторизации
771
+ onAuth: boolean;
772
+ // Согласие на главной странице
773
+ hasAgreement: boolean;
774
+ // Наличие анкеты
775
+ hasAnketa: boolean;
776
+ // Подтягивание с ГБДФЛ
777
+ hasGBDFL: boolean;
778
+ // Подтягивание с ГКБ
779
+ hasGKB: boolean;
780
+ // Подтягивание с ИНСИС
781
+ hasInsis: boolean;
782
+ // Калькулятор без ввода данных
783
+ hasCalculator: boolean;
784
+ };
785
+ hasLayoutMargins: boolean;
786
+ readonly product: string | null;
787
+ showNav: boolean;
788
+ menuItems: MenuItem[];
789
+ menu: {
790
+ title: string;
791
+ hasBack: boolean;
792
+ loading: boolean;
793
+ backIcon: string;
794
+ onBack: any;
795
+ onLink: any;
796
+ selectedItem: MenuItem;
797
+ };
798
+ settings: {
799
+ open: boolean;
800
+ overlay: boolean;
801
+ items: MenuItem[];
802
+ };
803
+ buttons: MenuItem[];
804
+ panelAction: string | null;
805
+ panel: {
806
+ open: boolean;
807
+ overlay: boolean;
808
+ title: string;
809
+ clear: Function | void;
810
+ };
723
811
  historyPageIndex: number;
724
812
  historyPageSize: number;
725
813
  historyTotalItems: number;
726
814
  isColumnAsc = { ...InitialColumns() };
727
815
  idleKey: number;
728
- processList: any[];
816
+ processList: Item[] | null;
729
817
  countries: Value[];
730
818
  citizenshipCountries: Value[];
731
819
  taxCountries: Value[];
820
+ addTaxCountries: Value[];
732
821
  states: Value[];
733
822
  regions: Value[];
734
823
  cities: Value[];
@@ -738,40 +827,93 @@ export class DataStoreClass {
738
827
  documentIssuers: Value[];
739
828
  familyStatuses: Value[];
740
829
  relations: Value[];
741
- surveyByHealthSecond: any[];
742
- surveyByCriticalSecond: any[];
743
- questionRefs: any[];
830
+ questionRefs: Value[];
744
831
  epayLink: string;
745
832
  residents: Value[];
746
833
  ipdl: Value[];
747
834
  economySectorCode: Value[];
748
835
  gender: Value[];
749
836
  fontSize: number;
750
- isFontChangerOpen = false;
751
- isLoading = false;
752
- userNotFound = false;
837
+ isFontChangerOpen: boolean = false;
838
+ isLoading: boolean = false;
839
+ userNotFound: boolean = false;
753
840
  user: User;
754
- accessToken = null;
755
- refreshToken = null;
841
+ accessToken: string | null = null;
842
+ refreshToken: string | null = null;
756
843
  processCoverTypeSum: any[];
757
- taskList: any[];
758
- processHistory: any[];
844
+ processIndexRate: any[];
845
+ processPaymentPeriod: any[];
846
+ taskList: TaskListItem[];
847
+ processHistory: TaskHistory[];
759
848
  contragentList: any[];
760
849
  contragentFormKey: string;
761
850
  processCode: number | null;
762
851
  groupCode: string;
763
- userGroups: any[];
852
+ userGroups: Item[];
764
853
  onMainPage: boolean;
854
+ SaleChanellPolicyList: any[];
855
+ RegionPolicyList: any[];
856
+ ManagerPolicyList: any[];
857
+ AgentDataList: any[];
858
+ riskGroup: any[];
765
859
  constructor() {
860
+ this.controls = {
861
+ onAuth: false,
862
+ hasAnketa: true,
863
+ hasAgreement: true,
864
+ hasGBDFL: true,
865
+ hasGKB: false,
866
+ hasInsis: false,
867
+ hasCalculator: false,
868
+ };
869
+ this.hasLayoutMargins = true;
870
+ this.processIndexRate = [];
871
+ this.processPaymentPeriod = [];
872
+ this.questionRefs = [];
873
+ this.SaleChanellPolicyList = [];
874
+ this.RegionPolicyList = [];
875
+ this.ManagerPolicyList = [];
876
+ this.AgentDataList = [];
877
+ this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as string) : null;
878
+ this.showNav = true;
879
+ this.menuItems = [];
880
+ this.menu = {
881
+ title: '',
882
+ hasBack: false,
883
+ loading: false,
884
+ backIcon: 'mdi-arrow-left',
885
+ onBack: {},
886
+ onLink: {},
887
+ selectedItem: new MenuItem(),
888
+ };
889
+ this.settings = {
890
+ open: false,
891
+ overlay: false,
892
+ items: [],
893
+ };
894
+ this.buttons = [];
895
+ this.panel = {
896
+ open: false,
897
+ overlay: false,
898
+ title: '',
899
+ clear: function () {
900
+ const panelActions = document.getElementById('panel-actions');
901
+ if (panelActions) {
902
+ panelActions.innerHTML = '';
903
+ }
904
+ },
905
+ };
906
+ this.panelAction = null;
766
907
  this.historyPageIndex = 1;
767
908
  this.historyPageSize = 10;
768
909
  this.historyTotalItems = 0;
769
910
  this.isColumnAsc = { ...InitialColumns() };
770
911
  this.idleKey = 999;
771
- this.processList = [];
912
+ this.processList = null;
772
913
  this.countries = [];
773
914
  this.citizenshipCountries = [];
774
915
  this.taxCountries = [];
916
+ this.addTaxCountries = [];
775
917
  this.states = [];
776
918
  this.regions = [];
777
919
  this.cities = [];
@@ -781,18 +923,11 @@ export class DataStoreClass {
781
923
  this.documentIssuers = [];
782
924
  this.familyStatuses = [];
783
925
  this.relations = [];
784
- this.surveyByHealthSecond = [];
785
- this.surveyByCriticalSecond = [];
786
- this.questionRefs = [];
787
926
  this.epayLink = '';
788
927
  this.residents = [];
789
928
  this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
790
929
  this.economySectorCode = [];
791
- this.gender = [
792
- new Value(0, null),
793
- new Value(1, 'Мужской'),
794
- new Value(2, 'Женский'),
795
- ];
930
+ this.gender = [new Value(0, null), new Value(1, 'Мужской'), new Value(2, 'Женский')];
796
931
  this.fontSize = 14;
797
932
  this.isFontChangerOpen = false;
798
933
  this.isLoading = false;
@@ -809,42 +944,98 @@ export class DataStoreClass {
809
944
  this.groupCode = 'Work';
810
945
  this.userGroups = [];
811
946
  this.onMainPage = true;
947
+ this.riskGroup = [
948
+ {
949
+ id: '1',
950
+ nameKz: '',
951
+ nameRu: '1',
952
+ isDefault: true,
953
+ },
954
+ {
955
+ id: '2',
956
+ nameKz: '',
957
+ nameRu: '2',
958
+ },
959
+ {
960
+ id: '3',
961
+ nameKz: '',
962
+ nameRu: '3',
963
+ },
964
+ {
965
+ id: '4',
966
+ nameKz: '',
967
+ nameRu: '4',
968
+ },
969
+ {
970
+ id: '5',
971
+ nameKz: '',
972
+ nameRu: '5',
973
+ },
974
+ ];
812
975
  }
813
976
  }
814
977
 
815
- export class StoreClass {
816
- birthInfos: any[];
978
+ export class FormStoreClass {
979
+ additionalInsuranceTerms: AddCover[];
980
+ additionalInsuranceTermsWithout: AddCover[];
981
+ signUrl: string | null;
982
+ affilationResolution: {
983
+ id: string | number | null;
984
+ processInstanceId: string | number | null;
985
+ number: string | number | null;
986
+ date: string | number | null;
987
+ };
988
+ signedDocumentList: IDocument[];
989
+ surveyByHealthBase: AnketaFirst | null;
990
+ surveyByCriticalBase: AnketaFirst | null;
991
+ surveyByHealthSecond: AnketaSecond[] | null;
992
+ surveyByCriticalSecond: AnketaSecond[] | null;
993
+ definedAnswersId: {
994
+ surveyByHealthBase: any;
995
+ surveyByCriticalBase: any;
996
+ };
997
+ birthInfos: BirthInfoGKB[];
817
998
  SaleChanellPolicy: Value;
818
999
  AgentData: {
819
1000
  agentId: null;
820
- manId: 0;
821
- fullName: '';
1001
+ manId: number;
1002
+ fullName: string;
822
1003
  officeId: null;
823
1004
  officeCode: null;
824
- saleChannel: '';
825
- managerName: '';
1005
+ saleChannel: string;
1006
+ managerName: string;
826
1007
  };
827
1008
  RegionPolicy: Value;
828
1009
  ManagerPolicy: Value;
829
1010
  isDisabled: {
830
- policyholderForm: true;
831
- beneficiaryForm: true;
832
- beneficialOwnerForm: true;
833
- insuredForm: true;
834
- policyholdersRepresentativeForm: true;
835
- productConditionsForm: true;
836
- recalculationForm: true;
837
- surveyByHealthBase: true;
838
- surveyByCriticalBase: true;
839
- surveyByHealthBasePolicyholder: true;
840
- surveyByCriticalBasePolicyholder: true;
841
- insuranceDocument: true;
1011
+ policyholderForm: boolean;
1012
+ beneficiaryForm: boolean;
1013
+ beneficialOwnerForm: boolean;
1014
+ insuredForm: boolean;
1015
+ policyholdersRepresentativeForm: boolean;
1016
+ productConditionsForm: boolean;
1017
+ recalculationForm: boolean;
1018
+ surveyByHealthBase: boolean;
1019
+ surveyByCriticalBase: boolean;
1020
+ surveyByHealthBasePolicyholder: boolean;
1021
+ surveyByCriticalBasePolicyholder: boolean;
1022
+ insuranceDocument: boolean;
842
1023
  };
843
1024
  isPolicyholderInsured: boolean = false;
844
1025
  isPolicyholderBeneficiary: boolean = false;
845
1026
  isActOwnBehalf: boolean = true;
846
1027
  hasRepresentative: boolean = false;
847
- applicationData: { processInstanceId: number | string };
1028
+ isPolicyholderIPDL: boolean = false;
1029
+ applicationData: {
1030
+ processInstanceId: number | string;
1031
+ statusCode?: string | null;
1032
+ clientApp?: any;
1033
+ insuredApp?: any;
1034
+ beneficiaryApp?: any;
1035
+ beneficialOwnerApp?: any;
1036
+ spokesmanApp?: any;
1037
+ isTask?: boolean | null;
1038
+ };
848
1039
  policyholderForm: PolicyholderForm;
849
1040
  policyholderFormKey: string;
850
1041
  policyholdersRepresentativeForm: PolicyholdersRepresentativeForm;
@@ -864,8 +1055,25 @@ export class StoreClass {
864
1055
  questionnaireByCritical: any[];
865
1056
  canBeClaimed: boolean | null;
866
1057
  applicationTaskId: string | null;
867
- otpTokenId: string | null;
868
- constructor(procuctConditionsTitle: string) {
1058
+ constructor(procuctConditionsTitle?: string) {
1059
+ this.additionalInsuranceTerms = [];
1060
+ this.additionalInsuranceTermsWithout = [];
1061
+ this.signUrl = null;
1062
+ this.affilationResolution = {
1063
+ id: null,
1064
+ processInstanceId: null,
1065
+ number: null,
1066
+ date: null,
1067
+ };
1068
+ this.signedDocumentList = [];
1069
+ this.surveyByHealthBase = null;
1070
+ this.surveyByCriticalBase = null;
1071
+ this.surveyByHealthSecond = null;
1072
+ this.surveyByCriticalSecond = null;
1073
+ this.definedAnswersId = {
1074
+ surveyByHealthBase: {},
1075
+ surveyByCriticalBase: {},
1076
+ };
869
1077
  this.birthInfos = [];
870
1078
  this.SaleChanellPolicy = new Value();
871
1079
  this.AgentData = {
@@ -900,8 +1108,7 @@ export class StoreClass {
900
1108
  this.applicationData = { processInstanceId: 0 };
901
1109
  this.policyholderForm = new PolicyholderForm();
902
1110
  this.policyholderFormKey = 'policyholderForm';
903
- this.policyholdersRepresentativeForm =
904
- new PolicyholdersRepresentativeForm();
1111
+ this.policyholdersRepresentativeForm = new PolicyholdersRepresentativeForm();
905
1112
  this.policyholdersRepresentativeFormKey = 'policyholdersRepresentativeForm';
906
1113
  this.beneficiaryForm = [new BeneficiaryForm()];
907
1114
  this.beneficiaryFormKey = 'beneficiaryForm';
@@ -918,6 +1125,5 @@ export class StoreClass {
918
1125
  this.questionnaireByCritical = [];
919
1126
  this.canBeClaimed = null;
920
1127
  this.applicationTaskId = null;
921
- this.otpTokenId = null;
922
1128
  }
923
1129
  }