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

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.
@@ -1,22 +1,18 @@
1
- import { AxiosError } from 'axios';
2
- import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
3
- import { Roles, Statuses, StoreMembers } from '../types/enum';
4
1
  import { useDisplay } from 'vuetify';
5
2
  import { jwtDecode as jwt_decode } from 'jwt-decode';
6
3
  import { XMLParser } from 'fast-xml-parser';
7
- import type { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-router';
8
- import type * as Types from '../types';
9
-
10
- type LinkType = Partial<RouteLocationNormalized> | Partial<RouteLocationNormalizedLoaded> | string | null | boolean;
11
-
12
- const envMode = import.meta.env.VITE_MODE;
4
+ import { AxiosError } from 'axios';
5
+ import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
6
+ import { PolicyholderClass, Value, User } from '../composables/classes';
7
+ import type { EnvModes, NestedKeyOf, Projects, ResponseStructure, Utils } from '../types';
8
+ import { Roles, Statuses } from '../types/enum';
13
9
 
14
10
  export const useEnv = () => {
15
11
  return {
16
- envMode: envMode,
17
- isDev: envMode === 'development',
18
- isTest: envMode === 'test',
19
- isProduction: envMode === 'production',
12
+ envMode: import.meta.env.VITE_MODE,
13
+ isDev: import.meta.env.VITE_MODE === 'development',
14
+ isTest: import.meta.env.VITE_MODE === 'test',
15
+ isProduction: import.meta.env.VITE_MODE === 'production',
20
16
  };
21
17
  };
22
18
 
@@ -132,7 +128,7 @@ export const formatPhone = (phone: string) => {
132
128
  export const cleanWhiteSpace = (str: string) => String(str).replace(/\s+/g, '');
133
129
 
134
130
  export const jwtDecode = (token?: string | null) => {
135
- if (token) return jwt_decode<Types.Utils.JwtToken>(token);
131
+ if (token) return jwt_decode<Utils.JwtToken>(token);
136
132
  else return null;
137
133
  };
138
134
 
@@ -256,1837 +252,6 @@ export const ErrorHandler = (err: unknown, errorText?: string) => {
256
252
  return false;
257
253
  };
258
254
 
259
- class MenuItemConfig {
260
- id: any;
261
- title: string | null;
262
- link?: LinkType;
263
- hasLine?: boolean;
264
- description?: string | null;
265
- url?: string | null;
266
- initial?: any | null;
267
- icon?: string | null;
268
- action?: Function | void;
269
- disabled?: ComputedRef;
270
- color?: string;
271
- show?: ComputedRef;
272
- chip?: Types.ChipComponent;
273
-
274
- constructor(
275
- id: any = null,
276
- title: string | null = null,
277
- link?: LinkType,
278
- hasLine?: boolean,
279
- description?: string | null,
280
- url?: string | null,
281
- initial?: any | null,
282
- icon?: string | null,
283
- action?: Function | void,
284
- disabled?: ComputedRef,
285
- color?: string,
286
- show?: ComputedRef,
287
- chip?: Types.ChipComponent,
288
- ) {
289
- this.id = id;
290
- this.title = title;
291
- this.link = link;
292
- this.hasLine = hasLine;
293
- this.description = description;
294
- this.url = url;
295
- this.initial = initial;
296
- this.icon = icon;
297
- this.action = action;
298
- this.disabled = disabled;
299
- this.color = color;
300
- this.show = show;
301
- this.chip = chip;
302
- }
303
- }
304
-
305
- export class Value {
306
- id: string | number | null;
307
- code: string | number | null;
308
- nameRu: string | null;
309
- nameKz: string | null;
310
- ids: string | number | null;
311
-
312
- constructor(id: string | number | null = null, nameRu: string | null = null, nameKz: string | null = null, code: string | null = null, ids: string | null = null) {
313
- this.id = id;
314
- this.code = code;
315
- this.nameRu = nameRu;
316
- this.nameKz = nameKz;
317
- this.ids = ids;
318
- }
319
- }
320
-
321
- export class CountryValue extends Value {
322
- countryTypeCode: string | number | null;
323
-
324
- constructor(countryTypeCode = null, ...args: any) {
325
- super(...args);
326
- this.countryTypeCode = countryTypeCode;
327
- }
328
- }
329
-
330
- export class IDocument {
331
- id?: string;
332
- processInstanceId?: string;
333
- iin?: string;
334
- fileTypeId?: string;
335
- fileTypeName?: string;
336
- fileTypeNameRu?: string;
337
- fileId?: string;
338
- page?: number;
339
- fileName?: string;
340
- fileTypeCode?: string;
341
- sharedId?: string | null;
342
- signed?: boolean | null;
343
- signId?: string | null;
344
- certificateDate?: string | null;
345
- signedType?: number;
346
-
347
- constructor(
348
- id?: string,
349
- processInstanceId?: string,
350
- iin?: string,
351
- fileTypeId?: string,
352
- fileTypeName?: string,
353
- fileTypeNameRu?: string,
354
- fileId?: string,
355
- page?: number,
356
- fileName?: string,
357
- fileTypeCode?: string,
358
- sharedId?: string | null,
359
- signed?: boolean | null,
360
- signId?: string | null,
361
- certificateDate?: string | null,
362
- signedType?: number,
363
- ) {
364
- this.id = id;
365
- this.processInstanceId = processInstanceId;
366
- this.iin = iin;
367
- this.fileTypeId = fileTypeId;
368
- this.fileTypeName = fileTypeName;
369
- this.fileTypeNameRu = fileTypeNameRu;
370
- this.fileId = fileId;
371
- this.page = page;
372
- this.fileName = fileName;
373
- this.fileTypeCode = fileTypeCode;
374
- this.sharedId = sharedId;
375
- this.signed = signed;
376
- this.signId = signId;
377
- this.certificateDate = certificateDate;
378
- this.signedType = signedType;
379
- }
380
- }
381
-
382
- export class DocumentItem extends IDocument {
383
- constructor(
384
- {
385
- id,
386
- processInstanceId,
387
- iin,
388
- fileTypeId,
389
- fileTypeName,
390
- fileTypeNameRu,
391
- fileId,
392
- page,
393
- fileName,
394
- fileTypeCode,
395
- sharedId,
396
- signed,
397
- signId,
398
- certificateDate,
399
- signedType,
400
- }: IDocument = new IDocument(),
401
- ) {
402
- super(id, processInstanceId, iin, fileTypeId, fileTypeName, fileTypeNameRu, fileId, page, fileName, fileTypeCode, sharedId, signed, signId, certificateDate, signedType);
403
- }
404
- }
405
-
406
- export class MenuOption {
407
- text: string | null;
408
- subtitle: string | null;
409
- icon: string | null;
410
- variant: string | null;
411
- size: string | null;
412
-
413
- constructor(text = 'Text', subtitle = 'Subtitle', icon = 'mdi-content-copy', variant = 'text', size = 'small') {
414
- this.text = text;
415
- this.subtitle = subtitle;
416
- this.icon = icon;
417
- this.variant = variant;
418
- this.size = size;
419
- }
420
- }
421
-
422
- export const InitialColumns = (): {
423
- addRegNumber: boolean | null;
424
- number: boolean | null;
425
- iin: boolean | null;
426
- longName: boolean | null;
427
- userName: boolean | null;
428
- processCodeTitle: boolean | null;
429
- historyStatusTitle: boolean | null;
430
- dateCreated: boolean | null;
431
- } => {
432
- return {
433
- addRegNumber: null,
434
- number: null,
435
- iin: null,
436
- longName: null,
437
- userName: null,
438
- processCodeTitle: null,
439
- historyStatusTitle: null,
440
- dateCreated: null,
441
- };
442
- };
443
-
444
- export class User {
445
- login: string | null;
446
- password: string | null;
447
- roles: string[];
448
- id: string | null;
449
- fullName: string | null;
450
- code: string;
451
- branchCode: string;
452
-
453
- constructor(
454
- login: string | null = null,
455
- password: string | null = null,
456
- roles: string[] = [],
457
- id: string | null = null,
458
- fullName: string | null = null,
459
- code: string = '',
460
- branchCode: string = '',
461
- ) {
462
- this.login = login;
463
- this.password = password;
464
- this.roles = roles;
465
- this.id = id;
466
- this.fullName = fullName;
467
- this.code = code;
468
- this.branchCode = branchCode;
469
- }
470
-
471
- resetUser() {
472
- this.login = null;
473
- this.password = null;
474
- this.roles = [];
475
- this.id = null;
476
- this.fullName = null;
477
- this.code = '';
478
- this.branchCode = '';
479
- }
480
- }
481
-
482
- class Person {
483
- id: string | number | null;
484
- type: string | number | null;
485
- iin: string | null;
486
- longName: string | null;
487
- lastName: string | null;
488
- firstName: string | null;
489
- firstNameLat?: string | null;
490
- lastNameLat?: string | null;
491
- middleName: string | null;
492
- birthDate: string | null;
493
- gender: Value;
494
- genderName: string | null;
495
- birthPlace: Value;
496
- age: string | null;
497
- registrationDate: string;
498
-
499
- constructor(
500
- id = 0,
501
- type = 1,
502
- iin = null,
503
- longName = null,
504
- lastName = null,
505
- firstName = null,
506
- middleName = null,
507
- birthDate = null,
508
- gender = new Value(),
509
- genderName = null,
510
- birthPlace = new Value(),
511
- age = null,
512
- ) {
513
- this.id = id;
514
- this.type = type;
515
- this.iin = iin;
516
- this.longName = !!lastName && !!firstName && !!middleName ? (((((lastName as string) + firstName) as string) + middleName) as string) : longName;
517
- this.lastName = lastName;
518
- this.firstName = firstName;
519
- this.middleName = middleName;
520
- this.birthDate = birthDate;
521
- this.gender = gender;
522
- this.genderName = gender && gender.nameRu !== null ? (gender.nameRu as string) : genderName;
523
- this.birthPlace = birthPlace;
524
- this.age = age;
525
- this.registrationDate = new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1);
526
- }
527
-
528
- resetPerson(clearIinAndPhone: boolean = true) {
529
- this.id = 0;
530
- this.type = 1;
531
- if (clearIinAndPhone === true) {
532
- this.iin = null;
533
- }
534
- this.longName = null;
535
- this.lastName = null;
536
- this.firstName = null;
537
- this.middleName = null;
538
- this.birthDate = null;
539
- this.gender = new Value();
540
- this.genderName = null;
541
- this.birthPlace = new Value();
542
- this.age = null;
543
- this.registrationDate = new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1);
544
- }
545
-
546
- formatDate(date: any): Date | null {
547
- return formatDate(date);
548
- }
549
-
550
- getDateByKey(key: string): string | null {
551
- const ctxKey = key as keyof typeof this;
552
- if (this[ctxKey] && this[ctxKey] !== null) {
553
- const formattedDate = this.formatDate(this[ctxKey]);
554
- return formattedDate ? formattedDate.toISOString() : null;
555
- } else {
556
- return null;
557
- }
558
- }
559
-
560
- getBirthDate() {
561
- return this.getDateByKey('birthDate');
562
- }
563
-
564
- getDocumentExpireDate() {
565
- return this.getDateByKey('documentExpire');
566
- }
567
-
568
- getDocumentDate() {
569
- return this.getDateByKey('documentDate');
570
- }
571
-
572
- getAgeByBirthDate() {
573
- const date = this.formatDate(this.birthDate);
574
- if (date) {
575
- const age = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
576
- if (new Date(date) < new Date(Date.now()) && age >= 0) {
577
- return age.toString();
578
- }
579
- } else {
580
- return null;
581
- }
582
- }
583
- }
584
-
585
- export class Contragent extends Person {
586
- economySectorCode: Value;
587
- countryOfCitizenship: Value;
588
- countryOfTaxResidency: Value;
589
- registrationCountry: Value;
590
- registrationProvince: Value;
591
- registrationRegion: Value;
592
- registrationRegionType: Value;
593
- registrationCity: Value;
594
- registrationQuarter: string | null;
595
- registrationMicroDistrict: string | null;
596
- registrationStreet: string | null;
597
- registrationNumberHouse: string | null;
598
- registrationNumberApartment: string | null;
599
- phoneNumber: string | null;
600
- homePhone: string | null;
601
- email: string | null;
602
- signOfResidency: Value;
603
- documentType: Value;
604
- documentNumber: string | null;
605
- documentIssuers: Value;
606
- documentDate: string | null;
607
- documentExpire: string | null;
608
- verifyDate: string | null;
609
- verifyType: string | null;
610
- otpTokenId: string | null;
611
-
612
- constructor(
613
- economySectorCode = new Value(),
614
- countryOfCitizenship = new Value(),
615
- countryOfTaxResidency = new Value(),
616
- registrationCountry = new Value(),
617
- registrationProvince = new Value(),
618
- registrationRegion = new Value(),
619
- registrationRegionType = new Value(),
620
- registrationCity = new Value(),
621
- registrationQuarter = null,
622
- registrationMicroDistrict = null,
623
- registrationStreet = null,
624
- registrationNumberHouse = null,
625
- registrationNumberApartment = null,
626
- phoneNumber = null,
627
- homePhone = null,
628
- email = null,
629
- signOfResidency = new Value(),
630
- documentType = new Value(),
631
- documentNumber = null,
632
- documentIssuers = new Value(),
633
- documentDate = null,
634
- documentExpire = null,
635
- ...args: any
636
- ) {
637
- super(...args);
638
- this.economySectorCode = economySectorCode;
639
- this.countryOfCitizenship = countryOfCitizenship;
640
- this.countryOfTaxResidency = countryOfTaxResidency;
641
- this.registrationCountry = registrationCountry;
642
- this.registrationProvince = registrationProvince;
643
- this.registrationRegion = registrationRegion;
644
- this.registrationRegionType = registrationRegionType;
645
- this.registrationCity = registrationCity;
646
- this.registrationQuarter = registrationQuarter;
647
- this.registrationMicroDistrict = registrationMicroDistrict;
648
- this.registrationStreet = registrationStreet;
649
- this.registrationNumberHouse = registrationNumberHouse;
650
- this.registrationNumberApartment = registrationNumberApartment;
651
- this.phoneNumber = phoneNumber;
652
- this.homePhone = homePhone;
653
- this.email = email;
654
- this.signOfResidency = signOfResidency;
655
- this.documentType = documentType;
656
- this.documentNumber = documentNumber;
657
- this.documentIssuers = documentIssuers;
658
- this.documentDate = documentDate;
659
- this.documentExpire = documentExpire;
660
- this.verifyDate = null;
661
- this.verifyType = null;
662
- this.otpTokenId = null;
663
- }
664
- }
665
-
666
- export class Member extends Person {
667
- response?: {
668
- contragent?: Types.ContragentType;
669
- questionnaires?: Types.ContragentQuestionaries[];
670
- contacts?: Types.ContragentContacts[];
671
- documents?: Types.ContragentDocuments[];
672
- addresses?: Types.ContragentAddress[];
673
- };
674
- verifyType: any;
675
- verifyDate: any;
676
- postIndex: string | null;
677
- isPdl: boolean;
678
- migrationCard: string | null;
679
- migrationCardIssueDate: string | null;
680
- migrationCardExpireDate: string | null;
681
- confirmDocType: string | null;
682
- confirmDocNumber: string | null;
683
- confirmDocIssueDate: string | null;
684
- confirmDocExpireDate: string | null;
685
- notaryLongName: string | null;
686
- notaryLicenseNumber: string | null;
687
- notaryLicenseDate: string | null;
688
- notaryLicenseIssuer: string | null;
689
- jurLongName: string | null;
690
- fullNameRod: string | null;
691
- confirmDocTypeKz: string | null;
692
- confirmDocTypeRod: string | null;
693
- isNotary: boolean;
694
- insurancePay: Value;
695
- job: string | null;
696
- jobPosition: string | null;
697
- jobPlace: string | null;
698
- positionCode: string | null;
699
- registrationCountry: Value;
700
- registrationProvince: Value;
701
- registrationRegion: Value;
702
- registrationRegionType: Value;
703
- registrationCity: Value;
704
- registrationQuarter?: string | null;
705
- registrationMicroDistrict?: string | null;
706
- registrationStreet?: string | null;
707
- registrationNumberHouse?: string | null;
708
- registrationNumberApartment?: string | null;
709
- birthRegion: Value;
710
- documentType: Value;
711
- documentNumber: string | null;
712
- documentIssuers: Types.Base.Document.IssuerOther;
713
- documentDate: string | null;
714
- documentExpire: string | null;
715
- signOfResidency: Value;
716
- signOfIPDL: Value;
717
- countryOfCitizenship: Value;
718
- countryOfTaxResidency: Value;
719
- addTaxResidency: Value;
720
- economySectorCode: Value;
721
- phoneNumber: string | null;
722
- homePhone: string | null;
723
- email: string | null;
724
- address: string | null;
725
- familyStatus: Value;
726
- isTerror: null;
727
- relationDegree: Value;
728
- isDisability: boolean;
729
- disabilityGroup: Value | null;
730
- percentageOfPayoutAmount: string | number | null;
731
- _cyrPattern: RegExp;
732
- _numPattern: RegExp;
733
- _phonePattern: RegExp;
734
- _emailPattern: RegExp;
735
- gotFromInsis: boolean | null;
736
- gosPersonData: Types.Api.GBD.Person | null;
737
- parsedDocument: any;
738
- hasAgreement: boolean | null;
739
- otpTokenId: string | null;
740
- otpCode: string;
741
- documentsList: Types.ContragentDocuments[];
742
- isInsuredUnderage?: boolean = false;
743
- bankInfo: BankInfoClass;
744
- transferContractCompany: Value;
745
- digitalDocument: IDocument | null;
746
- identityDocument: {
747
- documentType: Value;
748
- documentNumber: string | null;
749
- issuedOn: string | null;
750
- issuedBy: Value;
751
- validUntil: string | null;
752
- };
753
-
754
- constructor(
755
- id = 0,
756
- type = 1,
757
- iin = null,
758
- phoneNumber = null,
759
- longName = null,
760
- lastName = null,
761
- firstName = null,
762
- middleName = null,
763
- birthDate = null,
764
- gender = new Value(),
765
- genderName = null,
766
- birthPlace = new Value(),
767
- age = null,
768
- registrationDate = null,
769
- job = null,
770
- jobPosition = null,
771
- jobPlace = null,
772
- positionCode = null,
773
- registrationCountry = new Value(),
774
- registrationProvince = new Value(),
775
- registrationRegion = new Value(),
776
- registrationRegionType = new Value(),
777
- registrationCity = new Value(),
778
- registrationQuarter = null,
779
- registrationMicroDistrict = null,
780
- registrationStreet = null,
781
- registrationNumberHouse = null,
782
- registrationNumberApartment = null,
783
- birthRegion = new Value(),
784
- documentType = new Value(),
785
- documentNumber = null,
786
- documentIssuers = new Value(),
787
- documentDate = null,
788
- documentExpire = null,
789
- signOfResidency = new Value(),
790
- signOfIPDL = new Value(),
791
- isTerror = null,
792
- countryOfCitizenship = new Value(),
793
- countryOfTaxResidency = new Value(),
794
- addTaxResidency = new Value(),
795
- economySectorCode = new Value(),
796
- homePhone = null,
797
- email = null,
798
- address = null,
799
- familyStatus = new Value(),
800
- relationDegree = new Value(),
801
- isDisability = false,
802
- disabilityGroupId = new Value(),
803
- percentageOfPayoutAmount = null,
804
- migrationCard = null,
805
- migrationCardIssueDate = null,
806
- migrationCardExpireDate = null,
807
- confirmDocType = null,
808
- confirmDocNumber = null,
809
- confirmDocIssueDate = null,
810
- confirmDocExpireDate = null,
811
- notaryLongName = null,
812
- notaryLicenseNumber = null,
813
- notaryLicenseDate = null,
814
- notaryLicenseIssuer = null,
815
- jurLongName = null,
816
- fullNameRod = null,
817
- confirmDocTypeKz = null,
818
- confirmDocTypeRod = null,
819
- isNotary = false,
820
- ) {
821
- super(id, type, iin, longName, lastName, firstName, middleName, birthDate, gender, genderName, birthPlace, age);
822
- this.documentsList = [];
823
- this.postIndex = null;
824
- this.isPdl = false;
825
- this.migrationCard = migrationCard;
826
- this.migrationCardIssueDate = migrationCardIssueDate;
827
- this.migrationCardExpireDate = migrationCardExpireDate;
828
- this.confirmDocType = confirmDocType;
829
- this.confirmDocNumber = confirmDocNumber;
830
- this.confirmDocIssueDate = confirmDocIssueDate;
831
- this.confirmDocExpireDate = confirmDocExpireDate;
832
- this.notaryLongName = notaryLongName;
833
- this.notaryLicenseNumber = notaryLicenseNumber;
834
- this.notaryLicenseDate = notaryLicenseDate;
835
- this.notaryLicenseIssuer = notaryLicenseIssuer;
836
- this.jurLongName = jurLongName;
837
- this.fullNameRod = fullNameRod;
838
- this.confirmDocTypeKz = confirmDocTypeKz;
839
- this.confirmDocTypeRod = confirmDocTypeRod;
840
- this.isNotary = isNotary;
841
- this.insurancePay = new Value();
842
- this.job = job;
843
- this.jobPosition = jobPosition;
844
- this.jobPlace = jobPlace;
845
- this.positionCode = positionCode;
846
- this.registrationCountry = registrationCountry;
847
- this.registrationProvince = registrationProvince;
848
- this.registrationRegion = registrationRegion;
849
- this.registrationRegionType = registrationRegionType;
850
- this.registrationCity = registrationCity;
851
- this.registrationQuarter = registrationQuarter;
852
- this.registrationMicroDistrict = registrationMicroDistrict;
853
- this.registrationStreet = registrationStreet;
854
- this.registrationNumberHouse = registrationNumberHouse;
855
- this.registrationNumberApartment = registrationNumberApartment;
856
- this.birthRegion = birthRegion;
857
- this.documentType = documentType;
858
- this.documentNumber = documentNumber;
859
- this.documentIssuers = documentIssuers;
860
- this.documentDate = documentDate;
861
- this.documentExpire = documentExpire;
862
- this.signOfResidency = signOfResidency;
863
- this.signOfIPDL = signOfIPDL;
864
- this.countryOfCitizenship = countryOfCitizenship;
865
- this.countryOfTaxResidency = countryOfTaxResidency;
866
- this.addTaxResidency = addTaxResidency;
867
- this.economySectorCode = economySectorCode;
868
- this.phoneNumber = phoneNumber;
869
- this.homePhone = homePhone;
870
- this.email = email;
871
- this.otpTokenId = null;
872
- this.otpCode = '';
873
- this.address = address;
874
- this.familyStatus = familyStatus;
875
- this.isTerror = isTerror;
876
- this.relationDegree = relationDegree;
877
- this.isDisability = isDisability;
878
- this.disabilityGroup = disabilityGroupId;
879
- this.percentageOfPayoutAmount = percentageOfPayoutAmount;
880
- this._cyrPattern = /[\u0400-\u04FF -]+/;
881
- this._numPattern = /[0-9]+/;
882
- this._phonePattern = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
883
- this._emailPattern = /.+@.+\..+/;
884
- this.gotFromInsis = true;
885
- this.gosPersonData = null;
886
- this.parsedDocument = null;
887
- this.hasAgreement = null;
888
- this.bankInfo = new BankInfoClass();
889
- this.transferContractCompany = new Value();
890
- this.digitalDocument = null;
891
- this.identityDocument = {
892
- documentType: new Value(),
893
- documentNumber: null,
894
- issuedOn: null,
895
- issuedBy: new Value(),
896
- validUntil: null,
897
- };
898
- }
899
-
900
- resetMember(clearIinAndPhone: boolean = true) {
901
- super.resetPerson(clearIinAndPhone);
902
- this.job = null;
903
- this.jobPosition = null;
904
- this.jobPlace = null;
905
- this.positionCode = null;
906
- this.registrationCountry = new Value();
907
- this.registrationProvince = new Value();
908
- this.registrationRegion = new Value();
909
- this.registrationRegionType = new Value();
910
- this.registrationCity = new Value();
911
- this.registrationQuarter = null;
912
- this.registrationMicroDistrict = null;
913
- this.registrationStreet = null;
914
- this.registrationNumberHouse = null;
915
- this.registrationNumberApartment = null;
916
- this.birthRegion = new Value();
917
- this.documentType = new Value();
918
- this.documentNumber = null;
919
- this.documentIssuers = new Value();
920
- this.documentDate = null;
921
- this.documentExpire = null;
922
- this.signOfResidency = new Value();
923
- this.signOfIPDL = new Value();
924
- this.countryOfCitizenship = new Value();
925
- this.countryOfTaxResidency = new Value();
926
- this.economySectorCode = new Value();
927
- if (clearIinAndPhone === true) {
928
- this.phoneNumber = null;
929
- }
930
- this.homePhone = null;
931
- this.email = null;
932
- this.address = null;
933
- this.familyStatus = new Value();
934
- this.isTerror = null;
935
- this.relationDegree = new Value();
936
- this.isDisability = false;
937
- this.disabilityGroup = null;
938
- this.percentageOfPayoutAmount = null;
939
- this.gotFromInsis = true;
940
- this.gosPersonData = null;
941
- this.parsedDocument = null;
942
- this.hasAgreement = null;
943
- this.insurancePay = new Value();
944
- this.migrationCard = null;
945
- this.migrationCardIssueDate = null;
946
- this.migrationCardExpireDate = null;
947
- this.confirmDocType = null;
948
- this.confirmDocNumber = null;
949
- this.confirmDocIssueDate = null;
950
- this.confirmDocExpireDate = null;
951
- this.notaryLongName = null;
952
- this.notaryLicenseNumber = null;
953
- this.notaryLicenseDate = null;
954
- this.notaryLicenseIssuer = null;
955
- this.jurLongName = null;
956
- this.fullNameRod = null;
957
- this.confirmDocTypeKz = null;
958
- this.confirmDocTypeRod = null;
959
- this.isNotary = false;
960
- }
961
-
962
- getPattern(pattern: string) {
963
- const key = `_${pattern}Pattern` as keyof typeof this;
964
- return this[key];
965
- }
966
-
967
- validatedMessage(valid: any, msg = 'Обязательное поле') {
968
- return {
969
- error: valid,
970
- msg,
971
- };
972
- }
973
-
974
- validateFullName() {
975
- return this.lastName !== null && this.firstName !== null;
976
- }
977
-
978
- getFullNameShorted() {
979
- return this.validateFullName() ? `${this.lastName} ${this.firstName?.charAt(0)}. ${this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''}` : null;
980
- }
981
-
982
- getFullName() {
983
- return this.validateFullName() ? (this.lastName + ' ' + this.firstName + ' ' + this.middleName != '' ? this.middleName?.charAt(0) : '') : null;
984
- }
985
- }
986
-
987
- export class CalculatorForm {
988
- country: Value;
989
- countries: CountryValue[] | null;
990
- purpose: Value;
991
- workType: Value;
992
- sportsType: Value;
993
- type: Value;
994
- days: string | number | null;
995
- maxDays: Value;
996
- age: string | null;
997
- price: string | null;
998
- professionType: Value;
999
- amount: Value;
1000
- startDate: string | null;
1001
- endDate: string | null;
1002
- period: Value;
1003
- currency: string | null;
1004
-
1005
- constructor() {
1006
- this.country = new Value();
1007
- this.countries = [];
1008
- this.purpose = new Value();
1009
- this.workType = new Value();
1010
- this.sportsType = new Value();
1011
- this.type = new Value();
1012
- this.days = null;
1013
- this.maxDays = new Value();
1014
- this.age = null;
1015
- this.price = null;
1016
- this.professionType = new Value();
1017
- this.amount = new Value();
1018
- this.startDate = null;
1019
- this.endDate = null;
1020
- this.period = new Value();
1021
- this.currency = null;
1022
- }
1023
- }
1024
-
1025
- export class ProductConditions {
1026
- signDate: string | null;
1027
- birthDate: string | null;
1028
- gender: Value;
1029
- insuranceCase: string | null;
1030
- coverPeriod: number | null;
1031
- payPeriod: number | null;
1032
- termsOfInsurance: string | null;
1033
- annualIncome: string | null;
1034
- processIndexRate: Value;
1035
- processGfot: Value;
1036
- transferContractCompany: Value;
1037
- requestedSumInsured: number | string | null;
1038
- requestedSumInsuredInDollar: number | string | null;
1039
- insurancePremiumPerMonth: number | string | null;
1040
- insurancePremiumPerMonthInDollar: number | string | null;
1041
- establishingGroupDisabilityFromThirdYear: string | null;
1042
- possibilityToChange: string | null;
1043
- deathOfInsuredDueToAccident: Value;
1044
- establishingGroupDisability: Value;
1045
- temporaryDisability: Value;
1046
- bodyInjury: Value;
1047
- criticalIllnessOfTheInsured: Value;
1048
- paymentPeriod: Value;
1049
- amountOfInsurancePremium: string | number | null;
1050
- lifeMultiply: string | number | null;
1051
- lifeAdditive: string | number | null;
1052
- lifeMultiplyClient: string | number | null;
1053
- lifeAdditiveClient: string | number | null;
1054
- adbMultiply: string | number | null;
1055
- adbAdditive: string | number | null;
1056
- disabilityMultiply: string | number | null;
1057
- disabilityAdditive: string | number | null;
1058
- riskGroup: Value;
1059
- riskGroup2: Value;
1060
- additionalConditionAnnuityPayments: boolean;
1061
- guaranteedPeriod: number | null;
1062
- typeAnnuityInsurance: Value;
1063
- termAnnuityPayments: number | string | null;
1064
- periodAnnuityPayment: Value;
1065
- amountAnnuityPayments: number | string | null;
1066
- isRecalculated: boolean;
1067
- totalAmount5: number | string | null;
1068
- totalAmount7: number | string | null;
1069
- statePremium5: number | string | null;
1070
- statePremium7: number | string | null;
1071
- calculatorForm: CalculatorForm;
1072
- agentCommission: number | null;
1073
- fixInsSum: number | string | null;
1074
- amountRefunded: number | string | null;
1075
- amountPaid: number | string | null;
1076
- calcDate: string | null;
1077
- contractEndDate: string | null;
1078
- currency: Value;
1079
-
1080
- constructor(
1081
- insuranceCase = null,
1082
- coverPeriod = null,
1083
- payPeriod = null,
1084
- termsOfInsurance = null,
1085
- annualIncome = null,
1086
- processIndexRate = new Value(),
1087
- processGfot = new Value(),
1088
- transferContractCompany = new Value(),
1089
- requestedSumInsured = null,
1090
- insurancePremiumPerMonth = null,
1091
- establishingGroupDisabilityFromThirdYear = null,
1092
- possibilityToChange = null,
1093
- deathOfInsuredDueToAccident = new Value(),
1094
- establishingGroupDisability = new Value(),
1095
- temporaryDisability = new Value(),
1096
- bodyInjury = new Value(),
1097
- criticalIllnessOfTheInsured = new Value(),
1098
- paymentPeriod = new Value(),
1099
- amountOfInsurancePremium = null,
1100
- lifeMultiply = null,
1101
- lifeAdditive = null,
1102
- lifeMultiplyClient = null,
1103
- lifeAdditiveClient = null,
1104
- adbMultiply = null,
1105
- adbAdditive = null,
1106
- disabilityMultiply = null,
1107
- disabilityAdditive = null,
1108
- riskGroup = new Value(),
1109
- riskGroup2 = new Value(),
1110
- additionalConditionAnnuityPayments = false,
1111
- guaranteedPeriod = null,
1112
- typeAnnuityInsurance = new Value(),
1113
- termAnnuityPayments = null,
1114
- periodAnnuityPayment = new Value(),
1115
- amountAnnuityPayments = null,
1116
- isRecalculated = false,
1117
- totalAmount5 = null,
1118
- totalAmount7 = null,
1119
- statePremium5 = null,
1120
- statePremium7 = null,
1121
- calculatorForm = new CalculatorForm(),
1122
- agentCommission = null,
1123
- fixInsSum = null,
1124
- amountRefunded = null,
1125
- amountPaid = null,
1126
- calcDate = null,
1127
- contractEndDate = null,
1128
- currency = new Value(),
1129
- ) {
1130
- this.requestedSumInsuredInDollar = null;
1131
- this.insurancePremiumPerMonthInDollar = null;
1132
- this.signDate = null;
1133
- this.birthDate = null;
1134
- this.gender = new Value();
1135
- this.insuranceCase = insuranceCase;
1136
- this.coverPeriod = coverPeriod;
1137
- this.payPeriod = payPeriod;
1138
- this.termsOfInsurance = termsOfInsurance;
1139
- this.annualIncome = annualIncome;
1140
- this.processIndexRate = processIndexRate;
1141
- this.processGfot = processGfot;
1142
- this.transferContractCompany = transferContractCompany;
1143
- this.requestedSumInsured = requestedSumInsured;
1144
- this.insurancePremiumPerMonth = insurancePremiumPerMonth;
1145
- this.establishingGroupDisabilityFromThirdYear = establishingGroupDisabilityFromThirdYear;
1146
- this.possibilityToChange = possibilityToChange;
1147
- this.deathOfInsuredDueToAccident = deathOfInsuredDueToAccident;
1148
- this.establishingGroupDisability = establishingGroupDisability;
1149
- this.temporaryDisability = temporaryDisability;
1150
- this.bodyInjury = bodyInjury;
1151
- this.criticalIllnessOfTheInsured = criticalIllnessOfTheInsured;
1152
- this.paymentPeriod = paymentPeriod;
1153
- this.amountOfInsurancePremium = amountOfInsurancePremium;
1154
- this.lifeMultiply = lifeMultiply;
1155
- this.lifeAdditive = lifeAdditive;
1156
- this.lifeMultiplyClient = lifeMultiplyClient;
1157
- this.lifeAdditiveClient = lifeAdditiveClient;
1158
- this.adbMultiply = adbMultiply;
1159
- this.adbAdditive = adbAdditive;
1160
- this.disabilityMultiply = disabilityMultiply;
1161
- this.disabilityAdditive = disabilityAdditive;
1162
- this.riskGroup = riskGroup;
1163
- this.riskGroup2 = riskGroup2;
1164
- this.additionalConditionAnnuityPayments = additionalConditionAnnuityPayments;
1165
- this.guaranteedPeriod = guaranteedPeriod;
1166
- this.typeAnnuityInsurance = typeAnnuityInsurance;
1167
- this.termAnnuityPayments = termAnnuityPayments;
1168
- this.periodAnnuityPayment = periodAnnuityPayment;
1169
- this.amountAnnuityPayments = amountAnnuityPayments;
1170
- this.isRecalculated = isRecalculated;
1171
- this.totalAmount5 = totalAmount5;
1172
- this.totalAmount7 = totalAmount7;
1173
- this.statePremium5 = statePremium5;
1174
- this.statePremium7 = statePremium7;
1175
- this.calculatorForm = calculatorForm;
1176
- this.agentCommission = agentCommission;
1177
- this.fixInsSum = fixInsSum;
1178
- this.amountRefunded = amountRefunded;
1179
- this.amountPaid = amountPaid;
1180
- this.calcDate = calcDate;
1181
- this.contractEndDate = contractEndDate;
1182
- this.currency = currency;
1183
- }
1184
-
1185
- getSingleTripDays() {
1186
- if (this.calculatorForm.startDate && this.calculatorForm.endDate) {
1187
- const date1 = formatDate(this.calculatorForm.startDate);
1188
- const date2 = formatDate(this.calculatorForm.endDate);
1189
- if (date1 && date2) {
1190
- const days = Math.ceil((date2.getTime() - date1.getTime()) / (1000 * 3600 * 24)) + 1;
1191
- if (days > 0) {
1192
- return days;
1193
- }
1194
- }
1195
- }
1196
- return null;
1197
- }
1198
- }
1199
-
1200
- export class MemberSettings {
1201
- has?: boolean;
1202
- isMultiple?: boolean;
1203
- required?: boolean;
1204
- limit?: number;
1205
-
1206
- constructor(options?: { has?: boolean; isMultiple?: boolean; required?: boolean; limit?: number }) {
1207
- if (options) {
1208
- this.has = options.has;
1209
- this.isMultiple = options.isMultiple;
1210
- this.limit = options.limit;
1211
- if (this.has === true) {
1212
- this.required = options.required;
1213
- } else {
1214
- this.required = false;
1215
- }
1216
- }
1217
- }
1218
- }
1219
-
1220
- export class DataStoreClass {
1221
- projectConfig: Types.Utils.ProjectConfig | null;
1222
- // IMP Контроллер фич
1223
- controls: {
1224
- // Cтавит значения по дефолту полям
1225
- setDefaults: {
1226
- sectorCode: boolean;
1227
- percentage: boolean;
1228
- signOfResidency: boolean;
1229
- countryOfTaxResidency: boolean;
1230
- countryOfCitizenship: boolean;
1231
- };
1232
- // Проверка на роль при авторизации
1233
- onAuth: boolean;
1234
- // Согласие на главной странице
1235
- hasAgreement: boolean;
1236
- // Наличие анкеты
1237
- hasAnketa: boolean;
1238
- // Обязательность доп анкеты
1239
- isSecondAnketaRequired: boolean;
1240
- // Подтягивание с ГБДФЛ
1241
- hasGBDFL: boolean;
1242
- // Подтягивание с ГКБ
1243
- hasGKB: boolean;
1244
- // Подтягивание с ИНСИС
1245
- hasInsis: boolean;
1246
- // Калькулятор без ввода данных
1247
- hasCalculator: boolean;
1248
- // Блок прикрепления к менеджеру
1249
- hasAttachment: boolean;
1250
- // Решение АС
1251
- hasAffiliation: boolean;
1252
- // Выбор метода подписания
1253
- hasChooseSign: boolean;
1254
- // Выбор метода оплаты
1255
- hasChoosePay: boolean;
1256
- // Блок источник
1257
- hasSource: boolean;
1258
- };
1259
- members: {
1260
- clientApp: MemberSettings;
1261
- insuredApp: MemberSettings;
1262
- beneficiaryApp: MemberSettings;
1263
- beneficialOwnerApp: MemberSettings;
1264
- spokesmanApp: MemberSettings;
1265
- };
1266
- iframeLoading: boolean;
1267
- hasLayoutMargins: boolean;
1268
- readonly product: Types.Projects | null;
1269
- readonly parentProduct: 'efo' | 'auletti';
1270
- showNav: boolean;
1271
- showDisabledMessage: boolean;
1272
- menuItems: MenuItem[];
1273
- menu: {
1274
- title: string;
1275
- hasBack: boolean;
1276
- loading: boolean;
1277
- backIcon: string;
1278
- moreIcon: string;
1279
- hasInfo: boolean;
1280
- infoIcon: string;
1281
- infoItems: MenuItem[];
1282
- onBack: any;
1283
- onLink: any;
1284
- selectedItem: MenuItem;
1285
- };
1286
- settings: {
1287
- open: boolean;
1288
- overlay: boolean;
1289
- items: MenuItem[];
1290
- };
1291
- buttons: MenuItem[];
1292
- isButtonsLoading: boolean;
1293
- panelAction: keyof typeof constants.actions | null;
1294
- panel: {
1295
- open: boolean;
1296
- overlay: boolean;
1297
- title: string;
1298
- clear: () => void;
1299
- };
1300
- rightPanel: {
1301
- open: boolean;
1302
- overlay: boolean;
1303
- title: string;
1304
- clear: () => void;
1305
- };
1306
- historyPageIndex: number;
1307
- historyPageSize: number;
1308
- historyTotalItems: number;
1309
- isColumnAsc = { ...InitialColumns() };
1310
- idleKey: number;
1311
- processList: Types.Item[] | null;
1312
- countries: Value[];
1313
- citizenshipCountries: Value[];
1314
- taxCountries: Value[];
1315
- addTaxCountries: Value[];
1316
- states: Value[];
1317
- regions: Value[];
1318
- cities: Value[];
1319
- localityTypes: Value[];
1320
- dicFileTypeList: Value[];
1321
- documentTypes: Value[];
1322
- documentIssuers: Value[];
1323
- familyStatuses: Value[];
1324
- disabilityGroups: Value[];
1325
- relations: Value[];
1326
- banks: Value[];
1327
- transferContractCompanies: Value[];
1328
- insurancePay: Value[];
1329
- questionRefs: Value[];
1330
- residents: Value[];
1331
- ipdl: Value[];
1332
- economySectorCode: Value[];
1333
- economicActivityType: Value[];
1334
- gender: Value[];
1335
- authorityBasis: Value[];
1336
- fontSize: number;
1337
- isFontChangerOpen: boolean = false;
1338
- isLoading: boolean = false;
1339
- accessToken: string | null = null;
1340
- refreshToken: string | null = null;
1341
- processIndexRate: Value[];
1342
- processGfot: Value[];
1343
- processPaymentPeriod: Value[];
1344
- dicAnnuityTypeList: Value[];
1345
- processAnnuityPaymentPeriod: Value[];
1346
- taskList: Types.TaskListItem[];
1347
- processHistory: Types.TaskHistory[];
1348
- contragentList: Types.ContragentType[];
1349
- contragentFormKey: string;
1350
- processCode: number | null;
1351
- groupCode: string;
1352
- userGroups: Types.Item[];
1353
- onMainPage: boolean;
1354
- SaleChanellPolicy: Value[];
1355
- RegionPolicy: Value[];
1356
- ManagerPolicy: Value[];
1357
- ExecutorGPH: Value[];
1358
- AgentData: Types.AgentData[];
1359
- riskGroup: Value[];
1360
- DicCoverTypePeriod: Value[];
1361
- Source: Value[];
1362
- currencies: {
1363
- eur: number | null;
1364
- usd: number | null;
1365
- };
1366
- filters: {
1367
- show: (item: MenuItem) => boolean;
1368
- disabled: (item: MenuItem) => boolean;
1369
- };
1370
- amountArray: Value[];
1371
- currency: string | number | null;
1372
- periodArray: Value[];
1373
- maxDaysAllArray: Value[];
1374
- maxDaysFiltered: Value[];
1375
- dicAllCountries: CountryValue[];
1376
- dicCountries: CountryValue[];
1377
- types: Value[];
1378
- workTypes: Value[];
1379
- sportsTypes: Value[];
1380
- purposes: Value[];
1381
- programType: Value[];
1382
- constructor() {
1383
- this.projectConfig = null;
1384
- this.filters = {
1385
- show: (item: MenuItem) => {
1386
- if (typeof item.show === 'boolean') {
1387
- return item.show;
1388
- }
1389
- return true;
1390
- },
1391
- disabled: (item: MenuItem) => {
1392
- if (typeof item.disabled === 'boolean') {
1393
- return item.disabled;
1394
- }
1395
- return false;
1396
- },
1397
- };
1398
- this.currencies = {
1399
- eur: null,
1400
- usd: null,
1401
- };
1402
- this.members = {
1403
- clientApp: new MemberSettings(),
1404
- insuredApp: new MemberSettings(),
1405
- beneficiaryApp: new MemberSettings(),
1406
- beneficialOwnerApp: new MemberSettings(),
1407
- spokesmanApp: new MemberSettings(),
1408
- };
1409
- this.controls = {
1410
- setDefaults: {
1411
- sectorCode: true,
1412
- percentage: true,
1413
- signOfResidency: false,
1414
- countryOfTaxResidency: false,
1415
- countryOfCitizenship: false,
1416
- },
1417
- onAuth: false,
1418
- hasAnketa: true,
1419
- isSecondAnketaRequired: true,
1420
- hasAgreement: true,
1421
- hasGBDFL: true,
1422
- hasGKB: false,
1423
- hasInsis: false,
1424
- hasCalculator: false,
1425
- hasAttachment: true,
1426
- hasAffiliation: true,
1427
- hasChooseSign: false,
1428
- hasChoosePay: false,
1429
- hasSource: false,
1430
- };
1431
- this.iframeLoading = false;
1432
- this.hasLayoutMargins = true;
1433
- this.processIndexRate = [];
1434
- this.processGfot = [];
1435
- this.processPaymentPeriod = [];
1436
- this.programType = [];
1437
- this.dicAnnuityTypeList = [];
1438
- this.processAnnuityPaymentPeriod = [];
1439
- this.questionRefs = [];
1440
- this.SaleChanellPolicy = [];
1441
- this.RegionPolicy = [];
1442
- this.ManagerPolicy = [];
1443
- this.ExecutorGPH = [];
1444
- this.AgentData = [];
1445
- this.DicCoverTypePeriod = [];
1446
- this.Source = [];
1447
- this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as Types.Projects) : null;
1448
- this.parentProduct = import.meta.env.VITE_PARENT_PRODUCT ? import.meta.env.VITE_PARENT_PRODUCT : 'efo';
1449
- this.showNav = true;
1450
- this.showDisabledMessage = false;
1451
- this.menuItems = [];
1452
- this.menu = {
1453
- title: '',
1454
- hasBack: false,
1455
- loading: false,
1456
- backIcon: 'mdi-arrow-left',
1457
- moreIcon: 'mdi-dots-vertical',
1458
- hasInfo: false,
1459
- infoIcon: 'mdi-information-outline',
1460
- infoItems: [],
1461
- onBack: {},
1462
- onLink: {},
1463
- selectedItem: new MenuItem(),
1464
- };
1465
- this.settings = {
1466
- open: false,
1467
- overlay: false,
1468
- items: [],
1469
- };
1470
- this.buttons = [];
1471
- this.isButtonsLoading = false;
1472
- this.panel = {
1473
- open: false,
1474
- overlay: false,
1475
- title: '',
1476
- clear: () => {
1477
- const panelActions = document.getElementById('panel-actions');
1478
- if (panelActions) {
1479
- panelActions.innerHTML = '';
1480
- }
1481
- },
1482
- };
1483
- this.rightPanel = {
1484
- open: false,
1485
- overlay: false,
1486
- title: '',
1487
- clear: () => {
1488
- const panelActions = document.getElementById('right-panel-actions');
1489
- if (panelActions) {
1490
- panelActions.innerHTML = '';
1491
- }
1492
- },
1493
- };
1494
- this.panelAction = null;
1495
- this.historyPageIndex = 1;
1496
- this.historyPageSize = 10;
1497
- this.historyTotalItems = 0;
1498
- this.isColumnAsc = { ...InitialColumns() };
1499
- this.idleKey = 999;
1500
- this.processList = null;
1501
- this.countries = [];
1502
- this.citizenshipCountries = [];
1503
- this.taxCountries = [];
1504
- this.addTaxCountries = [];
1505
- this.states = [];
1506
- this.regions = [];
1507
- this.cities = [];
1508
- this.localityTypes = [];
1509
- this.dicFileTypeList = [];
1510
- this.documentTypes = [];
1511
- this.documentIssuers = [];
1512
- this.familyStatuses = [];
1513
- this.disabilityGroups = [];
1514
- this.relations = [];
1515
- this.banks = [];
1516
- this.transferContractCompanies = [];
1517
- this.insurancePay = [];
1518
- this.residents = [];
1519
- this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
1520
- this.economySectorCode = [];
1521
- this.economicActivityType = [];
1522
- this.gender = [new Value(0, null), new Value(1, 'Мужской'), new Value(2, 'Женский')];
1523
- this.authorityBasis = [];
1524
- this.fontSize = 14;
1525
- this.isFontChangerOpen = false;
1526
- this.isLoading = false;
1527
- this.accessToken = null;
1528
- this.refreshToken = null;
1529
- this.taskList = [];
1530
- this.processHistory = [];
1531
- this.contragentList = [];
1532
- this.contragentFormKey = 'contragentForm';
1533
- this.processCode = null;
1534
- this.groupCode = 'Work';
1535
- this.userGroups = [];
1536
- this.onMainPage = true;
1537
- this.riskGroup = [
1538
- {
1539
- id: '1',
1540
- nameKz: '',
1541
- nameRu: '1',
1542
- code: '',
1543
- ids: '',
1544
- },
1545
- {
1546
- id: '2',
1547
- nameKz: '',
1548
- nameRu: '2',
1549
- code: '',
1550
- ids: '',
1551
- },
1552
- {
1553
- id: '3',
1554
- nameKz: '',
1555
- nameRu: '3',
1556
- code: '',
1557
- ids: '',
1558
- },
1559
- {
1560
- id: '4',
1561
- nameKz: '',
1562
- nameRu: '4',
1563
- code: '',
1564
- ids: '',
1565
- },
1566
- {
1567
- id: '5',
1568
- nameKz: '',
1569
- nameRu: '5',
1570
- code: '',
1571
- ids: '',
1572
- },
1573
- ];
1574
- this.amountArray = [];
1575
- this.currency = null;
1576
- this.maxDaysAllArray = [];
1577
- this.periodArray = [];
1578
- this.maxDaysFiltered = [];
1579
- this.dicCountries = [];
1580
- this.dicAllCountries = [];
1581
- this.types = [];
1582
- this.purposes = [];
1583
- this.workTypes = [];
1584
- this.sportsTypes = [];
1585
- }
1586
- }
1587
-
1588
- export class FormStoreClass {
1589
- documentName: string | null;
1590
- regNumber: string | null;
1591
- policyNumber: string | null;
1592
- contractDate: string | null;
1593
- needToScanSignedContract: boolean;
1594
- isUploadedSignedContract: boolean;
1595
- signedContractFormData: any;
1596
- lfb: {
1597
- clients: Types.ClientV2[];
1598
- policyholder: PolicyholderClass;
1599
- hasAccidentIncidents: boolean;
1600
- accidentIncidents: Types.AccidentIncidents[];
1601
- policyholderActivities: PolicyholderActivity[];
1602
- beneficialOwners: BeneficialOwner[];
1603
- beneficialOwnersIndex: number;
1604
- isPolicyholderBeneficialOwner: boolean;
1605
- clientId: string | null;
1606
- insuredFile: any;
1607
- isPanelInside: boolean;
1608
- typeChange: string;
1609
- add: boolean;
1610
- };
1611
- additionalInsuranceTerms: Types.AddCover[];
1612
- additionalInsuranceTermsWithout: Types.AddCover[];
1613
- signUrls: Types.SignUrlType[];
1614
- epayLink: string | null;
1615
- invoiceData: Types.EpayResponse | null;
1616
- affilationResolution: {
1617
- id: string | number | null;
1618
- processInstanceId: string | number | null;
1619
- number: string | number | null;
1620
- date: string | null;
1621
- };
1622
- finCenterData: {
1623
- processInstanceId: string | number | null;
1624
- regNumber: string | number | null;
1625
- date: string | null;
1626
- };
1627
- signedDocumentList: IDocument[];
1628
- signatories: any[];
1629
- surveyByHealthBase: Types.AnketaFirst | null;
1630
- surveyByHealthBasePolicyholder: Types.AnketaFirst | null;
1631
- surveyByCriticalBase: Types.AnketaFirst | null;
1632
- surveyByCriticalBasePolicyholder: Types.AnketaFirst | null;
1633
- definedAnswersId: {
1634
- surveyByHealthBase: any;
1635
- surveyByCriticalBase: any;
1636
- surveyByHealthBasePolicyholder: any;
1637
- surveyByCriticalBasePolicyholder: any;
1638
- };
1639
- birthInfos: Types.Api.GKB.BirthInfo[];
1640
- SaleChanellPolicy: Value;
1641
- AgentData: Types.AgentData;
1642
- RegionPolicy: Value;
1643
- ManagerPolicy: Value;
1644
- ExecutorGPH: Value;
1645
- Source: Value;
1646
- isDisabled: {
1647
- policyholderForm: boolean;
1648
- beneficiaryForm: boolean;
1649
- beneficialOwnerForm: boolean;
1650
- insuredForm: boolean;
1651
- slaveInsuredForm: boolean;
1652
- policyholdersRepresentativeForm: boolean;
1653
- productConditionsForm: boolean;
1654
- calculatorForm: boolean;
1655
- recalculationForm: boolean;
1656
- surveyByHealthBase: boolean;
1657
- surveyByCriticalBase: boolean;
1658
- surveyByHealthBasePolicyholder: boolean;
1659
- surveyByCriticalBasePolicyholder: boolean;
1660
- insuranceDocument: boolean;
1661
- policyholderActivitiesForm: boolean;
1662
- accidentStatisticsForm: boolean;
1663
- };
1664
- isPolicyholderInsured: boolean = false;
1665
- isPolicyholderBeneficiary: boolean = false;
1666
- isActOwnBehalf: boolean = true;
1667
- hasRepresentative: boolean = false;
1668
- isPolicyholderIPDL: boolean = false;
1669
- applicationData: {
1670
- processInstanceId: number | string;
1671
- regNumber?: string;
1672
- statusCode?: keyof typeof Statuses;
1673
- clientApp?: any;
1674
- processCode?: number;
1675
- insuredApp?: any;
1676
- pensionApp?: any;
1677
- isEnpfSum?: boolean;
1678
- beneficiaryApp?: any;
1679
- beneficialOwnerApp?: any;
1680
- spokesmanApp?: any;
1681
- isTask?: boolean | null;
1682
- createDate?: string | null;
1683
- policyAppDto?: Types.PolicyAppDto;
1684
- parentPolicyDto?: Types.ParentPolicyDto | null;
1685
- insisWorkDataApp?: Types.InsisWorkDataApp;
1686
- addCoverDto?: Types.AddCover[];
1687
- slave?: any;
1688
- };
1689
- policyholderForm: Member;
1690
- policyholderFormKey: StoreMembers.policyholderForm;
1691
- policyholdersRepresentativeForm: Member;
1692
- policyholdersRepresentativeFormKey: StoreMembers.policyholdersRepresentativeForm;
1693
- beneficiaryForm: Member[];
1694
- beneficiaryFormKey: StoreMembers.beneficiaryForm;
1695
- beneficiaryFormIndex: number;
1696
- beneficialOwnerForm: Member[];
1697
- beneficialOwnerFormIndex: number;
1698
- beneficialOwnerFormKey: StoreMembers.beneficialOwnerForm;
1699
- insuredForm: Member[];
1700
- slaveInsuredForm: Member;
1701
- insuredFormKey: StoreMembers.insuredForm;
1702
- insuredFormIndex: number;
1703
- productConditionsForm: ProductConditions;
1704
- productConditionsFormKey: string;
1705
- pensionApp: any;
1706
- questionnaireByHealth: any;
1707
- questionnaireByCritical: any[];
1708
- canBeClaimed: boolean | null;
1709
- applicationTaskId: string | null;
1710
- requiredDocuments: RequiredDocument[];
1711
- isNeedToRecalculate: boolean;
1712
- constructor() {
1713
- this.regNumber = null;
1714
- this.policyNumber = null;
1715
- this.contractDate = null;
1716
- this.documentName = null;
1717
- this.isUploadedSignedContract = false;
1718
- this.needToScanSignedContract = false;
1719
- this.signedContractFormData = null;
1720
- this.lfb = {
1721
- clients: [],
1722
- policyholder: new PolicyholderClass(),
1723
- hasAccidentIncidents: true,
1724
- policyholderActivities: [new PolicyholderActivity()],
1725
- beneficialOwners: [new BeneficialOwner()],
1726
- beneficialOwnersIndex: 0,
1727
- isPolicyholderBeneficialOwner: false,
1728
- accidentIncidents: [],
1729
- clientId: null,
1730
- insuredFile: null,
1731
- isPanelInside: false,
1732
- typeChange: 'calculation',
1733
- add: false,
1734
- };
1735
- this.additionalInsuranceTerms = [];
1736
- this.additionalInsuranceTermsWithout = [];
1737
- this.signUrls = [];
1738
- this.epayLink = null;
1739
- this.invoiceData = null;
1740
- this.affilationResolution = {
1741
- id: null,
1742
- processInstanceId: null,
1743
- number: null,
1744
- date: null,
1745
- };
1746
- this.finCenterData = {
1747
- processInstanceId: null,
1748
- regNumber: null,
1749
- date: null,
1750
- };
1751
- this.signedDocumentList = [];
1752
- this.signatories = [];
1753
- this.surveyByHealthBase = null;
1754
- this.surveyByHealthBasePolicyholder = null;
1755
- this.surveyByCriticalBase = null;
1756
- this.surveyByCriticalBasePolicyholder = null;
1757
- this.definedAnswersId = {
1758
- surveyByHealthBase: {},
1759
- surveyByCriticalBase: {},
1760
- surveyByHealthBasePolicyholder: {},
1761
- surveyByCriticalBasePolicyholder: {},
1762
- };
1763
- this.birthInfos = [];
1764
- this.SaleChanellPolicy = new Value();
1765
- this.AgentData = {
1766
- agentId: null,
1767
- manId: 0,
1768
- fullName: '',
1769
- officeId: null,
1770
- officeCode: null,
1771
- saleChannel: '',
1772
- managerName: '',
1773
- };
1774
- this.RegionPolicy = new Value();
1775
- this.ManagerPolicy = new Value();
1776
- this.ExecutorGPH = new Value();
1777
- this.Source = new Value();
1778
- this.isDisabled = {
1779
- policyholderForm: true,
1780
- beneficiaryForm: true,
1781
- beneficialOwnerForm: true,
1782
- insuredForm: true,
1783
- slaveInsuredForm: true,
1784
- policyholdersRepresentativeForm: true,
1785
- productConditionsForm: true,
1786
- calculatorForm: true,
1787
- recalculationForm: true,
1788
- surveyByHealthBase: true,
1789
- surveyByCriticalBase: true,
1790
- surveyByHealthBasePolicyholder: true,
1791
- surveyByCriticalBasePolicyholder: true,
1792
- insuranceDocument: true,
1793
- policyholderActivitiesForm: true,
1794
- accidentStatisticsForm: true,
1795
- };
1796
- this.isPolicyholderInsured = false;
1797
- this.isPolicyholderBeneficiary = false;
1798
- this.isActOwnBehalf = true;
1799
- this.hasRepresentative = false;
1800
- this.applicationData = { processInstanceId: 0 };
1801
- this.policyholderForm = new Member();
1802
- this.policyholderFormKey = StoreMembers.policyholderForm;
1803
- this.policyholdersRepresentativeForm = new Member();
1804
- this.policyholdersRepresentativeFormKey = StoreMembers.policyholdersRepresentativeForm;
1805
- this.beneficiaryForm = [new Member()];
1806
- this.beneficiaryFormKey = StoreMembers.beneficiaryForm;
1807
- this.beneficiaryFormIndex = 0;
1808
- this.beneficialOwnerForm = [new Member()];
1809
- this.beneficialOwnerFormIndex = 0;
1810
- this.beneficialOwnerFormKey = StoreMembers.beneficialOwnerForm;
1811
- this.insuredForm = [new Member()];
1812
- this.slaveInsuredForm = new Member();
1813
- this.insuredFormKey = StoreMembers.insuredForm;
1814
- this.insuredFormIndex = 0;
1815
- this.productConditionsForm = new ProductConditions();
1816
- this.productConditionsFormKey = 'productConditionsForm';
1817
- this.questionnaireByHealth = {};
1818
- this.questionnaireByCritical = [];
1819
- this.canBeClaimed = null;
1820
- this.applicationTaskId = null;
1821
- this.requiredDocuments = [];
1822
- this.isNeedToRecalculate = false;
1823
- }
1824
- }
1825
-
1826
- export class Address {
1827
- country: Value;
1828
- region: Value;
1829
- state: Value;
1830
- regionType: Value;
1831
- city: Value;
1832
- square: string | null;
1833
- microdistrict: string | null;
1834
- street: string | null;
1835
- houseNumber: string | null;
1836
- kato: string | null;
1837
- longName: string | null;
1838
- longNameKz: string | null;
1839
-
1840
- constructor() {
1841
- this.country = new Value();
1842
- this.region = new Value();
1843
- this.state = new Value();
1844
- this.regionType = new Value();
1845
- this.city = new Value();
1846
- this.square = null;
1847
- this.microdistrict = null;
1848
- this.street = null;
1849
- this.houseNumber = null;
1850
- this.kato = null;
1851
- this.longName = null;
1852
- this.longNameKz = null;
1853
- }
1854
- }
1855
-
1856
- export class PolicyholderActivity {
1857
- activityTypeName: string | null;
1858
- empoloyeeCount: string | null;
1859
-
1860
- constructor() {
1861
- this.activityTypeName = null;
1862
- this.empoloyeeCount = null;
1863
- }
1864
- }
1865
-
1866
- export class BaseGroupClass {
1867
- id: string | number;
1868
- longName: string;
1869
- iin: string;
1870
- phoneNumber: string;
1871
- age: string;
1872
- name: string;
1873
- nameKz: string;
1874
- longNameKz: string;
1875
- citizenship: Value;
1876
- email: string;
1877
- resident: Value;
1878
- taxResidentCountry: Value;
1879
- addTaxResidency: Value;
1880
- economySectorCode: Value;
1881
- hasAttachedFile: boolean;
1882
- actualAddress: Address;
1883
- isActualAddressEqualLegalAddres: boolean;
1884
- legalAddress: Address;
1885
- identityDocument: {
1886
- documentType: Value;
1887
- documentNumber: string;
1888
- series: string;
1889
- issuedBy: Value;
1890
- issuedOn: string;
1891
- validUntil: string;
1892
- };
1893
- bankInfo: BankInfoClass;
1894
- kbe: string;
1895
-
1896
- constructor() {
1897
- this.id = 0;
1898
- this.longName = '';
1899
- this.iin = '';
1900
- this.phoneNumber = '';
1901
- this.age = '';
1902
- this.name = '';
1903
- this.nameKz = '';
1904
- this.longNameKz = '';
1905
- this.citizenship = new Value();
1906
- this.email = '';
1907
- this.resident = new Value();
1908
- this.taxResidentCountry = new Value();
1909
- this.addTaxResidency = new Value();
1910
- this.economySectorCode = new Value();
1911
- this.hasAttachedFile = false;
1912
- this.actualAddress = new Address();
1913
- this.isActualAddressEqualLegalAddres = true;
1914
- this.legalAddress = new Address();
1915
- this.identityDocument = {
1916
- documentType: new Value(),
1917
- documentNumber: '',
1918
- series: '',
1919
- issuedBy: new Value(),
1920
- issuedOn: '',
1921
- validUntil: '',
1922
- };
1923
- this.bankInfo = new BankInfoClass();
1924
- this.kbe = '';
1925
- }
1926
- }
1927
-
1928
- export class PhysGroupClass extends BaseGroupClass {
1929
- lastName: string;
1930
- firstName: string;
1931
- middleName: string;
1932
- birthDate: string;
1933
- gender: Value;
1934
- placeOfBirth: Value;
1935
- workDetails: { workplace: string; positionRu: string; positionKz: string; jobDuties: string };
1936
- hasContactPerson: boolean;
1937
- authorityDetails: {
1938
- basis: Value;
1939
- documentNumber: string | null;
1940
- date: string | null;
1941
- };
1942
-
1943
- constructor() {
1944
- super();
1945
- this.lastName = '';
1946
- this.firstName = '';
1947
- this.middleName = '';
1948
- this.birthDate = '';
1949
- this.gender = new Value();
1950
- this.placeOfBirth = new Value();
1951
- this.workDetails = { workplace: '', positionRu: '', positionKz: '', jobDuties: '' };
1952
- this.hasContactPerson = false;
1953
- this.authorityDetails = {
1954
- basis: new Value(),
1955
- documentNumber: null,
1956
- date: null,
1957
- };
1958
- }
1959
- }
1960
-
1961
- export class GroupMember extends PhysGroupClass {
1962
- isLeader: boolean;
1963
-
1964
- typeOfEconomicActivity: Value;
1965
- activityTypes: { activityTypeName: string; empoloyeeCount: number }[];
1966
- beneficalOwnerQuest: { order: number; text: string; answer: boolean | null }[];
1967
- authoritedPerson: PhysGroupClass;
1968
- insuredPolicyData: Types.InsuredPolicyType;
1969
-
1970
- constructor() {
1971
- super();
1972
- // Client
1973
- this.isLeader = false;
1974
- this.typeOfEconomicActivity = new Value();
1975
- this.activityTypes = [];
1976
- this.beneficalOwnerQuest = [
1977
- {
1978
- order: 0,
1979
- text: 'Отметка о наличии/отсутствии физического лица (лиц), которому прямо или косвенно принадлежат более 25 % долей участия в уставном капитале либо размещенных (за вычетом привилегированных и выкупленных обществом) акций юридического лица',
1980
- answer: null,
1981
- },
1982
- {
1983
- order: 1,
1984
- text: 'Отметка о наличии/отсутствии физического лица (лиц), осуществляющего контроль над юридическим лицом по иным основаниям',
1985
- answer: null,
1986
- },
1987
- {
1988
- order: 2,
1989
- text: 'Отметка о наличии/отсутствии физического лица (лиц) в интересах которого юридическим лицом устанавливаются деловые отношения (совершаются операции)',
1990
- answer: null,
1991
- },
1992
- ];
1993
- this.authoritedPerson = new PhysGroupClass();
1994
- // Insured
1995
- this.insuredPolicyData = {
1996
- insSum: 0,
1997
- insSumWithLoad: 0,
1998
- premium: 0,
1999
- premiumWithLoad: 0,
2000
- insuredRisk: {
2001
- lifeMultiply: 0,
2002
- lifeAdditive: 0,
2003
- disabilityMultiply: 0,
2004
- disabilityAdditive: 0,
2005
- traumaTableMultiple: 0,
2006
- accidentalLifeMultiply: 0,
2007
- accidentalLifeAdditive: 0,
2008
- criticalMultiply: 0,
2009
- criticalAdditive: 0,
2010
- },
2011
- insuredCoverData: [],
2012
- };
2013
- }
2014
- }
2015
-
2016
- export class BankInfoClass {
2017
- bankName: Value;
2018
- bin: string;
2019
- iik: string;
2020
- bik: string;
2021
- kbe: string;
2022
-
2023
- constructor() {
2024
- this.bankName = new Value();
2025
- this.bin = '';
2026
- this.iik = '';
2027
- this.bik = '';
2028
- this.kbe = '';
2029
- }
2030
- }
2031
-
2032
- export class PolicyholderClass {
2033
- isIpdl: boolean;
2034
- clientData: GroupMember;
2035
-
2036
- constructor() {
2037
- this.isIpdl = false;
2038
- this.clientData = new GroupMember();
2039
- }
2040
- }
2041
-
2042
- export class BeneficialOwner {
2043
- id: string;
2044
- isIpdl: boolean;
2045
- beneficialOwnerData: GroupMember;
2046
-
2047
- constructor() {
2048
- this.isIpdl = false;
2049
- this.beneficialOwnerData = new GroupMember();
2050
- this.id = '';
2051
- }
2052
- }
2053
-
2054
- export class TransferContract {
2055
- id: string | null;
2056
- transferContractIsOppv: boolean;
2057
- transferContractFirstPaymentDate: string;
2058
- transferContractAmount: number | string;
2059
- transferContractDate: string;
2060
- transferContractNumber: string;
2061
- transferContractRegNumber: string;
2062
- transferContract: boolean;
2063
- transferContractCompany: Value;
2064
- transferContractMonthCount: number | null;
2065
-
2066
- constructor() {
2067
- this.id = null;
2068
- this.transferContractIsOppv = false;
2069
- this.transferContractFirstPaymentDate = '';
2070
- this.transferContractAmount = 0;
2071
- this.transferContractDate = '';
2072
- this.transferContractNumber = '';
2073
- this.transferContract = false;
2074
- this.transferContractRegNumber = '';
2075
- this.transferContractCompany = new Value();
2076
- this.transferContractMonthCount = null;
2077
- }
2078
- }
2079
-
2080
- export class RequiredDocument extends Value {
2081
- iin: string = '';
2082
- }
2083
-
2084
- export class MenuItem extends MenuItemConfig {
2085
- constructor({ id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip }: MenuItemConfig = new MenuItemConfig()) {
2086
- super(id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip);
2087
- }
2088
- }
2089
-
2090
255
  export const policyholderToBeneficialOwner = (isPolicyholderBeneficialOwner: boolean, policyholder?: PolicyholderClass) => {
2091
256
  const formStore = useFormStore();
2092
257
  const dataStore = useDataStore();
@@ -2167,11 +332,11 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
2167
332
  const countryName = benAddress[0].countryName;
2168
333
  const cityName = benAddress[0].cityName;
2169
334
  if (countryName) {
2170
- const country = dataStore.countries.find((i: Value) => (i.nameRu as string).match(new RegExp(countryName, 'i')));
335
+ const country = dataStore.countries.find(i => (i.nameRu as string).match(new RegExp(countryName, 'i')));
2171
336
  beneficiary.registrationCountry = country ?? new Value();
2172
337
  }
2173
338
  if (cityName) {
2174
- const city = dataStore.cities.find((i: Value) => i.nameRu === cityName.replace('г.', ''));
339
+ const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
2175
340
  beneficiary.registrationCity = city ?? new Value();
2176
341
  }
2177
342
  const contragentData = beneficiary.response.contragent;
@@ -2181,9 +346,9 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
2181
346
  } else {
2182
347
  beneficiary.birthPlace = new Value();
2183
348
  }
