hl-core 0.0.7-beta.9 → 0.0.8

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 (52) hide show
  1. package/.prettierrc +2 -1
  2. package/api/index.ts +66 -47
  3. package/api/interceptors.ts +4 -4
  4. package/components/Button/Btn.vue +7 -2
  5. package/components/Button/ScrollButtons.vue +6 -0
  6. package/components/Complex/ContentBlock.vue +5 -0
  7. package/components/{Layout → Dialog}/Dialog.vue +3 -27
  8. package/components/Dialog/FamilyDialog.vue +39 -0
  9. package/components/Form/FormBlock.vue +114 -0
  10. package/components/Form/FormSection.vue +18 -0
  11. package/components/Form/FormTextSection.vue +20 -0
  12. package/components/Form/FormToggle.vue +52 -0
  13. package/components/Form/ProductConditionsBlock.vue +68 -0
  14. package/components/Input/EmptyFormField.vue +5 -0
  15. package/components/Input/FileInput.vue +71 -0
  16. package/components/Input/FormInput.vue +171 -0
  17. package/components/Input/PanelInput.vue +133 -0
  18. package/components/Input/RoundedInput.vue +35 -36
  19. package/components/Layout/Drawer.vue +18 -16
  20. package/components/Layout/Header.vue +4 -18
  21. package/components/Layout/Loader.vue +1 -7
  22. package/components/Layout/SettingsPanel.vue +17 -37
  23. package/components/List/ListEmpty.vue +22 -0
  24. package/components/Menu/MenuNav.vue +22 -20
  25. package/components/Menu/MenuNavItem.vue +6 -6
  26. package/components/Pages/Anketa.vue +333 -0
  27. package/components/Pages/Auth.vue +91 -0
  28. package/components/Pages/Documents.vue +108 -0
  29. package/components/Pages/MemberForm.vue +1138 -0
  30. package/components/Pages/ProductAgreement.vue +18 -0
  31. package/components/Pages/ProductConditions.vue +349 -0
  32. package/components/Panel/PanelItem.vue +2 -4
  33. package/components/Panel/PanelSelectItem.vue +20 -0
  34. package/components/Transitions/FadeTransition.vue +5 -0
  35. package/composables/classes.ts +299 -253
  36. package/composables/constants.ts +14 -7
  37. package/composables/index.ts +55 -60
  38. package/composables/styles.ts +31 -7
  39. package/layouts/default.vue +46 -26
  40. package/layouts/full.vue +2 -12
  41. package/nuxt.config.ts +3 -0
  42. package/package.json +13 -10
  43. package/pages/500.vue +40 -12
  44. package/plugins/helperFunctionsPlugins.ts +6 -2
  45. package/plugins/storePlugin.ts +6 -5
  46. package/store/data.store.js +781 -1880
  47. package/store/member.store.ts +291 -0
  48. package/store/messages.ts +66 -51
  49. package/store/rules.js +26 -28
  50. package/types/index.ts +250 -0
  51. package/composables/models.ts +0 -43
  52. /package/store/{form.store.js → form.store.ts} +0 -0
@@ -1,15 +1,7 @@
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
- type LinkType =
8
- | RouteLocationNormalized
9
- | RouteLocationNormalizedLoaded
10
- | string
11
- | null
12
- | boolean;
4
+ type LinkType = Partial<RouteLocationNormalized> | Partial<RouteLocationNormalizedLoaded> | string | null | boolean;
13
5
 
