hl-core 0.0.10-beta.41-4 → 0.0.10-beta.41-6

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 (2) hide show
  1. package/composables/classes.ts +832 -803
  2. package/package.json +1 -1
@@ -5,6 +5,34 @@ import type * as Types from '../types';
5
5
 
6
6
  type LinkType = Partial<RouteLocationNormalized> | Partial<RouteLocationNormalizedLoaded> | string | null | boolean;
7
7
 
8
+ export {
9
+ MenuItem,
10
+ Value,
11
+ CountryValue,
12
+ IDocument,
13
+ DocumentItem,
14
+ MenuOption,
15
+ InitialColumns,
16
+ User,
17
+ Contragent,
18
+ Member,
19
+ CalculatorForm,
20
+ ProductConditions,
21
+ MemberSettings,
22
+ DataStoreClass,
23
+ FormStoreClass,
24
+ Address,
25
+ PolicyholderActivity,
26
+ BaseGroupClass,
27
+ PhysGroupClass,
28
+ GroupMember,
29
+ BankInfoClass,
30
+ PolicyholderClass,
31
+ BeneficialOwner,
32
+ TransferContract,
33
+ RequiredDocument,
34
+ };
35
+
8
36
  class MenuItemConfig {
9
37
  id: any;
10
38
  title: string | null;
@@ -51,7 +79,13 @@ class MenuItemConfig {
51
79
  }
52
80
  }
53
81
 
