hl-core 0.0.8-beta.39 → 0.0.8-beta.40
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.
- package/api/index.ts +32 -25
- package/components/Form/FormBlock.vue +28 -17
- package/components/Form/ManagerAttachment.vue +1 -1
- package/components/Form/ProductConditionsBlock.vue +3 -1
- package/components/Pages/Anketa.vue +9 -3
- package/components/Pages/MemberForm.vue +32 -34
- package/components/Pages/ProductConditions.vue +14 -14
- package/components/Panel/PanelHandler.vue +3 -3
- package/composables/classes.ts +61 -81
- package/composables/constants.ts +22 -59
- package/composables/index.ts +18 -15
- package/package.json +1 -1
- package/store/{data.store.js → data.store.ts} +813 -765
- package/store/member.store.ts +50 -63
- package/store/{rules.js → rules.ts} +30 -30
- package/types/enum.ts +83 -0
- package/types/index.ts +181 -18
package/composables/classes.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Statuses, StoreMembers, MemberAppCodes } from '../types/enum';
|
|
1
2
|
import { formatDate } from '.';
|
|
2
3
|
import { RouteLocationNormalized, RouteLocationNormalizedLoaded } from 'vue-router';
|
|
3
4
|
|
|
@@ -58,8 +59,8 @@ export class MenuItem extends MenuItemConfig {
|
|
|
58
59
|
export class Value {
|
|
59
60
|
id: string | number | null;
|
|
60
61
|
code: string | number | null;
|
|
61
|
-
nameRu: string |
|
|
62
|
-
nameKz: string |
|
|
62
|
+
nameRu: string | null;
|
|
63
|
+
nameKz: string | null;
|
|
63
64
|
ids: string | number | null;
|
|
64
65
|
|
|
65
66
|
constructor(id: string | number | null = null, nameRu: string | null = null, nameKz: string | null = null, code: string | null = null, ids: string | null = null) {
|
|
@@ -140,7 +141,16 @@ export class MenuOption {
|
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
143
|
|
|
143
|
-
export const InitialColumns = ()
|
|
144
|
+
export const InitialColumns = (): {
|
|
145
|
+
addRegNumber: boolean | null;
|
|
146
|
+
number: boolean | null;
|
|
147
|
+
iin: boolean | null;
|
|
148
|
+
longName: boolean | null;
|
|
149
|
+
userName: boolean | null;
|
|
150
|
+
processCodeTitle: boolean | null;
|
|
151
|
+
historyStatusTitle: boolean | null;
|
|
152
|
+
dateCreated: boolean | null;
|
|
153
|
+
} => {
|
|
144
154
|
return {
|
|
145
155
|
addRegNumber: null,
|
|
146
156
|
number: null,
|
|
@@ -360,11 +370,11 @@ export class Contragent extends Person {
|
|
|
360
370
|
|
|
361
371
|
export class Member extends Person {
|
|
362
372
|
response?: {
|
|
363
|
-
contragent?:
|
|
364
|
-
questionnaires?:
|
|
365
|
-
contacts?:
|
|
366
|
-
documents?:
|
|
367
|
-
addresses?:
|
|
373
|
+
contragent?: ContragentType;
|
|
374
|
+
questionnaires?: ContragentQuestionaries[];
|
|
375
|
+
contacts?: ContragentContacts[];
|
|
376
|
+
documents?: ContragentDocuments[];
|
|
377
|
+
addresses?: ContragentAddress[];
|
|
368
378
|
};
|
|
369
379
|
verifyType: any;
|
|
370
380
|
verifyDate: any;
|
|
@@ -431,7 +441,7 @@ export class Member extends Person {
|
|
|
431
441
|
hasAgreement: boolean | null;
|
|
432
442
|
otpTokenId: string | null;
|
|
433
443
|
otpCode: string | null;
|
|
434
|
-
documentsList:
|
|
444
|
+
documentsList: ContragentDocuments[];
|
|
435
445
|
constructor(
|
|
436
446
|
id = 0,
|
|
437
447
|
type = 1,
|
|
@@ -650,43 +660,13 @@ export class Member extends Person {
|
|
|
650
660
|
}
|
|
651
661
|
}
|
|
652
662
|
|
|
653
|
-
export class PolicyholderForm extends Member {
|
|
654
|
-
constructor(...args: any) {
|
|
655
|
-
super(...args);
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
export class InsuredForm extends Member {
|
|
660
|
-
constructor(...args: any) {
|
|
661
|
-
super(...args);
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
|
|
665
|
-
export class BeneficiaryForm extends Member {
|
|
666
|
-
constructor(...args: any) {
|
|
667
|
-
super(...args);
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
|
|
671
|
-
export class BeneficialOwnerForm extends Member {
|
|
672
|
-
constructor(...args: any) {
|
|
673
|
-
super(...args);
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
export class PolicyholdersRepresentativeForm extends Member {
|
|
678
|
-
constructor(...args: any) {
|
|
679
|
-
super(...args);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
|
|
683
663
|
export class ProductConditions {
|
|
684
664
|
signDate: string | null;
|
|
685
665
|
birthDate: string | null;
|
|
686
666
|
gender: Value;
|
|
687
667
|
insuranceCase: string | null;
|
|
688
|
-
coverPeriod:
|
|
689
|
-
payPeriod:
|
|
668
|
+
coverPeriod: number | null;
|
|
669
|
+
payPeriod: number | null;
|
|
690
670
|
termsOfInsurance: string | null;
|
|
691
671
|
annualIncome: string | null;
|
|
692
672
|
processIndexRate: Value;
|
|
@@ -702,20 +682,20 @@ export class ProductConditions {
|
|
|
702
682
|
bodyInjury: Value;
|
|
703
683
|
criticalIllnessOfTheInsured: Value;
|
|
704
684
|
paymentPeriod: Value;
|
|
705
|
-
amountOfInsurancePremium: string | null;
|
|
706
|
-
lifeMultiply: string | null;
|
|
707
|
-
lifeAdditive: string | null;
|
|
708
|
-
lifeMultiplyClient: string | null;
|
|
709
|
-
lifeAdditiveClient: string | null;
|
|
710
|
-
adbMultiply: string | null;
|
|
711
|
-
adbAdditive: string | null;
|
|
712
|
-
disabilityMultiply: string | null;
|
|
713
|
-
disabilityAdditive: string | null;
|
|
685
|
+
amountOfInsurancePremium: string | number | null;
|
|
686
|
+
lifeMultiply: string | number | null;
|
|
687
|
+
lifeAdditive: string | number | null;
|
|
688
|
+
lifeMultiplyClient: string | number | null;
|
|
689
|
+
lifeAdditiveClient: string | number | null;
|
|
690
|
+
adbMultiply: string | number | null;
|
|
691
|
+
adbAdditive: string | number | null;
|
|
692
|
+
disabilityMultiply: string | number | null;
|
|
693
|
+
disabilityAdditive: string | number | null;
|
|
714
694
|
processTariff: Value;
|
|
715
695
|
riskGroup: Value;
|
|
716
696
|
riskGroup2: Value;
|
|
717
697
|
additionalConditionAnnuityPayments: boolean;
|
|
718
|
-
guaranteedPeriod: number |
|
|
698
|
+
guaranteedPeriod: number | null;
|
|
719
699
|
typeAnnuityInsurance: Value;
|
|
720
700
|
termAnnuityPayments: number | string | null;
|
|
721
701
|
periodAnnuityPayment: Value;
|
|
@@ -853,7 +833,7 @@ export class DataStoreClass {
|
|
|
853
833
|
};
|
|
854
834
|
iframeLoading: boolean;
|
|
855
835
|
hasLayoutMargins: boolean;
|
|
856
|
-
readonly product:
|
|
836
|
+
readonly product: Projects | null;
|
|
857
837
|
showNav: boolean;
|
|
858
838
|
menuItems: MenuItem[];
|
|
859
839
|
menu: {
|
|
@@ -873,7 +853,7 @@ export class DataStoreClass {
|
|
|
873
853
|
};
|
|
874
854
|
buttons: MenuItem[];
|
|
875
855
|
isButtonsLoading: boolean;
|
|
876
|
-
panelAction:
|
|
856
|
+
panelAction: keyof typeof constants.actions | null;
|
|
877
857
|
panel: {
|
|
878
858
|
open: boolean;
|
|
879
859
|
overlay: boolean;
|
|
@@ -908,7 +888,6 @@ export class DataStoreClass {
|
|
|
908
888
|
fontSize: number;
|
|
909
889
|
isFontChangerOpen: boolean = false;
|
|
910
890
|
isLoading: boolean = false;
|
|
911
|
-
userNotFound: boolean = false;
|
|
912
891
|
user: User;
|
|
913
892
|
accessToken: string | null = null;
|
|
914
893
|
refreshToken: string | null = null;
|
|
@@ -919,7 +898,7 @@ export class DataStoreClass {
|
|
|
919
898
|
processAnnuityPaymentPeriod: Value[];
|
|
920
899
|
taskList: TaskListItem[];
|
|
921
900
|
processHistory: TaskHistory[];
|
|
922
|
-
contragentList:
|
|
901
|
+
contragentList: ContragentType[];
|
|
923
902
|
contragentFormKey: string;
|
|
924
903
|
processCode: number | null;
|
|
925
904
|
groupCode: string;
|
|
@@ -990,7 +969,7 @@ export class DataStoreClass {
|
|
|
990
969
|
this.RegionPolicy = [];
|
|
991
970
|
this.ManagerPolicy = [];
|
|
992
971
|
this.AgentData = [];
|
|
993
|
-
this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as
|
|
972
|
+
this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as Projects) : null;
|
|
994
973
|
this.showNav = true;
|
|
995
974
|
this.menuItems = [];
|
|
996
975
|
this.menu = {
|
|
@@ -1049,7 +1028,6 @@ export class DataStoreClass {
|
|
|
1049
1028
|
this.fontSize = 14;
|
|
1050
1029
|
this.isFontChangerOpen = false;
|
|
1051
1030
|
this.isLoading = false;
|
|
1052
|
-
this.userNotFound = false;
|
|
1053
1031
|
this.user = new User();
|
|
1054
1032
|
this.accessToken = null;
|
|
1055
1033
|
this.refreshToken = null;
|
|
@@ -1112,12 +1090,12 @@ export class FormStoreClass {
|
|
|
1112
1090
|
id: string | number | null;
|
|
1113
1091
|
processInstanceId: string | number | null;
|
|
1114
1092
|
number: string | number | null;
|
|
1115
|
-
date: string |
|
|
1093
|
+
date: string | null;
|
|
1116
1094
|
};
|
|
1117
1095
|
finCenterData: {
|
|
1118
1096
|
processInstanceId: string | number | null;
|
|
1119
1097
|
regNumber: string | number | null;
|
|
1120
|
-
date: string |
|
|
1098
|
+
date: string | null;
|
|
1121
1099
|
};
|
|
1122
1100
|
signedDocumentList: IDocument[];
|
|
1123
1101
|
surveyByHealthBase: AnketaFirst | null;
|
|
@@ -1158,27 +1136,29 @@ export class FormStoreClass {
|
|
|
1158
1136
|
isPolicyholderIPDL: boolean = false;
|
|
1159
1137
|
applicationData: {
|
|
1160
1138
|
processInstanceId: number | string;
|
|
1161
|
-
statusCode?:
|
|
1139
|
+
statusCode?: keyof typeof Statuses;
|
|
1162
1140
|
clientApp?: any;
|
|
1163
1141
|
insuredApp?: any;
|
|
1164
1142
|
beneficiaryApp?: any;
|
|
1165
1143
|
beneficialOwnerApp?: any;
|
|
1166
1144
|
spokesmanApp?: any;
|
|
1167
1145
|
isTask?: boolean | null;
|
|
1168
|
-
policyAppDto?:
|
|
1146
|
+
policyAppDto?: PolicyAppDto;
|
|
1147
|
+
insisWorkDataApp?: InsisWorkDataApp;
|
|
1148
|
+
addCoverDto?: AddCover[];
|
|
1169
1149
|
};
|
|
1170
|
-
policyholderForm:
|
|
1171
|
-
policyholderFormKey:
|
|
1172
|
-
policyholdersRepresentativeForm:
|
|
1173
|
-
policyholdersRepresentativeFormKey:
|
|
1174
|
-
beneficiaryForm:
|
|
1175
|
-
beneficiaryFormKey:
|
|
1150
|
+
policyholderForm: Member;
|
|
1151
|
+
policyholderFormKey: StoreMembers.policyholderForm;
|
|
1152
|
+
policyholdersRepresentativeForm: Member;
|
|
1153
|
+
policyholdersRepresentativeFormKey: StoreMembers.policyholdersRepresentativeForm;
|
|
1154
|
+
beneficiaryForm: Member[];
|
|
1155
|
+
beneficiaryFormKey: StoreMembers.beneficiaryForm;
|
|
1176
1156
|
beneficiaryFormIndex: number;
|
|
1177
|
-
beneficialOwnerForm:
|
|
1157
|
+
beneficialOwnerForm: Member[];
|
|
1178
1158
|
beneficialOwnerFormIndex: number;
|
|
1179
|
-
beneficialOwnerFormKey:
|
|
1180
|
-
insuredForm:
|
|
1181
|
-
insuredFormKey:
|
|
1159
|
+
beneficialOwnerFormKey: StoreMembers.beneficialOwnerForm;
|
|
1160
|
+
insuredForm: Member[];
|
|
1161
|
+
insuredFormKey: StoreMembers.insuredForm;
|
|
1182
1162
|
insuredFormIndex: number;
|
|
1183
1163
|
productConditionsForm: ProductConditions;
|
|
1184
1164
|
productConditionsFormKey: string;
|
|
@@ -1248,18 +1228,18 @@ export class FormStoreClass {
|
|
|
1248
1228
|
this.isActOwnBehalf = true;
|
|
1249
1229
|
this.hasRepresentative = false;
|
|
1250
1230
|
this.applicationData = { processInstanceId: 0 };
|
|
1251
|
-
this.policyholderForm = new
|
|
1252
|
-
this.policyholderFormKey =
|
|
1253
|
-
this.policyholdersRepresentativeForm = new
|
|
1254
|
-
this.policyholdersRepresentativeFormKey =
|
|
1255
|
-
this.beneficiaryForm = [new
|
|
1256
|
-
this.beneficiaryFormKey =
|
|
1231
|
+
this.policyholderForm = new Member();
|
|
1232
|
+
this.policyholderFormKey = StoreMembers.policyholderForm;
|
|
1233
|
+
this.policyholdersRepresentativeForm = new Member();
|
|
1234
|
+
this.policyholdersRepresentativeFormKey = StoreMembers.policyholdersRepresentativeForm;
|
|
1235
|
+
this.beneficiaryForm = [new Member()];
|
|
1236
|
+
this.beneficiaryFormKey = StoreMembers.beneficiaryForm;
|
|
1257
1237
|
this.beneficiaryFormIndex = 0;
|
|
1258
|
-
this.beneficialOwnerForm = [new
|
|
1238
|
+
this.beneficialOwnerForm = [new Member()];
|
|
1259
1239
|
this.beneficialOwnerFormIndex = 0;
|
|
1260
|
-
this.beneficialOwnerFormKey =
|
|
1261
|
-
this.insuredForm = [new
|
|
1262
|
-
this.insuredFormKey =
|
|
1240
|
+
this.beneficialOwnerFormKey = StoreMembers.beneficialOwnerForm;
|
|
1241
|
+
this.insuredForm = [new Member()];
|
|
1242
|
+
this.insuredFormKey = StoreMembers.insuredForm;
|
|
1263
1243
|
this.insuredFormIndex = 0;
|
|
1264
1244
|
this.productConditionsForm = new ProductConditions();
|
|
1265
1245
|
this.productConditionsFormKey = 'productConditionsForm';
|
package/composables/constants.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Actions, PostActions, Roles, Statuses } from '../types/enum';
|
|
2
|
+
|
|
1
3
|
export const constants = Object.freeze({
|
|
2
4
|
products: {
|
|
3
5
|
baiterek: 3,
|
|
@@ -8,68 +10,29 @@ export const constants = Object.freeze({
|
|
|
8
10
|
gons: 10,
|
|
9
11
|
halykkazyna: 11,
|
|
10
12
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
editableStatuses: [Statuses.StartForm, Statuses.EditBeneficiaryForm, Statuses.EditForm],
|
|
14
|
+
documentsLinkVisibleStatuses: [
|
|
15
|
+
Statuses.DocumentsSignedFrom,
|
|
16
|
+
Statuses.UnderwriterForm,
|
|
17
|
+
Statuses.AffilationResolutionForm,
|
|
18
|
+
Statuses.Completed,
|
|
19
|
+
Statuses.InsurancePremiumOnlinePaid,
|
|
20
|
+
],
|
|
21
|
+
returnStatementStatuses: [Statuses.DocumentsSignedFrom, Statuses.ContractSignedFrom, Statuses.WaitingInsurancePremiumForm, Statuses.UnderwriterForm],
|
|
22
|
+
cancelApplicationStatuses: [
|
|
23
|
+
Statuses.StartForm,
|
|
24
|
+
Statuses.EditForm,
|
|
25
|
+
Statuses.EditBeneficiaryForm,
|
|
26
|
+
Statuses.WaitingInsurancePremiumForm,
|
|
27
|
+
Statuses.DocumentsSignedFrom,
|
|
28
|
+
Statuses.ContractSignedFrom,
|
|
29
|
+
],
|
|
16
30
|
gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
object: 'object',
|
|
21
|
-
},
|
|
22
|
-
roles: {
|
|
23
|
-
manager: 'Manager',
|
|
24
|
-
admin: 'Admin',
|
|
25
|
-
underwriter: 'Underwriter',
|
|
26
|
-
agent: 'Agent',
|
|
27
|
-
compliance: 'Compliance',
|
|
28
|
-
agentMycar: 'AgentMycar',
|
|
29
|
-
analyst: 'Analyst',
|
|
30
|
-
upk: 'UPK',
|
|
31
|
-
finCenter: 'FinCenter',
|
|
32
|
-
supervisor: 'Supervisor',
|
|
33
|
-
support: 'Support',
|
|
34
|
-
managerHalykBank: 'ManagerHalykBank',
|
|
35
|
-
serviceManager: 'ServiceManager',
|
|
36
|
-
drn: 'DRNSJ',
|
|
37
|
-
},
|
|
38
|
-
actions: {
|
|
39
|
-
accept: 'accept',
|
|
40
|
-
rejectclient: 'rejectclient',
|
|
41
|
-
reject: 'reject',
|
|
42
|
-
return: 'return',
|
|
43
|
-
claim: 'claim',
|
|
44
|
-
sign: 'sign',
|
|
45
|
-
pay: 'pay',
|
|
46
|
-
register: 'register',
|
|
47
|
-
send: 'send',
|
|
48
|
-
affiliate: 'affiliate',
|
|
49
|
-
},
|
|
31
|
+
roles: Roles,
|
|
32
|
+
actions: Actions,
|
|
33
|
+
postActions: PostActions,
|
|
50
34
|
yearCases: [2, 0, 1, 1, 1, 2],
|
|
51
35
|
yearTitles: ['год', 'года', 'лет'],
|
|
52
|
-
panelActions: {
|
|
53
|
-
accept: 'accept',
|
|
54
|
-
claim: 'claim',
|
|
55
|
-
return: 'return',
|
|
56
|
-
reject: 'reject',
|
|
57
|
-
rejectclient: 'rejectclient',
|
|
58
|
-
},
|
|
59
|
-
postActions: {
|
|
60
|
-
font: 'font',
|
|
61
|
-
route: 'route',
|
|
62
|
-
onRouteChange: 'onRouteChange',
|
|
63
|
-
applicationCreated: 'applicationCreated',
|
|
64
|
-
clipboard: 'clipboard',
|
|
65
|
-
toHomePage: 'toHomePage',
|
|
66
|
-
toStatementHistory: 'toStatementHistory',
|
|
67
|
-
toAuth: 'toAuth',
|
|
68
|
-
DOMevent: 'DOMevent',
|
|
69
|
-
Error401: 'Error401',
|
|
70
|
-
Error500: 'Error500',
|
|
71
|
-
iframeLoaded: 'iframeLoaded',
|
|
72
|
-
},
|
|
73
36
|
currencySymbols: {
|
|
74
37
|
kzt: '₸',
|
|
75
38
|
usd: '$',
|
package/composables/index.ts
CHANGED
|
@@ -227,21 +227,24 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
|
|
|
227
227
|
beneficiary.registrationRegionType = new Value();
|
|
228
228
|
beneficiary.registrationStreet = '';
|
|
229
229
|
} else {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
230
|
+
if (beneficiary.response && beneficiary.response.addresses && beneficiary.response.addresses.length) {
|
|
231
|
+
const benAddress = beneficiary.response.addresses;
|
|
232
|
+
const country = dataStore.countries.find(i => (i.nameRu as string).match(new RegExp(benAddress[0].countryName, 'i')));
|
|
233
|
+
const city = dataStore.cities.find(i => i.nameRu === benAddress[0].cityName.replace('г.', ''));
|
|
234
|
+
const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
|
|
235
|
+
const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
|
|
236
|
+
const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
|
|
237
|
+
beneficiary.registrationCountry = country ?? new Value();
|
|
238
|
+
beneficiary.registrationCity = city ?? new Value();
|
|
239
|
+
beneficiary.registrationMicroDistrict = beneficiary.response?.addresses[0].microRaion ?? '';
|
|
240
|
+
beneficiary.registrationNumberApartment = beneficiary.response?.addresses[0].apartmentNumber ?? '';
|
|
241
|
+
beneficiary.registrationNumberHouse = beneficiary.response?.addresses[0].blockNumber ?? '';
|
|
242
|
+
beneficiary.registrationProvince = province ?? new Value();
|
|
243
|
+
beneficiary.registrationQuarter = beneficiary.response?.addresses[0].kvartal ?? '';
|
|
244
|
+
beneficiary.registrationRegion = region ?? new Value();
|
|
245
|
+
beneficiary.registrationRegionType = localityType ?? new Value();
|
|
246
|
+
beneficiary.registrationStreet = beneficiary.response?.addresses[0].streetName ?? '';
|
|
247
|
+
}
|
|
245
248
|
}
|
|
246
249
|
}
|
|
247
250
|
};
|