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.
@@ -0,0 +1,1836 @@
1
+ import { Statuses, StoreMembers, MemberAppCodes } from '../types/enum';
2
+ import { formatDate } from '.';
3
+ import type { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-router';
4
+ import type * as Types from '../types';
5
+
6
+ type LinkType = Partial<RouteLocationNormalized> | Partial<RouteLocationNormalizedLoaded> | string | null | boolean;
7
+
8
+ class MenuItemConfig {
9
+ id: any;
10
+ title: string | null;
11
+ link?: LinkType;
12
+ hasLine?: boolean;
13
+ description?: string | null;
14
+ url?: string | null;
15
+ initial?: any | null;
16
+ icon?: string | null;
17
+ action?: Function | void;
18
+ disabled?: ComputedRef;
19
+ color?: string;
20
+ show?: ComputedRef;
21
+ chip?: Types.ChipComponent;
22
+
23
+ constructor(
24
+ id: any = null,
25
+ title: string | null = null,
26
+ link?: LinkType,
27
+ hasLine?: boolean,
28
+ description?: string | null,
29
+ url?: string | null,
30
+ initial?: any | null,
31
+ icon?: string | null,
32
+ action?: Function | void,
33
+ disabled?: ComputedRef,
34
+ color?: string,
35
+ show?: ComputedRef,
36
+ chip?: Types.ChipComponent,
37
+ ) {
38
+ this.id = id;
39
+ this.title = title;
40
+ this.link = link;
41
+ this.hasLine = hasLine;
42
+ this.description = description;
43
+ this.url = url;
44
+ this.initial = initial;
45
+ this.icon = icon;
46
+ this.action = action;
47
+ this.disabled = disabled;
48
+ this.color = color;
49
+ this.show = show;
50
+ this.chip = chip;
51
+ }
52
+ }
53
+
54
+ export class Value {
55
+ id: string | number | null;
56
+ code: string | number | null;
57
+ nameRu: string | null;
58
+ nameKz: string | null;
59
+ ids: string | number | null;
60
+
61
+ constructor(id: string | number | null = null, nameRu: string | null = null, nameKz: string | null = null, code: string | null = null, ids: string | null = null) {
62
+ this.id = id;
63
+ this.code = code;
64
+ this.nameRu = nameRu;
65
+ this.nameKz = nameKz;
66
+ this.ids = ids;
67
+ }
68
+ }
69
+
70
+ export class CountryValue extends Value {
71
+ countryTypeCode: string | number | null;
72
+
73
+ constructor(countryTypeCode = null, ...args: any) {
74
+ super(...args);
75
+ this.countryTypeCode = countryTypeCode;
76
+ }
77
+ }
78
+
79
+ export class IDocument {
80
+ id?: string;
81
+ processInstanceId?: string;
82
+ iin?: string;
83
+ fileTypeId?: string;
84
+ fileTypeName?: string;
85
+ fileTypeNameRu?: string;
86
+ fileId?: string;
87
+ page?: number;
88
+ fileName?: string;
89
+ fileTypeCode?: string;
90
+ sharedId?: string | null;
91
+ signed?: boolean | null;
92
+ signId?: string | null;
93
+ certificateDate?: string | null;
94
+ signedType?: number;
95
+
96
+ constructor(
97
+ id?: string,
98
+ processInstanceId?: string,
99
+ iin?: string,
100
+ fileTypeId?: string,
101
+ fileTypeName?: string,
102
+ fileTypeNameRu?: string,
103
+ fileId?: string,
104
+ page?: number,
105
+ fileName?: string,
106
+ fileTypeCode?: string,
107
+ sharedId?: string | null,
108
+ signed?: boolean | null,
109
+ signId?: string | null,
110
+ certificateDate?: string | null,
111
+ signedType?: number,
112
+ ) {
113
+ this.id = id;
114
+ this.processInstanceId = processInstanceId;
115
+ this.iin = iin;
116
+ this.fileTypeId = fileTypeId;
117
+ this.fileTypeName = fileTypeName;
118
+ this.fileTypeNameRu = fileTypeNameRu;
119
+ this.fileId = fileId;
120
+ this.page = page;
121
+ this.fileName = fileName;
122
+ this.fileTypeCode = fileTypeCode;
123
+ this.sharedId = sharedId;
124
+ this.signed = signed;
125
+ this.signId = signId;
126
+ this.certificateDate = certificateDate;
127
+ this.signedType = signedType;
128
+ }
129
+ }
130
+
131
+ export class DocumentItem extends IDocument {
132
+ constructor(
133
+ {
134
+ id,
135
+ processInstanceId,
136
+ iin,
137
+ fileTypeId,
138
+ fileTypeName,
139
+ fileTypeNameRu,
140
+ fileId,
141
+ page,
142
+ fileName,
143
+ fileTypeCode,
144
+ sharedId,
145
+ signed,
146
+ signId,
147
+ certificateDate,
148
+ signedType,
149
+ }: IDocument = new IDocument(),
150
+ ) {
151
+ super(id, processInstanceId, iin, fileTypeId, fileTypeName, fileTypeNameRu, fileId, page, fileName, fileTypeCode, sharedId, signed, signId, certificateDate, signedType);
152
+ }
153
+ }
154
+
155
+ export class MenuOption {
156
+ text: string | null;
157
+ subtitle: string | null;
158
+ icon: string | null;
159
+ variant: string | null;
160
+ size: string | null;
161
+
162
+ constructor(text = 'Text', subtitle = 'Subtitle', icon = 'mdi-content-copy', variant = 'text', size = 'small') {
163
+ this.text = text;
164
+ this.subtitle = subtitle;
165
+ this.icon = icon;
166
+ this.variant = variant;
167
+ this.size = size;
168
+ }
169
+ }
170
+
171
+ export const InitialColumns = (): {
172
+ addRegNumber: boolean | null;
173
+ number: boolean | null;
174
+ iin: boolean | null;
175
+ longName: boolean | null;
176
+ userName: boolean | null;
177
+ processCodeTitle: boolean | null;
178
+ historyStatusTitle: boolean | null;
179
+ dateCreated: boolean | null;
180
+ } => {
181
+ return {
182
+ addRegNumber: null,
183
+ number: null,
184
+ iin: null,
185
+ longName: null,
186
+ userName: null,
187
+ processCodeTitle: null,
188
+ historyStatusTitle: null,
189
+ dateCreated: null,
190
+ };
191
+ };
192
+
193
+ export class User {
194
+ login: string | null;
195
+ password: string | null;
196
+ roles: string[];
197
+ id: string | null;
198
+ fullName: string | null;
199
+ code: string;
200
+ branchCode: string;
201
+
202
+ constructor(
203
+ login: string | null = null,
204
+ password: string | null = null,
205
+ roles: string[] = [],
206
+ id: string | null = null,
207
+ fullName: string | null = null,
208
+ code: string = '',
209
+ branchCode: string = '',
210
+ ) {
211
+ this.login = login;
212
+ this.password = password;
213
+ this.roles = roles;
214
+ this.id = id;
215
+ this.fullName = fullName;
216
+ this.code = code;
217
+ this.branchCode = branchCode;
218
+ }
219
+
220
+ resetUser() {
221
+ this.login = null;
222
+ this.password = null;
223
+ this.roles = [];
224
+ this.id = null;
225
+ this.fullName = null;
226
+ this.code = '';
227
+ this.branchCode = '';
228
+ }
229
+ }
230
+
231
+ class Person {
232
+ id: string | number | null;
233
+ type: string | number | null;
234
+ iin: string | null;
235
+ longName: string | null;
236
+ lastName: string | null;
237
+ firstName: string | null;
238
+ firstNameLat?: string | null;
239
+ lastNameLat?: string | null;
240
+ middleName: string | null;
241
+ birthDate: string | null;
242
+ gender: Value;
243
+ genderName: string | null;
244
+ birthPlace: Value;
245
+ age: string | null;
246
+ registrationDate: string;
247
+
248
+ constructor(
249
+ id = 0,
250
+ type = 1,
251
+ iin = null,
252
+ longName = null,
253
+ lastName = null,
254
+ firstName = null,
255
+ middleName = null,
256
+ birthDate = null,
257
+ gender = new Value(),
258
+ genderName = null,
259
+ birthPlace = new Value(),
260
+ age = null,
261
+ ) {
262
+ this.id = id;
263
+ this.type = type;
264
+ this.iin = iin;
265
+ this.longName = !!lastName && !!firstName && !!middleName ? (((((lastName as string) + firstName) as string) + middleName) as string) : longName;
266
+ this.lastName = lastName;
267
+ this.firstName = firstName;
268
+ this.middleName = middleName;
269
+ this.birthDate = birthDate;
270
+ this.gender = gender;
271
+ this.genderName = gender && gender.nameRu !== null ? (gender.nameRu as string) : genderName;
272
+ this.birthPlace = birthPlace;
273
+ this.age = age;
274
+ this.registrationDate = new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1);
275
+ }
276
+
277
+ resetPerson(clearIinAndPhone: boolean = true) {
278
+ this.id = 0;
279
+ this.type = 1;
280
+ if (clearIinAndPhone === true) {
281
+ this.iin = null;
282
+ }
283
+ this.longName = null;
284
+ this.lastName = null;
285
+ this.firstName = null;
286
+ this.middleName = null;
287
+ this.birthDate = null;
288
+ this.gender = new Value();
289
+ this.genderName = null;
290
+ this.birthPlace = new Value();
291
+ this.age = null;
292
+ this.registrationDate = new Date(Date.now() - new Date().getTimezoneOffset() * 60 * 1000).toISOString().slice(0, -1);
293
+ }
294
+
295
+ formatDate(date: any): Date | null {
296
+ return formatDate(date);
297
+ }
298
+
299
+ getDateByKey(key: string): string | null {
300
+ const ctxKey = key as keyof typeof this;
301
+ if (this[ctxKey] && this[ctxKey] !== null) {
302
+ const formattedDate = this.formatDate(this[ctxKey]);
303
+ return formattedDate ? formattedDate.toISOString() : null;
304
+ } else {
305
+ return null;
306
+ }
307
+ }
308
+
309
+ getBirthDate() {
310
+ return this.getDateByKey('birthDate');
311
+ }
312
+
313
+ getDocumentExpireDate() {
314
+ return this.getDateByKey('documentExpire');
315
+ }
316
+
317
+ getDocumentDate() {
318
+ return this.getDateByKey('documentDate');
319
+ }
320
+
321
+ getAgeByBirthDate() {
322
+ const date = this.formatDate(this.birthDate);
323
+ if (date) {
324
+ const age = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
325
+ if (new Date(date) < new Date(Date.now()) && age >= 0) {
326
+ return age.toString();
327
+ }
328
+ } else {
329
+ return null;
330
+ }
331
+ }
332
+ }
333
+
334
+ export class Contragent extends Person {
335
+ economySectorCode: Value;
336
+ countryOfCitizenship: Value;
337
+ countryOfTaxResidency: Value;
338
+ registrationCountry: Value;
339
+ registrationProvince: Value;
340
+ registrationRegion: Value;
341
+ registrationRegionType: Value;
342
+ registrationCity: Value;
343
+ registrationQuarter: string | null;
344
+ registrationMicroDistrict: string | null;
345
+ registrationStreet: string | null;
346
+ registrationNumberHouse: string | null;
347
+ registrationNumberApartment: string | null;
348
+ phoneNumber: string | null;
349
+ homePhone: string | null;
350
+ email: string | null;
351
+ signOfResidency: Value;
352
+ documentType: Value;
353
+ documentNumber: string | null;
354
+ documentIssuers: Value;
355
+ documentDate: string | null;
356
+ documentExpire: string | null;
357
+ verifyDate: string | null;
358
+ verifyType: string | null;
359
+ otpTokenId: string | null;
360
+
361
+ constructor(
362
+ economySectorCode = new Value(),
363
+ countryOfCitizenship = new Value(),
364
+ countryOfTaxResidency = new Value(),
365
+ registrationCountry = new Value(),
366
+ registrationProvince = new Value(),
367
+ registrationRegion = new Value(),
368
+ registrationRegionType = new Value(),
369
+ registrationCity = new Value(),
370
+ registrationQuarter = null,
371
+ registrationMicroDistrict = null,
372
+ registrationStreet = null,
373
+ registrationNumberHouse = null,
374
+ registrationNumberApartment = null,
375
+ phoneNumber = null,
376
+ homePhone = null,
377
+ email = null,
378
+ signOfResidency = new Value(),
379
+ documentType = new Value(),
380
+ documentNumber = null,
381
+ documentIssuers = new Value(),
382
+ documentDate = null,
383
+ documentExpire = null,
384
+ ...args: any
385
+ ) {
386
+ super(...args);
387
+ this.economySectorCode = economySectorCode;
388
+ this.countryOfCitizenship = countryOfCitizenship;
389
+ this.countryOfTaxResidency = countryOfTaxResidency;
390
+ this.registrationCountry = registrationCountry;
391
+ this.registrationProvince = registrationProvince;
392
+ this.registrationRegion = registrationRegion;
393
+ this.registrationRegionType = registrationRegionType;
394
+ this.registrationCity = registrationCity;
395
+ this.registrationQuarter = registrationQuarter;
396
+ this.registrationMicroDistrict = registrationMicroDistrict;
397
+ this.registrationStreet = registrationStreet;
398
+ this.registrationNumberHouse = registrationNumberHouse;
399
+ this.registrationNumberApartment = registrationNumberApartment;
400
+ this.phoneNumber = phoneNumber;
401
+ this.homePhone = homePhone;
402
+ this.email = email;
403
+ this.signOfResidency = signOfResidency;
404
+ this.documentType = documentType;
405
+ this.documentNumber = documentNumber;
406
+ this.documentIssuers = documentIssuers;
407
+ this.documentDate = documentDate;
408
+ this.documentExpire = documentExpire;
409
+ this.verifyDate = null;
410
+ this.verifyType = null;
411
+ this.otpTokenId = null;
412
+ }
413
+ }
414
+
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;
464
+ 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;
507
+
508
+ 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;
611
+ }
612
+
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
+ }
623
+ }
624
+ return null;
625
+ }
626
+ }
627
+
628
+ export class MemberSettings {
629
+ has?: boolean;
630
+ isMultiple?: boolean;
631
+ required?: boolean;
632
+ limit?: number;
633
+
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;
643
+ }
644
+ }
645
+ }
646
+ }
647
+
648
+ export class DataStoreClass {
649
+ projectConfig: Types.Utils.ProjectConfig | null;
650
+ // IMP Контроллер фич
651
+ controls: {
652
+ // Cтавит значения по дефолту полям
653
+ setDefaults: {
654
+ sectorCode: boolean;
655
+ percentage: boolean;
656
+ signOfResidency: boolean;
657
+ countryOfTaxResidency: boolean;
658
+ countryOfCitizenship: boolean;
659
+ };
660
+ // Проверка на роль при авторизации
661
+ onAuth: boolean;
662
+ // Согласие на главной странице
663
+ hasAgreement: boolean;
664
+ // Наличие анкеты
665
+ hasAnketa: boolean;
666
+ // Обязательность доп анкеты
667
+ isSecondAnketaRequired: boolean;
668
+ // Подтягивание с ГБДФЛ
669
+ hasGBDFL: boolean;
670
+ // Подтягивание с ГКБ
671
+ hasGKB: boolean;
672
+ // Подтягивание с ИНСИС
673
+ hasInsis: boolean;
674
+ // Калькулятор без ввода данных
675
+ hasCalculator: boolean;
676
+ // Блок прикрепления к менеджеру
677
+ hasAttachment: boolean;
678
+ // Решение АС
679
+ hasAffiliation: boolean;
680
+ // Выбор метода подписания
681
+ hasChooseSign: boolean;
682
+ // Выбор метода оплаты
683
+ hasChoosePay: boolean;
684
+ // Блок источник
685
+ hasSource: boolean;
686
+ };
687
+ members: {
688
+ clientApp: MemberSettings;
689
+ insuredApp: MemberSettings;
690
+ beneficiaryApp: MemberSettings;
691
+ beneficialOwnerApp: MemberSettings;
692
+ spokesmanApp: MemberSettings;
693
+ };
694
+ iframeLoading: boolean;
695
+ hasLayoutMargins: boolean;
696
+ readonly product: Types.Projects | null;
697
+ readonly parentProduct: 'efo' | 'auletti';
698
+ showNav: boolean;
699
+ showDisabledMessage: boolean;
700
+ menuItems: MenuItem[];
701
+ menu: {
702
+ title: string;
703
+ hasBack: boolean;
704
+ loading: boolean;
705
+ backIcon: string;
706
+ moreIcon: string;
707
+ hasInfo: boolean;
708
+ infoIcon: string;
709
+ infoItems: MenuItem[];
710
+ onBack: any;
711
+ onLink: any;
712
+ selectedItem: MenuItem;
713
+ };
714
+ settings: {
715
+ open: boolean;
716
+ overlay: boolean;
717
+ items: MenuItem[];
718
+ };
719
+ buttons: MenuItem[];
720
+ isButtonsLoading: boolean;
721
+ panelAction: keyof typeof constants.actions | null;
722
+ panel: {
723
+ open: boolean;
724
+ overlay: boolean;
725
+ title: string;
726
+ clear: () => void;
727
+ };
728
+ rightPanel: {
729
+ open: boolean;
730
+ overlay: boolean;
731
+ title: string;
732
+ clear: () => void;
733
+ };
734
+ historyPageIndex: number;
735
+ historyPageSize: number;
736
+ historyTotalItems: number;
737
+ isColumnAsc = { ...InitialColumns() };
738
+ idleKey: number;
739
+ processList: Types.Item[] | null;
740
+ countries: Value[];
741
+ citizenshipCountries: Value[];
742
+ taxCountries: Value[];
743
+ addTaxCountries: Value[];
744
+ states: Value[];
745
+ regions: Value[];
746
+ cities: Value[];
747
+ localityTypes: Value[];
748
+ dicFileTypeList: Value[];
749
+ documentTypes: Value[];
750
+ documentIssuers: Value[];
751
+ familyStatuses: Value[];
752
+ disabilityGroups: Value[];
753
+ relations: Value[];
754
+ banks: Value[];
755
+ transferContractCompanies: Value[];
756
+ insurancePay: Value[];
757
+ questionRefs: Value[];
758
+ residents: Value[];
759
+ ipdl: Value[];
760
+ economySectorCode: Value[];
761
+ economicActivityType: Value[];
762
+ gender: Value[];
763
+ authorityBasis: Value[];
764
+ fontSize: number;
765
+ isFontChangerOpen: boolean = false;
766
+ isLoading: boolean = false;
767
+ accessToken: string | null = null;
768
+ refreshToken: string | null = null;
769
+ processIndexRate: Value[];
770
+ processGfot: Value[];
771
+ processPaymentPeriod: Value[];
772
+ dicAnnuityTypeList: Value[];
773
+ processAnnuityPaymentPeriod: Value[];
774
+ taskList: Types.TaskListItem[];
775
+ processHistory: Types.TaskHistory[];
776
+ contragentList: Types.ContragentType[];
777
+ contragentFormKey: string;
778
+ processCode: number | null;
779
+ groupCode: string;
780
+ userGroups: Types.Item[];
781
+ onMainPage: boolean;
782
+ SaleChanellPolicy: Value[];
783
+ RegionPolicy: Value[];
784
+ ManagerPolicy: Value[];
785
+ ExecutorGPH: Value[];
786
+ AgentData: Types.AgentData[];
787
+ riskGroup: Value[];
788
+ DicCoverTypePeriod: Value[];
789
+ Source: Value[];
790
+ currencies: {
791
+ eur: number | null;
792
+ usd: number | null;
793
+ };
794
+ filters: {
795
+ show: (item: MenuItem) => boolean;
796
+ disabled: (item: MenuItem) => boolean;
797
+ };
798
+ amountArray: Value[];
799
+ currency: string | number | null;
800
+ periodArray: Value[];
801
+ maxDaysAllArray: Value[];
802
+ maxDaysFiltered: Value[];
803
+ dicAllCountries: CountryValue[];
804
+ dicCountries: CountryValue[];
805
+ types: Value[];
806
+ workTypes: Value[];
807
+ sportsTypes: Value[];
808
+ purposes: Value[];
809
+ programType: Value[];
810
+ constructor() {
811
+ this.projectConfig = null;
812
+ this.filters = {
813
+ show: (item: MenuItem) => {
814
+ if (typeof item.show === 'boolean') {
815
+ return item.show;
816
+ }
817
+ return true;
818
+ },
819
+ disabled: (item: MenuItem) => {
820
+ if (typeof item.disabled === 'boolean') {
821
+ return item.disabled;
822
+ }
823
+ return false;
824
+ },
825
+ };
826
+ this.currencies = {
827
+ eur: null,
828
+ usd: null,
829
+ };
830
+ this.members = {
831
+ clientApp: new MemberSettings(),
832
+ insuredApp: new MemberSettings(),
833
+ beneficiaryApp: new MemberSettings(),
834
+ beneficialOwnerApp: new MemberSettings(),
835
+ spokesmanApp: new MemberSettings(),
836
+ };
837
+ this.controls = {
838
+ setDefaults: {
839
+ sectorCode: true,
840
+ percentage: true,
841
+ signOfResidency: false,
842
+ countryOfTaxResidency: false,
843
+ countryOfCitizenship: false,
844
+ },
845
+ onAuth: false,
846
+ hasAnketa: true,
847
+ isSecondAnketaRequired: true,
848
+ hasAgreement: true,
849
+ hasGBDFL: true,
850
+ hasGKB: false,
851
+ hasInsis: false,
852
+ hasCalculator: false,
853
+ hasAttachment: true,
854
+ hasAffiliation: true,
855
+ hasChooseSign: false,
856
+ hasChoosePay: false,
857
+ hasSource: false,
858
+ };
859
+ this.iframeLoading = false;
860
+ this.hasLayoutMargins = true;
861
+ this.processIndexRate = [];
862
+ this.processGfot = [];
863
+ this.processPaymentPeriod = [];
864
+ this.programType = [];
865
+ this.dicAnnuityTypeList = [];
866
+ this.processAnnuityPaymentPeriod = [];
867
+ this.questionRefs = [];
868
+ this.SaleChanellPolicy = [];
869
+ this.RegionPolicy = [];
870
+ this.ManagerPolicy = [];
871
+ this.ExecutorGPH = [];
872
+ this.AgentData = [];
873
+ this.DicCoverTypePeriod = [];
874
+ this.Source = [];
875
+ this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as Types.Projects) : null;
876
+ this.parentProduct = import.meta.env.VITE_PARENT_PRODUCT ? import.meta.env.VITE_PARENT_PRODUCT : 'efo';
877
+ this.showNav = true;
878
+ this.showDisabledMessage = false;
879
+ this.menuItems = [];
880
+ this.menu = {
881
+ title: '',
882
+ hasBack: false,
883
+ loading: false,
884
+ backIcon: 'mdi-arrow-left',
885
+ moreIcon: 'mdi-dots-vertical',
886
+ hasInfo: false,
887
+ infoIcon: 'mdi-information-outline',
888
+ infoItems: [],
889
+ onBack: {},
890
+ onLink: {},
891
+ selectedItem: new MenuItem(),
892
+ };
893
+ this.settings = {
894
+ open: false,
895
+ overlay: false,
896
+ items: [],
897
+ };
898
+ this.buttons = [];
899
+ this.isButtonsLoading = false;
900
+ this.panel = {
901
+ open: false,
902
+ overlay: false,
903
+ title: '',
904
+ clear: () => {
905
+ const panelActions = document.getElementById('panel-actions');
906
+ if (panelActions) {
907
+ panelActions.innerHTML = '';
908
+ }
909
+ },
910
+ };
911
+ this.rightPanel = {
912
+ open: false,
913
+ overlay: false,
914
+ title: '',
915
+ clear: () => {
916
+ const panelActions = document.getElementById('right-panel-actions');
917
+ if (panelActions) {
918
+ panelActions.innerHTML = '';
919
+ }
920
+ },
921
+ };
922
+ this.panelAction = null;
923
+ this.historyPageIndex = 1;
924
+ this.historyPageSize = 10;
925
+ this.historyTotalItems = 0;
926
+ this.isColumnAsc = { ...InitialColumns() };
927
+ this.idleKey = 999;
928
+ this.processList = null;
929
+ this.countries = [];
930
+ this.citizenshipCountries = [];
931
+ this.taxCountries = [];
932
+ this.addTaxCountries = [];
933
+ this.states = [];
934
+ this.regions = [];
935
+ this.cities = [];
936
+ this.localityTypes = [];
937
+ this.dicFileTypeList = [];
938
+ this.documentTypes = [];
939
+ this.documentIssuers = [];
940
+ this.familyStatuses = [];
941
+ this.disabilityGroups = [];
942
+ this.relations = [];
943
+ this.banks = [];
944
+ this.transferContractCompanies = [];
945
+ this.insurancePay = [];
946
+ this.residents = [];
947
+ this.ipdl = [new Value(1, null), new Value(2, 'Да'), new Value(3, 'Нет')];
948
+ this.economySectorCode = [];
949
+ this.economicActivityType = [];
950
+ this.gender = [new Value(0, null), new Value(1, 'Мужской'), new Value(2, 'Женский')];
951
+ this.authorityBasis = [];
952
+ this.fontSize = 14;
953
+ this.isFontChangerOpen = false;
954
+ this.isLoading = false;
955
+ this.accessToken = null;
956
+ this.refreshToken = null;
957
+ this.taskList = [];
958
+ this.processHistory = [];
959
+ this.contragentList = [];
960
+ this.contragentFormKey = 'contragentForm';
961
+ this.processCode = null;
962
+ this.groupCode = 'Work';
963
+ this.userGroups = [];
964
+ this.onMainPage = true;
965
+ this.riskGroup = [
966
+ {
967
+ id: '1',
968
+ nameKz: '',
969
+ nameRu: '1',
970
+ code: '',
971
+ ids: '',
972
+ },
973
+ {
974
+ id: '2',
975
+ nameKz: '',
976
+ nameRu: '2',
977
+ code: '',
978
+ ids: '',
979
+ },
980
+ {
981
+ id: '3',
982
+ nameKz: '',
983
+ nameRu: '3',
984
+ code: '',
985
+ ids: '',
986
+ },
987
+ {
988
+ id: '4',
989
+ nameKz: '',
990
+ nameRu: '4',
991
+ code: '',
992
+ ids: '',
993
+ },
994
+ {
995
+ id: '5',
996
+ nameKz: '',
997
+ nameRu: '5',
998
+ code: '',
999
+ ids: '',
1000
+ },
1001
+ ];
1002
+ this.amountArray = [];
1003
+ this.currency = null;
1004
+ this.maxDaysAllArray = [];
1005
+ this.periodArray = [];
1006
+ this.maxDaysFiltered = [];
1007
+ this.dicCountries = [];
1008
+ this.dicAllCountries = [];
1009
+ this.types = [];
1010
+ this.purposes = [];
1011
+ this.workTypes = [];
1012
+ this.sportsTypes = [];
1013
+ }
1014
+ }
1015
+
1016
+ export class FormStoreClass {
1017
+ documentName: string | null;
1018
+ regNumber: string | null;
1019
+ policyNumber: string | null;
1020
+ contractDate: string | null;
1021
+ needToScanSignedContract: boolean;
1022
+ isUploadedSignedContract: boolean;
1023
+ signedContractFormData: any;
1024
+ lfb: {
1025
+ clients: Types.ClientV2[];
1026
+ policyholder: PolicyholderClass;
1027
+ hasAccidentIncidents: boolean;
1028
+ accidentIncidents: Types.AccidentIncidents[];
1029
+ policyholderActivities: PolicyholderActivity[];
1030
+ beneficialOwners: BeneficialOwner[];
1031
+ beneficialOwnersIndex: number;
1032
+ isPolicyholderBeneficialOwner: boolean;
1033
+ clientId: string | null;
1034
+ insuredFile: any;
1035
+ isPanelInside: boolean;
1036
+ typeChange: string;
1037
+ add: boolean;
1038
+ };
1039
+ additionalInsuranceTerms: Types.AddCover[];
1040
+ additionalInsuranceTermsWithout: Types.AddCover[];
1041
+ signUrls: Types.SignUrlType[];
1042
+ epayLink: string | null;
1043
+ invoiceData: Types.EpayResponse | null;
1044
+ affilationResolution: {
1045
+ id: string | number | null;
1046
+ processInstanceId: string | number | null;
1047
+ number: string | number | null;
1048
+ date: string | null;
1049
+ };
1050
+ finCenterData: {
1051
+ processInstanceId: string | number | null;
1052
+ regNumber: string | number | null;
1053
+ date: string | null;
1054
+ };
1055
+ signedDocumentList: IDocument[];
1056
+ signatories: any[];
1057
+ surveyByHealthBase: Types.AnketaFirst | null;
1058
+ surveyByHealthBasePolicyholder: Types.AnketaFirst | null;
1059
+ surveyByCriticalBase: Types.AnketaFirst | null;
1060
+ surveyByCriticalBasePolicyholder: Types.AnketaFirst | null;
1061
+ definedAnswersId: {
1062
+ surveyByHealthBase: any;
1063
+ surveyByCriticalBase: any;
1064
+ surveyByHealthBasePolicyholder: any;
1065
+ surveyByCriticalBasePolicyholder: any;
1066
+ };
1067
+ birthInfos: Types.Api.GKB.BirthInfo[];
1068
+ SaleChanellPolicy: Value;
1069
+ AgentData: Types.AgentData;
1070
+ RegionPolicy: Value;
1071
+ ManagerPolicy: Value;
1072
+ ExecutorGPH: Value;
1073
+ Source: Value;
1074
+ isDisabled: {
1075
+ policyholderForm: boolean;
1076
+ beneficiaryForm: boolean;
1077
+ beneficialOwnerForm: boolean;
1078
+ insuredForm: boolean;
1079
+ slaveInsuredForm: boolean;
1080
+ policyholdersRepresentativeForm: boolean;
1081
+ productConditionsForm: boolean;
1082
+ calculatorForm: boolean;
1083
+ recalculationForm: boolean;
1084
+ surveyByHealthBase: boolean;
1085
+ surveyByCriticalBase: boolean;
1086
+ surveyByHealthBasePolicyholder: boolean;
1087
+ surveyByCriticalBasePolicyholder: boolean;
1088
+ insuranceDocument: boolean;
1089
+ policyholderActivitiesForm: boolean;
1090
+ accidentStatisticsForm: boolean;
1091
+ };
1092
+ isPolicyholderInsured: boolean = false;
1093
+ isPolicyholderBeneficiary: boolean = false;
1094
+ isActOwnBehalf: boolean = true;
1095
+ hasRepresentative: boolean = false;
1096
+ isPolicyholderIPDL: boolean = false;
1097
+ applicationData: {
1098
+ processInstanceId: number | string;
1099
+ regNumber?: string;
1100
+ statusCode?: keyof typeof Statuses;
1101
+ clientApp?: any;
1102
+ processCode?: number;
1103
+ insuredApp?: any;
1104
+ pensionApp?: any;
1105
+ isEnpfSum?: boolean;
1106
+ beneficiaryApp?: any;
1107
+ beneficialOwnerApp?: any;
1108
+ spokesmanApp?: any;
1109
+ isTask?: boolean | null;
1110
+ createDate?: string | null;
1111
+ policyAppDto?: Types.PolicyAppDto;
1112
+ parentPolicyDto?: Types.ParentPolicyDto | null;
1113
+ insisWorkDataApp?: Types.InsisWorkDataApp;
1114
+ addCoverDto?: Types.AddCover[];
1115
+ slave?: any;
1116
+ };
1117
+ policyholderForm: Member;
1118
+ policyholderFormKey: StoreMembers.policyholderForm;
1119
+ policyholdersRepresentativeForm: Member;
1120
+ policyholdersRepresentativeFormKey: StoreMembers.policyholdersRepresentativeForm;
1121
+ beneficiaryForm: Member[];
1122
+ beneficiaryFormKey: StoreMembers.beneficiaryForm;
1123
+ beneficiaryFormIndex: number;
1124
+ beneficialOwnerForm: Member[];
1125
+ beneficialOwnerFormIndex: number;
1126
+ beneficialOwnerFormKey: StoreMembers.beneficialOwnerForm;
1127
+ insuredForm: Member[];
1128
+ slaveInsuredForm: Member;
1129
+ insuredFormKey: StoreMembers.insuredForm;
1130
+ insuredFormIndex: number;
1131
+ productConditionsForm: ProductConditions;
1132
+ productConditionsFormKey: string;
1133
+ pensionApp: any;
1134
+ questionnaireByHealth: any;
1135
+ questionnaireByCritical: any[];
1136
+ canBeClaimed: boolean | null;
1137
+ applicationTaskId: string | null;
1138
+ requiredDocuments: RequiredDocument[];
1139
+ isNeedToRecalculate: boolean;
1140
+ constructor() {
1141
+ this.regNumber = null;
1142
+ this.policyNumber = null;
1143
+ this.contractDate = null;
1144
+ this.documentName = null;
1145
+ this.isUploadedSignedContract = false;
1146
+ this.needToScanSignedContract = false;
1147
+ this.signedContractFormData = null;
1148
+ this.lfb = {
1149
+ clients: [],
1150
+ policyholder: new PolicyholderClass(),
1151
+ hasAccidentIncidents: true,
1152
+ policyholderActivities: [new PolicyholderActivity()],
1153
+ beneficialOwners: [new BeneficialOwner()],
1154
+ beneficialOwnersIndex: 0,
1155
+ isPolicyholderBeneficialOwner: false,
1156
+ accidentIncidents: [],
1157
+ clientId: null,
1158
+ insuredFile: null,
1159
+ isPanelInside: false,
1160
+ typeChange: 'calculation',
1161
+ add: false,
1162
+ };
1163
+ this.additionalInsuranceTerms = [];
1164
+ this.additionalInsuranceTermsWithout = [];
1165
+ this.signUrls = [];
1166
+ this.epayLink = null;
1167
+ this.invoiceData = null;
1168
+ this.affilationResolution = {
1169
+ id: null,
1170
+ processInstanceId: null,
1171
+ number: null,
1172
+ date: null,
1173
+ };
1174
+ this.finCenterData = {
1175
+ processInstanceId: null,
1176
+ regNumber: null,
1177
+ date: null,
1178
+ };
1179
+ this.signedDocumentList = [];
1180
+ this.signatories = [];
1181
+ this.surveyByHealthBase = null;
1182
+ this.surveyByHealthBasePolicyholder = null;
1183
+ this.surveyByCriticalBase = null;
1184
+ this.surveyByCriticalBasePolicyholder = null;
1185
+ this.definedAnswersId = {
1186
+ surveyByHealthBase: {},
1187
+ surveyByCriticalBase: {},
1188
+ surveyByHealthBasePolicyholder: {},
1189
+ surveyByCriticalBasePolicyholder: {},
1190
+ };
1191
+ this.birthInfos = [];
1192
+ this.SaleChanellPolicy = new Value();
1193
+ this.AgentData = {
1194
+ agentId: null,
1195
+ manId: 0,
1196
+ fullName: '',
1197
+ officeId: null,
1198
+ officeCode: null,
1199
+ saleChannel: '',
1200
+ managerName: '',
1201
+ };
1202
+ this.RegionPolicy = new Value();
1203
+ this.ManagerPolicy = new Value();
1204
+ this.ExecutorGPH = new Value();
1205
+ this.Source = new Value();
1206
+ this.isDisabled = {
1207
+ policyholderForm: true,
1208
+ beneficiaryForm: true,
1209
+ beneficialOwnerForm: true,
1210
+ insuredForm: true,
1211
+ slaveInsuredForm: true,
1212
+ policyholdersRepresentativeForm: true,
1213
+ productConditionsForm: true,
1214
+ calculatorForm: true,
1215
+ recalculationForm: true,
1216
+ surveyByHealthBase: true,
1217
+ surveyByCriticalBase: true,
1218
+ surveyByHealthBasePolicyholder: true,
1219
+ surveyByCriticalBasePolicyholder: true,
1220
+ insuranceDocument: true,
1221
+ policyholderActivitiesForm: true,
1222
+ accidentStatisticsForm: true,
1223
+ };
1224
+ this.isPolicyholderInsured = false;
1225
+ this.isPolicyholderBeneficiary = false;
1226
+ this.isActOwnBehalf = true;
1227
+ this.hasRepresentative = false;
1228
+ this.applicationData = { processInstanceId: 0 };
1229
+ this.policyholderForm = new Member();
1230
+ this.policyholderFormKey = StoreMembers.policyholderForm;
1231
+ this.policyholdersRepresentativeForm = new Member();
1232
+ this.policyholdersRepresentativeFormKey = StoreMembers.policyholdersRepresentativeForm;
1233
+ this.beneficiaryForm = [new Member()];
1234
+ this.beneficiaryFormKey = StoreMembers.beneficiaryForm;
1235
+ this.beneficiaryFormIndex = 0;
1236
+ this.beneficialOwnerForm = [new Member()];
1237
+ this.beneficialOwnerFormIndex = 0;
1238
+ this.beneficialOwnerFormKey = StoreMembers.beneficialOwnerForm;
1239
+ this.insuredForm = [new Member()];
1240
+ this.slaveInsuredForm = new Member();
1241
+ this.insuredFormKey = StoreMembers.insuredForm;
1242
+ this.insuredFormIndex = 0;
1243
+ this.productConditionsForm = new ProductConditions();
1244
+ this.productConditionsFormKey = 'productConditionsForm';
1245
+ this.questionnaireByHealth = {};
1246
+ this.questionnaireByCritical = [];
1247
+ this.canBeClaimed = null;
1248
+ this.applicationTaskId = null;
1249
+ this.requiredDocuments = [];
1250
+ this.isNeedToRecalculate = false;
1251
+ }
1252
+ }
1253
+
1254
+ export class Address {
1255
+ country: Value;
1256
+ region: Value;
1257
+ state: Value;
1258
+ regionType: Value;
1259
+ city: Value;
1260
+ square: string | null;
1261
+ microdistrict: string | null;
1262
+ street: string | null;
1263
+ houseNumber: string | null;
1264
+ kato: string | null;
1265
+ longName: string | null;
1266
+ longNameKz: string | null;
1267
+
1268
+ constructor() {
1269
+ this.country = new Value();
1270
+ this.region = new Value();
1271
+ this.state = new Value();
1272
+ this.regionType = new Value();
1273
+ this.city = new Value();
1274
+ this.square = null;
1275
+ this.microdistrict = null;
1276
+ this.street = null;
1277
+ this.houseNumber = null;
1278
+ this.kato = null;
1279
+ this.longName = null;
1280
+ this.longNameKz = null;
1281
+ }
1282
+ }
1283
+
1284
+ export class PolicyholderActivity {
1285
+ activityTypeName: string | null;
1286
+ empoloyeeCount: string | null;
1287
+
1288
+ constructor() {
1289
+ this.activityTypeName = null;
1290
+ this.empoloyeeCount = null;
1291
+ }
1292
+ }
1293
+
1294
+ export class BaseGroupClass {
1295
+ id: string | number;
1296
+ longName: string;
1297
+ iin: string;
1298
+ phoneNumber: string;
1299
+ age: string;
1300
+ name: string;
1301
+ nameKz: string;
1302
+ longNameKz: string;
1303
+ citizenship: Value;
1304
+ email: string;
1305
+ resident: Value;
1306
+ taxResidentCountry: Value;
1307
+ addTaxResidency: Value;
1308
+ economySectorCode: Value;
1309
+ hasAttachedFile: boolean;
1310
+ actualAddress: Address;
1311
+ isActualAddressEqualLegalAddres: boolean;
1312
+ legalAddress: Address;
1313
+ identityDocument: {
1314
+ documentType: Value;
1315
+ documentNumber: string;
1316
+ series: string;
1317
+ issuedBy: Value;
1318
+ issuedOn: string;
1319
+ validUntil: string;
1320
+ };
1321
+ bankInfo: BankInfoClass;
1322
+ kbe: string;
1323
+
1324
+ constructor() {
1325
+ this.id = 0;
1326
+ this.longName = '';
1327
+ this.iin = '';
1328
+ this.phoneNumber = '';
1329
+ this.age = '';
1330
+ this.name = '';
1331
+ this.nameKz = '';
1332
+ this.longNameKz = '';
1333
+ this.citizenship = new Value();
1334
+ this.email = '';
1335
+ this.resident = new Value();
1336
+ this.taxResidentCountry = new Value();
1337
+ this.addTaxResidency = new Value();
1338
+ this.economySectorCode = new Value();
1339
+ this.hasAttachedFile = false;
1340
+ this.actualAddress = new Address();
1341
+ this.isActualAddressEqualLegalAddres = true;
1342
+ this.legalAddress = new Address();
1343
+ this.identityDocument = {
1344
+ documentType: new Value(),
1345
+ documentNumber: '',
1346
+ series: '',
1347
+ issuedBy: new Value(),
1348
+ issuedOn: '',
1349
+ validUntil: '',
1350
+ };
1351
+ this.bankInfo = new BankInfoClass();
1352
+ this.kbe = '';
1353
+ }
1354
+ }
1355
+
1356
+ export class GroupMember extends PhysGroupClass {
1357
+ isLeader: boolean;
1358
+
1359
+ typeOfEconomicActivity: Value;
1360
+ activityTypes: { activityTypeName: string; empoloyeeCount: number }[];
1361
+ beneficalOwnerQuest: { order: number; text: string; answer: boolean | null }[];
1362
+ authoritedPerson: PhysGroupClass;
1363
+ insuredPolicyData: Types.InsuredPolicyType;
1364
+
1365
+ constructor() {
1366
+ super();
1367
+ // Client
1368
+ this.isLeader = false;
1369
+ this.typeOfEconomicActivity = new Value();
1370
+ this.activityTypes = [];
1371
+ this.beneficalOwnerQuest = [
1372
+ {
1373
+ order: 0,
1374
+ text: 'Отметка о наличии/отсутствии физического лица (лиц), которому прямо или косвенно принадлежат более 25 % долей участия в уставном капитале либо размещенных (за вычетом привилегированных и выкупленных обществом) акций юридического лица',
1375
+ answer: null,
1376
+ },
1377
+ {
1378
+ order: 1,
1379
+ text: 'Отметка о наличии/отсутствии физического лица (лиц), осуществляющего контроль над юридическим лицом по иным основаниям',
1380
+ answer: null,
1381
+ },
1382
+ {
1383
+ order: 2,
1384
+ text: 'Отметка о наличии/отсутствии физического лица (лиц) в интересах которого юридическим лицом устанавливаются деловые отношения (совершаются операции)',
1385
+ answer: null,
1386
+ },
1387
+ ];
1388
+ this.authoritedPerson = new PhysGroupClass();
1389
+ // Insured
1390
+ this.insuredPolicyData = {
1391
+ insSum: 0,
1392
+ insSumWithLoad: 0,
1393
+ premium: 0,
1394
+ premiumWithLoad: 0,
1395
+ insuredRisk: {
1396
+ lifeMultiply: 0,
1397
+ lifeAdditive: 0,
1398
+ disabilityMultiply: 0,
1399
+ disabilityAdditive: 0,
1400
+ traumaTableMultiple: 0,
1401
+ accidentalLifeMultiply: 0,
1402
+ accidentalLifeAdditive: 0,
1403
+ criticalMultiply: 0,
1404
+ criticalAdditive: 0,
1405
+ },
1406
+ insuredCoverData: [],
1407
+ };
1408
+ }
1409
+ }
1410
+
1411
+ export class BankInfoClass {
1412
+ bankName: Value;
1413
+ bin: string;
1414
+ iik: string;
1415
+ bik: string;
1416
+ kbe: string;
1417
+
1418
+ constructor() {
1419
+ this.bankName = new Value();
1420
+ this.bin = '';
1421
+ this.iik = '';
1422
+ this.bik = '';
1423
+ this.kbe = '';
1424
+ }
1425
+ }
1426
+
1427
+ export class PolicyholderClass {
1428
+ isIpdl: boolean;
1429
+ clientData: GroupMember;
1430
+
1431
+ constructor() {
1432
+ this.isIpdl = false;
1433
+ this.clientData = new GroupMember();
1434
+ }
1435
+ }
1436
+
1437
+ export class BeneficialOwner {
1438
+ id: string;
1439
+ isIpdl: boolean;
1440
+ beneficialOwnerData: GroupMember;
1441
+
1442
+ constructor() {
1443
+ this.isIpdl = false;
1444
+ this.beneficialOwnerData = new GroupMember();
1445
+ this.id = '';
1446
+ }
1447
+ }
1448
+
1449
+ export class TransferContract {
1450
+ id: string | null;
1451
+ transferContractIsOppv: boolean;
1452
+ transferContractFirstPaymentDate: string;
1453
+ transferContractAmount: number | string;
1454
+ transferContractDate: string;
1455
+ transferContractNumber: string;
1456
+ transferContractRegNumber: string;
1457
+ transferContract: boolean;
1458
+ transferContractCompany: Value;
1459
+ transferContractMonthCount: number | null;
1460
+
1461
+ constructor() {
1462
+ this.id = null;
1463
+ this.transferContractIsOppv = false;
1464
+ this.transferContractFirstPaymentDate = '';
1465
+ this.transferContractAmount = 0;
1466
+ this.transferContractDate = '';
1467
+ this.transferContractNumber = '';
1468
+ this.transferContract = false;
1469
+ this.transferContractRegNumber = '';
1470
+ this.transferContractCompany = new Value();
1471
+ this.transferContractMonthCount = null;
1472
+ }
1473
+ }
1474
+
1475
+ export class RequiredDocument extends Value {
1476
+ iin: string = '';
1477
+ }
1478
+
1479
+ export class MenuItem extends MenuItemConfig {
1480
+ constructor({ id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip }: MenuItemConfig = new MenuItemConfig()) {
1481
+ super(id, title, link, hasLine, description, url, initial, icon, action, disabled, color, show, chip);
1482
+ }
1483
+ }
1484
+ export class Member extends Person {
1485
+ response?: {
1486
+ contragent?: Types.ContragentType;
1487
+ questionnaires?: Types.ContragentQuestionaries[];
1488
+ contacts?: Types.ContragentContacts[];
1489
+ documents?: Types.ContragentDocuments[];
1490
+ addresses?: Types.ContragentAddress[];
1491
+ };
1492
+ verifyType: any;
1493
+ verifyDate: any;
1494
+ postIndex: string | null;
1495
+ isPdl: boolean;
1496
+ migrationCard: string | null;
1497
+ migrationCardIssueDate: string | null;
1498
+ migrationCardExpireDate: string | null;
1499
+ confirmDocType: string | null;
1500
+ confirmDocNumber: string | null;
1501
+ confirmDocIssueDate: string | null;
1502
+ confirmDocExpireDate: string | null;
1503
+ notaryLongName: string | null;
1504
+ notaryLicenseNumber: string | null;
1505
+ notaryLicenseDate: string | null;
1506
+ notaryLicenseIssuer: string | null;
1507
+ jurLongName: string | null;
1508
+ fullNameRod: string | null;
1509
+ confirmDocTypeKz: string | null;
1510
+ confirmDocTypeRod: string | null;
1511
+ isNotary: boolean;
1512
+ insurancePay: Value;
1513
+ job: string | null;
1514
+ jobPosition: string | null;
1515
+ jobPlace: string | null;
1516
+ positionCode: string | null;
1517
+ registrationCountry: Value;
1518
+ registrationProvince: Value;
1519
+ registrationRegion: Value;
1520
+ registrationRegionType: Value;
1521
+ registrationCity: Value;
1522
+ registrationQuarter?: string | null;
1523
+ registrationMicroDistrict?: string | null;
1524
+ registrationStreet?: string | null;
1525
+ registrationNumberHouse?: string | null;
1526
+ registrationNumberApartment?: string | null;
1527
+ birthRegion: Value;
1528
+ documentType: Value;
1529
+ documentNumber: string | null;
1530
+ documentIssuers: Types.Base.Document.IssuerOther;
1531
+ documentDate: string | null;
1532
+ documentExpire: string | null;
1533
+ signOfResidency: Value;
1534
+ signOfIPDL: Value;
1535
+ countryOfCitizenship: Value;
1536
+ countryOfTaxResidency: Value;
1537
+ addTaxResidency: Value;
1538
+ economySectorCode: Value;
1539
+ phoneNumber: string | null;
1540
+ homePhone: string | null;
1541
+ email: string | null;
1542
+ address: string | null;
1543
+ familyStatus: Value;
1544
+ isTerror: null;
1545
+ relationDegree: Value;
1546
+ isDisability: boolean;
1547
+ disabilityGroup: Value | null;
1548
+ percentageOfPayoutAmount: string | number | null;
1549
+ _cyrPattern: RegExp;
1550
+ _numPattern: RegExp;
1551
+ _phonePattern: RegExp;
1552
+ _emailPattern: RegExp;
1553
+ gotFromInsis: boolean | null;
1554
+ gosPersonData: Types.Api.GBD.Person | null;
1555
+ parsedDocument: any;
1556
+ hasAgreement: boolean | null;
1557
+ otpTokenId: string | null;
1558
+ otpCode: string;
1559
+ documentsList: Types.ContragentDocuments[];
1560
+ isInsuredUnderage?: boolean = false;
1561
+ bankInfo: BankInfoClass;
1562
+ transferContractCompany: Value;
1563
+ digitalDocument: IDocument | null;
1564
+ identityDocument: {
1565
+ documentType: Value;
1566
+ documentNumber: string | null;
1567
+ issuedOn: string | null;
1568
+ issuedBy: Value;
1569
+ validUntil: string | null;
1570
+ };
1571
+
1572
+ constructor(
1573
+ id = 0,
1574
+ type = 1,
1575
+ iin = null,
1576
+ phoneNumber = null,
1577
+ longName = null,
1578
+ lastName = null,
1579
+ firstName = null,
1580
+ middleName = null,
1581
+ birthDate = null,
1582
+ gender = new Value(),
1583
+ genderName = null,
1584
+ birthPlace = new Value(),
1585
+ age = null,
1586
+ registrationDate = null,
1587
+ job = null,
1588
+ jobPosition = null,
1589
+ jobPlace = null,
1590
+ positionCode = null,
1591
+ registrationCountry = new Value(),
1592
+ registrationProvince = new Value(),
1593
+ registrationRegion = new Value(),
1594
+ registrationRegionType = new Value(),
1595
+ registrationCity = new Value(),
1596
+ registrationQuarter = null,
1597
+ registrationMicroDistrict = null,
1598
+ registrationStreet = null,
1599
+ registrationNumberHouse = null,
1600
+ registrationNumberApartment = null,
1601
+ birthRegion = new Value(),
1602
+ documentType = new Value(),
1603
+ documentNumber = null,
1604
+ documentIssuers = new Value(),
1605
+ documentDate = null,
1606
+ documentExpire = null,
1607
+ signOfResidency = new Value(),
1608
+ signOfIPDL = new Value(),
1609
+ isTerror = null,
1610
+ countryOfCitizenship = new Value(),
1611
+ countryOfTaxResidency = new Value(),
1612
+ addTaxResidency = new Value(),
1613
+ economySectorCode = new Value(),
1614
+ homePhone = null,
1615
+ email = null,
1616
+ address = null,
1617
+ familyStatus = new Value(),
1618
+ relationDegree = new Value(),
1619
+ isDisability = false,
1620
+ disabilityGroupId = new Value(),
1621
+ percentageOfPayoutAmount = null,
1622
+ migrationCard = null,
1623
+ migrationCardIssueDate = null,
1624
+ migrationCardExpireDate = null,
1625
+ confirmDocType = null,
1626
+ confirmDocNumber = null,
1627
+ confirmDocIssueDate = null,
1628
+ confirmDocExpireDate = null,
1629
+ notaryLongName = null,
1630
+ notaryLicenseNumber = null,
1631
+ notaryLicenseDate = null,
1632
+ notaryLicenseIssuer = null,
1633
+ jurLongName = null,
1634
+ fullNameRod = null,
1635
+ confirmDocTypeKz = null,
1636
+ confirmDocTypeRod = null,
1637
+ isNotary = false,
1638
+ ) {
1639
+ super(id, type, iin, longName, lastName, firstName, middleName, birthDate, gender, genderName, birthPlace, age);
1640
+ this.documentsList = [];
1641
+ this.postIndex = null;
1642
+ this.isPdl = false;
1643
+ this.migrationCard = migrationCard;
1644
+ this.migrationCardIssueDate = migrationCardIssueDate;
1645
+ this.migrationCardExpireDate = migrationCardExpireDate;
1646
+ this.confirmDocType = confirmDocType;
1647
+ this.confirmDocNumber = confirmDocNumber;
1648
+ this.confirmDocIssueDate = confirmDocIssueDate;
1649
+ this.confirmDocExpireDate = confirmDocExpireDate;
1650
+ this.notaryLongName = notaryLongName;
1651
+ this.notaryLicenseNumber = notaryLicenseNumber;
1652
+ this.notaryLicenseDate = notaryLicenseDate;
1653
+ this.notaryLicenseIssuer = notaryLicenseIssuer;
1654
+ this.jurLongName = jurLongName;
1655
+ this.fullNameRod = fullNameRod;
1656
+ this.confirmDocTypeKz = confirmDocTypeKz;
1657
+ this.confirmDocTypeRod = confirmDocTypeRod;
1658
+ this.isNotary = isNotary;
1659
+ this.insurancePay = new Value();
1660
+ this.job = job;
1661
+ this.jobPosition = jobPosition;
1662
+ this.jobPlace = jobPlace;
1663
+ this.positionCode = positionCode;
1664
+ this.registrationCountry = registrationCountry;
1665
+ this.registrationProvince = registrationProvince;
1666
+ this.registrationRegion = registrationRegion;
1667
+ this.registrationRegionType = registrationRegionType;
1668
+ this.registrationCity = registrationCity;
1669
+ this.registrationQuarter = registrationQuarter;
1670
+ this.registrationMicroDistrict = registrationMicroDistrict;
1671
+ this.registrationStreet = registrationStreet;
1672
+ this.registrationNumberHouse = registrationNumberHouse;
1673
+ this.registrationNumberApartment = registrationNumberApartment;
1674
+ this.birthRegion = birthRegion;
1675
+ this.documentType = documentType;
1676
+ this.documentNumber = documentNumber;
1677
+ this.documentIssuers = documentIssuers;
1678
+ this.documentDate = documentDate;
1679
+ this.documentExpire = documentExpire;
1680
+ this.signOfResidency = signOfResidency;
1681
+ this.signOfIPDL = signOfIPDL;
1682
+ this.countryOfCitizenship = countryOfCitizenship;
1683
+ this.countryOfTaxResidency = countryOfTaxResidency;
1684
+ this.addTaxResidency = addTaxResidency;
1685
+ this.economySectorCode = economySectorCode;
1686
+ this.phoneNumber = phoneNumber;
1687
+ this.homePhone = homePhone;
1688
+ this.email = email;
1689
+ this.otpTokenId = null;
1690
+ this.otpCode = '';
1691
+ this.address = address;
1692
+ this.familyStatus = familyStatus;
1693
+ this.isTerror = isTerror;
1694
+ this.relationDegree = relationDegree;
1695
+ this.isDisability = isDisability;
1696
+ this.disabilityGroup = disabilityGroupId;
1697
+ this.percentageOfPayoutAmount = percentageOfPayoutAmount;
1698
+ this._cyrPattern = /[\u0400-\u04FF -]+/;
1699
+ this._numPattern = /[0-9]+/;
1700
+ this._phonePattern = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
1701
+ this._emailPattern = /.+@.+\..+/;
1702
+ this.gotFromInsis = true;
1703
+ this.gosPersonData = null;
1704
+ this.parsedDocument = null;
1705
+ this.hasAgreement = null;
1706
+ this.bankInfo = new BankInfoClass();
1707
+ this.transferContractCompany = new Value();
1708
+ this.digitalDocument = null;
1709
+ this.identityDocument = {
1710
+ documentType: new Value(),
1711
+ documentNumber: null,
1712
+ issuedOn: null,
1713
+ issuedBy: new Value(),
1714
+ validUntil: null,
1715
+ };
1716
+ }
1717
+
1718
+ resetMember(clearIinAndPhone: boolean = true) {
1719
+ super.resetPerson(clearIinAndPhone);
1720
+ this.job = null;
1721
+ this.jobPosition = null;
1722
+ this.jobPlace = null;
1723
+ this.positionCode = null;
1724
+ this.registrationCountry = new Value();
1725
+ this.registrationProvince = new Value();
1726
+ this.registrationRegion = new Value();
1727
+ this.registrationRegionType = new Value();
1728
+ this.registrationCity = new Value();
1729
+ this.registrationQuarter = null;
1730
+ this.registrationMicroDistrict = null;
1731
+ this.registrationStreet = null;
1732
+ this.registrationNumberHouse = null;
1733
+ this.registrationNumberApartment = null;
1734
+ this.birthRegion = new Value();
1735
+ this.documentType = new Value();
1736
+ this.documentNumber = null;
1737
+ this.documentIssuers = new Value();
1738
+ this.documentDate = null;
1739
+ this.documentExpire = null;
1740
+ this.signOfResidency = new Value();
1741
+ this.signOfIPDL = new Value();
1742
+ this.countryOfCitizenship = new Value();
1743
+ this.countryOfTaxResidency = new Value();
1744
+ this.economySectorCode = new Value();
1745
+ if (clearIinAndPhone === true) {
1746
+ this.phoneNumber = null;
1747
+ }
1748
+ this.homePhone = null;
1749
+ this.email = null;
1750
+ this.address = null;
1751
+ this.familyStatus = new Value();
1752
+ this.isTerror = null;
1753
+ this.relationDegree = new Value();
1754
+ this.isDisability = false;
1755
+ this.disabilityGroup = null;
1756
+ this.percentageOfPayoutAmount = null;
1757
+ this.gotFromInsis = true;
1758
+ this.gosPersonData = null;
1759
+ this.parsedDocument = null;
1760
+ this.hasAgreement = null;
1761
+ this.insurancePay = new Value();
1762
+ this.migrationCard = null;
1763
+ this.migrationCardIssueDate = null;
1764
+ this.migrationCardExpireDate = null;
1765
+ this.confirmDocType = null;
1766
+ this.confirmDocNumber = null;
1767
+ this.confirmDocIssueDate = null;
1768
+ this.confirmDocExpireDate = null;
1769
+ this.notaryLongName = null;
1770
+ this.notaryLicenseNumber = null;
1771
+ this.notaryLicenseDate = null;
1772
+ this.notaryLicenseIssuer = null;
1773
+ this.jurLongName = null;
1774
+ this.fullNameRod = null;
1775
+ this.confirmDocTypeKz = null;
1776
+ this.confirmDocTypeRod = null;
1777
+ this.isNotary = false;
1778
+ }
1779
+
1780
+ getPattern(pattern: string) {
1781
+ const key = `_${pattern}Pattern` as keyof typeof this;
1782
+ return this[key];
1783
+ }
1784
+
1785
+ validatedMessage(valid: any, msg = 'Обязательное поле') {
1786
+ return {
1787
+ error: valid,
1788
+ msg,
1789
+ };
1790
+ }
1791
+
1792
+ validateFullName() {
1793
+ return this.lastName !== null && this.firstName !== null;
1794
+ }
1795
+
1796
+ getFullNameShorted() {
1797
+ return this.validateFullName() ? `${this.lastName} ${this.firstName?.charAt(0)}. ${this.middleName != '' ? this.middleName?.charAt(0) + '.' : ''}` : null;
1798
+ }
1799
+
1800
+ getFullName() {
1801
+ return this.validateFullName() ? (this.lastName + ' ' + this.firstName + ' ' + this.middleName != '' ? this.middleName?.charAt(0) : '') : null;
1802
+ }
1803
+ }
1804
+
1805
+ export class PhysGroupClass extends BaseGroupClass {
1806
+ lastName: string;
1807
+ firstName: string;
1808
+ middleName: string;
1809
+ birthDate: string;
1810
+ gender: Value;
1811
+ placeOfBirth: Value;
1812
+ workDetails: { workplace: string; positionRu: string; positionKz: string; jobDuties: string };
1813
+ hasContactPerson: boolean;
1814
+ authorityDetails: {
1815
+ basis: Value;
1816
+ documentNumber: string | null;
1817
+ date: string | null;
1818
+ };
1819
+
1820
+ constructor() {
1821
+ super();
1822
+ this.lastName = '';
1823
+ this.firstName = '';
1824
+ this.middleName = '';
1825
+ this.birthDate = '';
1826
+ this.gender = new Value();
1827
+ this.placeOfBirth = new Value();
1828
+ this.workDetails = { workplace: '', positionRu: '', positionKz: '', jobDuties: '' };
1829
+ this.hasContactPerson = false;
1830
+ this.authorityDetails = {
1831
+ basis: new Value(),
1832
+ documentNumber: null,
1833
+ date: null,
1834
+ };
1835
+ }
1836
+ }