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

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.
@@ -0,0 +1,923 @@
1
+ import { formatDate } from '.';
2
+ import {
3
+ RouteLocationNormalized,
4
+ RouteLocationNormalizedLoaded,
5
+ } from 'vue-router';
6
+
7
+ export class MenuItem {
8
+ id: any;
9
+ title: string | null;
10
+ link?: RouteLocationNormalized | RouteLocationNormalizedLoaded;
11
+ constructor(
12
+ id: any = null,
13
+ title: string | null = null,
14
+ link?: RouteLocationNormalized | RouteLocationNormalizedLoaded,
15
+ ) {
16
+ this.id = id;
17
+ this.title = title;
18
+ this.link = link;
19
+ }
20
+ }
21
+
22
+ export class Value {
23
+ id: string | number | null;
24
+ code: string | number | null;
25
+ nameRu: string | number | null;
26
+ nameKz: string | number | null;
27
+ ids: string | number | null;
28
+
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
+ ) {
36
+ this.id = id;
37
+ this.code = code;
38
+ this.nameRu = nameRu;
39
+ this.nameKz = nameKz;
40
+ this.ids = ids;
41
+ }
42
+ }
43
+
44
+ export class MenuOption {
45
+ text: string | null;
46
+ subtitle: string | null;
47
+ icon: string | null;
48
+ variant: string | null;
49
+ size: string | null;
50
+
51
+ constructor(
52
+ text = 'Text',
53
+ subtitle = 'Subtitle',
54
+ icon = 'mdi-content-copy',
55
+ variant = 'text',
56
+ size = 'small',
57
+ ) {
58
+ this.text = text;
59
+ this.subtitle = subtitle;
60
+ this.icon = icon;
61
+ this.variant = variant;
62
+ this.size = size;
63
+ }
64
+ }
65
+
66
+ export const InitialColumns = () => {
67
+ return {
68
+ addRegNumber: null,
69
+ number: null,
70
+ iin: null,
71
+ longName: null,
72
+ userName: null,
73
+ processCodeTitle: null,
74
+ historyStatusTitle: null,
75
+ dateCreated: null,
76
+ };
77
+ };
78
+
79
+ export class User {
80
+ login: string | null;
81
+ password: string | null;
82
+ roles: string[] | null;
83
+ id: string | null;
84
+ fullName: string | null;
85
+
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
+ ) {
93
+ this.login = login;
94
+ this.password = password;
95
+ this.roles = roles;
96
+ this.id = id;
97
+ this.fullName = fullName;
98
+ }
99
+
100
+ resetUser() {
101
+ this.login = null;
102
+ this.password = null;
103
+ this.roles = [];
104
+ this.id = null;
105
+ this.fullName = null;
106
+ }
107
+ }
108
+
109
+ class Person {
110
+ id: string | number | null;
111
+ type: string | number | null;
112
+ iin: string | null;
113
+ longName: string | null;
114
+ lastName: string | null;
115
+ firstName: string | null;
116
+ middleName: string | null;
117
+ birthDate: string | null;
118
+ gender: Value;
119
+ genderName: string | null;
120
+ birthPlace: Value;
121
+ age: string | null;
122
+ registrationDate: string;
123
+
124
+ constructor(
125
+ id = 0,
126
+ type = 1,
127
+ iin = null,
128
+ longName = null,
129
+ lastName = null,
130
+ firstName = null,
131
+ middleName = null,
132
+ birthDate = null,
133
+ gender = new Value(),
134
+ genderName = null,
135
+ birthPlace = new Value(),
136
+ age = null,
137
+ ) {
138
+ this.id = id;
139
+ this.type = type;
140
+ this.iin = iin;
141
+ this.longName =
142
+ !!lastName && !!firstName && !!middleName
143
+ ? (((((lastName as string) + firstName) as string) +
144
+ middleName) as string)
145
+ : longName;
146
+ this.lastName = lastName;
147
+ this.firstName = firstName;
148
+ this.middleName = middleName;
149
+ this.birthDate = birthDate;
150
+ this.gender = gender;
151
+ this.genderName =
152
+ gender && gender.nameRu !== null ? (gender.nameRu as string) : genderName;
153
+ this.birthPlace = birthPlace;
154
+ this.age = age;
155
+ this.registrationDate = new Date(
156
+ Date.now() - new Date().getTimezoneOffset() * 60 * 1000,
157
+ )
158
+ .toISOString()
159
+ .slice(0, -1);
160
+ }
161
+
162
+ resetPerson(clearIinAndPhone = true) {
163
+ this.id = 0;
164
+ this.type = 1;
165
+ if (clearIinAndPhone === true) {
166
+ this.iin = null;
167
+ }
168
+ this.longName = null;
169
+ this.lastName = null;
170
+ this.firstName = null;
171
+ this.middleName = null;
172
+ this.birthDate = null;
173
+ this.gender = new Value();
174
+ this.genderName = null;
175
+ this.birthPlace = new Value();
176
+ this.age = null;
177
+ this.registrationDate = new Date(
178
+ Date.now() - new Date().getTimezoneOffset() * 60 * 1000,
179
+ )
180
+ .toISOString()
181
+ .slice(0, -1);
182
+ }
183
+
184
+ formatDate(date: any): Date | null {
185
+ return formatDate(date);
186
+ }
187
+
188
+ getDateByKey(key: string): string | null {
189
+ const ctxKey = key as keyof typeof this;
190
+ if (this[ctxKey] && this[ctxKey] !== null) {
191
+ const formattedDate = this.formatDate(this[ctxKey]);
192
+ return formattedDate ? formattedDate.toISOString() : null;
193
+ } else {
194
+ return null;
195
+ }
196
+ }
197
+
198
+ getBirthDate() {
199
+ return this.getDateByKey('birthDate');
200
+ }
201
+
202
+ getDocumentExpireDate() {
203
+ return this.getDateByKey('documentExpire');
204
+ }
205
+
206
+ getDocumentDate() {
207
+ return this.getDateByKey('documentDate');
208
+ }
209
+
210
+ getAgeByBirthDate() {
211
+ const date = this.formatDate(this.birthDate);
212
+ if (date) {
213
+ const age = Math.abs(
214
+ new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970,
215
+ );
216
+ if (new Date(date) < new Date(Date.now()) && age > 0) {
217
+ return age;
218
+ }
219
+ } else {
220
+ return '';
221
+ }
222
+ }
223
+ }
224
+
225
+ export class Contragent extends Person {
226
+ economySectorCode: Value;
227
+ countryOfCitizenship: Value;
228
+ countryOfTaxResidency: Value;
229
+ registrationCountry: Value;
230
+ registrationProvince: Value;
231
+ registrationRegion: Value;
232
+ registrationRegionType: Value;
233
+ registrationCity: Value;
234
+ registrationQuarter: string | null;
235
+ registrationMicroDistrict: string | null;
236
+ registrationStreet: string | null;
237
+ registrationNumberHouse: string | null;
238
+ registrationNumberApartment: string | null;
239
+ phoneNumber: string | null;
240
+ homePhone: string | null;
241
+ email: string | null;
242
+ signOfResidency: Value;
243
+ documentType: Value;
244
+ documentNumber: string | null;
245
+ documentIssuers: Value;
246
+ documentDate: string | null;
247
+ documentExpire: string | null;
248
+ verifyDate: string | null;
249
+ verifyType: string | null;
250
+ otpTokenId: string | null;
251
+ constructor(
252
+ economySectorCode = new Value(),
253
+ countryOfCitizenship = new Value(),
254
+ countryOfTaxResidency = new Value(),
255
+ registrationCountry = new Value(),
256
+ registrationProvince = new Value(),
257
+ registrationRegion = new Value(),
258
+ registrationRegionType = new Value(),
259
+ registrationCity = new Value(),
260
+ registrationQuarter = null,
261
+ registrationMicroDistrict = null,
262
+ registrationStreet = null,
263
+ registrationNumberHouse = null,
264
+ registrationNumberApartment = null,
265
+ phoneNumber = null,
266
+ homePhone = null,
267
+ email = null,
268
+ signOfResidency = new Value(),
269
+ documentType = new Value(),
270
+ documentNumber = null,
271
+ documentIssuers = new Value(),
272
+ documentDate = null,
273
+ documentExpire = null,
274
+ ...args: any
275
+ ) {
276
+ super(...args);
277
+ this.economySectorCode = economySectorCode;
278
+ this.countryOfCitizenship = countryOfCitizenship;
279
+ this.countryOfTaxResidency = countryOfTaxResidency;
280
+ this.registrationCountry = registrationCountry;
281
+ this.registrationProvince = registrationProvince;
282
+ this.registrationRegion = registrationRegion;
283
+ this.registrationRegionType = registrationRegionType;
284
+ this.registrationCity = registrationCity;
285
+ this.registrationQuarter = registrationQuarter;
286
+ this.registrationMicroDistrict = registrationMicroDistrict;
287
+ this.registrationStreet = registrationStreet;
288
+ this.registrationNumberHouse = registrationNumberHouse;
289
+ this.registrationNumberApartment = registrationNumberApartment;
290
+ this.phoneNumber = phoneNumber;
291
+ this.homePhone = homePhone;
292
+ this.email = email;
293
+ this.signOfResidency = signOfResidency;
294
+ this.documentType = documentType;
295
+ this.documentNumber = documentNumber;
296
+ this.documentIssuers = documentIssuers;
297
+ this.documentDate = documentDate;
298
+ this.documentExpire = documentExpire;
299
+ this.verifyDate = null;
300
+ this.verifyType = null;
301
+ this.otpTokenId = null;
302
+ }
303
+ }
304
+
305
+ class Form extends Person {
306
+ job: string | null;
307
+ jobPosition: string | null;
308
+ jobPlace: string | null;
309
+ registrationCountry: Value;
310
+ registrationProvince: Value;
311
+ registrationRegion: Value;
312
+ registrationRegionType: Value;
313
+ registrationCity: Value;
314
+ registrationQuarter: string | null;
315
+ registrationMicroDistrict: string | null;
316
+ registrationStreet: string | null;
317
+ registrationNumberHouse: string | null;
318
+ registrationNumberApartment: string | null;
319
+ birthRegion: Value;
320
+ documentType: Value;
321
+ documentNumber: string | null;
322
+ documentIssuers: Value;
323
+ documentDate: string | null;
324
+ documentExpire: string | null;
325
+ signOfResidency: Value;
326
+ signOfIPDL: Value;
327
+ countryOfCitizenship: Value;
328
+ countryOfTaxResidency: Value;
329
+ addTaxResidency: Value;
330
+ economySectorCode: Value;
331
+ phoneNumber: string | null;
332
+ homePhone: string | null;
333
+ email: string | null;
334
+ address: string | null;
335
+ familyStatus: Value;
336
+ isTerror: Value | null;
337
+ relationDegree: Value;
338
+ isDisability: Value;
339
+ disabilityGroup: Value | null;
340
+ percentageOfPayoutAmount: string | number | null;
341
+ _cyrPattern: RegExp;
342
+ _numPattern: RegExp;
343
+ _phonePattern: RegExp;
344
+ _emailPattern: RegExp;
345
+ gotFromInsis: boolean | null;
346
+ gosPersonData: any;
347
+ constructor(
348
+ id = 0,
349
+ type = 1,
350
+ iin = null,
351
+ phoneNumber = null,
352
+ longName = null,
353
+ lastName = null,
354
+ firstName = null,
355
+ middleName = null,
356
+ birthDate = null,
357
+ gender = new Value(),
358
+ genderName = null,
359
+ birthPlace = new Value(),
360
+ age = null,
361
+ registrationDate = null,
362
+ job = null,
363
+ jobPosition = null,
364
+ jobPlace = null,
365
+ registrationCountry = new Value(),
366
+ registrationProvince = new Value(),
367
+ registrationRegion = new Value(),
368
+ registrationRegionType = new Value(),
369
+ registrationCity = new Value(),
370
+ registrationQuarter = null,
371
+ registrationMicroDistrict = null,
372
+ registrationStreet = null,
373
+ registrationNumberHouse = null,
374
+ registrationNumberApartment = null,
375
+ birthRegion = new Value(),
376
+ documentType = new Value(),
377
+ documentNumber = null,
378
+ documentIssuers = new Value(),
379
+ documentDate = null,
380
+ documentExpire = null,
381
+ signOfResidency = new Value(),
382
+ signOfIPDL = new Value(),
383
+ isTerror = null,
384
+ countryOfCitizenship = new Value(),
385
+ countryOfTaxResidency = new Value(),
386
+ addTaxResidency = new Value(),
387
+ economySectorCode = new Value(),
388
+ homePhone = null,
389
+ email = null,
390
+ address = null,
391
+ familyStatus = new Value(),
392
+ relationDegree = new Value(),
393
+ isDisability = new Value(),
394
+ disabilityGroupId = new Value(),
395
+ percentageOfPayoutAmount = null,
396
+ ) {
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
+ );
411
+ this.job = job;
412
+ this.jobPosition = jobPosition;
413
+ this.jobPlace = jobPlace;
414
+ this.registrationCountry = registrationCountry;
415
+ this.registrationProvince = registrationProvince;
416
+ this.registrationRegion = registrationRegion;
417
+ this.registrationRegionType = registrationRegionType;
418
+ this.registrationCity = registrationCity;
419
+ this.registrationQuarter = registrationQuarter;
420
+ this.registrationMicroDistrict = registrationMicroDistrict;
421
+ this.registrationStreet = registrationStreet;
422
+ this.registrationNumberHouse = registrationNumberHouse;
423
+ this.registrationNumberApartment = registrationNumberApartment;
424
+ this.birthRegion = birthRegion;
425
+ this.documentType = documentType;
426
+ this.documentNumber = documentNumber;
427
+ this.documentIssuers = documentIssuers;
428
+ this.documentDate = documentDate;
429
+ this.documentExpire = documentExpire;
430
+ this.signOfResidency = signOfResidency;
431
+ this.signOfIPDL = signOfIPDL;
432
+ this.countryOfCitizenship = countryOfCitizenship;
433
+ this.countryOfTaxResidency = countryOfTaxResidency;
434
+ this.addTaxResidency = addTaxResidency;
435
+ this.economySectorCode = economySectorCode;
436
+ this.phoneNumber = phoneNumber;
437
+ this.homePhone = homePhone;
438
+ this.email = email;
439
+ this.address = address;
440
+ this.familyStatus = familyStatus;
441
+ this.isTerror = isTerror;
442
+ this.relationDegree = relationDegree;
443
+ this.isDisability = isDisability;
444
+ this.disabilityGroup = disabilityGroupId;
445
+ this.percentageOfPayoutAmount = percentageOfPayoutAmount;
446
+ this._cyrPattern = /[\u0400-\u04FF]+/;
447
+ this._numPattern = /[0-9]+/;
448
+ this._phonePattern = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
449
+ this._emailPattern = /.+@.+\..+/;
450
+ this.gotFromInsis = true;
451
+ this.gosPersonData = null;
452
+ }
453
+
454
+ resetForm(clearIinAndPhone = true) {
455
+ super.resetPerson(clearIinAndPhone);
456
+ this.job = null;
457
+ this.jobPosition = null;
458
+ this.jobPlace = null;
459
+ this.registrationCountry = new Value();
460
+ this.registrationProvince = new Value();
461
+ this.registrationRegion = new Value();
462
+ this.registrationRegionType = new Value();
463
+ this.registrationCity = new Value();
464
+ this.registrationQuarter = null;
465
+ this.registrationMicroDistrict = null;
466
+ this.registrationStreet = null;
467
+ this.registrationNumberHouse = null;
468
+ this.registrationNumberApartment = null;
469
+ this.birthRegion = new Value();
470
+ this.documentType = new Value();
471
+ this.documentNumber = null;
472
+ this.documentIssuers = new Value();
473
+ this.documentDate = null;
474
+ this.documentExpire = null;
475
+ this.signOfResidency = new Value();
476
+ this.signOfIPDL = new Value();
477
+ this.countryOfCitizenship = new Value();
478
+ this.countryOfTaxResidency = new Value();
479
+ this.economySectorCode = new Value();
480
+ if (clearIinAndPhone === true) {
481
+ this.phoneNumber = null;
482
+ }
483
+ this.homePhone = null;
484
+ this.email = null;
485
+ this.address = null;
486
+ this.familyStatus = new Value();
487
+ this.isTerror = new Value();
488
+ this.relationDegree = new Value();
489
+ this.isDisability = new Value();
490
+ this.disabilityGroup = null;
491
+ this.percentageOfPayoutAmount = null;
492
+ this.gotFromInsis = true;
493
+ this.gosPersonData = null;
494
+ }
495
+
496
+ getPattern(pattern: string) {
497
+ const key = `_${pattern}Pattern` as keyof typeof this;
498
+ return this[key];
499
+ }
500
+
501
+ validatedMessage(valid: any, msg = 'Обязательное поле') {
502
+ return {
503
+ error: valid,
504
+ msg,
505
+ };
506
+ }
507
+
508
+ validateFullName() {
509
+ return this.lastName !== null && this.firstName !== null;
510
+ }
511
+
512
+ getFullNameShorted() {
513
+ return this.validateFullName()
514
+ ? `${this.lastName} ${this.firstName?.charAt(0)}. ${
515
+ this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''
516
+ }`
517
+ : null;
518
+ }
519
+
520
+ getFullName() {
521
+ return this.validateFullName()
522
+ ? this.lastName + ' ' + this.firstName + ' ' + this.middleName != ''
523
+ ? this.middleName?.charAt(0)
524
+ : ''
525
+ : null;
526
+ }
527
+ }
528
+
529
+ export class PolicyholderForm extends Form {
530
+ constructor(...args: any) {
531
+ super(...args);
532
+ }
533
+ }
534
+
535
+ export class InsuredForm extends Form {
536
+ constructor(...args: any) {
537
+ super(...args);
538
+ }
539
+ }
540
+
541
+ export class BeneficiaryForm extends Form {
542
+ insurancePay: Value;
543
+ constructor(...args: any) {
544
+ super(...args);
545
+ this.insurancePay = new Value();
546
+ }
547
+ }
548
+
549
+ export class BeneficialOwnerForm extends Form {
550
+ constructor(...args: any) {
551
+ super(...args);
552
+ }
553
+ }
554
+
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
+ ) {
591
+ 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
+ }
629
+ }
630
+
631
+ export class ProductConditions {
632
+ insuranceCase: string | null;
633
+ coverPeriod: string | null;
634
+ payPeriod: string | null;
635
+ termsOfInsurance: string | null;
636
+ annualIncome: string | null;
637
+ processIndexRate: Value;
638
+ requestedSumInsured: string | null;
639
+ insurancePremiumPerMonth: string | null;
640
+ establishingGroupDisabilityFromThirdYear: string | null;
641
+ possibilityToChange: string | null;
642
+ deathOfInsuredDueToAccident: Value;
643
+ establishingGroupDisability: Value;
644
+ temporaryDisability: Value;
645
+ bodyInjury: Value;
646
+ criticalIllnessOfTheInsured: Value;
647
+ paymentPeriod: Value;
648
+ amountOfInsurancePremium: string | null;
649
+ lifeMultiply: string | null;
650
+ lifeAdditive: string | null;
651
+ lifeMultiplyClient: string | null;
652
+ lifeAdditiveClient: string | null;
653
+ adbMultiply: string | null;
654
+ adbAdditive: string | null;
655
+ disabilityMultiply: string | null;
656
+ disabilityAdditive: string | null;
657
+ processTariff: Value;
658
+ riskGroup: Value;
659
+ riskGroup2: Value;
660
+ constructor(
661
+ insuranceCase = null,
662
+ coverPeriod = null,
663
+ payPeriod = null,
664
+ termsOfInsurance = null,
665
+ annualIncome = null,
666
+ processIndexRate = new Value(),
667
+ requestedSumInsured = null,
668
+ insurancePremiumPerMonth = null,
669
+ establishingGroupDisabilityFromThirdYear = null,
670
+ possibilityToChange = null,
671
+ deathOfInsuredDueToAccident = new Value(),
672
+ establishingGroupDisability = new Value(),
673
+ temporaryDisability = new Value(),
674
+ bodyInjury = new Value(),
675
+ criticalIllnessOfTheInsured = new Value(),
676
+ paymentPeriod = new Value(),
677
+ amountOfInsurancePremium = null,
678
+ lifeMultiply = null,
679
+ lifeAdditive = null,
680
+ lifeMultiplyClient = null,
681
+ lifeAdditiveClient = null,
682
+ adbMultiply = null,
683
+ adbAdditive = null,
684
+ disabilityMultiply = null,
685
+ disabilityAdditive = null,
686
+ processTariff = new Value(),
687
+ riskGroup = new Value(),
688
+ riskGroup2 = new Value(),
689
+ ) {
690
+ this.insuranceCase = insuranceCase;
691
+ this.coverPeriod = coverPeriod;
692
+ this.payPeriod = payPeriod;
693
+ this.termsOfInsurance = termsOfInsurance;
694
+ this.annualIncome = annualIncome;
695
+ this.processIndexRate = processIndexRate;
696
+ this.requestedSumInsured = requestedSumInsured;
697
+ this.insurancePremiumPerMonth = insurancePremiumPerMonth;
698
+ this.establishingGroupDisabilityFromThirdYear =
699
+ establishingGroupDisabilityFromThirdYear;
700
+ this.possibilityToChange = possibilityToChange;
701
+ this.deathOfInsuredDueToAccident = deathOfInsuredDueToAccident;
702
+ this.establishingGroupDisability = establishingGroupDisability;
703
+ this.temporaryDisability = temporaryDisability;
704
+ this.bodyInjury = bodyInjury;
705
+ this.criticalIllnessOfTheInsured = criticalIllnessOfTheInsured;
706
+ this.paymentPeriod = paymentPeriod;
707
+ this.amountOfInsurancePremium = amountOfInsurancePremium;
708
+ this.lifeMultiply = lifeMultiply;
709
+ this.lifeAdditive = lifeAdditive;
710
+ this.lifeMultiplyClient = lifeMultiplyClient;
711
+ this.lifeAdditiveClient = lifeAdditiveClient;
712
+ this.adbMultiply = adbMultiply;
713
+ this.adbAdditive = adbAdditive;
714
+ this.disabilityMultiply = disabilityMultiply;
715
+ this.disabilityAdditive = disabilityAdditive;
716
+ this.processTariff = processTariff;
717
+ this.riskGroup = riskGroup;
718
+ this.riskGroup2 = riskGroup2;
719
+ }
720
+ }
721
+
722
+ export class DataStoreClass {
723
+ historyPageIndex: number;
724
+ historyPageSize: number;
725
+ historyTotalItems: number;
726
+ isColumnAsc = { ...InitialColumns() };
727
+ idleKey: number;
728
+ processList: any[];
729
+ countries: Value[];
730
+ citizenshipCountries: Value[];
731
+ taxCountries: Value[];
732
+ states: Value[];
733
+ regions: Value[];
734
+ cities: Value[];
735
+ localityTypes: Value[];
736
+ dicFileTypeList: Value[];
737
+ documentTypes: Value[];
738
+ documentIssuers: Value[];
739
+ familyStatuses: Value[];
740
+ relations: Value[];
741
+ surveyByHealthSecond: any[];
742
+ surveyByCriticalSecond: any[];
743
+ questionRefs: any[];
744
+ epayLink: string;
745
+ residents: Value[];
746
+ ipdl: Value[];
747
+ economySectorCode: Value[];
748
+ gender: Value[];
749
+ fontSize: number;
750
+ isFontChangerOpen = false;
751
+ isLoading = false;
752
+ userNotFound = false;
753
+ user: User;
754
+ accessToken = null;
755
+ refreshToken = null;
756
+ processCoverTypeSum: any[];
757
+ taskList: any[];
758
+ processHistory: any[];
759
+ contragentList: any[];
760
+ contragentFormKey: string;
761
+ processCode: number | null;
762
+ groupCode: string;
763
+ userGroups: any[];
764
+ onMainPage: boolean;
765
+ constructor() {
766
+ this.historyPageIndex = 1;
767
+ this.historyPageSize = 10;
768
+ this.historyTotalItems = 0;
769
+ this.isColumnAsc = { ...InitialColumns() };
770
+ this.idleKey = 999;
771
+ this.processList = [];
772
+ this.countries = [];
773
+ this.citizenshipCountries = [];
774
+ this.taxCountries = [];
775
+ this.states = [];
776
+ this.regions = [];
777
+ this.cities = [];
778
+ this.localityTypes = [];
779
+ this.dicFileTypeList = [];
780
+ this.documentTypes = [];
781
+ this.documentIssuers = [];
782
+ this.familyStatuses = [];
783
+ this.relations = [];
784
+ this.surveyByHealthSecond = [];
785
+ this.surveyByCriticalSecond = [];
786
+ this.questionRefs = [];
787
+ this.epayLink = '';
788
+ this.residents = [];
789
+ this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
790
+ this.economySectorCode = [];
791
+ this.gender = [
792
+ new Value(0, null),
793
+ new Value(1, 'Мужской'),
794
+ new Value(2, 'Женский'),
795
+ ];
796
+ this.fontSize = 14;
797
+ this.isFontChangerOpen = false;
798
+ this.isLoading = false;
799
+ this.userNotFound = false;
800
+ this.user = new User();
801
+ this.accessToken = null;
802
+ this.refreshToken = null;
803
+ this.processCoverTypeSum = [];
804
+ this.taskList = [];
805
+ this.processHistory = [];
806
+ this.contragentList = [];
807
+ this.contragentFormKey = 'contragentForm';
808
+ this.processCode = null;
809
+ this.groupCode = 'Work';
810
+ this.userGroups = [];
811
+ this.onMainPage = true;
812
+ }
813
+ }
814
+
815
+ export class StoreClass {
816
+ birthInfos: any[];
817
+ SaleChanellPolicy: Value;
818
+ AgentData: {
819
+ agentId: null;
820
+ manId: 0;
821
+ fullName: '';
822
+ officeId: null;
823
+ officeCode: null;
824
+ saleChannel: '';
825
+ managerName: '';
826
+ };
827
+ RegionPolicy: Value;
828
+ ManagerPolicy: Value;
829
+ 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;
842
+ };
843
+ isPolicyholderInsured: boolean = false;
844
+ isPolicyholderBeneficiary: boolean = false;
845
+ isActOwnBehalf: boolean = true;
846
+ hasRepresentative: boolean = false;
847
+ applicationData: { processInstanceId: number | string };
848
+ policyholderForm: PolicyholderForm;
849
+ policyholderFormKey: string;
850
+ policyholdersRepresentativeForm: PolicyholdersRepresentativeForm;
851
+ policyholdersRepresentativeFormKey: string;
852
+ beneficiaryForm: BeneficiaryForm[];
853
+ beneficiaryFormKey: string;
854
+ beneficiaryFormIndex: number;
855
+ beneficialOwnerForm: BeneficialOwnerForm[];
856
+ beneficialOwnerFormIndex: number;
857
+ beneficialOwnerFormKey: string;
858
+ insuredForm: InsuredForm[];
859
+ insuredFormKey: string;
860
+ insuredFormIndex: number;
861
+ productConditionsForm: ProductConditions;
862
+ productConditionsFormKey: string;
863
+ questionnaireByHealth: any;
864
+ questionnaireByCritical: any[];
865
+ canBeClaimed: boolean | null;
866
+ applicationTaskId: string | null;
867
+ otpTokenId: string | null;
868
+ constructor(procuctConditionsTitle: string) {
869
+ this.birthInfos = [];
870
+ this.SaleChanellPolicy = new Value();
871
+ this.AgentData = {
872
+ agentId: null,
873
+ manId: 0,
874
+ fullName: '',
875
+ officeId: null,
876
+ officeCode: null,
877
+ saleChannel: '',
878
+ managerName: '',
879
+ };
880
+ this.RegionPolicy = new Value();
881
+ this.ManagerPolicy = new Value();
882
+ this.isDisabled = {
883
+ policyholderForm: true,
884
+ beneficiaryForm: true,
885
+ beneficialOwnerForm: true,
886
+ insuredForm: true,
887
+ policyholdersRepresentativeForm: true,
888
+ productConditionsForm: true,
889
+ recalculationForm: true,
890
+ surveyByHealthBase: true,
891
+ surveyByCriticalBase: true,
892
+ surveyByHealthBasePolicyholder: true,
893
+ surveyByCriticalBasePolicyholder: true,
894
+ insuranceDocument: true,
895
+ };
896
+ this.isPolicyholderInsured = false;
897
+ this.isPolicyholderBeneficiary = false;
898
+ this.isActOwnBehalf = true;
899
+ this.hasRepresentative = false;
900
+ this.applicationData = { processInstanceId: 0 };
901
+ this.policyholderForm = new PolicyholderForm();
902
+ this.policyholderFormKey = 'policyholderForm';
903
+ this.policyholdersRepresentativeForm =
904
+ new PolicyholdersRepresentativeForm();
905
+ this.policyholdersRepresentativeFormKey = 'policyholdersRepresentativeForm';
906
+ this.beneficiaryForm = [new BeneficiaryForm()];
907
+ this.beneficiaryFormKey = 'beneficiaryForm';
908
+ this.beneficiaryFormIndex = 0;
909
+ this.beneficialOwnerForm = [new BeneficialOwnerForm()];
910
+ this.beneficialOwnerFormIndex = 0;
911
+ this.beneficialOwnerFormKey = 'beneficialOwnerForm';
912
+ this.insuredForm = [new InsuredForm()];
913
+ this.insuredFormKey = 'insuredForm';
914
+ this.insuredFormIndex = 0;
915
+ this.productConditionsForm = new ProductConditions();
916
+ this.productConditionsFormKey = 'productConditionsForm';
917
+ this.questionnaireByHealth = {};
918
+ this.questionnaireByCritical = [];
919
+ this.canBeClaimed = null;
920
+ this.applicationTaskId = null;
921
+ this.otpTokenId = null;
922
+ }
923
+ }