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

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
@@ -51,7 +51,13 @@ class MenuItemConfig {
51
51
  }
52
52
  }
53
53
 
54
- export class Value {
54
+ class MenuItem extends MenuItemConfig {
55
+ constructor({ id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip }: MenuItemConfig = new MenuItemConfig()) {
56
+ super(id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip);
57
+ }
58
+ }
59
+
60
+ class Value {
55
61
  id: string | number | null;
56
62
  code: string | number | null;
57
63
  nameRu: string | null;
@@ -67,7 +73,7 @@ export class Value {
67
73
  }
68
74
  }
69
75
 
70
- export class CountryValue extends Value {
76
+ class CountryValue extends Value {
71
77
  countryTypeCode: string | number | null;
72
78
 
73
79
  constructor(countryTypeCode = null, ...args: any) {
@@ -76,7 +82,7 @@ export class CountryValue extends Value {
76
82
  }
77
83
  }
78
84
 
79
- export class IDocument {
85
+ class IDocument {
80
86
  id?: string;
81
87
  processInstanceId?: string;
82
88
  iin?: string;
@@ -128,7 +134,7 @@ export class IDocument {
128
134
  }
129
135
  }
130
136
 
131
- export class DocumentItem extends IDocument {
137
+ class DocumentItem extends IDocument {
132
138
  constructor(
133
139
  {
134
140
  id,
@@ -152,7 +158,7 @@ export class DocumentItem extends IDocument {
152
158
  }
153
159
  }
154
160
 
155
- export class MenuOption {
161
+ class MenuOption {
156
162
  text: string | null;
157
163
  subtitle: string | null;
158
164
  icon: string | null;
@@ -168,7 +174,7 @@ export class MenuOption {
168
174
  }
169
175
  }
170
176
 
171
- export const InitialColumns = (): {
177
+ const InitialColumns = (): {
172
178
  addRegNumber: boolean | null;
173
179
  number: boolean | null;
174
180
  iin: boolean | null;
@@ -190,7 +196,7 @@ export const InitialColumns = (): {
190
196
  };
191
197
  };
192
198
 
193
- export class User {
199
+ class User {
194
200
  login: string | null;
195
201
  password: string | null;
196
202
  roles: string[];
@@ -331,7 +337,7 @@ class Person {
331
337
  }
332
338
  }
333
339
 
334
- export class Contragent extends Person {
340
+ class Contragent extends Person {
335
341
  economySectorCode: Value;
336
342
  countryOfCitizenship: Value;
337
343
  countryOfTaxResidency: Value;
@@ -412,240 +418,561 @@ export class Contragent extends Person {
412
418
  }
413
419
  }
414
420
 
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;
421
+ class Member extends Person {
422
+ response?: {
423
+ contragent?: Types.ContragentType;
424
+ questionnaires?: Types.ContragentQuestionaries[];
425
+ contacts?: Types.ContragentContacts[];
426
+ documents?: Types.ContragentDocuments[];
427
+ addresses?: Types.ContragentAddress[];
428
+ };
429
+ verifyType: any;
430
+ verifyDate: any;
431
+ postIndex: string | null;
432
+ isPdl: boolean;
433
+ migrationCard: string | null;
434
+ migrationCardIssueDate: string | null;
435
+ migrationCardExpireDate: string | null;
436
+ confirmDocType: string | null;
437
+ confirmDocNumber: string | null;
438
+ confirmDocIssueDate: string | null;
439
+ confirmDocExpireDate: string | null;
440
+ notaryLongName: string | null;
441
+ notaryLicenseNumber: string | null;
442
+ notaryLicenseDate: string | null;
443
+ notaryLicenseIssuer: string | null;
444
+ jurLongName: string | null;
445
+ fullNameRod: string | null;
446
+ confirmDocTypeKz: string | null;
447
+ confirmDocTypeRod: string | null;
448
+ isNotary: boolean;
449
+ insurancePay: Value;
450
+ job: string | null;
451
+ jobPosition: string | null;
452
+ jobPlace: string | null;
453
+ positionCode: string | null;
454
+ registrationCountry: Value;
455
+ registrationProvince: Value;
456
+ registrationRegion: Value;
457
+ registrationRegionType: Value;
458
+ registrationCity: Value;
459
+ registrationQuarter?: string | null;
460
+ registrationMicroDistrict?: string | null;
461
+ registrationStreet?: string | null;
462
+ registrationNumberHouse?: string | null;
463
+ registrationNumberApartment?: string | null;
464
+ birthRegion: Value;
465
+ documentType: Value;
466
+ documentNumber: string | null;
467
+ documentIssuers: Types.Base.Document.IssuerOther;
468
+ documentDate: string | null;
469
+ documentExpire: string | null;
470
+ signOfResidency: Value;
471
+ signOfIPDL: Value;
472
+ countryOfCitizenship: Value;
473
+ countryOfTaxResidency: Value;
474
+ addTaxResidency: Value;
475
+ economySectorCode: Value;
476
+ phoneNumber: string | null;
477
+ homePhone: string | null;
478
+ email: string | null;
479
+ address: string | null;
480
+ familyStatus: Value;
481
+ isTerror: null;
482
+ relationDegree: Value;
483
+ isDisability: boolean;
484
+ disabilityGroup: Value | null;
485
+ percentageOfPayoutAmount: string | number | null;
486
+ _cyrPattern: RegExp;
487
+ _numPattern: RegExp;
488
+ _phonePattern: RegExp;
489
+ _emailPattern: RegExp;
490
+ gotFromInsis: boolean | null;
491
+ gosPersonData: Types.Api.GBD.Person | null;
492
+ parsedDocument: any;
493
+ hasAgreement: boolean | null;
494
+ otpTokenId: string | null;
495
+ otpCode: string;
496
+ documentsList: Types.ContragentDocuments[];
497
+ isInsuredUnderage?: boolean = false;
498
+ bankInfo: BankInfoClass;
464
499
  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;
500
+ digitalDocument: IDocument | null;
501
+ identityDocument: {
502
+ documentType: Value;
503
+ documentNumber: string | null;
504
+ issuedOn: string | null;
505
+ issuedBy: Value;
506
+ validUntil: string | null;
507
+ };
507
508
 
508
509
  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;
510
+ id = 0,
511
+ type = 1,
512
+ iin = null,
513
+ phoneNumber = null,
514
+ longName = null,
515
+ lastName = null,
516
+ firstName = null,
517
+ middleName = null,
518
+ birthDate = null,
519
+ gender = new Value(),
520
+ genderName = null,
521
+ birthPlace = new Value(),
522
+ age = null,
523
+ registrationDate = null,
524
+ job = null,
525
+ jobPosition = null,
526
+ jobPlace = null,
527
+ positionCode = null,
528
+ registrationCountry = new Value(),
529
+ registrationProvince = new Value(),
530
+ registrationRegion = new Value(),
531
+ registrationRegionType = new Value(),
532
+ registrationCity = new Value(),
533
+ registrationQuarter = null,
534
+ registrationMicroDistrict = null,
535
+ registrationStreet = null,
536
+ registrationNumberHouse = null,
537
+ registrationNumberApartment = null,
538
+ birthRegion = new Value(),
539
+ documentType = new Value(),
540
+ documentNumber = null,
541
+ documentIssuers = new Value(),
542
+ documentDate = null,
543
+ documentExpire = null,
544
+ signOfResidency = new Value(),
545
+ signOfIPDL = new Value(),
546
+ isTerror = null,
547
+ countryOfCitizenship = new Value(),
548
+ countryOfTaxResidency = new Value(),
549
+ addTaxResidency = new Value(),
550
+ economySectorCode = new Value(),
551
+ homePhone = null,
552
+ email = null,
553
+ address = null,
554
+ familyStatus = new Value(),
555
+ relationDegree = new Value(),
556
+ isDisability = false,
557
+ disabilityGroupId = new Value(),
558
+ percentageOfPayoutAmount = null,
559
+ migrationCard = null,
560
+ migrationCardIssueDate = null,
561
+ migrationCardExpireDate = null,
562
+ confirmDocType = null,
563
+ confirmDocNumber = null,
564
+ confirmDocIssueDate = null,
565
+ confirmDocExpireDate = null,
566
+ notaryLongName = null,
567
+ notaryLicenseNumber = null,
568
+ notaryLicenseDate = null,
569
+ notaryLicenseIssuer = null,
570
+ jurLongName = null,
571
+ fullNameRod = null,
572
+ confirmDocTypeKz = null,
573
+ confirmDocTypeRod = null,
574
+ isNotary = false,
575
+ ) {
576
+ super(id, type, iin, longName, lastName, firstName, middleName, birthDate, gender, genderName, birthPlace, age);
577
+ this.documentsList = [];
578
+ this.postIndex = null;
579
+ this.isPdl = false;
580
+ this.migrationCard = migrationCard;
581
+ this.migrationCardIssueDate = migrationCardIssueDate;
582
+ this.migrationCardExpireDate = migrationCardExpireDate;
583
+ this.confirmDocType = confirmDocType;
584
+ this.confirmDocNumber = confirmDocNumber;
585
+ this.confirmDocIssueDate = confirmDocIssueDate;
586
+ this.confirmDocExpireDate = confirmDocExpireDate;
587
+ this.notaryLongName = notaryLongName;
588
+ this.notaryLicenseNumber = notaryLicenseNumber;
589
+ this.notaryLicenseDate = notaryLicenseDate;
590
+ this.notaryLicenseIssuer = notaryLicenseIssuer;
591
+ this.jurLongName = jurLongName;
592
+ this.fullNameRod = fullNameRod;
593
+ this.confirmDocTypeKz = confirmDocTypeKz;
594
+ this.confirmDocTypeRod = confirmDocTypeRod;
595
+ this.isNotary = isNotary;
596
+ this.insurancePay = new Value();
597
+ this.job = job;
598
+ this.jobPosition = jobPosition;
599
+ this.jobPlace = jobPlace;
600
+ this.positionCode = positionCode;
601
+ this.registrationCountry = registrationCountry;
602
+ this.registrationProvince = registrationProvince;
603
+ this.registrationRegion = registrationRegion;
604
+ this.registrationRegionType = registrationRegionType;
605
+ this.registrationCity = registrationCity;
606
+ this.registrationQuarter = registrationQuarter;
607
+ this.registrationMicroDistrict = registrationMicroDistrict;
608
+ this.registrationStreet = registrationStreet;
609
+ this.registrationNumberHouse = registrationNumberHouse;
610
+ this.registrationNumberApartment = registrationNumberApartment;
611
+ this.birthRegion = birthRegion;
612
+ this.documentType = documentType;
613
+ this.documentNumber = documentNumber;
614
+ this.documentIssuers = documentIssuers;
615
+ this.documentDate = documentDate;
616
+ this.documentExpire = documentExpire;
617
+ this.signOfResidency = signOfResidency;
618
+ this.signOfIPDL = signOfIPDL;
619
+ this.countryOfCitizenship = countryOfCitizenship;
620
+ this.countryOfTaxResidency = countryOfTaxResidency;
621
+ this.addTaxResidency = addTaxResidency;
622
+ this.economySectorCode = economySectorCode;
623
+ this.phoneNumber = phoneNumber;
624
+ this.homePhone = homePhone;
625
+ this.email = email;
626
+ this.otpTokenId = null;
627
+ this.otpCode = '';
628
+ this.address = address;
629
+ this.familyStatus = familyStatus;
630
+ this.isTerror = isTerror;
631
+ this.relationDegree = relationDegree;
632
+ this.isDisability = isDisability;
633
+ this.disabilityGroup = disabilityGroupId;
634
+ this.percentageOfPayoutAmount = percentageOfPayoutAmount;
635
+ this._cyrPattern = /[\u0400-\u04FF -]+/;
636
+ this._numPattern = /[0-9]+/;
637
+ this._phonePattern = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
638
+ this._emailPattern = /.+@.+\..+/;
639
+ this.gotFromInsis = true;
640
+ this.gosPersonData = null;
641
+ this.parsedDocument = null;
642
+ this.hasAgreement = null;
643
+ this.bankInfo = new BankInfoClass();
644
+ this.transferContractCompany = new Value();
645
+ this.digitalDocument = null;
646
+ this.identityDocument = {
647
+ documentType: new Value(),
648
+ documentNumber: null,
649
+ issuedOn: null,
650
+ issuedBy: new Value(),
651
+ validUntil: null,
652
+ };
611
653
  }
612
654
 
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
- }
655
+ resetMember(clearIinAndPhone: boolean = true) {
656
+ super.resetPerson(clearIinAndPhone);
657
+ this.job = null;
658
+ this.jobPosition = null;
659
+ this.jobPlace = null;
660
+ this.positionCode = null;
661
+ this.registrationCountry = new Value();
662
+ this.registrationProvince = new Value();
663
+ this.registrationRegion = new Value();
664
+ this.registrationRegionType = new Value();
665
+ this.registrationCity = new Value();
666
+ this.registrationQuarter = null;
667
+ this.registrationMicroDistrict = null;
668
+ this.registrationStreet = null;
669
+ this.registrationNumberHouse = null;
670
+ this.registrationNumberApartment = null;
671
+ this.birthRegion = new Value();
672
+ this.documentType = new Value();
673
+ this.documentNumber = null;
674
+ this.documentIssuers = new Value();
675
+ this.documentDate = null;
676
+ this.documentExpire = null;
677
+ this.signOfResidency = new Value();
678
+ this.signOfIPDL = new Value();
679
+ this.countryOfCitizenship = new Value();
680
+ this.countryOfTaxResidency = new Value();
681
+ this.economySectorCode = new Value();
682
+ if (clearIinAndPhone === true) {
683
+ this.phoneNumber = null;
623
684
  }
624
- return null;
685
+ this.homePhone = null;
686
+ this.email = null;
687
+ this.address = null;
688
+ this.familyStatus = new Value();
689
+ this.isTerror = null;
690
+ this.relationDegree = new Value();
691
+ this.isDisability = false;
692
+ this.disabilityGroup = null;
693
+ this.percentageOfPayoutAmount = null;
694
+ this.gotFromInsis = true;
695
+ this.gosPersonData = null;
696
+ this.parsedDocument = null;
697
+ this.hasAgreement = null;
698
+ this.insurancePay = new Value();
699
+ this.migrationCard = null;
700
+ this.migrationCardIssueDate = null;
701
+ this.migrationCardExpireDate = null;
702
+ this.confirmDocType = null;
703
+ this.confirmDocNumber = null;
704
+ this.confirmDocIssueDate = null;
705
+ this.confirmDocExpireDate = null;
706
+ this.notaryLongName = null;
707
+ this.notaryLicenseNumber = null;
708
+ this.notaryLicenseDate = null;
709
+ this.notaryLicenseIssuer = null;
710
+ this.jurLongName = null;
711
+ this.fullNameRod = null;
712
+ this.confirmDocTypeKz = null;
713
+ this.confirmDocTypeRod = null;
714
+ this.isNotary = false;
625
715
  }
626
- }
627
716
 
628
- export class MemberSettings {
629
- has?: boolean;
630
- isMultiple?: boolean;
631
- required?: boolean;
632
- limit?: number;
717
+ getPattern(pattern: string) {
718
+ const key = `_${pattern}Pattern` as keyof typeof this;
719
+ return this[key];
720
+ }
633
721
 
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;
641
- } else {
642
- this.required = false;
722
+ validatedMessage(valid: any, msg = 'Обязательное поле') {
723
+ return {
724
+ error: valid,
725
+ msg,
726
+ };
727
+ }
728
+
729
+ validateFullName() {
730
+ return this.lastName !== null && this.firstName !== null;
731
+ }
732
+
733
+ getFullNameShorted() {
734
+ return this.validateFullName() ? `${this.lastName} ${this.firstName?.charAt(0)}. ${this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''}` : null;
735
+ }
736
+
737
+ getFullName() {
738
+ return this.validateFullName() ? (this.lastName + ' ' + this.firstName + ' ' + this.middleName != '' ? this.middleName?.charAt(0) : '') : null;
739
+ }
740
+ }
741
+
742
+ class CalculatorForm {
743
+ country: Value;
744
+ countries: CountryValue[] | null;
745
+ purpose: Value;
746
+ workType: Value;
747
+ sportsType: Value;
748
+ type: Value;
749
+ days: string | number | null;
750
+ maxDays: Value;
751
+ age: string | null;
752
+ price: string | null;
753
+ professionType: Value;
754
+ amount: Value;
755
+ startDate: string | null;
756
+ endDate: string | null;
757
+ period: Value;
758
+ currency: string | null;
759
+
760
+ constructor() {
761
+ this.country = new Value();
762
+ this.countries = [];
763
+ this.purpose = new Value();
764
+ this.workType = new Value();
765
+ this.sportsType = new Value();
766
+ this.type = new Value();
767
+ this.days = null;
768
+ this.maxDays = new Value();
769
+ this.age = null;
770
+ this.price = null;
771
+ this.professionType = new Value();
772
+ this.amount = new Value();
773
+ this.startDate = null;
774
+ this.endDate = null;
775
+ this.period = new Value();
776
+ this.currency = null;
777
+ }
778
+ }
779
+
780
+ class ProductConditions {
781
+ signDate: string | null;
782
+ birthDate: string | null;
783
+ gender: Value;
784
+ insuranceCase: string | null;
785
+ coverPeriod: number | null;
786
+ payPeriod: number | null;
787
+ termsOfInsurance: string | null;
788
+ annualIncome: string | null;
789
+ processIndexRate: Value;
790
+ processGfot: Value;
791
+ transferContractCompany: Value;
792
+ requestedSumInsured: number | string | null;
793
+ requestedSumInsuredInDollar: number | string | null;
794
+ insurancePremiumPerMonth: number | string | null;
795
+ insurancePremiumPerMonthInDollar: number | string | null;
796
+ establishingGroupDisabilityFromThirdYear: string | null;
797
+ possibilityToChange: string | null;
798
+ deathOfInsuredDueToAccident: Value;
799
+ establishingGroupDisability: Value;
800
+ temporaryDisability: Value;
801
+ bodyInjury: Value;
802
+ criticalIllnessOfTheInsured: Value;
803
+ paymentPeriod: Value;
804
+ amountOfInsurancePremium: string | number | null;
805
+ lifeMultiply: string | number | null;
806
+ lifeAdditive: string | number | null;
807
+ lifeMultiplyClient: string | number | null;
808
+ lifeAdditiveClient: string | number | null;
809
+ adbMultiply: string | number | null;
810
+ adbAdditive: string | number | null;
811
+ disabilityMultiply: string | number | null;
812
+ disabilityAdditive: string | number | null;
813
+ riskGroup: Value;
814
+ riskGroup2: Value;
815
+ additionalConditionAnnuityPayments: boolean;
816
+ guaranteedPeriod: number | null;
817
+ typeAnnuityInsurance: Value;
818
+ termAnnuityPayments: number | string | null;
819
+ periodAnnuityPayment: Value;
820
+ amountAnnuityPayments: number | string | null;
821
+ isRecalculated: boolean;
822
+ totalAmount5: number | string | null;
823
+ totalAmount7: number | string | null;
824
+ statePremium5: number | string | null;
825
+ statePremium7: number | string | null;
826
+ calculatorForm: CalculatorForm;
827
+ agentCommission: number | null;
828
+ fixInsSum: number | string | null;
829
+ amountRefunded: number | string | null;
830
+ amountPaid: number | string | null;
831
+ calcDate: string | null;
832
+ contractEndDate: string | null;
833
+ currency: Value;
834
+
835
+ constructor(
836
+ insuranceCase = null,
837
+ coverPeriod = null,
838
+ payPeriod = null,
839
+ termsOfInsurance = null,
840
+ annualIncome = null,
841
+ processIndexRate = new Value(),
842
+ processGfot = new Value(),
843
+ transferContractCompany = new Value(),
844
+ requestedSumInsured = null,
845
+ insurancePremiumPerMonth = null,
846
+ establishingGroupDisabilityFromThirdYear = null,
847
+ possibilityToChange = null,
848
+ deathOfInsuredDueToAccident = new Value(),
849
+ establishingGroupDisability = new Value(),
850
+ temporaryDisability = new Value(),
851
+ bodyInjury = new Value(),
852
+ criticalIllnessOfTheInsured = new Value(),
853
+ paymentPeriod = new Value(),
854
+ amountOfInsurancePremium = null,
855
+ lifeMultiply = null,
856
+ lifeAdditive = null,
857
+ lifeMultiplyClient = null,
858
+ lifeAdditiveClient = null,
859
+ adbMultiply = null,
860
+ adbAdditive = null,
861
+ disabilityMultiply = null,
862
+ disabilityAdditive = null,
863
+ riskGroup = new Value(),
864
+ riskGroup2 = new Value(),
865
+ additionalConditionAnnuityPayments = false,
866
+ guaranteedPeriod = null,
867
+ typeAnnuityInsurance = new Value(),
868
+ termAnnuityPayments = null,
869
+ periodAnnuityPayment = new Value(),
870
+ amountAnnuityPayments = null,
871
+ isRecalculated = false,
872
+ totalAmount5 = null,
873
+ totalAmount7 = null,
874
+ statePremium5 = null,
875
+ statePremium7 = null,
876
+ calculatorForm = new CalculatorForm(),
877
+ agentCommission = null,
878
+ fixInsSum = null,
879
+ amountRefunded = null,
880
+ amountPaid = null,
881
+ calcDate = null,
882
+ contractEndDate = null,
883
+ currency = new Value(),
884
+ ) {
885
+ this.requestedSumInsuredInDollar = null;
886
+ this.insurancePremiumPerMonthInDollar = null;
887
+ this.signDate = null;
888
+ this.birthDate = null;
889
+ this.gender = new Value();
890
+ this.insuranceCase = insuranceCase;
891
+ this.coverPeriod = coverPeriod;
892
+ this.payPeriod = payPeriod;
893
+ this.termsOfInsurance = termsOfInsurance;
894
+ this.annualIncome = annualIncome;
895
+ this.processIndexRate = processIndexRate;
896
+ this.processGfot = processGfot;
897
+ this.transferContractCompany = transferContractCompany;
898
+ this.requestedSumInsured = requestedSumInsured;
899
+ this.insurancePremiumPerMonth = insurancePremiumPerMonth;
900
+ this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
901
+ this.possibilityToChange = possibilityToChange;
902
+ this.deathOfInsuredDueToAccident = deathOfInsuredDueToAccident;
903
+ this.establishingGroupDisability = establishingGroupDisability;
904
+ this.temporaryDisability = temporaryDisability;
905
+ this.bodyInjury = bodyInjury;
906
+ this.criticalIllnessOfTheInsured = criticalIllnessOfTheInsured;
907
+ this.paymentPeriod = paymentPeriod;
908
+ this.amountOfInsurancePremium = amountOfInsurancePremium;
909
+ this.lifeMultiply = lifeMultiply;
910
+ this.lifeAdditive = lifeAdditive;
911
+ this.lifeMultiplyClient = lifeMultiplyClient;
912
+ this.lifeAdditiveClient = lifeAdditiveClient;
913
+ this.adbMultiply = adbMultiply;
914
+ this.adbAdditive = adbAdditive;
915
+ this.disabilityMultiply = disabilityMultiply;
916
+ this.disabilityAdditive = disabilityAdditive;
917
+ this.riskGroup = riskGroup;
918
+ this.riskGroup2 = riskGroup2;
919
+ this.additionalConditionAnnuityPayments = additionalConditionAnnuityPayments;
920
+ this.guaranteedPeriod = guaranteedPeriod;
921
+ this.typeAnnuityInsurance = typeAnnuityInsurance;
922
+ this.termAnnuityPayments = termAnnuityPayments;
923
+ this.periodAnnuityPayment = periodAnnuityPayment;
924
+ this.amountAnnuityPayments = amountAnnuityPayments;
925
+ this.isRecalculated = isRecalculated;
926
+ this.totalAmount5 = totalAmount5;
927
+ this.totalAmount7 = totalAmount7;
928
+ this.statePremium5 = statePremium5;
929
+ this.statePremium7 = statePremium7;
930
+ this.calculatorForm = calculatorForm;
931
+ this.agentCommission = agentCommission;
932
+ this.fixInsSum = fixInsSum;
933
+ this.amountRefunded = amountRefunded;
934
+ this.amountPaid = amountPaid;
935
+ this.calcDate = calcDate;
936
+ this.contractEndDate = contractEndDate;
937
+ this.currency = currency;
938
+ }
939
+
940
+ getSingleTripDays() {
941
+ if (this.calculatorForm.startDate && this.calculatorForm.endDate) {
942
+ const date1 = formatDate(this.calculatorForm.startDate);
943
+ const date2 = formatDate(this.calculatorForm.endDate);
944
+ if (date1 && date2) {
945
+ const days = Math.ceil((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24)) + 1;
946
+ if (days > 0) {
947
+ return days;
948
+ }
949
+ }
950
+ }
951
+ return null;
952
+ }
953
+ }
954
+
955
+ class MemberSettings {
956
+ has?: boolean;
957
+ isMultiple?: boolean;
958
+ required?: boolean;
959
+ limit?: number;
960
+
961
+ constructor(options?: { has?: boolean; isMultiple?: boolean; required?: boolean; limit?: number }) {
962
+ if (options) {
963
+ this.has = options.has;
964
+ this.isMultiple = options.isMultiple;
965
+ this.limit = options.limit;
966
+ if (this.has === true) {
967
+ this.required = options.required;
968
+ } else {
969
+ this.required = false;
643
970
  }
644
971
  }
645
972
  }
646
973
  }
647
974
 
648
- export class DataStoreClass {
975
+ class DataStoreClass {
649
976
  projectConfig: Types.Utils.ProjectConfig | null;
650
977
  // IMP Контроллер фич
651
978
  controls: {
@@ -1013,7 +1340,7 @@ export class DataStoreClass {
1013
1340
  }
1014
1341
  }
1015
1342
 
1016
- export class FormStoreClass {
1343
+ class FormStoreClass {
1017
1344
  documentName: string | null;
1018
1345
  regNumber: string | null;
1019
1346
  policyNumber: string | null;
@@ -1218,591 +1545,142 @@ export class FormStoreClass {
1218
1545
  surveyByHealthBasePolicyholder: true,
1219
1546
  surveyByCriticalBasePolicyholder: true,
1220
1547
  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;
1548
+ policyholderActivitiesForm: true,
1549
+ accidentStatisticsForm: true,
1550
+ };
1551
+ this.isPolicyholderInsured = false;
1552
+ this.isPolicyholderBeneficiary = false;
1553
+ this.isActOwnBehalf = true;
1554
+ this.hasRepresentative = false;
1555
+ this.applicationData = { processInstanceId: 0 };
1556
+ this.policyholderForm = new Member();
1557
+ this.policyholderFormKey = StoreMembers.policyholderForm;
1558
+ this.policyholdersRepresentativeForm = new Member();
1559
+ this.policyholdersRepresentativeFormKey = StoreMembers.policyholdersRepresentativeForm;
1560
+ this.beneficiaryForm = [new Member()];
1561
+ this.beneficiaryFormKey = StoreMembers.beneficiaryForm;
1562
+ this.beneficiaryFormIndex = 0;
1563
+ this.beneficialOwnerForm = [new Member()];
1564
+ this.beneficialOwnerFormIndex = 0;
1565
+ this.beneficialOwnerFormKey = StoreMembers.beneficialOwnerForm;
1566
+ this.insuredForm = [new Member()];
1567
+ this.slaveInsuredForm = new Member();
1568
+ this.insuredFormKey = StoreMembers.insuredForm;
1569
+ this.insuredFormIndex = 0;
1570
+ this.productConditionsForm = new ProductConditions();
1571
+ this.productConditionsFormKey = 'productConditionsForm';
1572
+ this.questionnaireByHealth = {};
1573
+ this.questionnaireByCritical = [];
1574
+ this.canBeClaimed = null;
1575
+ this.applicationTaskId = null;
1576
+ this.requiredDocuments = [];
1577
+ this.isNeedToRecalculate = false;
1778
1578
  }
1579
+ }
1779
1580
 
1780
- getPattern(pattern: string) {
1781
- const key = `_${pattern}Pattern` as keyof typeof this;
1782
- return this[key];
1783
- }
1581
+ class Address {
1582
+ country: Value;
1583
+ region: Value;
1584
+ state: Value;
1585
+ regionType: Value;
1586
+ city: Value;
1587
+ square: string | null;
1588
+ microdistrict: string | null;
1589
+ street: string | null;
1590
+ houseNumber: string | null;
1591
+ kato: string | null;
1592
+ longName: string | null;
1593
+ longNameKz: string | null;
1784
1594
 
1785
- validatedMessage(valid: any, msg = 'Обязательное поле') {
1786
- return {
1787
- error: valid,
1788
- msg,
1789
- };
1595
+ constructor() {
1596
+ this.country = new Value();
1597
+ this.region = new Value();
1598
+ this.state = new Value();
1599
+ this.regionType = new Value();
1600
+ this.city = new Value();
1601
+ this.square = null;
1602
+ this.microdistrict = null;
1603
+ this.street = null;
1604
+ this.houseNumber = null;
1605
+ this.kato = null;
1606
+ this.longName = null;
1607
+ this.longNameKz = null;
1790
1608
  }
1609
+ }
1791
1610
 
1792
- validateFullName() {
1793
- return this.lastName !== null && this.firstName !== null;
1794
- }
1611
+ class PolicyholderActivity {
1612
+ activityTypeName: string | null;
1613
+ empoloyeeCount: string | null;
1795
1614
 
1796
- getFullNameShorted() {
1797
- return this.validateFullName() ? `${this.lastName} ${this.firstName?.charAt(0)}. ${this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''}` : null;
1615
+ constructor() {
1616
+ this.activityTypeName = null;
1617
+ this.empoloyeeCount = null;
1798
1618
  }
1619
+ }
1799
1620
 
1800
- getFullName() {
1801
- return this.validateFullName() ? (this.lastName + ' ' + this.firstName + ' ' + this.middleName != '' ? this.middleName?.charAt(0) : '') : null;
1621
+ class BaseGroupClass {
1622
+ id: string | number;
1623
+ longName: string;
1624
+ iin: string;
1625
+ phoneNumber: string;
1626
+ age: string;
1627
+ name: string;
1628
+ nameKz: string;
1629
+ longNameKz: string;
1630
+ citizenship: Value;
1631
+ email: string;
1632
+ resident: Value;
1633
+ taxResidentCountry: Value;
1634
+ addTaxResidency: Value;
1635
+ economySectorCode: Value;
1636
+ hasAttachedFile: boolean;
1637
+ actualAddress: Address;
1638
+ isActualAddressEqualLegalAddres: boolean;
1639
+ legalAddress: Address;
1640
+ identityDocument: {
1641
+ documentType: Value;
1642
+ documentNumber: string;
1643
+ series: string;
1644
+ issuedBy: Value;
1645
+ issuedOn: string;
1646
+ validUntil: string;
1647
+ };
1648
+ bankInfo: BankInfoClass;
1649
+ kbe: string;
1650
+
1651
+ constructor() {
1652
+ this.id = 0;
1653
+ this.longName = '';
1654
+ this.iin = '';
1655
+ this.phoneNumber = '';
1656
+ this.age = '';
1657
+ this.name = '';
1658
+ this.nameKz = '';
1659
+ this.longNameKz = '';
1660
+ this.citizenship = new Value();
1661
+ this.email = '';
1662
+ this.resident = new Value();
1663
+ this.taxResidentCountry = new Value();
1664
+ this.addTaxResidency = new Value();
1665
+ this.economySectorCode = new Value();
1666
+ this.hasAttachedFile = false;
1667
+ this.actualAddress = new Address();
1668
+ this.isActualAddressEqualLegalAddres = true;
1669
+ this.legalAddress = new Address();
1670
+ this.identityDocument = {
1671
+ documentType: new Value(),
1672
+ documentNumber: '',
1673
+ series: '',
1674
+ issuedBy: new Value(),
1675
+ issuedOn: '',
1676
+ validUntil: '',
1677
+ };
1678
+ this.bankInfo = new BankInfoClass();
1679
+ this.kbe = '';
1802
1680
  }
1803
1681
  }
1804
1682
 
1805
- export class PhysGroupClass extends BaseGroupClass {
1683
+ class PhysGroupClass extends BaseGroupClass {
1806
1684
  lastName: string;
1807
1685
  firstName: string;
1808
1686
  middleName: string;
@@ -1834,3 +1712,154 @@ export class PhysGroupClass extends BaseGroupClass {
1834
1712
  };
1835
1713
  }
1836
1714
  }
1715
+
1716
+ class GroupMember extends PhysGroupClass {
1717
+ isLeader: boolean;
1718
+
1719
+ typeOfEconomicActivity: Value;
1720
+ activityTypes: { activityTypeName: string; empoloyeeCount: number }[];
1721
+ beneficalOwnerQuest: { order: number; text: string; answer: boolean | null }[];
1722
+ authoritedPerson: PhysGroupClass;
1723
+ insuredPolicyData: Types.InsuredPolicyType;
1724
+
1725
+ constructor() {
1726
+ super();
1727
+ // Client
1728
+ this.isLeader = false;
1729
+ this.typeOfEconomicActivity = new Value();
1730
+ this.activityTypes = [];
1731
+ this.beneficalOwnerQuest = [
1732
+ {
1733
+ order: 0,
1734
+ text: 'Отметка о наличии/отсутствии физического лица (лиц), которому прямо или косвенно принадлежат более 25 % долей участия в уставном капитале либо размещенных (за вычетом привилегированных и выкупленных обществом) акций юридического лица',
1735
+ answer: null,
1736
+ },
1737
+ {
1738
+ order: 1,
1739
+ text: 'Отметка о наличии/отсутствии физического лица (лиц), осуществляющего контроль над юридическим лицом по иным основаниям',
1740
+ answer: null,
1741
+ },
1742
+ {
1743
+ order: 2,
1744
+ text: 'Отметка о наличии/отсутствии физического лица (лиц) в интересах которого юридическим лицом устанавливаются деловые отношения (совершаются операции)',
1745
+ answer: null,
1746
+ },
1747
+ ];
1748
+ this.authoritedPerson = new PhysGroupClass();
1749
+ // Insured
1750
+ this.insuredPolicyData = {
1751
+ insSum: 0,
1752
+ insSumWithLoad: 0,
1753
+ premium: 0,
1754
+ premiumWithLoad: 0,
1755
+ insuredRisk: {
1756
+ lifeMultiply: 0,
1757
+ lifeAdditive: 0,
1758
+ disabilityMultiply: 0,
1759
+ disabilityAdditive: 0,
1760
+ traumaTableMultiple: 0,
1761
+ accidentalLifeMultiply: 0,
1762
+ accidentalLifeAdditive: 0,
1763
+ criticalMultiply: 0,
1764
+ criticalAdditive: 0,
1765
+ },
1766
+ insuredCoverData: [],
1767
+ };
1768
+ }
1769
+ }
1770
+
1771
+ class BankInfoClass {
1772
+ bankName: Value;
1773
+ bin: string;
1774
+ iik: string;
1775
+ bik: string;
1776
+ kbe: string;
1777
+
1778
+ constructor() {
1779
+ this.bankName = new Value();
1780
+ this.bin = '';
1781
+ this.iik = '';
1782
+ this.bik = '';
1783
+ this.kbe = '';
1784
+ }
1785
+ }
1786
+
1787
+ class PolicyholderClass {
1788
+ isIpdl: boolean;
1789
+ clientData: GroupMember;
1790
+
1791
+ constructor() {
1792
+ this.isIpdl = false;
1793
+ this.clientData = new GroupMember();
1794
+ }
1795
+ }
1796
+
1797
+ class BeneficialOwner {
1798
+ id: string;
1799
+ isIpdl: boolean;
1800
+ beneficialOwnerData: GroupMember;
1801
+
1802
+ constructor() {
1803
+ this.isIpdl = false;
1804
+ this.beneficialOwnerData = new GroupMember();
1805
+ this.id = '';
1806
+ }
1807
+ }
1808
+
1809
+ class TransferContract {
1810
+ id: string | null;
1811
+ transferContractIsOppv: boolean;
1812
+ transferContractFirstPaymentDate: string;
1813
+ transferContractAmount: number | string;
1814
+ transferContractDate: string;
1815
+ transferContractNumber: string;
1816
+ transferContractRegNumber: string;
1817
+ transferContract: boolean;
1818
+ transferContractCompany: Value;
1819
+ transferContractMonthCount: number | null;
1820
+
1821
+ constructor() {
1822
+ this.id = null;
1823
+ this.transferContractIsOppv = false;
1824
+ this.transferContractFirstPaymentDate = '';
1825
+ this.transferContractAmount = 0;
1826
+ this.transferContractDate = '';
1827
+ this.transferContractNumber = '';
1828
+ this.transferContract = false;
1829
+ this.transferContractRegNumber = '';
1830
+ this.transferContractCompany = new Value();
1831
+ this.transferContractMonthCount = null;
1832
+ }
1833
+ }
1834
+
1835
+ class RequiredDocument extends Value {
1836
+ iin: string = '';
1837
+ }
1838
+
1839
+ export {
1840
+ MenuItem,
1841
+ Value,
1842
+ CountryValue,
1843
+ IDocument,
1844
+ DocumentItem,
1845
+ MenuOption,
1846
+ InitialColumns,
1847
+ User,
1848
+ Contragent,
1849
+ Member,
1850
+ CalculatorForm,
1851
+ ProductConditions,
1852
+ MemberSettings,
1853
+ DataStoreClass,
1854
+ FormStoreClass,
1855
+ Address,
1856
+ PolicyholderActivity,
1857
+ BaseGroupClass,
1858
+ PhysGroupClass,
1859
+ GroupMember,
1860
+ BankInfoClass,
1861
+ PolicyholderClass,
1862
+ BeneficialOwner,
1863
+ TransferContract,
1864
+ RequiredDocument,
1865
+ };