2184
- const province = dataStore.states.find((i: Value) => i.ids === benAddress[0].stateCode);
2185
- const localityType = dataStore.localityTypes.find((i: Value) => i.nameRu === benAddress[0].cityTypeName);
2186
- const region = dataStore.regions.find((i: Value) => i.ids == benAddress[0].regionCode);
349
+ const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
350
+ const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
351
+ const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
2187
352
  beneficiary.registrationMicroDistrict = beneficiary.response?.addresses[0].microRaion ?? '';
2188
353
  beneficiary.registrationNumberApartment = beneficiary.response?.addresses[0].apartmentNumber ?? '';
2189
354
  beneficiary.registrationNumberHouse = beneficiary.response?.addresses[0].blockNumber ?? '';
@@ -2234,11 +399,11 @@ export const setAddressInsured = (whichIndex: number, sameAddress: boolean) => {
2234
399
  const countryName = benAddress[0].countryName;
2235
400
  const cityName = benAddress[0].cityName;
2236
401
  if (countryName) {
2237
- const country = dataStore.countries.find((i: Value) => (i.nameRu as string).match(new RegExp(countryName, 'i')));
402
+ const country = dataStore.countries.find(i => (i.nameRu as string).match(new RegExp(countryName, 'i')));
2238
403
  insured.registrationCountry = country ?? new Value();
2239
404
  }
2240
405
  if (cityName) {
2241
- const city = dataStore.cities.find((i: Value) => i.nameRu === cityName.replace('г.', ''));
406
+ const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
2242
407
  insured.registrationCity = city ?? new Value();
2243
408
  }
2244
409
  const contragentData = insured.response.contragent;
@@ -2248,9 +413,9 @@ export const setAddressInsured = (whichIndex: number, sameAddress: boolean) => {
2248
413
  } else {
2249
414
  insured.birthPlace = new Value();
2250
415
  }
2251
- const province = dataStore.states.find((i: Value) => i.ids === benAddress[0].stateCode);
2252
- const localityType = dataStore.localityTypes.find((i: Value) => i.nameRu === benAddress[0].cityTypeName);
2253
- const region = dataStore.regions.find((i: Value) => i.ids == benAddress[0].regionCode);
416
+ const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
417
+ const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
418
+ const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
2254
419
  insured.registrationMicroDistrict = insured.response?.addresses[0].microRaion ?? '';
2255
420
  insured.registrationNumberApartment = insured.response?.addresses[0].apartmentNumber ?? '';
2256
421
  insured.registrationNumberHouse = insured.response?.addresses[0].blockNumber ?? '';
@@ -2308,7 +473,7 @@ type WhichValuePerEnv =
2308
473
  export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
2309
474
  const valuesPerEnv: {
2310
475
  [key in WhichValuePerEnv]: {
2311
- [key in Types.EnvModes]: string;
476
+ [key in EnvModes]: string;
2312
477
  };
2313
478
  } = {
2314
479
  qrHubUrl: {
@@ -2367,7 +532,7 @@ export const getStrValuePerEnv = (which: WhichValuePerEnv) => {
2367
532
  test: 'http://aml-dev.halyklife.nb/api',
2368
533
  },
2369
534
  };
2370
- return valuesPerEnv[which][import.meta.env.VITE_MODE as Types.EnvModes];
535
+ return valuesPerEnv[which][import.meta.env.VITE_MODE as EnvModes];
2371
536
  };
2372
537
 
2373
538
  export const getMainPageRoute = () => {
@@ -2384,7 +549,7 @@ export const getMainPageRoute = () => {
2384
549
  return 'index';
2385
550
  };
2386
551
 
2387
- export const keyDeleter = <T extends object>(data: T, keys: Array<Types.NestedKeyOf<T>>) => {
552
+ export const keyDeleter = <T extends object>(data: T, keys: Array<NestedKeyOf<T>>) => {
2388
553
  if (typeof data === 'object' && !!data && keys && Array.isArray(keys) && keys.length) {
2389
554
  keys.forEach(key => {
2390
555
  if (key) {
@@ -2488,7 +653,7 @@ export const callDocumentReader = async (imageBase64: string | string[]) => {
2488
653
  }
2489
654
  };
2490
655
 
2491
- export const validateResponseStructure = <T>(res: Types.ResponseStructure<T>) => {
656
+ export const validateResponseStructure = <T>(res: ResponseStructure<T>) => {
2492
657
  if (res && res.code === 0) {
2493
658
  return res.data;
2494
659
  } else {
@@ -2550,7 +715,7 @@ export class RoleController {
2550
715
  this.user.branchCode = decoded.branchCode;
2551
716
  const key = getKeyWithPattern(decoded, 'role');
2552
717
  if (key) {
2553
- const roles = decoded[key as keyof Types.Utils.JwtToken];
718
+ const roles = decoded[key as keyof Utils.JwtToken];
2554
719
  if (typeof roles === 'string') {
2555
720
  this.user.roles.push(roles);
2556
721
  } else if (typeof roles === 'object') {
@@ -2566,7 +731,7 @@ export class RoleController {
2566
731
  const env = useEnv();
2567
732
  const dataStore = useDataStore();
2568
733
  const hasAccessByProduct = (() => {
2569
- const product = productFromExternal as Types.Projects;
734
+ const product = productFromExternal as Projects;
2570
735
  if (dataStore.isLifetrip || product === 'lifetrip') return this.isBranchDirector();
2571
736
  if (dataStore.isPension || product === 'pensionannuitynew') return this.isBranchDirector() || this.isExecutor();
2572
737
  if (dataStore.isLifeBusiness || product === 'lifebusiness') return this.isHeadManager() || this.isBranchDirector();