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

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 (53) hide show
  1. package/.prettierrc +2 -1
  2. package/api/index.ts +295 -20
  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/Complex/Content.vue +1 -1
  7. package/components/Complex/ContentBlock.vue +5 -0
  8. package/components/Complex/Page.vue +13 -2
  9. package/components/{Layout → Dialog}/Dialog.vue +7 -11
  10. package/components/Dialog/FamilyDialog.vue +39 -0
  11. package/components/Form/Documents.vue +107 -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 +41 -0
  16. package/components/Form/MemberForm.vue +1132 -0
  17. package/components/Form/ProductConditions.vue +343 -0
  18. package/components/Form/ProductConditionsBlock.vue +68 -0
  19. package/components/Input/EmptyFormField.vue +5 -0
  20. package/components/Input/FileInput.vue +71 -0
  21. package/components/Input/FormInput.vue +170 -0
  22. package/components/Input/PanelInput.vue +132 -0
  23. package/components/Input/RoundedInput.vue +39 -36
  24. package/components/Layout/Drawer.vue +42 -0
  25. package/components/Layout/Header.vue +25 -11
  26. package/components/Layout/Loader.vue +9 -6
  27. package/components/Layout/SettingsPanel.vue +48 -0
  28. package/components/List/ListEmpty.vue +22 -0
  29. package/components/Menu/MenuNav.vue +70 -30
  30. package/components/Menu/MenuNavItem.vue +8 -1
  31. package/components/Panel/PanelItem.vue +5 -0
  32. package/components/Panel/PanelSelectItem.vue +20 -0
  33. package/components/Transitions/FadeTransition.vue +5 -0
  34. package/composables/classes.ts +401 -201
  35. package/composables/constants.ts +27 -12
  36. package/composables/index.ts +72 -35
  37. package/composables/styles.ts +31 -7
  38. package/layouts/clear.vue +1 -1
  39. package/layouts/default.vue +72 -6
  40. package/layouts/full.vue +6 -0
  41. package/nuxt.config.ts +5 -2
  42. package/package.json +17 -11
  43. package/pages/500.vue +85 -0
  44. package/plugins/helperFunctionsPlugins.ts +10 -2
  45. package/plugins/storePlugin.ts +6 -5
  46. package/store/data.store.js +1871 -526
  47. package/store/member.store.ts +291 -0
  48. package/store/messages.ts +152 -34
  49. package/store/rules.js +26 -28
  50. package/tailwind.config.js +10 -0
  51. package/types/index.ts +120 -0
  52. package/models/index.ts +0 -23
  53. /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
+ 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,125 +630,48 @@ 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;
@@ -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,55 @@ export class ProductConditions {
720
765
  }
721
766
 