54
- export class Value {
82
+ class MenuItem extends MenuItemConfig {
83
+ constructor({ id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip }: MenuItemConfig = new MenuItemConfig()) {
84
+ super(id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip);
85
+ }
86
+ }
87
+
88
+ class Value {
55
89
  id: string | number | null;
56
90
  code: string | number | null;
57
91
  nameRu: string | null;
@@ -67,7 +101,7 @@ export class Value {
67
101
  }
68
102
  }
69
103
 
70
- export class CountryValue extends Value {
104
+ class CountryValue extends Value {
71
105
  countryTypeCode: string | number | null;
72
106
 
73
107
  constructor(countryTypeCode = null, ...args: any) {
@@ -76,7 +110,7 @@ export class CountryValue extends Value {
76
110
  }
77
111
  }
78
112
 
79
- export class IDocument {
113
+ class IDocument {
80
114
  id?: string;
81
115
  processInstanceId?: string;
82
116
  iin?: string;
@@ -128,7 +162,7 @@ export class IDocument {
128
162
  }
129
163
  }
130
164
 
131
- export class DocumentItem extends IDocument {
165
+ class DocumentItem extends IDocument {
132
166
  constructor(
133
167
  {
134
168
  id,
@@ -152,7 +186,7 @@ export class DocumentItem extends IDocument {
152
186
  }
153
187
  }
154
188
 
155
- export class MenuOption {
189
+ class MenuOption {
156
190
  text: string | null;
157
191
  subtitle: string | null;
158
192
  icon: string | null;
@@ -168,7 +202,7 @@ export class MenuOption {
168
202
  }
169
203
  }
170
204
 
171
- export const InitialColumns = (): {
205
+ const InitialColumns = (): {
172
206
  addRegNumber: boolean | null;
173
207
  number: boolean | null;
174
208
  iin: boolean | null;
@@ -190,7 +224,7 @@ export const InitialColumns = (): {
190
224
  };
191
225
  };
192
226
 
193
- export class User {
227
+ class User {
194
228
  login: string | null;
195
229
  password: string | null;
196
230
  roles: string[];
@@ -331,7 +365,7 @@ class Person {
331
365
  }
332
366
  }
333
367
 
334
- export class Contragent extends Person {
368
+ class Contragent extends Person {
335
369
  economySectorCode: Value;
336
370
  countryOfCitizenship: Value;
337
371
  countryOfTaxResidency: Value;
@@ -412,232 +446,553 @@ export class Contragent extends Person {
412
446
  }
413
447
  }
414
448
 
415
- export class CalculatorForm {
416
- country: Value;
417
- countries: CountryValue[] | null;
418
- purpose: Value;
419
- workType: Value;
420
- sportsType: Value;
421
- type: Value;
422
- days: string | number | null;
423
- maxDays: Value;
424
- age: string | null;
425
- price: string | null;
426
- professionType: Value;
427
- amount: Value;
428
- startDate: string | null;
429
- endDate: string | null;
430
- period: Value;
431
- currency: string | null;
432
-
433
- constructor() {
434
- this.country = new Value();
435
- this.countries = [];
436
- this.purpose = new Value();
437
- this.workType = new Value();
438
- this.sportsType = new Value();
439
- this.type = new Value();
440
- this.days = null;
441
- this.maxDays = new Value();
442
- this.age = null;
443
- this.price = null;
444
- this.professionType = new Value();
445
- this.amount = new Value();
446
- this.startDate = null;
447
- this.endDate = null;
448
- this.period = new Value();
449
- this.currency = null;
450
- }
451
- }
452
-
453
- export class ProductConditions {
454
- signDate: string | null;
455
- birthDate: string | null;
456
- gender: Value;
457
- insuranceCase: string | null;
458
- coverPeriod: number | null;
459
- payPeriod: number | null;
460
- termsOfInsurance: string | null;
461
- annualIncome: string | null;
462
- processIndexRate: Value;
463
- processGfot: Value;
449
+ class Member extends Person {
450
+ response?: {
451
+ contragent?: Types.ContragentType;
452
+ questionnaires?: Types.ContragentQuestionaries[];
453
+ contacts?: Types.ContragentContacts[];
454
+ documents?: Types.ContragentDocuments[];
455
+ addresses?: Types.ContragentAddress[];
456
+ };
457
+ verifyType: any;
458
+ verifyDate: any;
459
+ postIndex: string | null;
460
+ isPdl: boolean;
461
+ migrationCard: string | null;
462
+ migrationCardIssueDate: string | null;
463
+ migrationCardExpireDate: string | null;
464
+ confirmDocType: string | null;
465
+ confirmDocNumber: string | null;
466
+ confirmDocIssueDate: string | null;
467
+ confirmDocExpireDate: string | null;
468
+ notaryLongName: string | null;
469
+ notaryLicenseNumber: string | null;
470
+ notaryLicenseDate: string | null;
471
+ notaryLicenseIssuer: string | null;
472
+ jurLongName: string | null;
473
+ fullNameRod: string | null;
474
+ confirmDocTypeKz: string | null;
475
+ confirmDocTypeRod: string | null;
476
+ isNotary: boolean;
477
+ insurancePay: Value;
478
+ job: string | null;
479
+ jobPosition: string | null;
480
+ jobPlace: string | null;
481
+ positionCode: string | null;
482
+ registrationCountry: Value;
483
+ registrationProvince: Value;
484
+ registrationRegion: Value;
485
+ registrationRegionType: Value;
486
+ registrationCity: Value;
487
+ registrationQuarter?: string | null;
488
+ registrationMicroDistrict?: string | null;
489
+ registrationStreet?: string | null;
490
+ registrationNumberHouse?: string | null;
491
+ registrationNumberApartment?: string | null;
492
+ birthRegion: Value;
493
+ documentType: Value;
494
+ documentNumber: string | null;
495
+ documentIssuers: Types.Base.Document.IssuerOther;
496
+ documentDate: string | null;
497
+ documentExpire: string | null;
498
+ signOfResidency: Value;
499
+ signOfIPDL: Value;
500
+ countryOfCitizenship: Value;
501
+ countryOfTaxResidency: Value;
502
+ addTaxResidency: Value;
503
+ economySectorCode: Value;
504
+ phoneNumber: string | null;
505
+ homePhone: string | null;
506
+ email: string | null;
507
+ address: string | null;
508
+ familyStatus: Value;
509
+ isTerror: null;
510
+ relationDegree: Value;
511
+ isDisability: boolean;
512
+ disabilityGroup: Value | null;
513
+ percentageOfPayoutAmount: string | number | null;
514
+ _cyrPattern: RegExp;
515
+ _numPattern: RegExp;
516
+ _phonePattern: RegExp;
517
+ _emailPattern: RegExp;
518
+ gotFromInsis: boolean | null;
519
+ gosPersonData: Types.Api.GBD.Person | null;
520
+ parsedDocument: any;
521
+ hasAgreement: boolean | null;
522
+ otpTokenId: string | null;
523
+ otpCode: string;
524
+ documentsList: Types.ContragentDocuments[];
525
+ isInsuredUnderage?: boolean = false;
526
+ bankInfo: BankInfoClass;
464
527
  transferContractCompany: Value;
465
- requestedSumInsured: number | string | null;
466
- requestedSumInsuredInDollar: number | string | null;
467
- insurancePremiumPerMonth: number | string | null;
468
- insurancePremiumPerMonthInDollar: number | string | null;
469
- establishingGroupDisabilityFromThirdYear: string | null;
470
- possibilityToChange: string | null;
471
- deathOfInsuredDueToAccident: Value;
472
- establishingGroupDisability: Value;
473
- temporaryDisability: Value;
474
- bodyInjury: Value;
475
- criticalIllnessOfTheInsured: Value;
476
- paymentPeriod: Value;
477
- amountOfInsurancePremium: string | number | null;
478
- lifeMultiply: string | number | null;
479
- lifeAdditive: string | number | null;
480
- lifeMultiplyClient: string | number | null;
481
- lifeAdditiveClient: string | number | null;
482
- adbMultiply: string | number | null;
483
- adbAdditive: string | number | null;
484
- disabilityMultiply: string | number | null;
485
- disabilityAdditive: string | number | null;
486
- riskGroup: Value;
487
- riskGroup2: Value;
488
- additionalConditionAnnuityPayments: boolean;
489
- guaranteedPeriod: number | null;
490
- typeAnnuityInsurance: Value;
491
- termAnnuityPayments: number | string | null;
492
- periodAnnuityPayment: Value;
493
- amountAnnuityPayments: number | string | null;
494
- isRecalculated: boolean;
495
- totalAmount5: number | string | null;
496
- totalAmount7: number | string | null;
497
- statePremium5: number | string | null;
498
- statePremium7: number | string | null;
499
- calculatorForm: CalculatorForm;
500
- agentCommission: number | null;
501
- fixInsSum: number | string | null;
502
- amountRefunded: number | string | null;
503
- amountPaid: number | string | null;
504
- calcDate: string | null;
505
- contractEndDate: string | null;
506
- currency: Value;
528
+ digitalDocument: IDocument | null;
529
+ identityDocument: {
530
+ documentType: Value;
531
+ documentNumber: string | null;
532
+ issuedOn: string | null;
533
+ issuedBy: Value;
534
+ validUntil: string | null;
535
+ };
507
536
 
508
537
  constructor(
509
- insuranceCase = null,
510
- coverPeriod = null,
511
- payPeriod = null,
512
- termsOfInsurance = null,
513
- annualIncome = null,
514
- processIndexRate = new Value(),
515
- processGfot = new Value(),
516
- transferContractCompany = new Value(),
517
- requestedSumInsured = null,
518
- insurancePremiumPerMonth = null,
519
- establishingGroupDisabilityFromThirdYear = null,
520
- possibilityToChange = null,
521
- deathOfInsuredDueToAccident = new Value(),
522
- establishingGroupDisability = new Value(),
523
- temporaryDisability = new Value(),
524
- bodyInjury = new Value(),
525
- criticalIllnessOfTheInsured = new Value(),
526
- paymentPeriod = new Value(),
527
- amountOfInsurancePremium = null,
528
- lifeMultiply = null,
529
- lifeAdditive = null,
530
- lifeMultiplyClient = null,
531
- lifeAdditiveClient = null,
532
- adbMultiply = null,
533
- adbAdditive = null,
534
- disabilityMultiply = null,
535
- disabilityAdditive = null,
536
- riskGroup = new Value(),
537
- riskGroup2 = new Value(),
538
- additionalConditionAnnuityPayments = false,
539
- guaranteedPeriod = null,
540
- typeAnnuityInsurance = new Value(),
541
- termAnnuityPayments = null,
542
- periodAnnuityPayment = new Value(),
543
- amountAnnuityPayments = null,
544
- isRecalculated = false,
545
- totalAmount5 = null,
546
- totalAmount7 = null,
547
- statePremium5 = null,
548
- statePremium7 = null,
549
- calculatorForm = new CalculatorForm(),
550
- agentCommission = null,
551
- fixInsSum = null,
552
- amountRefunded = null,
553
- amountPaid = null,
554
- calcDate = null,
555
- contractEndDate = null,
556
- currency = new Value(),
557
- ) {
558
- this.requestedSumInsuredInDollar = null;
559
- this.insurancePremiumPerMonthInDollar = null;
560
- this.signDate = null;
561
- this.birthDate = null;
562
- this.gender = new Value();
563
- this.insuranceCase = insuranceCase;
564
- this.coverPeriod = coverPeriod;
565
- this.payPeriod = payPeriod;
566
- this.termsOfInsurance = termsOfInsurance;
567
- this.annualIncome = annualIncome;
568
- this.processIndexRate = processIndexRate;
569
- this.processGfot = processGfot;
570
- this.transferContractCompany = transferContractCompany;
571
- this.requestedSumInsured = requestedSumInsured;
572
- this.insurancePremiumPerMonth = insurancePremiumPerMonth;
573
- this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
574
- this.possibilityToChange = possibilityToChange;
575
- this.deathOfInsuredDueToAccident = deathOfInsuredDueToAccident;
576
- this.establishingGroupDisability = establishingGroupDisability;
577
- this.temporaryDisability = temporaryDisability;
578
- this.bodyInjury = bodyInjury;
579
- this.criticalIllnessOfTheInsured = criticalIllnessOfTheInsured;
580
- this.paymentPeriod = paymentPeriod;
581
- this.amountOfInsurancePremium = amountOfInsurancePremium;
582
- this.lifeMultiply = lifeMultiply;
583
- this.lifeAdditive = lifeAdditive;
584
- this.lifeMultiplyClient = lifeMultiplyClient;
585
- this.lifeAdditiveClient = lifeAdditiveClient;
586
- this.adbMultiply = adbMultiply;
587
- this.adbAdditive = adbAdditive;
588
- this.disabilityMultiply = disabilityMultiply;
589
- this.disabilityAdditive = disabilityAdditive;
590
- this.riskGroup = riskGroup;
591
- this.riskGroup2 = riskGroup2;
592
- this.additionalConditionAnnuityPayments = additionalConditionAnnuityPayments;
593
- this.guaranteedPeriod = guaranteedPeriod;
594
- this.typeAnnuityInsurance = typeAnnuityInsurance;
595
- this.termAnnuityPayments = termAnnuityPayments;
596
- this.periodAnnuityPayment = periodAnnuityPayment;
597
- this.amountAnnuityPayments = amountAnnuityPayments;
598
- this.isRecalculated = isRecalculated;
599
- this.totalAmount5 = totalAmount5;
600
- this.totalAmount7 = totalAmount7;
601
- this.statePremium5 = statePremium5;
602
- this.statePremium7 = statePremium7;
603
- this.calculatorForm = calculatorForm;
604
- this.agentCommission = agentCommission;
605
- this.fixInsSum = fixInsSum;
606
- this.amountRefunded = amountRefunded;
607
- this.amountPaid = amountPaid;
608
- this.calcDate = calcDate;
609
- this.contractEndDate = contractEndDate;
610
- this.currency = currency;
538
+ id = 0,
539
+ type = 1,
540
+ iin = null,
541
+ phoneNumber = null,
542
+ longName = null,
543
+ lastName = null,
544
+ firstName = null,
545
+ middleName = null,
546
+ birthDate = null,
547
+ gender = new Value(),
548
+ genderName = null,
549
+ birthPlace = new Value(),
550
+ age = null,
551
+ registrationDate = null,
552
+ job = null,
553
+ jobPosition = null,
554
+ jobPlace = null,
555
+ positionCode = null,
556
+ registrationCountry = new Value(),
557
+ registrationProvince = new Value(),
558
+ registrationRegion = new Value(),
559
+ registrationRegionType = new Value(),
560
+ registrationCity = new Value(),
561
+ registrationQuarter = null,
562
+ registrationMicroDistrict = null,
563
+ registrationStreet = null,
564
+ registrationNumberHouse = null,
565
+ registrationNumberApartment = null,
566
+ birthRegion = new Value(),
567
+ documentType = new Value(),
568
+ documentNumber = null,
569
+ documentIssuers = new Value(),
570
+ documentDate = null,
571
+ documentExpire = null,
572
+ signOfResidency = new Value(),
573
+ signOfIPDL = new Value(),
574
+ isTerror = null,
575
+ countryOfCitizenship = new Value(),
576
+ countryOfTaxResidency = new Value(),
577
+ addTaxResidency = new Value(),
578
+ economySectorCode = new Value(),
579
+ homePhone = null,
580
+ email = null,
581
+ address = null,
582
+ familyStatus = new Value(),
583
+ relationDegree = new Value(),
584
+ isDisability = false,
585
+ disabilityGroupId = new Value(),
586
+ percentageOfPayoutAmount = null,
587
+ migrationCard = null,
588
+ migrationCardIssueDate = null,
589
+ migrationCardExpireDate = null,
590
+ confirmDocType = null,
591
+ confirmDocNumber = null,
592
+ confirmDocIssueDate = null,
593
+ confirmDocExpireDate = null,
594
+ notaryLongName = null,
595
+ notaryLicenseNumber = null,
596
+ notaryLicenseDate = null,
597
+ notaryLicenseIssuer = null,
598
+ jurLongName = null,
599
+ fullNameRod = null,
600
+ confirmDocTypeKz = null,
601
+ confirmDocTypeRod = null,
602
+ isNotary = false,
603
+ ) {
604
+ super(id, type, iin, longName, lastName, firstName, middleName, birthDate, gender, genderName, birthPlace, age);
605
+ this.documentsList = [];
606
+ this.postIndex = null;
607
+ this.isPdl = false;
608
+ this.migrationCard = migrationCard;
609
+ this.migrationCardIssueDate = migrationCardIssueDate;
610
+ this.migrationCardExpireDate = migrationCardExpireDate;
611
+ this.confirmDocType = confirmDocType;
612
+ this.confirmDocNumber = confirmDocNumber;
613
+ this.confirmDocIssueDate = confirmDocIssueDate;
614
+ this.confirmDocExpireDate = confirmDocExpireDate;
615
+ this.notaryLongName = notaryLongName;
616
+ this.notaryLicenseNumber = notaryLicenseNumber;
617
+ this.notaryLicenseDate = notaryLicenseDate;
618
+ this.notaryLicenseIssuer = notaryLicenseIssuer;
619
+ this.jurLongName = jurLongName;
620
+ this.fullNameRod = fullNameRod;
621
+ this.confirmDocTypeKz = confirmDocTypeKz;
622
+ this.confirmDocTypeRod = confirmDocTypeRod;
623
+ this.isNotary = isNotary;
624
+ this.insurancePay = new Value();
625
+ this.job = job;
626
+ this.jobPosition = jobPosition;
627
+ this.jobPlace = jobPlace;
628
+ this.positionCode = positionCode;
629
+ this.registrationCountry = registrationCountry;
630
+ this.registrationProvince = registrationProvince;
631
+ this.registrationRegion = registrationRegion;
632
+ this.registrationRegionType = registrationRegionType;
633
+ this.registrationCity = registrationCity;
634
+ this.registrationQuarter = registrationQuarter;
635
+ this.registrationMicroDistrict = registrationMicroDistrict;
636
+ this.registrationStreet = registrationStreet;
637
+ this.registrationNumberHouse = registrationNumberHouse;
638
+ this.registrationNumberApartment = registrationNumberApartment;
639
+ this.birthRegion = birthRegion;
640
+ this.documentType = documentType;
641
+ this.documentNumber = documentNumber;
642
+ this.documentIssuers = documentIssuers;
643
+ this.documentDate = documentDate;
644
+ this.documentExpire = documentExpire;
645
+ this.signOfResidency = signOfResidency;
646
+ this.signOfIPDL = signOfIPDL;
647
+ this.countryOfCitizenship = countryOfCitizenship;
648
+ this.countryOfTaxResidency = countryOfTaxResidency;
649
+ this.addTaxResidency = addTaxResidency;
650
+ this.economySectorCode = economySectorCode;
651
+ this.phoneNumber = phoneNumber;
652
+ this.homePhone = homePhone;
653
+ this.email = email;
654
+ this.otpTokenId = null;
655
+ this.otpCode = '';
656
+ this.address = address;
657
+ this.familyStatus = familyStatus;
658
+ this.isTerror = isTerror;
659
+ this.relationDegree = relationDegree;
660
+ this.isDisability = isDisability;
661
+ this.disabilityGroup = disabilityGroupId;
662
+ this.percentageOfPayoutAmount = percentageOfPayoutAmount;
663
+ this._cyrPattern = /[\u0400-\u04FF -]+/;
664
+ this._numPattern = /[0-9]+/;
665
+ this._phonePattern = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
666
+ this._emailPattern = /.+@.+\..+/;
667
+ this.gotFromInsis = true;
668
+ this.gosPersonData = null;
669
+ this.parsedDocument = null;
670
+ this.hasAgreement = null;
671
+ this.bankInfo = new BankInfoClass();
672
+ this.transferContractCompany = new Value();
673
+ this.digitalDocument = null;
674
+ this.identityDocument = {
675
+ documentType: new Value(),
676
+ documentNumber: null,
677
+ issuedOn: null,
678
+ issuedBy: new Value(),
679
+ validUntil: null,
680
+ };
611
681
  }
612
682
 
613
- getSingleTripDays() {
614
- if (this.calculatorForm.startDate && this.calculatorForm.endDate) {
615
- const date1 = formatDate(this.calculatorForm.startDate);
616
- const date2 = formatDate(this.calculatorForm.endDate);
617
- if (date1 && date2) {
618
- const days = Math.ceil((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24)) + 1;
619
- if (days > 0) {
620
- return days;
621
- }
622
- }
683
+ resetMember(clearIinAndPhone: boolean = true) {
684
+ super.resetPerson(clearIinAndPhone);
685
+ this.job = null;
686
+ this.jobPosition = null;
687
+ this.jobPlace = null;
688
+ this.positionCode = null;
689
+ this.registrationCountry = new Value();
690
+ this.registrationProvince = new Value();
691
+ this.registrationRegion = new Value();
692
+ this.registrationRegionType = new Value();
693
+ this.registrationCity = new Value();
694
+ this.registrationQuarter = null;
695
+ this.registrationMicroDistrict = null;
696
+ this.registrationStreet = null;
697
+ this.registrationNumberHouse = null;
698
+ this.registrationNumberApartment = null;
699
+ this.birthRegion = new Value();
700
+ this.documentType = new Value();
701
+ this.documentNumber = null;
702
+ this.documentIssuers = new Value();
703
+ this.documentDate = null;
704
+ this.documentExpire = null;
705
+ this.signOfResidency = new Value();
706
+ this.signOfIPDL = new Value();
707
+ this.countryOfCitizenship = new Value();
708
+ this.countryOfTaxResidency = new Value();
709
+ this.economySectorCode = new Value();
710
+ if (clearIinAndPhone === true) {
711
+ this.phoneNumber = null;
623
712
  }
624
- return null;
713
+ this.homePhone = null;
714
+ this.email = null;
715
+ this.address = null;
716
+ this.familyStatus = new Value();
717
+ this.isTerror = null;
718
+ this.relationDegree = new Value();
719
+ this.isDisability = false;
720
+ this.disabilityGroup = null;
721
+ this.percentageOfPayoutAmount = null;
722
+ this.gotFromInsis = true;
723
+ this.gosPersonData = null;
724
+ this.parsedDocument = null;
725
+ this.hasAgreement = null;
726
+ this.insurancePay = new Value();
727
+ this.migrationCard = null;
728
+ this.migrationCardIssueDate = null;
729
+ this.migrationCardExpireDate = null;
730
+ this.confirmDocType = null;
731
+ this.confirmDocNumber = null;
732
+ this.confirmDocIssueDate = null;
733
+ this.confirmDocExpireDate = null;
734
+ this.notaryLongName = null;
735
+ this.notaryLicenseNumber = null;
736
+ this.notaryLicenseDate = null;
737
+ this.notaryLicenseIssuer = null;
738
+ this.jurLongName = null;
739
+ this.fullNameRod = null;
740
+ this.confirmDocTypeKz = null;
741
+ this.confirmDocTypeRod = null;
742
+ this.isNotary = false;
625
743
  }
626
- }
627
744
 
628
- export class MemberSettings {
629
- has?: boolean;
630
- isMultiple?: boolean;
631
- required?: boolean;
632
- limit?: number;
745
+ getPattern(pattern: string) {
746
+ const key = `_${pattern}Pattern` as keyof typeof this;
747
+ return this[key];
748
+ }
633
749
 
634
- constructor(options?: { has?: boolean; isMultiple?: boolean; required?: boolean; limit?: number }) {
635
- if (options) {
636
- this.has = options.has;
637
- this.isMultiple = options.isMultiple;
638
- this.limit = options.limit;
639
- if (this.has === true) {
640
- this.required = options.required;
750
+ validatedMessage(valid: any, msg = 'Обязательное поле') {
751
+ return {
752
+ error: valid,
753
+ msg,
754
+ };
755
+ }
756
+
757
+ validateFullName() {
758
+ return this.lastName !== null && this.firstName !== null;
759
+ }
760
+
761
+ getFullNameShorted() {
762
+ return this.validateFullName() ? `${this.lastName} ${this.firstName?.charAt(0)}. ${this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''}` : null;
763
+ }
764
+
765
+ getFullName() {
766
+ return this.validateFullName() ? (this.lastName + ' ' + this.firstName + ' ' + this.middleName != '' ? this.middleName?.charAt(0) : '') : null;
767
+ }
768
+ }
769
+
770
+ class CalculatorForm {
771
+ country: Value;
772
+ countries: CountryValue[] | null;
773
+ purpose: Value;
774
+ workType: Value;
775
+ sportsType: Value;
776
+ type: Value;
777
+ days: string | number | null;
778
+ maxDays: Value;
779
+ age: string | null;
780
+ price: string | null;
781
+ professionType: Value;
782
+ amount: Value;
783
+ startDate: string | null;
784
+ endDate: string | null;
785
+ period: Value;
786
+ currency: string | null;
787
+
788
+ constructor() {
789
+ this.country = new Value();
790
+ this.countries = [];
791
+ this.purpose = new Value();
792
+ this.workType = new Value();
793
+ this.sportsType = new Value();
794
+ this.type = new Value();
795
+ this.days = null;
796
+ this.maxDays = new Value();
797
+ this.age = null;
798
+ this.price = null;
799
+ this.professionType = new Value();
800
+ this.amount = new Value();
801
+ this.startDate = null;
802
+ this.endDate = null;
803
+ this.period = new Value();
804
+ this.currency = null;
805
+ }
806
+ }
807
+
808
+ class ProductConditions {
809
+ signDate: string | null;
810
+ birthDate: string | null;
811
+ gender: Value;
812
+ insuranceCase: string | null;
813
+ coverPeriod: number | null;
814
+ payPeriod: number | null;
815
+ termsOfInsurance: string | null;
816
+ annualIncome: string | null;
817
+ processIndexRate: Value;
818
+ processGfot: Value;
819
+ transferContractCompany: Value;
820
+ requestedSumInsured: number | string | null;
821
+ requestedSumInsuredInDollar: number | string | null;
822
+ insurancePremiumPerMonth: number | string | null;
823
+ insurancePremiumPerMonthInDollar: number | string | null;
824
+ establishingGroupDisabilityFromThirdYear: string | null;
825
+ possibilityToChange: string | null;
826
+ deathOfInsuredDueToAccident: Value;
827
+ establishingGroupDisability: Value;
828
+ temporaryDisability: Value;
829
+ bodyInjury: Value;
830
+ criticalIllnessOfTheInsured: Value;
831
+ paymentPeriod: Value;
832
+ amountOfInsurancePremium: string | number | null;
833
+ lifeMultiply: string | number | null;
834
+ lifeAdditive: string | number | null;
835
+ lifeMultiplyClient: string | number | null;
836
+ lifeAdditiveClient: string | number | null;
837
+ adbMultiply: string | number | null;
838
+ adbAdditive: string | number | null;
839
+ disabilityMultiply: string | number | null;
840
+ disabilityAdditive: string | number | null;
841
+ riskGroup: Value;
842
+ riskGroup2: Value;
843
+ additionalConditionAnnuityPayments: boolean;
844
+ guaranteedPeriod: number | null;
845
+ typeAnnuityInsurance: Value;
846
+ termAnnuityPayments: number | string | null;
847
+ periodAnnuityPayment: Value;
848
+ amountAnnuityPayments: number | string | null;
849
+ isRecalculated: boolean;
850
+ totalAmount5: number | string | null;
851
+ totalAmount7: number | string | null;
852
+ statePremium5: number | string | null;
853
+ statePremium7: number | string | null;
854
+ calculatorForm: CalculatorForm;
855
+ agentCommission: number | null;
856
+ fixInsSum: number | string | null;
857
+ amountRefunded: number | string | null;
858
+ amountPaid: number | string | null;
859
+ calcDate: string | null;
860
+ contractEndDate: string | null;
861
+ currency: Value;
862
+
863
+ constructor(
864
+ insuranceCase = null,
865
+ coverPeriod = null,
866
+ payPeriod = null,
867
+ termsOfInsurance = null,
868
+ annualIncome = null,
869
+ processIndexRate = new Value(),
870
+ processGfot = new Value(),
871
+ transferContractCompany = new Value(),
872
+ requestedSumInsured = null,
873
+ insurancePremiumPerMonth = null,
874
+ establishingGroupDisabilityFromThirdYear = null,
875
+ possibilityToChange = null,
876
+ deathOfInsuredDueToAccident = new Value(),
877
+ establishingGroupDisability = new Value(),
878
+ temporaryDisability = new Value(),
879
+ bodyInjury = new Value(),
880
+ criticalIllnessOfTheInsured = new Value(),
881
+ paymentPeriod = new Value(),
882
+ amountOfInsurancePremium = null,
883
+ lifeMultiply = null,
884
+ lifeAdditive = null,
885
+ lifeMultiplyClient = null,
886
+ lifeAdditiveClient = null,
887
+ adbMultiply = null,
888
+ adbAdditive = null,
889
+ disabilityMultiply = null,
890
+ disabilityAdditive = null,
891
+ riskGroup = new Value(),
892
+ riskGroup2 = new Value(),
893
+ additionalConditionAnnuityPayments = false,
894
+ guaranteedPeriod = null,
895
+ typeAnnuityInsurance = new Value(),
896
+ termAnnuityPayments = null,
897
+ periodAnnuityPayment = new Value(),
898
+ amountAnnuityPayments = null,
899
+ isRecalculated = false,
900
+ totalAmount5 = null,
901
+ totalAmount7 = null,
902
+ statePremium5 = null,
903
+ statePremium7 = null,
904
+ calculatorForm = new CalculatorForm(),
905
+ agentCommission = null,
906
+ fixInsSum = null,
907
+ amountRefunded = null,
908
+ amountPaid = null,
909
+ calcDate = null,
910
+ contractEndDate = null,
911
+ currency = new Value(),
912
+ ) {
913
+ this.requestedSumInsuredInDollar = null;
914
+ this.insurancePremiumPerMonthInDollar = null;
915
+ this.signDate = null;
916
+ this.birthDate = null;
917
+ this.gender = new Value();
918
+ this.insuranceCase = insuranceCase;
919
+ this.coverPeriod = coverPeriod;
920
+ this.payPeriod = payPeriod;
921
+ this.termsOfInsurance = termsOfInsurance;
922
+ this.annualIncome = annualIncome;
923
+ this.processIndexRate = processIndexRate;
924
+ this.processGfot = processGfot;
925
+ this.transferContractCompany = transferContractCompany;
926
+ this.requestedSumInsured = requestedSumInsured;
927
+ this.insurancePremiumPerMonth = insurancePremiumPerMonth;
928
+ this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
929
+ this.possibilityToChange = possibilityToChange;
930
+ this.deathOfInsuredDueToAccident = deathOfInsuredDueToAccident;
931
+ this.establishingGroupDisability = establishingGroupDisability;
932
+ this.temporaryDisability = temporaryDisability;
933
+ this.bodyInjury = bodyInjury;
934
+ this.criticalIllnessOfTheInsured = criticalIllnessOfTheInsured;
935
+ this.paymentPeriod = paymentPeriod;
936
+ this.amountOfInsurancePremium = amountOfInsurancePremium;
937
+ this.lifeMultiply = lifeMultiply;
938
+ this.lifeAdditive = lifeAdditive;
939
+ this.lifeMultiplyClient = lifeMultiplyClient;
940
+ this.lifeAdditiveClient = lifeAdditiveClient;
941
+ this.adbMultiply = adbMultiply;
942
+ this.adbAdditive = adbAdditive;
943
+ this.disabilityMultiply = disabilityMultiply;
944
+ this.disabilityAdditive = disabilityAdditive;
945
+ this.riskGroup = riskGroup;
946
+ this.riskGroup2 = riskGroup2;
947
+ this.additionalConditionAnnuityPayments = additionalConditionAnnuityPayments;
948
+ this.guaranteedPeriod = guaranteedPeriod;
949
+ this.typeAnnuityInsurance = typeAnnuityInsurance;
950
+ this.termAnnuityPayments = termAnnuityPayments;
951
+ this.periodAnnuityPayment = periodAnnuityPayment;
952
+ this.amountAnnuityPayments = amountAnnuityPayments;
953
+ this.isRecalculated = isRecalculated;
954
+ this.totalAmount5 = totalAmount5;
955
+ this.totalAmount7 = totalAmount7;
956
+ this.statePremium5 = statePremium5;
957
+ this.statePremium7 = statePremium7;
958
+ this.calculatorForm = calculatorForm;
959
+ this.agentCommission = agentCommission;
960
+ this.fixInsSum = fixInsSum;
961
+ this.amountRefunded = amountRefunded;
962
+ this.amountPaid = amountPaid;
963
+ this.calcDate = calcDate;
964
+ this.contractEndDate = contractEndDate;
965
+ this.currency = currency;
966
+ }
967
+
968
+ getSingleTripDays() {
969
+ if (this.calculatorForm.startDate && this.calculatorForm.endDate) {
970
+ const date1 = formatDate(this.calculatorForm.startDate);
971
+ const date2 = formatDate(this.calculatorForm.endDate);
972
+ if (date1 && date2) {
973
+ const days = Math.ceil((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24)) + 1;
974
+ if (days > 0) {
975
+ return days;
976
+ }
977
+ }
978
+ }
979
+ return null;
980
+ }
981
+ }
982
+
983
+ class MemberSettings {
984
+ has?: boolean;
985
+ isMultiple?: boolean;
986
+ required?: boolean;
987
+ limit?: number;
988
+
989
+ constructor(options?: { has?: boolean; isMultiple?: boolean; required?: boolean; limit?: number }) {
990
+ if (options) {
991
+ this.has = options.has;
992
+ this.isMultiple = options.isMultiple;
993
+ this.limit = options.limit;
994
+ if (this.has === true) {
995
+ this.required = options.required;
641
996
  } else {
642
997
  this.required = false;
643
998
  }
@@ -645,7 +1000,7 @@ export class MemberSettings {
645
1000
  }
646
1001
  }
647
1002
 
648
- export class DataStoreClass {
1003
+ class DataStoreClass {
649
1004
  projectConfig: Types.Utils.ProjectConfig | null;
650
1005
  // IMP Контроллер фич
651
1006
  controls: {
@@ -1013,7 +1368,7 @@ export class DataStoreClass {
1013
1368
  }
1014
1369
  }
1015
1370
 
1016
- export class FormStoreClass {
1371
+ class FormStoreClass {
1017
1372
  documentName: string | null;
1018
1373
  regNumber: string | null;
1019
1374
  policyNumber: string | null;
@@ -1216,593 +1571,144 @@ export class FormStoreClass {
1216
1571
  surveyByHealthBase: true,
1217
1572
  surveyByCriticalBase: true,
1218
1573
  surveyByHealthBasePolicyholder: true,
1219
- surveyByCriticalBasePolicyholder: true,
1220
- insuranceDocument: true,
1221
- policyholderActivitiesForm: true,
1222
- accidentStatisticsForm: true,
1223
- };
1224
- this.isPolicyholderInsured = false;
1225
- this.isPolicyholderBeneficiary = false;
1226
- this.isActOwnBehalf = true;
1227
- this.hasRepresentative = false;
1228
- this.applicationData = { processInstanceId: 0 };
1229
- this.policyholderForm = new Member();
1230
- this.policyholderFormKey = StoreMembers.policyholderForm;
1231
- this.policyholdersRepresentativeForm = new Member();
1232
- this.policyholdersRepresentativeFormKey = StoreMembers.policyholdersRepresentativeForm;
1233
- this.beneficiaryForm = [new Member()];
1234
- this.beneficiaryFormKey = StoreMembers.beneficiaryForm;
1235
- this.beneficiaryFormIndex = 0;
1236
- this.beneficialOwnerForm = [new Member()];
1237
- this.beneficialOwnerFormIndex = 0;
1238
- this.beneficialOwnerFormKey = StoreMembers.beneficialOwnerForm;
1239
- this.insuredForm = [new Member()];
1240
- this.slaveInsuredForm = new Member();
1241
- this.insuredFormKey = StoreMembers.insuredForm;
1242
- this.insuredFormIndex = 0;
1243
- this.productConditionsForm = new ProductConditions();
1244
- this.productConditionsFormKey = 'productConditionsForm';
1245
- this.questionnaireByHealth = {};
1246
- this.questionnaireByCritical = [];
1247
- this.canBeClaimed = null;
1248
- this.applicationTaskId = null;
1249
- this.requiredDocuments = [];
1250
- this.isNeedToRecalculate = false;
1251
- }
1252
- }
1253
-
1254
- export class Address {
1255
- country: Value;
1256
- region: Value;
1257
- state: Value;
1258
- regionType: Value;
1259
- city: Value;
1260
- square: string | null;
1261
- microdistrict: string | null;
1262
- street: string | null;
1263
- houseNumber: string | null;
1264
- kato: string | null;
1265
- longName: string | null;
1266
- longNameKz: string | null;
1267
-
1268
- constructor() {
1269
- this.country = new Value();
1270
- this.region = new Value();
1271
- this.state = new Value();
1272
- this.regionType = new Value();
1273
- this.city = new Value();
1274
- this.square = null;
1275
- this.microdistrict = null;
1276
- this.street = null;
1277
- this.houseNumber = null;
1278
- this.kato = null;
1279
- this.longName = null;
1280
- this.longNameKz = null;
1281
- }
1282
- }
1283
-
1284
- export class PolicyholderActivity {
1285
- activityTypeName: string | null;
1286
- empoloyeeCount: string | null;
1287
-
1288
- constructor() {
1289
- this.activityTypeName = null;
1290
- this.empoloyeeCount = null;
1291
- }
1292
- }
1293
-
1294
- export class BaseGroupClass {
1295
- id: string | number;
1296
- longName: string;
1297
- iin: string;
1298
- phoneNumber: string;
1299
- age: string;
1300
- name: string;
1301
- nameKz: string;
1302
- longNameKz: string;
1303
- citizenship: Value;
1304
- email: string;
1305
- resident: Value;
1306
- taxResidentCountry: Value;
1307
- addTaxResidency: Value;
1308
- economySectorCode: Value;
1309
- hasAttachedFile: boolean;
1310
- actualAddress: Address;
1311
- isActualAddressEqualLegalAddres: boolean;
1312
- legalAddress: Address;
1313
- identityDocument: {
1314
- documentType: Value;
1315
- documentNumber: string;
1316
- series: string;
1317
- issuedBy: Value;
1318
- issuedOn: string;
1319
- validUntil: string;
1320
- };
1321
- bankInfo: BankInfoClass;
1322
- kbe: string;
1323
-
1324
- constructor() {
1325
- this.id = 0;
1326
- this.longName = '';
1327
- this.iin = '';
1328
- this.phoneNumber = '';
1329
- this.age = '';
1330
- this.name = '';
1331
- this.nameKz = '';
1332
- this.longNameKz = '';
1333
- this.citizenship = new Value();
1334
- this.email = '';
1335
- this.resident = new Value();
1336
- this.taxResidentCountry = new Value();
1337
- this.addTaxResidency = new Value();
1338
- this.economySectorCode = new Value();
1339
- this.hasAttachedFile = false;
1340
- this.actualAddress = new Address();
1341
- this.isActualAddressEqualLegalAddres = true;
1342
- this.legalAddress = new Address();
1343
- this.identityDocument = {
1344
- documentType: new Value(),
1345
- documentNumber: '',
1346
- series: '',
1347
- issuedBy: new Value(),
1348
- issuedOn: '',
1349
- validUntil: '',
1350
- };
1351
- this.bankInfo = new BankInfoClass();
1352
- this.kbe = '';
1353
- }
1354
- }
1355
-
1356
- export class GroupMember extends PhysGroupClass {
1357
- isLeader: boolean;
1358
-
1359
- typeOfEconomicActivity: Value;
1360
- activityTypes: { activityTypeName: string; empoloyeeCount: number }[];
1361
- beneficalOwnerQuest: { order: number; text: string; answer: boolean | null }[];
1362
- authoritedPerson: PhysGroupClass;
1363
- insuredPolicyData: Types.InsuredPolicyType;
1364
-
1365
- constructor() {
1366
- super();
1367
- // Client
1368
- this.isLeader = false;
1369
- this.typeOfEconomicActivity = new Value();
1370
- this.activityTypes = [];
1371
- this.beneficalOwnerQuest = [
1372
- {
1373
- order: 0,
1374
- text: 'Отметка о наличии/отсутствии физического лица (лиц), которому прямо или косвенно принадлежат более 25 % долей участия в уставном капитале либо размещенных (за вычетом привилегированных и выкупленных обществом) акций юридического лица',
1375
- answer: null,
1376
- },
1377
- {
1378
- order: 1,
1379
- text: 'Отметка о наличии/отсутствии физического лица (лиц), осуществляющего контроль над юридическим лицом по иным основаниям',
1380
- answer: null,
1381
- },
1382
- {
1383
- order: 2,
1384
- text: 'Отметка о наличии/отсутствии физического лица (лиц) в интересах которого юридическим лицом устанавливаются деловые отношения (совершаются операции)',
1385
- answer: null,
1386
- },
1387
- ];
1388
- this.authoritedPerson = new PhysGroupClass();
1389
- // Insured
1390
- this.insuredPolicyData = {
1391
- insSum: 0,
1392
- insSumWithLoad: 0,
1393
- premium: 0,
1394
- premiumWithLoad: 0,
1395
- insuredRisk: {
1396
- lifeMultiply: 0,
1397
- lifeAdditive: 0,
1398
- disabilityMultiply: 0,
1399
- disabilityAdditive: 0,
1400
- traumaTableMultiple: 0,
1401
- accidentalLifeMultiply: 0,
1402
- accidentalLifeAdditive: 0,
1403
- criticalMultiply: 0,
1404
- criticalAdditive: 0,
1405
- },
1406
- insuredCoverData: [],
1407
- };
1408
- }
1409
- }
1410
-
1411
- export class BankInfoClass {
1412
- bankName: Value;
1413
- bin: string;
1414
- iik: string;
1415
- bik: string;
1416
- kbe: string;
1417
-
1418
- constructor() {
1419
- this.bankName = new Value();
1420
- this.bin = '';
1421
- this.iik = '';
1422
- this.bik = '';
1423
- this.kbe = '';
1424
- }
1425
- }
1426
-
1427
- export class PolicyholderClass {
1428
- isIpdl: boolean;
1429
- clientData: GroupMember;
1430
-
1431
- constructor() {
1432
- this.isIpdl = false;
1433
- this.clientData = new GroupMember();
1434
- }
1435
- }
1436
-
1437
- export class BeneficialOwner {
1438
- id: string;
1439
- isIpdl: boolean;
1440
- beneficialOwnerData: GroupMember;
1441
-
1442
- constructor() {
1443
- this.isIpdl = false;
1444
- this.beneficialOwnerData = new GroupMember();
1445
- this.id = '';
1446
- }
1447
- }
1448
-
1449
- export class TransferContract {
1450
- id: string | null;
1451
- transferContractIsOppv: boolean;
1452
- transferContractFirstPaymentDate: string;
1453
- transferContractAmount: number | string;
1454
- transferContractDate: string;
1455
- transferContractNumber: string;
1456
- transferContractRegNumber: string;
1457
- transferContract: boolean;
1458
- transferContractCompany: Value;
1459
- transferContractMonthCount: number | null;
1460
-
1461
- constructor() {
1462
- this.id = null;
1463
- this.transferContractIsOppv = false;
1464
- this.transferContractFirstPaymentDate = '';
1465
- this.transferContractAmount = 0;
1466
- this.transferContractDate = '';
1467
- this.transferContractNumber = '';
1468
- this.transferContract = false;
1469
- this.transferContractRegNumber = '';
1470
- this.transferContractCompany = new Value();
1471
- this.transferContractMonthCount = null;
1472
- }
1473
- }
1474
-
1475
- export class RequiredDocument extends Value {
1476
- iin: string = '';
1477
- }
1478
-
1479
- export class MenuItem extends MenuItemConfig {
1480
- constructor({ id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip }: MenuItemConfig = new MenuItemConfig()) {
1481
- super(id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip);
1482
- }
1483
- }
1484
- export class Member extends Person {
1485
- response?: {
1486
- contragent?: Types.ContragentType;
1487
- questionnaires?: Types.ContragentQuestionaries[];
1488
- contacts?: Types.ContragentContacts[];
1489
- documents?: Types.ContragentDocuments[];
1490
- addresses?: Types.ContragentAddress[];
1491
- };
1492
- verifyType: any;
1493
- verifyDate: any;
1494
- postIndex: string | null;
1495
- isPdl: boolean;
1496
- migrationCard: string | null;
1497
- migrationCardIssueDate: string | null;
1498
- migrationCardExpireDate: string | null;
1499
- confirmDocType: string | null;
1500
- confirmDocNumber: string | null;
1501
- confirmDocIssueDate: string | null;
1502
- confirmDocExpireDate: string | null;
1503
- notaryLongName: string | null;
1504
- notaryLicenseNumber: string | null;
1505
- notaryLicenseDate: string | null;
1506
- notaryLicenseIssuer: string | null;
1507
- jurLongName: string | null;
1508
- fullNameRod: string | null;
1509
- confirmDocTypeKz: string | null;
1510
- confirmDocTypeRod: string | null;
1511
- isNotary: boolean;
1512
- insurancePay: Value;
1513
- job: string | null;
1514
- jobPosition: string | null;
1515
- jobPlace: string | null;
1516
- positionCode: string | null;
1517
- registrationCountry: Value;
1518
- registrationProvince: Value;
1519
- registrationRegion: Value;
1520
- registrationRegionType: Value;
1521
- registrationCity: Value;
1522
- registrationQuarter?: string | null;
1523
- registrationMicroDistrict?: string | null;
1524
- registrationStreet?: string | null;
1525
- registrationNumberHouse?: string | null;
1526
- registrationNumberApartment?: string | null;
1527
- birthRegion: Value;
1528
- documentType: Value;
1529
- documentNumber: string | null;
1530
- documentIssuers: Types.Base.Document.IssuerOther;
1531
- documentDate: string | null;
1532
- documentExpire: string | null;
1533
- signOfResidency: Value;
1534
- signOfIPDL: Value;
1535
- countryOfCitizenship: Value;
1536
- countryOfTaxResidency: Value;
1537
- addTaxResidency: Value;
1538
- economySectorCode: Value;
1539
- phoneNumber: string | null;
1540
- homePhone: string | null;
1541
- email: string | null;
1542
- address: string | null;
1543
- familyStatus: Value;
1544
- isTerror: null;
1545
- relationDegree: Value;
1546
- isDisability: boolean;
1547
- disabilityGroup: Value | null;
1548
- percentageOfPayoutAmount: string | number | null;
1549
- _cyrPattern: RegExp;
1550
- _numPattern: RegExp;
1551
- _phonePattern: RegExp;
1552
- _emailPattern: RegExp;
1553
- gotFromInsis: boolean | null;
1554
- gosPersonData: Types.Api.GBD.Person | null;
1555
- parsedDocument: any;
1556
- hasAgreement: boolean | null;
1557
- otpTokenId: string | null;
1558
- otpCode: string;
1559
- documentsList: Types.ContragentDocuments[];
1560
- isInsuredUnderage?: boolean = false;
1561
- bankInfo: BankInfoClass;
1562
- transferContractCompany: Value;
1563
- digitalDocument: IDocument | null;
1564
- identityDocument: {
1565
- documentType: Value;
1566
- documentNumber: string | null;
1567
- issuedOn: string | null;
1568
- issuedBy: Value;
1569
- validUntil: string | null;
1570
- };
1571
-
1572
- constructor(
1573
- id = 0,
1574
- type = 1,
1575
- iin = null,
1576
- phoneNumber = null,
1577
- longName = null,
1578
- lastName = null,
1579
- firstName = null,
1580
- middleName = null,
1581
- birthDate = null,
1582
- gender = new Value(),
1583
- genderName = null,
1584
- birthPlace = new Value(),
1585
- age = null,
1586
- registrationDate = null,
1587
- job = null,
1588
- jobPosition = null,
1589
- jobPlace = null,
1590
- positionCode = null,
1591
- registrationCountry = new Value(),
1592
- registrationProvince = new Value(),
1593
- registrationRegion = new Value(),
1594
- registrationRegionType = new Value(),
1595
- registrationCity = new Value(),
1596
- registrationQuarter = null,
1597
- registrationMicroDistrict = null,
1598
- registrationStreet = null,
1599
- registrationNumberHouse = null,
1600
- registrationNumberApartment = null,
1601
- birthRegion = new Value(),
1602
- documentType = new Value(),
1603
- documentNumber = null,
1604
- documentIssuers = new Value(),
1605
- documentDate = null,
1606
- documentExpire = null,
1607
- signOfResidency = new Value(),
1608
- signOfIPDL = new Value(),
1609
- isTerror = null,
1610
- countryOfCitizenship = new Value(),
1611
- countryOfTaxResidency = new Value(),
1612
- addTaxResidency = new Value(),
1613
- economySectorCode = new Value(),
1614
- homePhone = null,
1615
- email = null,
1616
- address = null,
1617
- familyStatus = new Value(),
1618
- relationDegree = new Value(),
1619
- isDisability = false,
1620
- disabilityGroupId = new Value(),
1621
- percentageOfPayoutAmount = null,
1622
- migrationCard = null,
1623
- migrationCardIssueDate = null,
1624
- migrationCardExpireDate = null,
1625
- confirmDocType = null,
1626
- confirmDocNumber = null,
1627
- confirmDocIssueDate = null,
1628
- confirmDocExpireDate = null,
1629
- notaryLongName = null,
1630
- notaryLicenseNumber = null,
1631
- notaryLicenseDate = null,
1632
- notaryLicenseIssuer = null,
1633
- jurLongName = null,
1634
- fullNameRod = null,
1635
- confirmDocTypeKz = null,
1636
- confirmDocTypeRod = null,
1637
- isNotary = false,
1638
- ) {
1639
- super(id, type, iin, longName, lastName, firstName, middleName, birthDate, gender, genderName, birthPlace, age);
1640
- this.documentsList = [];
1641
- this.postIndex = null;
1642
- this.isPdl = false;
1643
- this.migrationCard = migrationCard;
1644
- this.migrationCardIssueDate = migrationCardIssueDate;
1645
- this.migrationCardExpireDate = migrationCardExpireDate;
1646
- this.confirmDocType = confirmDocType;
1647
- this.confirmDocNumber = confirmDocNumber;
1648
- this.confirmDocIssueDate = confirmDocIssueDate;
1649
- this.confirmDocExpireDate = confirmDocExpireDate;
1650
- this.notaryLongName = notaryLongName;
1651
- this.notaryLicenseNumber = notaryLicenseNumber;
1652
- this.notaryLicenseDate = notaryLicenseDate;
1653
- this.notaryLicenseIssuer = notaryLicenseIssuer;
1654
- this.jurLongName = jurLongName;
1655
- this.fullNameRod = fullNameRod;
1656
- this.confirmDocTypeKz = confirmDocTypeKz;
1657
- this.confirmDocTypeRod = confirmDocTypeRod;
1658
- this.isNotary = isNotary;
1659
- this.insurancePay = new Value();
1660
- this.job = job;
1661
- this.jobPosition = jobPosition;
1662
- this.jobPlace = jobPlace;
1663
- this.positionCode = positionCode;
1664
- this.registrationCountry = registrationCountry;
1665
- this.registrationProvince = registrationProvince;
1666
- this.registrationRegion = registrationRegion;
1667
- this.registrationRegionType = registrationRegionType;
1668
- this.registrationCity = registrationCity;
1669
- this.registrationQuarter = registrationQuarter;
1670
- this.registrationMicroDistrict = registrationMicroDistrict;
1671
- this.registrationStreet = registrationStreet;
1672
- this.registrationNumberHouse = registrationNumberHouse;
1673
- this.registrationNumberApartment = registrationNumberApartment;
1674
- this.birthRegion = birthRegion;
1675
- this.documentType = documentType;
1676
- this.documentNumber = documentNumber;
1677
- this.documentIssuers = documentIssuers;
1678
- this.documentDate = documentDate;
1679
- this.documentExpire = documentExpire;
1680
- this.signOfResidency = signOfResidency;
1681
- this.signOfIPDL = signOfIPDL;
1682
- this.countryOfCitizenship = countryOfCitizenship;
1683
- this.countryOfTaxResidency = countryOfTaxResidency;
1684
- this.addTaxResidency = addTaxResidency;
1685
- this.economySectorCode = economySectorCode;
1686
- this.phoneNumber = phoneNumber;
1687
- this.homePhone = homePhone;
1688
- this.email = email;
1689
- this.otpTokenId = null;
1690
- this.otpCode = '';
1691
- this.address = address;
1692
- this.familyStatus = familyStatus;
1693
- this.isTerror = isTerror;
1694
- this.relationDegree = relationDegree;
1695
- this.isDisability = isDisability;
1696
- this.disabilityGroup = disabilityGroupId;
1697
- this.percentageOfPayoutAmount = percentageOfPayoutAmount;
1698
- this._cyrPattern = /[\u0400-\u04FF -]+/;
1699
- this._numPattern = /[0-9]+/;
1700
- this._phonePattern = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
1701
- this._emailPattern = /.+@.+\..+/;
1702
- this.gotFromInsis = true;
1703
- this.gosPersonData = null;
1704
- this.parsedDocument = null;
1705
- this.hasAgreement = null;
1706
- this.bankInfo = new BankInfoClass();
1707
- this.transferContractCompany = new Value();
1708
- this.digitalDocument = null;
1709
- this.identityDocument = {
1710
- documentType: new Value(),
1711
- documentNumber: null,
1712
- issuedOn: null,
1713
- issuedBy: new Value(),
1714
- validUntil: null,
1715
- };
1716
- }
1717
-
1718
- resetMember(clearIinAndPhone: boolean = true) {
1719
- super.resetPerson(clearIinAndPhone);
1720
- this.job = null;
1721
- this.jobPosition = null;
1722
- this.jobPlace = null;
1723
- this.positionCode = null;
1724
- this.registrationCountry = new Value();
1725
- this.registrationProvince = new Value();
1726
- this.registrationRegion = new Value();
1727
- this.registrationRegionType = new Value();
1728
- this.registrationCity = new Value();
1729
- this.registrationQuarter = null;
1730
- this.registrationMicroDistrict = null;
1731
- this.registrationStreet = null;
1732
- this.registrationNumberHouse = null;
1733
- this.registrationNumberApartment = null;
1734
- this.birthRegion = new Value();
1735
- this.documentType = new Value();
1736
- this.documentNumber = null;
1737
- this.documentIssuers = new Value();
1738
- this.documentDate = null;
1739
- this.documentExpire = null;
1740
- this.signOfResidency = new Value();
1741
- this.signOfIPDL = new Value();
1742
- this.countryOfCitizenship = new Value();
1743
- this.countryOfTaxResidency = new Value();
1744
- this.economySectorCode = new Value();
1745
- if (clearIinAndPhone === true) {
1746
- this.phoneNumber = null;
1747
- }
1748
- this.homePhone = null;
1749
- this.email = null;
1750
- this.address = null;
1751
- this.familyStatus = new Value();
1752
- this.isTerror = null;
1753
- this.relationDegree = new Value();
1754
- this.isDisability = false;
1755
- this.disabilityGroup = null;
1756
- this.percentageOfPayoutAmount = null;
1757
- this.gotFromInsis = true;
1758
- this.gosPersonData = null;
1759
- this.parsedDocument = null;
1760
- this.hasAgreement = null;
1761
- this.insurancePay = new Value();
1762
- this.migrationCard = null;
1763
- this.migrationCardIssueDate = null;
1764
- this.migrationCardExpireDate = null;
1765
- this.confirmDocType = null;
1766
- this.confirmDocNumber = null;
1767
- this.confirmDocIssueDate = null;
1768
- this.confirmDocExpireDate = null;
1769
- this.notaryLongName = null;
1770
- this.notaryLicenseNumber = null;
1771
- this.notaryLicenseDate = null;
1772
- this.notaryLicenseIssuer = null;
1773
- this.jurLongName = null;
1774
- this.fullNameRod = null;
1775
- this.confirmDocTypeKz = null;
1776
- this.confirmDocTypeRod = null;
1777
- this.isNotary = false;
1574
+ surveyByCriticalBasePolicyholder: true,
1575
+ insuranceDocument: true,
1576
+ policyholderActivitiesForm: true,
1577
+ accidentStatisticsForm: true,
1578
+ };
1579
+ this.isPolicyholderInsured = false;
1580
+ this.isPolicyholderBeneficiary = false;
1581
+ this.isActOwnBehalf = true;
1582
+ this.hasRepresentative = false;
1583
+ this.applicationData = { processInstanceId: 0 };
1584
+ this.policyholderForm = new Member();
1585
+ this.policyholderFormKey = StoreMembers.policyholderForm;
1586
+ this.policyholdersRepresentativeForm = new Member();
1587
+ this.policyholdersRepresentativeFormKey = StoreMembers.policyholdersRepresentativeForm;
1588
+ this.beneficiaryForm = [new Member()];
1589
+ this.beneficiaryFormKey = StoreMembers.beneficiaryForm;
1590
+ this.beneficiaryFormIndex = 0;
1591
+ this.beneficialOwnerForm = [new Member()];
1592
+ this.beneficialOwnerFormIndex = 0;
1593
+ this.beneficialOwnerFormKey = StoreMembers.beneficialOwnerForm;
1594
+ this.insuredForm = [new Member()];
1595
+ this.slaveInsuredForm = new Member();
1596
+ this.insuredFormKey = StoreMembers.insuredForm;
1597
+ this.insuredFormIndex = 0;
1598
+ this.productConditionsForm = new ProductConditions();
1599
+ this.productConditionsFormKey = 'productConditionsForm';
1600
+ this.questionnaireByHealth = {};
1601
+ this.questionnaireByCritical = [];
1602
+ this.canBeClaimed = null;
1603
+ this.applicationTaskId = null;
1604
+ this.requiredDocuments = [];
1605
+ this.isNeedToRecalculate = false;
1778
1606
  }
1607
+ }
1779
1608
 
1780
- getPattern(pattern: string) {
1781
- const key = `_${pattern}Pattern` as keyof typeof this;
1782
- return this[key];
1783
- }
1609
+ class Address {
1610
+ country: Value;
1611
+ region: Value;
1612
+ state: Value;
1613
+ regionType: Value;
1614
+ city: Value;
1615
+ square: string | null;
1616
+ microdistrict: string | null;
1617
+ street: string | null;
1618
+ houseNumber: string | null;
1619
+ kato: string | null;
1620
+ longName: string | null;
1621
+ longNameKz: string | null;
1784
1622
 
1785
- validatedMessage(valid: any, msg = 'Обязательное поле') {
1786
- return {
1787
- error: valid,
1788
- msg,
1789
- };
1623
+ constructor() {
1624
+ this.country = new Value();
1625
+ this.region = new Value();
1626
+ this.state = new Value();
1627
+ this.regionType = new Value();
1628
+ this.city = new Value();
1629
+ this.square = null;
1630
+ this.microdistrict = null;
1631
+ this.street = null;
1632
+ this.houseNumber = null;
1633
+ this.kato = null;
1634
+ this.longName = null;
1635
+ this.longNameKz = null;
1790
1636
  }
1637
+ }
1791
1638
 
1792
- validateFullName() {
1793
- return this.lastName !== null && this.firstName !== null;
1794
- }
1639
+ class PolicyholderActivity {
1640
+ activityTypeName: string | null;
1641
+ empoloyeeCount: string | null;
1795
1642
 
1796
- getFullNameShorted() {
1797
- return this.validateFullName() ? `${this.lastName} ${this.firstName?.charAt(0)}. ${this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''}` : null;
1643
+ constructor() {
1644
+ this.activityTypeName = null;
1645
+ this.empoloyeeCount = null;
1798
1646
  }
1647
+ }
1799
1648
 
1800
- getFullName() {
1801
- return this.validateFullName() ? (this.lastName + ' ' + this.firstName + ' ' + this.middleName != '' ? this.middleName?.charAt(0) : '') : null;
1649
+ class BaseGroupClass {
1650
+ id: string | number;
1651
+ longName: string;
1652
+ iin: string;
1653
+ phoneNumber: string;
1654
+ age: string;
1655
+ name: string;
1656
+ nameKz: string;
1657
+ longNameKz: string;
1658
+ citizenship: Value;
1659
+ email: string;
1660
+ resident: Value;
1661
+ taxResidentCountry: Value;
1662
+ addTaxResidency: Value;
1663
+ economySectorCode: Value;
1664
+ hasAttachedFile: boolean;
1665
+ actualAddress: Address;
1666
+ isActualAddressEqualLegalAddres: boolean;
1667
+ legalAddress: Address;
1668
+ identityDocument: {
1669
+ documentType: Value;
1670
+ documentNumber: string;
1671
+ series: string;
1672
+ issuedBy: Value;
1673
+ issuedOn: string;
1674
+ validUntil: string;
1675
+ };
1676
+ bankInfo: BankInfoClass;
1677
+ kbe: string;
1678
+
1679
+ constructor() {
1680
+ this.id = 0;
1681
+ this.longName = '';
1682
+ this.iin = '';
1683
+ this.phoneNumber = '';
1684
+ this.age = '';
1685
+ this.name = '';
1686
+ this.nameKz = '';
1687
+ this.longNameKz = '';
1688
+ this.citizenship = new Value();
1689
+ this.email = '';
1690
+ this.resident = new Value();
1691
+ this.taxResidentCountry = new Value();
1692
+ this.addTaxResidency = new Value();
1693
+ this.economySectorCode = new Value();
1694
+ this.hasAttachedFile = false;
1695
+ this.actualAddress = new Address();
1696
+ this.isActualAddressEqualLegalAddres = true;
1697
+ this.legalAddress = new Address();
1698
+ this.identityDocument = {
1699
+ documentType: new Value(),
1700
+ documentNumber: '',
1701
+ series: '',
1702
+ issuedBy: new Value(),
1703
+ issuedOn: '',
1704
+ validUntil: '',
1705
+ };
1706
+ this.bankInfo = new BankInfoClass();
1707
+ this.kbe = '';
1802
1708
  }
1803
1709
  }
1804
1710
 
1805
- export class PhysGroupClass extends BaseGroupClass {
1711
+ class PhysGroupClass extends BaseGroupClass {
1806
1712
  lastName: string;
1807
1713
  firstName: string;
1808
1714
  middleName: string;
@@ -1834,3 +1740,126 @@ export class PhysGroupClass extends BaseGroupClass {
1834
1740
  };
1835
1741
  }
1836
1742
  }
1743
+
1744
+ class GroupMember extends PhysGroupClass {
1745
+ isLeader: boolean;
1746
+
1747
+ typeOfEconomicActivity: Value;
1748
+ activityTypes: { activityTypeName: string; empoloyeeCount: number }[];
1749
+ beneficalOwnerQuest: { order: number; text: string; answer: boolean | null }[];
1750
+ authoritedPerson: PhysGroupClass;
1751
+ insuredPolicyData: Types.InsuredPolicyType;
1752
+
1753
+ constructor() {
1754
+ super();
1755
+ // Client
1756
+ this.isLeader = false;
1757
+ this.typeOfEconomicActivity = new Value();
1758
+ this.activityTypes = [];
1759
+ this.beneficalOwnerQuest = [
1760
+ {
1761
+ order: 0,
1762
+ text: 'Отметка о наличии/отсутствии физического лица (лиц), которому прямо или косвенно принадлежат более 25 % долей участия в уставном капитале либо размещенных (за вычетом привилегированных и выкупленных обществом) акций юридического лица',
1763
+ answer: null,
1764
+ },
1765
+ {
1766
+ order: 1,
1767
+ text: 'Отметка о наличии/отсутствии физического лица (лиц), осуществляющего контроль над юридическим лицом по иным основаниям',
1768
+ answer: null,
1769
+ },
1770
+ {
1771
+ order: 2,
1772
+ text: 'Отметка о наличии/отсутствии физического лица (лиц) в интересах которого юридическим лицом устанавливаются деловые отношения (совершаются операции)',
1773
+ answer: null,
1774
+ },
1775
+ ];
1776
+ this.authoritedPerson = new PhysGroupClass();
1777
+ // Insured
1778
+ this.insuredPolicyData = {
1779
+ insSum: 0,
1780
+ insSumWithLoad: 0,
1781
+ premium: 0,
1782
+ premiumWithLoad: 0,
1783
+ insuredRisk: {
1784
+ lifeMultiply: 0,
1785
+ lifeAdditive: 0,
1786
+ disabilityMultiply: 0,
1787
+ disabilityAdditive: 0,
1788
+ traumaTableMultiple: 0,
1789
+ accidentalLifeMultiply: 0,
1790
+ accidentalLifeAdditive: 0,
1791
+ criticalMultiply: 0,
1792
+ criticalAdditive: 0,
1793
+ },
1794
+ insuredCoverData: [],
1795
+ };
1796
+ }
1797
+ }
1798
+
1799
+ class BankInfoClass {
1800
+ bankName: Value;
1801
+ bin: string;
1802
+ iik: string;
1803
+ bik: string;
1804
+ kbe: string;
1805
+
1806
+ constructor() {
1807
+ this.bankName = new Value();
1808
+ this.bin = '';
1809
+ this.iik = '';
1810
+ this.bik = '';
1811
+ this.kbe = '';
1812
+ }
1813
+ }
1814
+
1815
+ class PolicyholderClass {
1816
+ isIpdl: boolean;
1817
+ clientData: GroupMember;
1818
+
1819
+ constructor() {
1820
+ this.isIpdl = false;
1821
+ this.clientData = new GroupMember();
1822
+ }
1823
+ }
1824
+
1825
+ class BeneficialOwner {
1826
+ id: string;
1827
+ isIpdl: boolean;
1828
+ beneficialOwnerData: GroupMember;
1829
+
1830
+ constructor() {
1831
+ this.isIpdl = false;
1832
+ this.beneficialOwnerData = new GroupMember();
1833
+ this.id = '';
1834
+ }
1835
+ }
1836
+
1837
+ class TransferContract {
1838
+ id: string | null;
1839
+ transferContractIsOppv: boolean;
1840
+ transferContractFirstPaymentDate: string;
1841
+ transferContractAmount: number | string;
1842
+ transferContractDate: string;
1843
+ transferContractNumber: string;
1844
+ transferContractRegNumber: string;
1845
+ transferContract: boolean;
1846
+ transferContractCompany: Value;
1847
+ transferContractMonthCount: number | null;
1848
+
1849
+ constructor() {
1850
+ this.id = null;
1851
+ this.transferContractIsOppv = false;
1852
+ this.transferContractFirstPaymentDate = '';
1853
+ this.transferContractAmount = 0;
1854
+ this.transferContractDate = '';
1855
+ this.transferContractNumber = '';
1856
+ this.transferContract = false;
1857
+ this.transferContractRegNumber = '';
1858
+ this.transferContractCompany = new Value();
1859
+ this.transferContractMonthCount = null;
1860
+ }
1861
+ }
1862
+
1863
+ class RequiredDocument extends Value {
1864
+ iin: string = '';
1865
+ }