hl-core 0.0.7-beta.7 → 0.0.7-beta.9
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 +275 -3
- package/components/Input/RoundedInput.vue +5 -0
- package/components/Layout/Drawer.vue +42 -0
- package/components/Layout/Loader.vue +9 -0
- package/components/Layout/SettingsPanel.vue +55 -67
- package/components/Menu/MenuNav.vue +22 -4
- package/components/Menu/MenuNavItem.vue +2 -1
- package/components/Panel/PanelItem.vue +7 -0
- package/composables/classes.ts +138 -27
- package/composables/constants.ts +2 -0
- package/composables/index.ts +43 -0
- package/layouts/default.vue +8 -1
- package/layouts/full.vue +8 -1
- package/package.json +2 -1
- package/plugins/helperFunctionsPlugins.ts +2 -0
- package/store/data.store.js +2646 -235
- package/store/messages.ts +101 -3
- package/components/Layout/Panel.vue +0 -33
package/composables/classes.ts
CHANGED
|
@@ -4,35 +4,61 @@ import {
|
|
|
4
4
|
RouteLocationNormalizedLoaded,
|
|
5
5
|
} from 'vue-router';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
type LinkType =
|
|
8
|
+
| RouteLocationNormalized
|
|
9
|
+
| RouteLocationNormalizedLoaded
|
|
10
|
+
| string
|
|
11
|
+
| null
|
|
12
|
+
| boolean;
|
|
13
|
+
|
|
14
|
+
class MenuItemConfig {
|
|
8
15
|
id: any;
|
|
9
16
|
title: string | null;
|
|
10
|
-
link?:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
description?: string;
|
|
17
|
+
link?: LinkType;
|
|
18
|
+
hasLine?: boolean;
|
|
19
|
+
description?: string | null;
|
|
20
|
+
url?: string | null;
|
|
21
|
+
initial?: object | null;
|
|
22
|
+
icon?: string | null;
|
|
23
|
+
action?: Function;
|
|
18
24
|
constructor(
|
|
19
25
|
id: any = null,
|
|
20
26
|
title: string | null = null,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
description?: string,
|
|
27
|
+
link?: LinkType,
|
|
28
|
+
hasLine?: boolean,
|
|
29
|
+
description?: string | null,
|
|
30
|
+
url?: string | null,
|
|
31
|
+
initial?: object | null,
|
|
32
|
+
icon?: string | null,
|
|
33
|
+
action?: Function,
|
|
29
34
|
) {
|
|
30
35
|
this.id = id;
|
|
31
36
|
this.title = title;
|
|
32
|
-
this.initial = initial;
|
|
33
37
|
this.link = link;
|
|
34
|
-
this.
|
|
38
|
+
this.hasLine = hasLine;
|
|
35
39
|
this.description = description;
|
|
40
|
+
this.url = url;
|
|
41
|
+
this.initial = initial;
|
|
42
|
+
this.icon = icon;
|
|
43
|
+
this.action = action;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export class MenuItem extends MenuItemConfig {
|
|
48
|
+
constructor(
|
|
49
|
+
{
|
|
50
|
+
id,
|
|
51
|
+
title,
|
|
52
|
+
link,
|
|
53
|
+
hasLine,
|
|
54
|
+
description,
|
|
55
|
+
url,
|
|
56
|
+
initial,
|
|
57
|
+
icon,
|
|
58
|
+
action,
|
|
59
|
+
}: MenuItemConfig = new MenuItemConfig(),
|
|
60
|
+
) {
|
|
61
|
+
super(id, title, link, hasLine, description, url, initial, icon, action);
|
|
36
62
|
}
|
|
37
63
|
}
|
|
38
64
|
|
|
@@ -737,6 +763,7 @@ export class ProductConditions {
|
|
|
737
763
|
}
|
|
738
764
|
|
|
739
765
|
export class DataStoreClass {
|
|
766
|
+
hasLayoutMargins: boolean;
|
|
740
767
|
product: string | null;
|
|
741
768
|
showNav: boolean;
|
|
742
769
|
menuItems: MenuItem[];
|
|
@@ -752,6 +779,11 @@ export class DataStoreClass {
|
|
|
752
779
|
settings: {
|
|
753
780
|
open: boolean;
|
|
754
781
|
overlay: boolean;
|
|
782
|
+
items: MenuItem[];
|
|
783
|
+
};
|
|
784
|
+
panel: {
|
|
785
|
+
open: boolean;
|
|
786
|
+
overlay: boolean;
|
|
755
787
|
};
|
|
756
788
|
historyPageIndex: number;
|
|
757
789
|
historyPageSize: number;
|
|
@@ -762,6 +794,7 @@ export class DataStoreClass {
|
|
|
762
794
|
countries: Value[];
|
|
763
795
|
citizenshipCountries: Value[];
|
|
764
796
|
taxCountries: Value[];
|
|
797
|
+
addTaxCountries: Value[];
|
|
765
798
|
states: Value[];
|
|
766
799
|
regions: Value[];
|
|
767
800
|
cities: Value[];
|
|
@@ -771,8 +804,6 @@ export class DataStoreClass {
|
|
|
771
804
|
documentIssuers: Value[];
|
|
772
805
|
familyStatuses: Value[];
|
|
773
806
|
relations: Value[];
|
|
774
|
-
surveyByHealthSecond: any[];
|
|
775
|
-
surveyByCriticalSecond: any[];
|
|
776
807
|
questionRefs: any[];
|
|
777
808
|
epayLink: string;
|
|
778
809
|
residents: Value[];
|
|
@@ -780,13 +811,16 @@ export class DataStoreClass {
|
|
|
780
811
|
economySectorCode: Value[];
|
|
781
812
|
gender: Value[];
|
|
782
813
|
fontSize: number;
|
|
783
|
-
isFontChangerOpen = false;
|
|
784
|
-
isLoading = false;
|
|
785
|
-
userNotFound = false;
|
|
814
|
+
isFontChangerOpen: boolean = false;
|
|
815
|
+
isLoading: boolean = false;
|
|
816
|
+
userNotFound: boolean = false;
|
|
786
817
|
user: User;
|
|
787
|
-
accessToken = null;
|
|
788
|
-
refreshToken = null;
|
|
818
|
+
accessToken: string | null = null;
|
|
819
|
+
refreshToken: string | null = null;
|
|
789
820
|
processCoverTypeSum: any[];
|
|
821
|
+
processIndexRate: any[];
|
|
822
|
+
processPaymentPeriod: any[];
|
|
823
|
+
additionalInsuranceTerms: any[];
|
|
790
824
|
taskList: any[];
|
|
791
825
|
processHistory: any[];
|
|
792
826
|
contragentList: any[];
|
|
@@ -795,7 +829,48 @@ export class DataStoreClass {
|
|
|
795
829
|
groupCode: string;
|
|
796
830
|
userGroups: any[];
|
|
797
831
|
onMainPage: boolean;
|
|
832
|
+
signUrl: string | null;
|
|
833
|
+
SaleChanellPolicyList: any[];
|
|
834
|
+
RegionPolicyList: any[];
|
|
835
|
+
ManagerPolicyList: any[];
|
|
836
|
+
AgentDataList: any[];
|
|
837
|
+
affilationResolution: {
|
|
838
|
+
id: string | number | null;
|
|
839
|
+
processInstanceId: string | number | null;
|
|
840
|
+
number: string | number | null;
|
|
841
|
+
date: string | number | null;
|
|
842
|
+
};
|
|
843
|
+
signedDocumentList: any[];
|
|
844
|
+
surveyByHealthBase: any[];
|
|
845
|
+
surveyByCriticalBase: any[];
|
|
846
|
+
surveyByHealthSecond: any[];
|
|
847
|
+
surveyByCriticalSecond: any[];
|
|
848
|
+
definedAnswersId: {
|
|
849
|
+
surveyByHealthBase: any;
|
|
850
|
+
surveyByCriticalBase: any;
|
|
851
|
+
};
|
|
852
|
+
riskGroup: any[];
|
|
798
853
|
constructor() {
|
|
854
|
+
this.hasLayoutMargins = true;
|
|
855
|
+
this.processIndexRate = [];
|
|
856
|
+
this.processPaymentPeriod = [];
|
|
857
|
+
this.additionalInsuranceTerms = [];
|
|
858
|
+
this.definedAnswersId = {
|
|
859
|
+
surveyByHealthBase: {},
|
|
860
|
+
surveyByCriticalBase: {},
|
|
861
|
+
};
|
|
862
|
+
this.signedDocumentList = [];
|
|
863
|
+
this.affilationResolution = {
|
|
864
|
+
id: null,
|
|
865
|
+
processInstanceId: null,
|
|
866
|
+
number: null,
|
|
867
|
+
date: null,
|
|
868
|
+
};
|
|
869
|
+
this.SaleChanellPolicyList = [];
|
|
870
|
+
this.RegionPolicyList = [];
|
|
871
|
+
this.ManagerPolicyList = [];
|
|
872
|
+
this.AgentDataList = [];
|
|
873
|
+
this.signUrl = null;
|
|
799
874
|
this.product = null;
|
|
800
875
|
this.showNav = true;
|
|
801
876
|
this.menuItems = [];
|
|
@@ -811,6 +886,11 @@ export class DataStoreClass {
|
|
|
811
886
|
this.settings = {
|
|
812
887
|
open: false,
|
|
813
888
|
overlay: false,
|
|
889
|
+
items: [],
|
|
890
|
+
};
|
|
891
|
+
this.panel = {
|
|
892
|
+
open: false,
|
|
893
|
+
overlay: false,
|
|
814
894
|
};
|
|
815
895
|
this.historyPageIndex = 1;
|
|
816
896
|
this.historyPageSize = 10;
|
|
@@ -821,6 +901,7 @@ export class DataStoreClass {
|
|
|
821
901
|
this.countries = [];
|
|
822
902
|
this.citizenshipCountries = [];
|
|
823
903
|
this.taxCountries = [];
|
|
904
|
+
this.addTaxCountries = [];
|
|
824
905
|
this.states = [];
|
|
825
906
|
this.regions = [];
|
|
826
907
|
this.cities = [];
|
|
@@ -830,6 +911,8 @@ export class DataStoreClass {
|
|
|
830
911
|
this.documentIssuers = [];
|
|
831
912
|
this.familyStatuses = [];
|
|
832
913
|
this.relations = [];
|
|
914
|
+
this.surveyByHealthBase = [];
|
|
915
|
+
this.surveyByCriticalBase = [];
|
|
833
916
|
this.surveyByHealthSecond = [];
|
|
834
917
|
this.surveyByCriticalSecond = [];
|
|
835
918
|
this.questionRefs = [];
|
|
@@ -858,10 +941,38 @@ export class DataStoreClass {
|
|
|
858
941
|
this.groupCode = 'Work';
|
|
859
942
|
this.userGroups = [];
|
|
860
943
|
this.onMainPage = true;
|
|
944
|
+
this.riskGroup = [
|
|
945
|
+
{
|
|
946
|
+
id: '1',
|
|
947
|
+
nameKz: '',
|
|
948
|
+
nameRu: '1',
|
|
949
|
+
isDefault: true,
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
id: '2',
|
|
953
|
+
nameKz: '',
|
|
954
|
+
nameRu: '2',
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
id: '3',
|
|
958
|
+
nameKz: '',
|
|
959
|
+
nameRu: '3',
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
id: '4',
|
|
963
|
+
nameKz: '',
|
|
964
|
+
nameRu: '4',
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
id: '5',
|
|
968
|
+
nameKz: '',
|
|
969
|
+
nameRu: '5',
|
|
970
|
+
},
|
|
971
|
+
];
|
|
861
972
|
}
|
|
862
973
|
}
|
|
863
974
|
|
|
864
|
-
export class
|
|
975
|
+
export class FormStoreClass {
|
|
865
976
|
birthInfos: any[];
|
|
866
977
|
SaleChanellPolicy: Value;
|
|
867
978
|
AgentData: {
|
package/composables/constants.ts
CHANGED
|
@@ -6,6 +6,7 @@ export const constants = Object.freeze({
|
|
|
6
6
|
lifetrip: 7,
|
|
7
7
|
bolashak: 8,
|
|
8
8
|
liferenta: 9,
|
|
9
|
+
gons: 10,
|
|
9
10
|
},
|
|
10
11
|
|
|
11
12
|
editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
|
|
@@ -14,6 +15,7 @@ export const constants = Object.freeze({
|
|
|
14
15
|
'UnderwriterForm',
|
|
15
16
|
'AffilationResolutionForm',
|
|
16
17
|
'Completed',
|
|
18
|
+
'InsurancePremiumOnlinePaid',
|
|
17
19
|
],
|
|
18
20
|
gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
|
|
19
21
|
types: {
|
package/composables/index.ts
CHANGED
|
@@ -111,6 +111,18 @@ export const formatProcents = (val: string | number) =>
|
|
|
111
111
|
export const sanitizeURL = (text: string) =>
|
|
112
112
|
text ? text.replace(/\r?\n|\r|\\|"/g, '') : '';
|
|
113
113
|
|
|
114
|
+
export const yearEnding = (
|
|
115
|
+
number: number,
|
|
116
|
+
titles: string[],
|
|
117
|
+
cases: number[],
|
|
118
|
+
) => {
|
|
119
|
+
return titles[
|
|
120
|
+
number % 100 > 4 && number % 100 < 20
|
|
121
|
+
? 2
|
|
122
|
+
: cases[number % 10 < 5 ? number % 10 : 5]
|
|
123
|
+
];
|
|
124
|
+
};
|
|
125
|
+
|
|
114
126
|
export const parseXML = (
|
|
115
127
|
xml: boolean | string = true,
|
|
116
128
|
withTag = false,
|
|
@@ -132,3 +144,34 @@ export const parseXML = (
|
|
|
132
144
|
}
|
|
133
145
|
}
|
|
134
146
|
};
|
|
147
|
+
|
|
148
|
+
export const ESBDMessage = (ESBDObject: any, initialPoint: any) => {
|
|
149
|
+
let result;
|
|
150
|
+
if (ESBDObject.errorCode === 2) {
|
|
151
|
+
if (ESBDObject.errorMsg.indexOf('EMSG') === -1) {
|
|
152
|
+
result = 'Клиент не является резидентом РК!';
|
|
153
|
+
} else {
|
|
154
|
+
result = ESBDObject.errorMsg
|
|
155
|
+
.substring(
|
|
156
|
+
ESBDObject.errorMsg.indexOf('EMSG') + 6,
|
|
157
|
+
ESBDObject.errorMsg.lastIndexOf('EWS-100'),
|
|
158
|
+
)
|
|
159
|
+
.replace(initialPoint, '');
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (ESBDObject.errorCode === 3) {
|
|
163
|
+
return false;
|
|
164
|
+
}
|
|
165
|
+
if (ESBDObject.errorCode === 1) {
|
|
166
|
+
result = ESBDObject.errorMsg
|
|
167
|
+
.substring(
|
|
168
|
+
ESBDObject.errorMsg.indexOf(initialPoint),
|
|
169
|
+
ESBDObject.errorMsg.lastIndexOf('ECL-0001'),
|
|
170
|
+
)
|
|
171
|
+
.replace(initialPoint, '');
|
|
172
|
+
}
|
|
173
|
+
if (ESBDObject.errorCode === 4) {
|
|
174
|
+
result = ESBDObject.errorMsg;
|
|
175
|
+
}
|
|
176
|
+
return result;
|
|
177
|
+
};
|
package/layouts/default.vue
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="h-full z-[1]"
|
|
4
|
+
:class="[
|
|
5
|
+
$dataStore.hasLayoutMargins
|
|
6
|
+
? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl'
|
|
7
|
+
: '',
|
|
8
|
+
]"
|
|
9
|
+
>
|
|
3
10
|
<div
|
|
4
11
|
:class="[$libStyles.greenBg]"
|
|
5
12
|
class="hidden z-[-1] lg:block absolute left-0 top-0 h-[200px] w-full"
|
package/layouts/full.vue
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="h-full z-[1]"
|
|
4
|
+
:class="[
|
|
5
|
+
$dataStore.hasLayoutMargins
|
|
6
|
+
? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl'
|
|
7
|
+
: '',
|
|
8
|
+
]"
|
|
9
|
+
>
|
|
3
10
|
<div
|
|
4
11
|
:class="[$libStyles.greenBg]"
|
|
5
12
|
class="hidden lg:block absolute z-[-1] left-0 top-0 h-[200px] w-full"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl-core",
|
|
3
|
-
"version": "0.0.7-beta.
|
|
3
|
+
"version": "0.0.7-beta.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "nuxt.config.ts",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"axios": "^1.3.4",
|
|
37
37
|
"fast-xml-parser": "4.0.12",
|
|
38
38
|
"jwt-decode": "^3.1.2",
|
|
39
|
+
"maska": "1.5.0",
|
|
39
40
|
"pinia": "^2.0.33",
|
|
40
41
|
"v-idle-3": "^0.3.14",
|
|
41
42
|
"vue-toastification": "^2.0.0-rc.5",
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { capitalize, getFullNameShorted, reformatIin } from '../composables';
|
|
2
2
|
import { constants } from '../composables/constants';
|
|
3
3
|
import Vidle from 'v-idle-3';
|
|
4
|
+
import Maska from 'maska';
|
|
4
5
|
|
|
5
6
|
export default defineNuxtPlugin(nuxtApp => {
|
|
6
7
|
nuxtApp.vueApp.use(Vidle);
|
|
8
|
+
nuxtApp.vueApp.use(Maska);
|
|
7
9
|
return {
|
|
8
10
|
provide: {
|
|
9
11
|
capitalize: capitalize,
|