722
767
  export class DataStoreClass {
768
+ // IMP Контроллер фич
769
+ controls: {
770
+ // Проверка на роль при авторизации
771
+ onAuth: boolean;
772
+ // Подтягивание с ГБДФЛ
773
+ hasGBDFL: boolean;
774
+ // Подтягивание с ГКБ
775
+ hasGKB: boolean;
776
+ // Подтягивание с ИНСИС
777
+ hasInsis: boolean;
778
+ // Калькулятор без ввода данных
779
+ hasCalculator: boolean;
780
+ };
781
+ hasLayoutMargins: boolean;
782
+ readonly product: string | null;
783
+ showNav: boolean;
784
+ menuItems: MenuItem[];
785
+ menu: {
786
+ title: string;
787
+ hasBack: boolean;
788
+ loading: boolean;
789
+ backIcon: string;
790
+ onBack: any;
791
+ onLink: any;
792
+ selectedItem: MenuItem;
793
+ };
794
+ settings: {
795
+ open: boolean;
796
+ overlay: boolean;
797
+ items: MenuItem[];
798
+ };
799
+ buttons: MenuItem[];
800
+ panelAction: string | null;
801
+ panel: {
802
+ open: boolean;
803
+ overlay: boolean;
804
+ title: string;
805
+ clear: Function | void;
806
+ };
723
807
  historyPageIndex: number;
724
808
  historyPageSize: number;
725
809
  historyTotalItems: number;
726
810
  isColumnAsc = { ...InitialColumns() };
727
811
  idleKey: number;
728
- processList: any[];
812
+ processList: Item[] | null;
729
813
  countries: Value[];
730
814
  citizenshipCountries: Value[];
731
815
  taxCountries: Value[];
816
+ addTaxCountries: Value[];
732
817
  states: Value[];
733
818
  regions: Value[];
734
819
  cities: Value[];
@@ -738,8 +823,6 @@ export class DataStoreClass {
738
823
  documentIssuers: Value[];
739
824
  familyStatuses: Value[];
740
825
  relations: Value[];
741
- surveyByHealthSecond: any[];
742
- surveyByCriticalSecond: any[];
743
826
  questionRefs: any[];
744
827
  epayLink: string;
745
828
  residents: Value[];
@@ -747,31 +830,115 @@ export class DataStoreClass {
747
830
  economySectorCode: Value[];
748
831
  gender: Value[];
749
832
  fontSize: number;
750
- isFontChangerOpen = false;
751
- isLoading = false;
752
- userNotFound = false;
833
+ isFontChangerOpen: boolean = false;
834
+ isLoading: boolean = false;
835
+ userNotFound: boolean = false;
753
836
  user: User;
754
- accessToken = null;
755
- refreshToken = null;
837
+ accessToken: string | null = null;
838
+ refreshToken: string | null = null;
756
839
  processCoverTypeSum: any[];
757
- taskList: any[];
758
- processHistory: any[];
840
+ processIndexRate: any[];
841
+ processPaymentPeriod: any[];
842
+ additionalInsuranceTerms: any[];
843
+ additionalInsuranceTermsWithout: any[];
844
+ taskList: TaskListItem[];
845
+ processHistory: TaskHistory[];
759
846
  contragentList: any[];
760
847
  contragentFormKey: string;
761
848
  processCode: number | null;
762
849
  groupCode: string;
763
- userGroups: any[];
850
+ userGroups: Item[];
764
851
  onMainPage: boolean;
852
+ signUrl: string | null;
853
+ SaleChanellPolicyList: any[];
854
+ RegionPolicyList: any[];
855
+ ManagerPolicyList: any[];
856
+ AgentDataList: any[];
857
+ affilationResolution: {
858
+ id: string | number | null;
859
+ processInstanceId: string | number | null;
860
+ number: string | number | null;
861
+ date: string | number | null;
862
+ };
863
+ signedDocumentList: any[];
864
+ surveyByHealthBase: any[];
865
+ surveyByCriticalBase: any[];
866
+ surveyByHealthSecond: any[];
867
+ surveyByCriticalSecond: any[];
868
+ definedAnswersId: {
869
+ surveyByHealthBase: any;
870
+ surveyByCriticalBase: any;
871
+ };
872
+ riskGroup: any[];
765
873
  constructor() {
874
+ this.controls = {
875
+ onAuth: false,
876
+ hasGBDFL: true,
877
+ hasGKB: false,
878
+ hasInsis: false,
879
+ hasCalculator: false,
880
+ };
881
+ this.hasLayoutMargins = true;
882
+ this.processIndexRate = [];
883
+ this.processPaymentPeriod = [];
884
+ this.additionalInsuranceTerms = [];
885
+ this.additionalInsuranceTermsWithout = [];
886
+ this.definedAnswersId = {
887
+ surveyByHealthBase: {},
888
+ surveyByCriticalBase: {},
889
+ };
890
+ this.signedDocumentList = [];
891
+ this.affilationResolution = {
892
+ id: null,
893
+ processInstanceId: null,
894
+ number: null,
895
+ date: null,
896
+ };
897
+ this.SaleChanellPolicyList = [];
898
+ this.RegionPolicyList = [];
899
+ this.ManagerPolicyList = [];
900
+ this.AgentDataList = [];
901
+ this.signUrl = null;
902
+ this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as string) : null;
903
+ this.showNav = true;
904
+ this.menuItems = [];
905
+ this.menu = {
906
+ title: '',
907
+ hasBack: false,
908
+ loading: false,
909
+ backIcon: 'mdi-arrow-left',
910
+ onBack: {},
911
+ onLink: {},
912
+ selectedItem: new MenuItem(),
913
+ };
914
+ this.settings = {
915
+ open: false,
916
+ overlay: false,
917
+ items: [],
918
+ };
919
+ this.buttons = [];
920
+ this.panel = {
921
+ open: false,
922
+ overlay: false,
923
+ title: '',
924
+ clear: function () {
925
+ const panelActions = document.getElementById('panel-actions');
926
+ if (panelActions) {
927
+ panelActions.innerHTML = '';
928
+ }
929
+ },
930
+ };
931
+ this.panelAction = null;
766
932
  this.historyPageIndex = 1;
767
933
  this.historyPageSize = 10;
768
934
  this.historyTotalItems = 0;
769
935
  this.isColumnAsc = { ...InitialColumns() };
770
936
  this.idleKey = 999;
771
- this.processList = [];
937
+ this.processList = null;
772
938
  this.countries = [];
773
939
  this.citizenshipCountries = [];
774
940
  this.taxCountries = [];
941
+ this.addTaxCountries = [];
775
942
  this.states = [];
776
943
  this.regions = [];
777
944
  this.cities = [];
@@ -781,6 +948,8 @@ export class DataStoreClass {
781
948
  this.documentIssuers = [];
782
949
  this.familyStatuses = [];
783
950
  this.relations = [];
951
+ this.surveyByHealthBase = [];
952
+ this.surveyByCriticalBase = [];
784
953
  this.surveyByHealthSecond = [];
785
954
  this.surveyByCriticalSecond = [];
786
955
  this.questionRefs = [];
@@ -788,11 +957,7 @@ export class DataStoreClass {
788
957
  this.residents = [];
789
958
  this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
790
959
  this.economySectorCode = [];
791
- this.gender = [
792
- new Value(0, null),
793
- new Value(1, 'Мужской'),
794
- new Value(2, 'Женский'),
795
- ];
960
+ this.gender = [new Value(0, null), new Value(1, 'Мужской'), new Value(2, 'Женский')];
796
961
  this.fontSize = 14;
797
962
  this.isFontChangerOpen = false;
798
963
  this.isLoading = false;
@@ -809,42 +974,80 @@ export class DataStoreClass {
809
974
  this.groupCode = 'Work';
810
975
  this.userGroups = [];
811
976
  this.onMainPage = true;
977
+ this.riskGroup = [
978
+ {
979
+ id: '1',
980
+ nameKz: '',
981
+ nameRu: '1',
982
+ isDefault: true,
983
+ },
984
+ {
985
+ id: '2',
986
+ nameKz: '',
987
+ nameRu: '2',
988
+ },
989
+ {
990
+ id: '3',
991
+ nameKz: '',
992
+ nameRu: '3',
993
+ },
994
+ {
995
+ id: '4',
996
+ nameKz: '',
997
+ nameRu: '4',
998
+ },
999
+ {
1000
+ id: '5',
1001
+ nameKz: '',
1002
+ nameRu: '5',
1003
+ },
1004
+ ];
812
1005
  }
813
1006
  }
814
1007
 
815
- export class StoreClass {
816
- birthInfos: any[];
1008
+ export class FormStoreClass {
1009
+ birthInfos: BirthInfoGKB[];
817
1010
  SaleChanellPolicy: Value;
818
1011
  AgentData: {
819
1012
  agentId: null;
820
- manId: 0;
821
- fullName: '';
1013
+ manId: number;
1014
+ fullName: string;
822
1015
  officeId: null;
823
1016
  officeCode: null;
824
- saleChannel: '';
825
- managerName: '';
1017
+ saleChannel: string;
1018
+ managerName: string;
826
1019
  };
827
1020
  RegionPolicy: Value;
828
1021
  ManagerPolicy: Value;
829
1022
  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;
1023
+ policyholderForm: boolean;
1024
+ beneficiaryForm: boolean;
1025
+ beneficialOwnerForm: boolean;
1026
+ insuredForm: boolean;
1027
+ policyholdersRepresentativeForm: boolean;
1028
+ productConditionsForm: boolean;
1029
+ recalculationForm: boolean;
1030
+ surveyByHealthBase: boolean;
1031
+ surveyByCriticalBase: boolean;
1032
+ surveyByHealthBasePolicyholder: boolean;
1033
+ surveyByCriticalBasePolicyholder: boolean;
1034
+ insuranceDocument: boolean;
842
1035
  };
843
1036
  isPolicyholderInsured: boolean = false;
844
1037
  isPolicyholderBeneficiary: boolean = false;
845
1038
  isActOwnBehalf: boolean = true;
846
1039
  hasRepresentative: boolean = false;
847
- applicationData: { processInstanceId: number | string };
1040
+ isPolicyholderIPDL: boolean = false;
1041
+ applicationData: {
1042
+ processInstanceId: number | string;
1043
+ statusCode?: string | null;
1044
+ clientApp?: any;
1045
+ insuredApp?: any;
1046
+ beneficiaryApp?: any;
1047
+ beneficialOwnerApp?: any;
1048
+ spokesmanApp?: any;
1049
+ isTask?: boolean | null;
1050
+ };
848
1051
  policyholderForm: PolicyholderForm;
849
1052
  policyholderFormKey: string;
850
1053
  policyholdersRepresentativeForm: PolicyholdersRepresentativeForm;
@@ -864,8 +1067,7 @@ export class StoreClass {
864
1067
  questionnaireByCritical: any[];
865
1068
  canBeClaimed: boolean | null;
866
1069
  applicationTaskId: string | null;
867
- otpTokenId: string | null;
868
- constructor(procuctConditionsTitle: string) {
1070
+ constructor(procuctConditionsTitle?: string) {
869
1071
  this.birthInfos = [];
870
1072
  this.SaleChanellPolicy = new Value();
871
1073
  this.AgentData = {
@@ -900,8 +1102,7 @@ export class StoreClass {
900
1102
  this.applicationData = { processInstanceId: 0 };
901
1103
  this.policyholderForm = new PolicyholderForm();
902
1104
  this.policyholderFormKey = 'policyholderForm';
903
- this.policyholdersRepresentativeForm =
904
- new PolicyholdersRepresentativeForm();
1105
+ this.policyholdersRepresentativeForm = new PolicyholdersRepresentativeForm();
905
1106
  this.policyholdersRepresentativeFormKey = 'policyholdersRepresentativeForm';
906
1107
  this.beneficiaryForm = [new BeneficiaryForm()];
907
1108
  this.beneficiaryFormKey = 'beneficiaryForm';
@@ -918,6 +1119,5 @@ export class StoreClass {
918
1119
  this.questionnaireByCritical = [];
919
1120
  this.canBeClaimed = null;
920
1121
  this.applicationTaskId = null;
921
- this.otpTokenId = null;
922
1122
  }
923
1123
  }