14
6
  class MenuItemConfig {
15
7
  id: any;
@@ -18,9 +10,13 @@ class MenuItemConfig {
18
10
  hasLine?: boolean;
19
11
  description?: string | null;
20
12
  url?: string | null;
21
- initial?: object | null;
13
+ initial?: any | null;
22
14
  icon?: string | null;
23
- action?: Function;
15
+ action?: Function | void;
16
+ disabled?: ComputedRef;
17
+ color?: string;
18
+ show?: ComputedRef;
19
+
24
20
  constructor(
25
21
  id: any = null,
26
22
  title: string | null = null,
@@ -28,9 +24,12 @@ class MenuItemConfig {
28
24
  hasLine?: boolean,
29
25
  description?: string | null,
30
26
  url?: string | null,
31
- initial?: object | null,
27
+ initial?: any | null,
32
28
  icon?: string | null,
33
- action?: Function,
29
+ action?: Function | void,
30
+ disabled?: ComputedRef,
31
+ color?: string,
32
+ show?: ComputedRef,
34
33
  ) {
35
34
  this.id = id;
36
35
  this.title = title;
@@ -41,24 +40,15 @@ class MenuItemConfig {
41
40
  this.initial = initial;
42
41
  this.icon = icon;
43
42
  this.action = action;
43
+ this.disabled = disabled;
44
+ this.color = color;
45
+ this.show = show;
44
46
  }
45
47
  }
46
48
 
47
49
  export class MenuItem extends MenuItemConfig {
48
- constructor(
49
- {
50
- id,
51
- title,
52
- link,
53
- hasLine,
54
- description,
55
- url,
56
- initial,
57
- icon,
58
- action,
59
- }: MenuItemConfig = new MenuItemConfig(),
60
- ) {
61
- super(id, title, link, hasLine, description, url, initial, icon, action);
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);
62
52
  }
63
53
  }
64
54
 
@@ -69,13 +59,7 @@ export class Value {
69
59
  nameKz: string | number | null;
70
60
  ids: string | number | null;
71
61
 
72
- constructor(
73
- id: string | number | null = null,
74
- nameRu: string | number | null = null,
75
- nameKz: string | number | null = null,
76
- code: string | number | null = null,
77
- ids: string | number | null = null,
78
- ) {
62
+ constructor(id: string | number | null = null, nameRu: string | null = null, nameKz: string | null = null, code: string | null = null, ids: string | null = null) {
79
63
  this.id = id;
80
64
  this.code = code;
81
65
  this.nameRu = nameRu;
@@ -84,6 +68,59 @@ export class Value {
84
68
  }
85
69
  }
86
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
+
87
124
  export class MenuOption {
88
125
  text: string | null;
89
126
  subtitle: string | null;
@@ -91,13 +128,7 @@ export class MenuOption {
91
128
  variant: string | null;
92
129
  size: string | null;
93
130
 
94
- constructor(
95
- text = 'Text',
96
- subtitle = 'Subtitle',
97
- icon = 'mdi-content-copy',
98
- variant = 'text',
99
- size = 'small',
100
- ) {
131
+ constructor(text = 'Text', subtitle = 'Subtitle', icon = 'mdi-content-copy', variant = 'text', size = 'small') {
101
132
  this.text = text;
102
133
  this.subtitle = subtitle;
103
134
  this.icon = icon;
@@ -122,17 +153,11 @@ export const InitialColumns = () => {
122
153
  export class User {
123
154
  login: string | null;
124
155
  password: string | null;
125
- roles: string[] | null;
156
+ roles: string[];
126
157
  id: string | null;
127
158
  fullName: string | null;
128
159
 
129
- constructor(
130
- login: string | null = null,
131
- password: string | null = null,
132
- roles: string[] = [],
133
- id: string | null = null,
134
- fullName: string | null = null,
135
- ) {
160
+ constructor(login: string | null = null, password: string | null = null, roles: string[] = [], id: string | null = null, fullName: string | null = null) {
136
161
  this.login = login;
137
162
  this.password = password;
138
163
  this.roles = roles;
@@ -181,28 +206,19 @@ class Person {
181
206
  this.id = id;
182
207
  this.type = type;
183
208
  this.iin = iin;
184
- this.longName =
185
- !!lastName && !!firstName && !!middleName
186
- ? (((((lastName as string) + firstName) as string) +
187
- middleName) as string)
188
- : longName;
209
+ this.longName = !!lastName && !!firstName && !!middleName ? (((((lastName as string) + firstName) as string) + middleName) as string) : longName;
189
210
  this.lastName = lastName;
190
211
  this.firstName = firstName;
191
212
  this.middleName = middleName;
192
213
  this.birthDate = birthDate;
193
214
  this.gender = gender;
194
- this.genderName =
195
- gender && gender.nameRu !== null ? (gender.nameRu as string) : genderName;
215
+ this.genderName = gender && gender.nameRu !== null ? (gender.nameRu as string) : genderName;
196
216
  this.birthPlace = birthPlace;
197
217
  this.age = age;
198
- this.registrationDate = new Date(
199
- Date.now() - new Date().getTimezoneOffset() * 60 * 1000,
200
- )
201
- .toISOString()
202
- .slice(0, -1);
218
+ this.registrationDate = new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1);
203
219
  }
204
220
 
205
- resetPerson(clearIinAndPhone = true) {
221
+ resetPerson(clearIinAndPhone: boolean = true) {
206
222
  this.id = 0;
207
223
  this.type = 1;
208
224
  if (clearIinAndPhone === true) {
@@ -217,11 +233,7 @@ class Person {
217
233
  this.genderName = null;
218
234
  this.birthPlace = new Value();
219
235
  this.age = null;
220
- this.registrationDate = new Date(
221
- Date.now() - new Date().getTimezoneOffset() * 60 * 1000,
222
- )
223
- .toISOString()
224
- .slice(0, -1);
236
+ this.registrationDate = new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1);
225
237
  }
226
238
 
227
239
  formatDate(date: any): Date | null {
@@ -253,14 +265,12 @@ class Person {
253
265
  getAgeByBirthDate() {
254
266
  const date = this.formatDate(this.birthDate);
255
267
  if (date) {
256
- const age = Math.abs(
257
- new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970,
258
- );
268
+ const age = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
259
269
  if (new Date(date) < new Date(Date.now()) && age > 0) {
260
- return age;
270
+ return age.toString();
261
271
  }
262
272
  } else {
263
- return '';
273
+ return null;
264
274
  }
265
275
  }
266
276
  }
@@ -345,7 +355,28 @@ export class Contragent extends Person {
345
355
  }
346
356
  }
347
357
 
348
- 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;
349
380
  job: string | null;
350
381
  jobPosition: string | null;
351
382
  jobPlace: string | null;
@@ -376,7 +407,7 @@ class Form extends Person {
376
407
  email: string | null;
377
408
  address: string | null;
378
409
  familyStatus: Value;
379
- isTerror: Value | null;
410
+ isTerror: null;
380
411
  relationDegree: Value;
381
412
  isDisability: Value;
382
413
  disabilityGroup: Value | null;
@@ -387,6 +418,9 @@ class Form extends Person {
387
418
  _emailPattern: RegExp;
388
419
  gotFromInsis: boolean | null;
389
420
  gosPersonData: any;
421
+ hasAgreement: boolean | null;
422
+ otpTokenId: string | null;
423
+ otpCode: string | null;
390
424
  constructor(
391
425
  id = 0,
392
426
  type = 1,
@@ -436,21 +470,43 @@ class Form extends Person {
436
470
  isDisability = new Value(),
437
471
  disabilityGroupId = new Value(),
438
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,
439
489
  ) {
440
- super(
441
- id,
442
- type,
443
- iin,
444
- longName,
445
- lastName,
446
- firstName,
447
- middleName,
448
- birthDate,
449
- gender,
450
- genderName,
451
- birthPlace,
452
- age,
453
- );
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();
454
510
  this.job = job;
455
511
  this.jobPosition = jobPosition;
456
512
  this.jobPlace = jobPlace;
@@ -479,6 +535,8 @@ class Form extends Person {
479
535
  this.phoneNumber = phoneNumber;
480
536
  this.homePhone = homePhone;
481
537
  this.email = email;
538
+ this.otpTokenId = null;
539
+ this.otpCode = null;
482
540
  this.address = address;
483
541
  this.familyStatus = familyStatus;
484
542
  this.isTerror = isTerror;
@@ -492,9 +550,10 @@ class Form extends Person {
492
550
  this._emailPattern = /.+@.+\..+/;
493
551
  this.gotFromInsis = true;
494
552
  this.gosPersonData = null;
553
+ this.hasAgreement = null;
495
554
  }
496
555
 
497
- resetForm(clearIinAndPhone = true) {
556
+ resetMember(clearIinAndPhone: boolean = true) {
498
557
  super.resetPerson(clearIinAndPhone);
499
558
  this.job = null;
500
559
  this.jobPosition = null;
@@ -527,13 +586,31 @@ class Form extends Person {
527
586
  this.email = null;
528
587
  this.address = null;
529
588
  this.familyStatus = new Value();
530
- this.isTerror = new Value();
589
+ this.isTerror = null;
531
590
  this.relationDegree = new Value();
532
591
  this.isDisability = new Value();
533
592
  this.disabilityGroup = null;
534
593
  this.percentageOfPayoutAmount = null;
535
594
  this.gotFromInsis = true;
536
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;
537
614
  }
538
615
 
539
616
  getPattern(pattern: string) {
@@ -553,133 +630,56 @@ class Form extends Person {
553
630
  }
554
631
 
555
632
  getFullNameShorted() {
556
- return this.validateFullName()
557
- ? `${this.lastName} ${this.firstName?.charAt(0)}. ${
558
- this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''
559
- }`
560
- : null;
633
+ return this.validateFullName() ? `${this.lastName} ${this.firstName?.charAt(0)}. ${this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''}` : null;
561
634
  }
562
635
 
563
636
  getFullName() {
564
- return this.validateFullName()
565
- ? this.lastName + ' ' + this.firstName + ' ' + this.middleName != ''
566
- ? this.middleName?.charAt(0)
567
- : ''
568
- : null;
637
+ return this.validateFullName() ? (this.lastName + ' ' + this.firstName + ' ' + this.middleName != '' ? this.middleName?.charAt(0) : '') : null;
569
638
  }
570
639
  }
571
640
 
572
- export class PolicyholderForm extends Form {
641
+ export class PolicyholderForm extends Member {
573
642
  constructor(...args: any) {
574
643
  super(...args);
575
644
  }
576
645
  }
577
646
 
578
- export class InsuredForm extends Form {
647
+ export class InsuredForm extends Member {
579
648
  constructor(...args: any) {
580
649
  super(...args);
581
650
  }
582
651
  }
583
652
 
584
- export class BeneficiaryForm extends Form {
585
- insurancePay: Value;
653
+ export class BeneficiaryForm extends Member {
586
654
  constructor(...args: any) {
587
655
  super(...args);
588
- this.insurancePay = new Value();
589
656
  }
590
657
  }
591
658
 
592
- export class BeneficialOwnerForm extends Form {
659
+ export class BeneficialOwnerForm extends Member {
593
660
  constructor(...args: any) {
594
661
  super(...args);
595
662
  }
596
663
  }
597
664
 
598
- export class PolicyholdersRepresentativeForm extends Form {
599
- migrationCard: string | null;
600
- migrationCardIssueDate: string | null;
601
- migrationCardExpireDate: string | null;
602
- confirmDocType: string | null;
603
- confirmDocNumber: string | null;
604
- confirmDocIssueDate: string | null;
605
- confirmDocExpireDate: string | null;
606
- notaryLongName: string | null;
607
- notaryLicenseNumber: string | null;
608
- notaryLicenseDate: string | null;
609
- notaryLicenseIssuer: string | null;
610
- jurLongName: string | null;
611
- fullNameRod: string | null;
612
- confirmDocTypeKz: string | null;
613
- confirmDocTypeRod: string | null;
614
- isNotary: boolean | null;
615
- constructor(
616
- migrationCard = null,
617
- migrationCardIssueDate = null,
618
- migrationCardExpireDate = null,
619
- confirmDocType = null,
620
- confirmDocNumber = null,
621
- confirmDocIssueDate = null,
622
- confirmDocExpireDate = null,
623
- notaryLongName = null,
624
- notaryLicenseNumber = null,
625
- notaryLicenseDate = null,
626
- notaryLicenseIssuer = null,
627
- jurLongName = null,
628
- fullNameRod = null,
629
- confirmDocTypeKz = null,
630
- confirmDocTypeRod = null,
631
- isNotary = false,
632
- ...args: any
633
- ) {
665
+ export class PolicyholdersRepresentativeForm extends Member {
666
+ constructor(...args: any) {
634
667
  super(...args);
635
- this.migrationCard = migrationCard;
636
- this.migrationCardIssueDate = migrationCardIssueDate;
637
- this.migrationCardExpireDate = migrationCardExpireDate;
638
- this.confirmDocType = confirmDocType;
639
- this.confirmDocNumber = confirmDocNumber;
640
- this.confirmDocIssueDate = confirmDocIssueDate;
641
- this.confirmDocExpireDate = confirmDocExpireDate;
642
- this.notaryLongName = notaryLongName;
643
- this.notaryLicenseNumber = notaryLicenseNumber;
644
- this.notaryLicenseDate = notaryLicenseDate;
645
- this.notaryLicenseIssuer = notaryLicenseIssuer;
646
- this.jurLongName = jurLongName;
647
- this.fullNameRod = fullNameRod;
648
- this.confirmDocTypeKz = confirmDocTypeKz;
649
- this.confirmDocTypeRod = confirmDocTypeRod;
650
- this.isNotary = isNotary;
651
- }
652
-
653
- resetMember(clearIinAndPhone = true) {
654
- super.resetForm(clearIinAndPhone);
655
- this.migrationCard = null;
656
- this.migrationCardIssueDate = null;
657
- this.migrationCardExpireDate = null;
658
- this.confirmDocType = null;
659
- this.confirmDocNumber = null;
660
- this.confirmDocIssueDate = null;
661
- this.confirmDocExpireDate = null;
662
- this.notaryLongName = null;
663
- this.notaryLicenseNumber = null;
664
- this.notaryLicenseDate = null;
665
- this.notaryLicenseIssuer = null;
666
- this.jurLongName = null;
667
- this.fullNameRod = null;
668
- this.confirmDocTypeKz = null;
669
- this.confirmDocTypeRod = null;
670
- this.isNotary = false;
671
668
  }
672
669
  }
673
670
 
674
671
  export class ProductConditions {
672
+ signDate: string | null;
673
+ birthDate: string | null;
674
+ gender: Value;
675
675
  insuranceCase: string | null;
676
676
  coverPeriod: string | null;
677
677
  payPeriod: string | null;
678
678
  termsOfInsurance: string | null;
679
679
  annualIncome: string | null;
680
680
  processIndexRate: Value;
681
- requestedSumInsured: string | null;
682
- insurancePremiumPerMonth: string | null;
681
+ requestedSumInsured: number | string | null;
682
+ insurancePremiumPerMonth: number | string | null;
683
683
  establishingGroupDisabilityFromThirdYear: string | null;
684
684
  possibilityToChange: string | null;
685
685
  deathOfInsuredDueToAccident: Value;
@@ -730,6 +730,9 @@ export class ProductConditions {
730
730
  riskGroup = new Value(),
731
731
  riskGroup2 = new Value(),
732
732
  ) {
733
+ this.signDate = null;
734
+ this.birthDate = null;
735
+ this.gender = new Value();
733
736
  this.insuranceCase = insuranceCase;
734
737
  this.coverPeriod = coverPeriod;
735
738
  this.payPeriod = payPeriod;
@@ -738,8 +741,7 @@ export class ProductConditions {
738
741
  this.processIndexRate = processIndexRate;
739
742
  this.requestedSumInsured = requestedSumInsured;
740
743
  this.insurancePremiumPerMonth = insurancePremiumPerMonth;
741
- this.establishingGroupDisabilityFromThirdYear =
742
- establishingGroupDisabilityFromThirdYear;
744
+ this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
743
745
  this.possibilityToChange = possibilityToChange;
744
746
  this.deathOfInsuredDueToAccident = deathOfInsuredDueToAccident;
745
747
  this.establishingGroupDisability = establishingGroupDisability;
@@ -763,8 +765,25 @@ export class ProductConditions {
763
765
  }
764
766
 
765
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
+ };
766
785
  hasLayoutMargins: boolean;
767
- product: string | null;
786
+ readonly product: string | null;
768
787
  showNav: boolean;
769
788
  menuItems: MenuItem[];
770
789
  menu: {
@@ -781,16 +800,20 @@ export class DataStoreClass {
781
800
  overlay: boolean;
782
801
  items: MenuItem[];
783
802
  };
803
+ buttons: MenuItem[];
804
+ panelAction: string | null;
784
805
  panel: {
785
806
  open: boolean;
786
807
  overlay: boolean;
808
+ title: string;
809
+ clear: Function | void;
787
810
  };
788
811
  historyPageIndex: number;
789
812
  historyPageSize: number;
790
813
  historyTotalItems: number;
791
814
  isColumnAsc = { ...InitialColumns() };
792
815
  idleKey: number;
793
- processList: any[] | null;
816
+ processList: Item[] | null;
794
817
  countries: Value[];
795
818
  citizenshipCountries: Value[];
796
819
  taxCountries: Value[];
@@ -804,7 +827,7 @@ export class DataStoreClass {
804
827
  documentIssuers: Value[];
805
828
  familyStatuses: Value[];
806
829
  relations: Value[];
807
- questionRefs: any[];
830
+ questionRefs: Value[];
808
831
  epayLink: string;
809
832
  residents: Value[];
810
833
  ipdl: Value[];
@@ -820,58 +843,38 @@ export class DataStoreClass {
820
843
  processCoverTypeSum: any[];
821
844
  processIndexRate: any[];
822
845
  processPaymentPeriod: any[];
823
- additionalInsuranceTerms: any[];
824
- taskList: any[];
825
- processHistory: any[];
846
+ taskList: TaskListItem[];
847
+ processHistory: TaskHistory[];
826
848
  contragentList: any[];
827
849
  contragentFormKey: string;
828
850
  processCode: number | null;
829
851
  groupCode: string;
830
- userGroups: any[];
852
+ userGroups: Item[];
831
853
  onMainPage: boolean;
832
- signUrl: string | null;
833
854
  SaleChanellPolicyList: any[];
834
855
  RegionPolicyList: any[];
835
856
  ManagerPolicyList: any[];
836
857
  AgentDataList: any[];
837
- affilationResolution: {
838
- id: string | number | null;
839
- processInstanceId: string | number | null;
840
- number: string | number | null;
841
- date: string | number | null;
842
- };
843
- signedDocumentList: any[];
844
- surveyByHealthBase: any[];
845
- surveyByCriticalBase: any[];
846
- surveyByHealthSecond: any[];
847
- surveyByCriticalSecond: any[];
848
- definedAnswersId: {
849
- surveyByHealthBase: any;
850
- surveyByCriticalBase: any;
851
- };
852
858
  riskGroup: any[];
853
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
+ };
854
869
  this.hasLayoutMargins = true;
855
870
  this.processIndexRate = [];
856
871
  this.processPaymentPeriod = [];
857
- this.additionalInsuranceTerms = [];
858
- this.definedAnswersId = {
859
- surveyByHealthBase: {},
860
- surveyByCriticalBase: {},
861
- };
862
- this.signedDocumentList = [];
863
- this.affilationResolution = {
864
- id: null,
865
- processInstanceId: null,
866
- number: null,
867
- date: null,
868
- };
872
+ this.questionRefs = [];
869
873
  this.SaleChanellPolicyList = [];
870
874
  this.RegionPolicyList = [];
871
875
  this.ManagerPolicyList = [];
872
876
  this.AgentDataList = [];
873
- this.signUrl = null;
874
- this.product = null;
877
+ this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as string) : null;
875
878
  this.showNav = true;
876
879
  this.menuItems = [];
877
880
  this.menu = {
@@ -888,10 +891,19 @@ export class DataStoreClass {
888
891
  overlay: false,
889
892
  items: [],
890
893
  };
894
+ this.buttons = [];
891
895
  this.panel = {
892
896
  open: false,
893
897
  overlay: false,
898
+ title: '',
899
+ clear: function () {
900
+ const panelActions = document.getElementById('panel-actions');
901
+ if (panelActions) {
902
+ panelActions.innerHTML = '';
903
+ }
904
+ },
894
905
  };
906
+ this.panelAction = null;
895
907
  this.historyPageIndex = 1;
896
908
  this.historyPageSize = 10;
897
909
  this.historyTotalItems = 0;
@@ -911,20 +923,11 @@ export class DataStoreClass {
911
923
  this.documentIssuers = [];
912
924
  this.familyStatuses = [];
913
925
  this.relations = [];
914
- this.surveyByHealthBase = [];
915
- this.surveyByCriticalBase = [];
916
- this.surveyByHealthSecond = [];
917
- this.surveyByCriticalSecond = [];
918
- this.questionRefs = [];
919
926
  this.epayLink = '';
920
927
  this.residents = [];
921
928
  this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
922
929
  this.economySectorCode = [];
923
- this.gender = [
924
- new Value(0, null),
925
- new Value(1, 'Мужской'),
926
- new Value(2, 'Женский'),
927
- ];
930
+ this.gender = [new Value(0, null), new Value(1, 'Мужской'), new Value(2, 'Женский')];
928
931
  this.fontSize = 14;
929
932
  this.isFontChangerOpen = false;
930
933
  this.isLoading = false;
@@ -973,38 +976,66 @@ export class DataStoreClass {
973
976
  }
974
977
 
975
978
  export class FormStoreClass {
976
- birthInfos: any[];
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[];
977
998
  SaleChanellPolicy: Value;
978
999
  AgentData: {
979
1000
  agentId: null;
980
- manId: 0;
981
- fullName: '';
1001
+ manId: number;
1002
+ fullName: string;
982
1003
  officeId: null;
983
1004
  officeCode: null;
984
- saleChannel: '';
985
- managerName: '';
1005
+ saleChannel: string;
1006
+ managerName: string;
986
1007
  };
987
1008
  RegionPolicy: Value;
988
1009
  ManagerPolicy: Value;
989
1010
  isDisabled: {
990
- policyholderForm: true;
991
- beneficiaryForm: true;
992
- beneficialOwnerForm: true;
993
- insuredForm: true;
994
- policyholdersRepresentativeForm: true;
995
- productConditionsForm: true;
996
- recalculationForm: true;
997
- surveyByHealthBase: true;
998
- surveyByCriticalBase: true;
999
- surveyByHealthBasePolicyholder: true;
1000
- surveyByCriticalBasePolicyholder: true;
1001
- 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;
1002
1023
  };
1003
1024
  isPolicyholderInsured: boolean = false;
1004
1025
  isPolicyholderBeneficiary: boolean = false;
1005
1026
  isActOwnBehalf: boolean = true;
1006
1027
  hasRepresentative: boolean = false;
1007
- 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
+ };
1008
1039
  policyholderForm: PolicyholderForm;
1009
1040
  policyholderFormKey: string;
1010
1041
  policyholdersRepresentativeForm: PolicyholdersRepresentativeForm;
@@ -1024,8 +1055,25 @@ export class FormStoreClass {
1024
1055
  questionnaireByCritical: any[];
1025
1056
  canBeClaimed: boolean | null;
1026
1057
  applicationTaskId: string | null;
1027
- otpTokenId: string | null;
1028
- 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
+ };
1029
1077
  this.birthInfos = [];
1030
1078
  this.SaleChanellPolicy = new Value();
1031
1079
  this.AgentData = {
@@ -1060,8 +1108,7 @@ export class FormStoreClass {
1060
1108
  this.applicationData = { processInstanceId: 0 };
1061
1109
  this.policyholderForm = new PolicyholderForm();
1062
1110
  this.policyholderFormKey = 'policyholderForm';
1063
- this.policyholdersRepresentativeForm =
1064
- new PolicyholdersRepresentativeForm();
1111
+ this.policyholdersRepresentativeForm = new PolicyholdersRepresentativeForm();
1065
1112
  this.policyholdersRepresentativeFormKey = 'policyholdersRepresentativeForm';
1066
1113
  this.beneficiaryForm = [new BeneficiaryForm()];
1067
1114
  this.beneficiaryFormKey = 'beneficiaryForm';
@@ -1078,6 +1125,5 @@ export class FormStoreClass {
1078
1125
  this.questionnaireByCritical = [];
1079
1126
  this.canBeClaimed = null;
1080
1127
  this.applicationTaskId = null;
1081
- this.otpTokenId = null;
1082
1128
  }
1083
1129
  }