hl-core 0.0.8-beta.1 → 0.0.8-beta.11
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 +27 -13
- package/api/interceptors.ts +1 -1
- package/components/Dialog/Dialog.vue +1 -1
- package/components/Form/FormBlock.vue +52 -27
- package/components/Form/ManagerAttachment.vue +196 -0
- package/components/Form/ProductConditionsBlock.vue +8 -4
- package/components/Input/Datepicker.vue +41 -0
- package/components/Input/FormInput.vue +15 -3
- package/components/Layout/SettingsPanel.vue +2 -2
- package/components/Menu/MenuHover.vue +30 -0
- package/components/Menu/MenuNav.vue +12 -4
- package/components/Pages/Anketa.vue +13 -5
- package/components/Pages/Documents.vue +1 -1
- package/components/Pages/MemberForm.vue +107 -12
- package/components/Pages/ProductConditions.vue +334 -17
- package/components/Panel/PanelHandler.vue +25 -11
- package/composables/classes.ts +94 -23
- package/composables/constants.ts +9 -1
- package/composables/index.ts +3 -2
- package/composables/styles.ts +10 -2
- package/configs/i18n.ts +19 -0
- package/layouts/default.vue +1 -1
- package/locales/en.json +408 -0
- package/locales/kz.json +408 -0
- package/locales/ru.json +408 -0
- package/nuxt.config.ts +12 -0
- package/package.json +9 -3
- package/pages/500.vue +1 -1
- package/plugins/helperFunctionsPlugins.ts +5 -0
- package/plugins/storePlugin.ts +0 -1
- package/plugins/vuetifyPlugin.ts +5 -0
- package/store/data.store.js +344 -508
- package/store/member.store.ts +95 -5
- package/store/rules.js +27 -12
- package/types/index.ts +32 -0
- package/store/messages.ts +0 -433
package/composables/classes.ts
CHANGED
|
@@ -265,7 +265,8 @@ class Person {
|
|
|
265
265
|
getAgeByBirthDate() {
|
|
266
266
|
const date = this.formatDate(this.birthDate);
|
|
267
267
|
if (date) {
|
|
268
|
-
const
|
|
268
|
+
const calcAge = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
|
|
269
|
+
const age = calcAge === 0 ? 1 : calcAge;
|
|
269
270
|
if (new Date(date) < new Date(Date.now()) && age > 0) {
|
|
270
271
|
return age.toString();
|
|
271
272
|
}
|
|
@@ -356,6 +357,13 @@ export class Contragent extends Person {
|
|
|
356
357
|
}
|
|
357
358
|
|
|
358
359
|
export class Member extends Person {
|
|
360
|
+
response?: {
|
|
361
|
+
contragent?: any;
|
|
362
|
+
questionnaires?: any;
|
|
363
|
+
contacts?: any;
|
|
364
|
+
documents?: any;
|
|
365
|
+
addresses?: any;
|
|
366
|
+
};
|
|
359
367
|
verifyType: any;
|
|
360
368
|
verifyDate: any;
|
|
361
369
|
postIndex: string | null;
|
|
@@ -421,6 +429,7 @@ export class Member extends Person {
|
|
|
421
429
|
hasAgreement: boolean | null;
|
|
422
430
|
otpTokenId: string | null;
|
|
423
431
|
otpCode: string | null;
|
|
432
|
+
documentsList: UserDocument[];
|
|
424
433
|
constructor(
|
|
425
434
|
id = 0,
|
|
426
435
|
type = 1,
|
|
@@ -488,6 +497,7 @@ export class Member extends Person {
|
|
|
488
497
|
isNotary = false,
|
|
489
498
|
) {
|
|
490
499
|
super(id, type, iin, longName, lastName, firstName, middleName, birthDate, gender, genderName, birthPlace, age);
|
|
500
|
+
this.documentsList = [];
|
|
491
501
|
this.postIndex = null;
|
|
492
502
|
this.isPdl = false;
|
|
493
503
|
this.migrationCard = migrationCard;
|
|
@@ -679,7 +689,9 @@ export class ProductConditions {
|
|
|
679
689
|
annualIncome: string | null;
|
|
680
690
|
processIndexRate: Value;
|
|
681
691
|
requestedSumInsured: number | string | null;
|
|
692
|
+
requestedSumInsuredInDollar: number | string | null;
|
|
682
693
|
insurancePremiumPerMonth: number | string | null;
|
|
694
|
+
insurancePremiumPerMonthInDollar: number | string | null;
|
|
683
695
|
establishingGroupDisabilityFromThirdYear: string | null;
|
|
684
696
|
possibilityToChange: string | null;
|
|
685
697
|
deathOfInsuredDueToAccident: Value;
|
|
@@ -730,6 +742,8 @@ export class ProductConditions {
|
|
|
730
742
|
riskGroup = new Value(),
|
|
731
743
|
riskGroup2 = new Value(),
|
|
732
744
|
) {
|
|
745
|
+
this.requestedSumInsuredInDollar = null;
|
|
746
|
+
this.insurancePremiumPerMonthInDollar = null;
|
|
733
747
|
this.signDate = null;
|
|
734
748
|
this.birthDate = null;
|
|
735
749
|
this.gender = new Value();
|
|
@@ -764,6 +778,17 @@ export class ProductConditions {
|
|
|
764
778
|
}
|
|
765
779
|
}
|
|
766
780
|
|
|
781
|
+
export class MemberSettings {
|
|
782
|
+
has?: boolean;
|
|
783
|
+
isMultiple?: boolean;
|
|
784
|
+
constructor(options?: { has?: boolean; isMultiple?: boolean }) {
|
|
785
|
+
if (options) {
|
|
786
|
+
this.has = options.has;
|
|
787
|
+
this.isMultiple = options.isMultiple;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
|
|
767
792
|
export class DataStoreClass {
|
|
768
793
|
// IMP Контроллер фич
|
|
769
794
|
controls: {
|
|
@@ -781,6 +806,15 @@ export class DataStoreClass {
|
|
|
781
806
|
hasInsis: boolean;
|
|
782
807
|
// Калькулятор без ввода данных
|
|
783
808
|
hasCalculator: boolean;
|
|
809
|
+
// Блок прикрепления к менеджеру
|
|
810
|
+
hasAttachment: boolean;
|
|
811
|
+
};
|
|
812
|
+
members: {
|
|
813
|
+
clientApp: MemberSettings;
|
|
814
|
+
insuredApp: MemberSettings;
|
|
815
|
+
beneficiaryApp: MemberSettings;
|
|
816
|
+
beneficialOwnerApp: MemberSettings;
|
|
817
|
+
spokesmanApp: MemberSettings;
|
|
784
818
|
};
|
|
785
819
|
hasLayoutMargins: boolean;
|
|
786
820
|
readonly product: string | null;
|
|
@@ -801,6 +835,7 @@ export class DataStoreClass {
|
|
|
801
835
|
items: MenuItem[];
|
|
802
836
|
};
|
|
803
837
|
buttons: MenuItem[];
|
|
838
|
+
isButtonsLoading: boolean;
|
|
804
839
|
panelAction: string | null;
|
|
805
840
|
panel: {
|
|
806
841
|
open: boolean;
|
|
@@ -839,9 +874,9 @@ export class DataStoreClass {
|
|
|
839
874
|
user: User;
|
|
840
875
|
accessToken: string | null = null;
|
|
841
876
|
refreshToken: string | null = null;
|
|
842
|
-
processCoverTypeSum:
|
|
843
|
-
processIndexRate:
|
|
844
|
-
processPaymentPeriod:
|
|
877
|
+
processCoverTypeSum: Value[];
|
|
878
|
+
processIndexRate: Value[];
|
|
879
|
+
processPaymentPeriod: Value[];
|
|
845
880
|
taskList: TaskListItem[];
|
|
846
881
|
processHistory: TaskHistory[];
|
|
847
882
|
contragentList: any[];
|
|
@@ -850,12 +885,45 @@ export class DataStoreClass {
|
|
|
850
885
|
groupCode: string;
|
|
851
886
|
userGroups: Item[];
|
|
852
887
|
onMainPage: boolean;
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
riskGroup:
|
|
888
|
+
SaleChanellPolicy: Value[];
|
|
889
|
+
RegionPolicy: Value[];
|
|
890
|
+
ManagerPolicy: Value[];
|
|
891
|
+
AgentData: AgentData[];
|
|
892
|
+
riskGroup: Value[];
|
|
893
|
+
currencies: {
|
|
894
|
+
eur: number | null;
|
|
895
|
+
usd: number | null;
|
|
896
|
+
};
|
|
897
|
+
filters: {
|
|
898
|
+
show: (item: MenuItem) => boolean;
|
|
899
|
+
disabled: (item: MenuItem) => boolean;
|
|
900
|
+
};
|
|
858
901
|
constructor() {
|
|
902
|
+
this.filters = {
|
|
903
|
+
show: (item: MenuItem) => {
|
|
904
|
+
if (typeof item.show === 'boolean') {
|
|
905
|
+
return item.show;
|
|
906
|
+
}
|
|
907
|
+
return true;
|
|
908
|
+
},
|
|
909
|
+
disabled: (item: MenuItem) => {
|
|
910
|
+
if (typeof item.disabled === 'boolean') {
|
|
911
|
+
return item.disabled;
|
|
912
|
+
}
|
|
913
|
+
return false;
|
|
914
|
+
},
|
|
915
|
+
};
|
|
916
|
+
this.currencies = {
|
|
917
|
+
eur: null,
|
|
918
|
+
usd: null,
|
|
919
|
+
};
|
|
920
|
+
this.members = {
|
|
921
|
+
clientApp: new MemberSettings(),
|
|
922
|
+
insuredApp: new MemberSettings(),
|
|
923
|
+
beneficiaryApp: new MemberSettings(),
|
|
924
|
+
beneficialOwnerApp: new MemberSettings(),
|
|
925
|
+
spokesmanApp: new MemberSettings(),
|
|
926
|
+
};
|
|
859
927
|
this.controls = {
|
|
860
928
|
onAuth: false,
|
|
861
929
|
hasAnketa: true,
|
|
@@ -864,15 +932,16 @@ export class DataStoreClass {
|
|
|
864
932
|
hasGKB: false,
|
|
865
933
|
hasInsis: false,
|
|
866
934
|
hasCalculator: false,
|
|
935
|
+
hasAttachment: true,
|
|
867
936
|
};
|
|
868
937
|
this.hasLayoutMargins = true;
|
|
869
938
|
this.processIndexRate = [];
|
|
870
939
|
this.processPaymentPeriod = [];
|
|
871
940
|
this.questionRefs = [];
|
|
872
|
-
this.
|
|
873
|
-
this.
|
|
874
|
-
this.
|
|
875
|
-
this.
|
|
941
|
+
this.SaleChanellPolicy = [];
|
|
942
|
+
this.RegionPolicy = [];
|
|
943
|
+
this.ManagerPolicy = [];
|
|
944
|
+
this.AgentData = [];
|
|
876
945
|
this.product = import.meta.env.VITE_PRODUCT ? (import.meta.env.VITE_PRODUCT as string) : null;
|
|
877
946
|
this.showNav = true;
|
|
878
947
|
this.menuItems = [];
|
|
@@ -891,6 +960,7 @@ export class DataStoreClass {
|
|
|
891
960
|
items: [],
|
|
892
961
|
};
|
|
893
962
|
this.buttons = [];
|
|
963
|
+
this.isButtonsLoading = false;
|
|
894
964
|
this.panel = {
|
|
895
965
|
open: false,
|
|
896
966
|
overlay: false,
|
|
@@ -947,27 +1017,36 @@ export class DataStoreClass {
|
|
|
947
1017
|
id: '1',
|
|
948
1018
|
nameKz: '',
|
|
949
1019
|
nameRu: '1',
|
|
950
|
-
|
|
1020
|
+
code: '',
|
|
1021
|
+
ids: '',
|
|
951
1022
|
},
|
|
952
1023
|
{
|
|
953
1024
|
id: '2',
|
|
954
1025
|
nameKz: '',
|
|
955
1026
|
nameRu: '2',
|
|
1027
|
+
code: '',
|
|
1028
|
+
ids: '',
|
|
956
1029
|
},
|
|
957
1030
|
{
|
|
958
1031
|
id: '3',
|
|
959
1032
|
nameKz: '',
|
|
960
1033
|
nameRu: '3',
|
|
1034
|
+
code: '',
|
|
1035
|
+
ids: '',
|
|
961
1036
|
},
|
|
962
1037
|
{
|
|
963
1038
|
id: '4',
|
|
964
1039
|
nameKz: '',
|
|
965
1040
|
nameRu: '4',
|
|
1041
|
+
code: '',
|
|
1042
|
+
ids: '',
|
|
966
1043
|
},
|
|
967
1044
|
{
|
|
968
1045
|
id: '5',
|
|
969
1046
|
nameKz: '',
|
|
970
1047
|
nameRu: '5',
|
|
1048
|
+
code: '',
|
|
1049
|
+
ids: '',
|
|
971
1050
|
},
|
|
972
1051
|
];
|
|
973
1052
|
}
|
|
@@ -995,15 +1074,7 @@ export class FormStoreClass {
|
|
|
995
1074
|
};
|
|
996
1075
|
birthInfos: BirthInfoGKB[];
|
|
997
1076
|
SaleChanellPolicy: Value;
|
|
998
|
-
AgentData:
|
|
999
|
-
agentId: null;
|
|
1000
|
-
manId: number;
|
|
1001
|
-
fullName: string;
|
|
1002
|
-
officeId: null;
|
|
1003
|
-
officeCode: null;
|
|
1004
|
-
saleChannel: string;
|
|
1005
|
-
managerName: string;
|
|
1006
|
-
};
|
|
1077
|
+
AgentData: AgentData;
|
|
1007
1078
|
RegionPolicy: Value;
|
|
1008
1079
|
ManagerPolicy: Value;
|
|
1009
1080
|
isDisabled: {
|
package/composables/constants.ts
CHANGED
|
@@ -7,6 +7,7 @@ export const constants = Object.freeze({
|
|
|
7
7
|
bolashak: 8,
|
|
8
8
|
liferenta: 9,
|
|
9
9
|
gons: 10,
|
|
10
|
+
halykkazyna: 11,
|
|
10
11
|
},
|
|
11
12
|
|
|
12
13
|
editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
|
|
@@ -26,11 +27,12 @@ export const constants = Object.freeze({
|
|
|
26
27
|
agentMycar: 'AgentMycar',
|
|
27
28
|
analyst: 'Analyst',
|
|
28
29
|
upk: 'UPK',
|
|
29
|
-
|
|
30
|
+
finCenter: 'FinCenter',
|
|
30
31
|
supervisor: 'Supervisor',
|
|
31
32
|
support: 'Support',
|
|
32
33
|
managerHalykBank: 'ManagerHalykBank',
|
|
33
34
|
serviceManager: 'ServiceManager',
|
|
35
|
+
drn: 'DRNSJ',
|
|
34
36
|
},
|
|
35
37
|
actions: {
|
|
36
38
|
accept: 'accept',
|
|
@@ -40,6 +42,8 @@ export const constants = Object.freeze({
|
|
|
40
42
|
claim: 'claim',
|
|
41
43
|
sign: 'sign',
|
|
42
44
|
pay: 'pay',
|
|
45
|
+
register: 'register',
|
|
46
|
+
send: 'send',
|
|
43
47
|
},
|
|
44
48
|
yearCases: [2, 0, 1, 1, 1, 2],
|
|
45
49
|
yearTitles: ['год', 'года', 'лет'],
|
|
@@ -62,4 +66,8 @@ export const constants = Object.freeze({
|
|
|
62
66
|
Error401: 'Error401',
|
|
63
67
|
Error500: 'Error500',
|
|
64
68
|
},
|
|
69
|
+
currencySymbols: {
|
|
70
|
+
kzt: '₸',
|
|
71
|
+
usd: '$',
|
|
72
|
+
},
|
|
65
73
|
});
|
package/composables/index.ts
CHANGED
|
@@ -92,8 +92,9 @@ export const getKeyWithPattern = (obj: any, key: string) => {
|
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
export const getAgeByBirthDate = (rawDate: string) => {
|
|
95
|
-
const
|
|
96
|
-
|
|
95
|
+
const calcAge = Math.abs(new Date(Date.now() - new Date(rawDate).getTime()).getUTCFullYear() - 1970);
|
|
96
|
+
const age = calcAge === 0 ? 1 : calcAge;
|
|
97
|
+
if (new Date(rawDate) < new Date(Date.now()) && age > 0) {
|
|
97
98
|
return age;
|
|
98
99
|
}
|
|
99
100
|
};
|
package/composables/styles.ts
CHANGED
|
@@ -17,12 +17,15 @@ export class Styles {
|
|
|
17
17
|
// Green
|
|
18
18
|
greenBg: string = 'bg-[#009C73]';
|
|
19
19
|
greenBgHover: string = 'hover:bg-[#00a277]';
|
|
20
|
-
greenBgLight: string = 'bg-[#
|
|
21
|
-
greenText: string = 'text-[#009C73]';
|
|
20
|
+
greenBgLight: string = 'bg-[#EAF6EF]';
|
|
21
|
+
greenText: string = '!text-[#009C73]';
|
|
22
22
|
greenTextHover: string = 'hover:text-[#009C73]';
|
|
23
|
+
greenBgLightHover: string = 'hover:bg-[#dbf0e4]';
|
|
23
24
|
|
|
24
25
|
// Yellow
|
|
25
26
|
yellowText: string = 'text-[#FAB31C]';
|
|
27
|
+
yellowBg: string = 'bg-[#FAB31C]';
|
|
28
|
+
yellowBgHover: string = 'hover:bg-[#FAB31C]';
|
|
26
29
|
|
|
27
30
|
// Grey
|
|
28
31
|
greyBg: string = 'bg-[#B8B8B8]';
|
|
@@ -56,8 +59,10 @@ export class Styles {
|
|
|
56
59
|
greenBtn: string;
|
|
57
60
|
blueBtn: string;
|
|
58
61
|
redBtn: string;
|
|
62
|
+
yellowBtn: string;
|
|
59
63
|
whiteBtn: string;
|
|
60
64
|
blueLightBtn: string;
|
|
65
|
+
greenLightBtn: string;
|
|
61
66
|
|
|
62
67
|
// Complex
|
|
63
68
|
flexColNav: string;
|
|
@@ -66,14 +71,17 @@ export class Styles {
|
|
|
66
71
|
|
|
67
72
|
// Muted or disabled
|
|
68
73
|
mutedText: string = 'text-[#99A3B3]';
|
|
74
|
+
disabled: string = 'cursor-not-allowed opacity-50';
|
|
69
75
|
|
|
70
76
|
constructor() {
|
|
71
77
|
// Button
|
|
72
78
|
this.greenBtn = `${this.greenBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgHover}`;
|
|
73
79
|
this.redBtn = `${this.redBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.redBgHover}`;
|
|
80
|
+
this.yellowBtn = `${this.yellowBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.yellowBgHover}`;
|
|
74
81
|
this.blueBtn = `${this.blueBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgHover}`;
|
|
75
82
|
this.whiteBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover}`;
|
|
76
83
|
this.blueLightBtn = `${this.blueBgLight} ${this.greyTextLight} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover}`;
|
|
84
|
+
this.greenLightBtn = `${this.greenBgLight} ${this.greenText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgLightHover}`;
|
|
77
85
|
|
|
78
86
|
// Complex
|
|
79
87
|
this.flexColNav = 'flex flex-col gap-[10px] px-2 pt-[14px]';
|
package/configs/i18n.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createI18n } from 'vue-i18n';
|
|
2
|
+
import en from '@/locales/en.json';
|
|
3
|
+
import ru from '@/locales/ru.json';
|
|
4
|
+
import kz from '@/locales/kz.json';
|
|
5
|
+
|
|
6
|
+
const instance = createI18n({
|
|
7
|
+
legacy: false,
|
|
8
|
+
globalInjection: true,
|
|
9
|
+
locale: 'ru',
|
|
10
|
+
messages: {
|
|
11
|
+
en,
|
|
12
|
+
ru,
|
|
13
|
+
kz,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export default instance;
|
|
18
|
+
|
|
19
|
+
export const i18n = instance.global;
|
package/layouts/default.vue
CHANGED
|
@@ -38,7 +38,7 @@ const openSettings = async () => {
|
|
|
38
38
|
|
|
39
39
|
const onLink = async (item: MenuItem) => {
|
|
40
40
|
if (dataStore.menu.onLink) await dataStore.menu.onLink(item);
|
|
41
|
-
if (
|
|
41
|
+
if (!dataStore.filters.disabled(item)) dataStore.menu.selectedItem = item;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
const onBack = async (item: MenuItem) => {
|