hl-core 0.0.7 → 0.0.8
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/.prettierrc +2 -1
- package/api/index.ts +580 -0
- package/api/interceptors.ts +38 -0
- package/components/Button/Btn.vue +57 -0
- package/components/Button/BtnIcon.vue +47 -0
- package/components/Button/ScrollButtons.vue +6 -0
- package/components/Button/SortArrow.vue +21 -0
- package/components/Complex/Content.vue +5 -0
- package/components/Complex/ContentBlock.vue +5 -0
- package/components/Complex/Page.vue +43 -0
- package/components/Dialog/Dialog.vue +76 -0
- package/components/Dialog/FamilyDialog.vue +39 -0
- package/components/Form/FormBlock.vue +114 -0
- package/components/Form/FormSection.vue +18 -0
- package/components/Form/FormTextSection.vue +20 -0
- package/components/Form/FormToggle.vue +52 -0
- package/components/Form/ProductConditionsBlock.vue +68 -0
- package/components/Input/EmptyFormField.vue +5 -0
- package/components/Input/FileInput.vue +71 -0
- package/components/Input/FormInput.vue +171 -0
- package/components/Input/PanelInput.vue +133 -0
- package/components/Input/RoundedInput.vue +143 -0
- package/components/Layout/Drawer.vue +44 -0
- package/components/Layout/Header.vue +48 -0
- package/components/Layout/Loader.vue +35 -0
- package/components/Layout/SettingsPanel.vue +48 -0
- package/components/List/ListEmpty.vue +22 -0
- package/components/Menu/MenuNav.vue +108 -0
- package/components/Menu/MenuNavItem.vue +37 -0
- package/components/Pages/Anketa.vue +333 -0
- package/components/Pages/Auth.vue +91 -0
- package/components/Pages/Documents.vue +108 -0
- package/components/Pages/MemberForm.vue +1138 -0
- package/components/Pages/ProductAgreement.vue +18 -0
- package/components/Pages/ProductConditions.vue +349 -0
- package/components/Panel/PanelItem.vue +5 -0
- package/components/Panel/PanelSelectItem.vue +20 -0
- package/components/Transitions/FadeTransition.vue +5 -0
- package/composables/axios.ts +11 -0
- package/composables/classes.ts +1129 -0
- package/composables/constants.ts +65 -0
- package/composables/index.ts +168 -2
- package/composables/styles.ts +41 -8
- package/layouts/clear.vue +3 -0
- package/layouts/default.vue +75 -0
- package/layouts/full.vue +6 -0
- package/nuxt.config.ts +27 -5
- package/package.json +23 -11
- package/pages/500.vue +85 -0
- package/plugins/helperFunctionsPlugins.ts +14 -2
- package/plugins/storePlugin.ts +6 -7
- package/plugins/vuetifyPlugin.ts +10 -0
- package/store/data.store.js +2460 -6
- package/store/form.store.ts +8 -0
- package/store/member.store.ts +291 -0
- package/store/messages.ts +156 -37
- package/store/rules.js +26 -28
- package/tailwind.config.js +10 -0
- package/types/index.ts +250 -0
- package/app.vue +0 -3
- package/components/Button/GreenBtn.vue +0 -33
- package/store/app.store.js +0 -12
package/store/rules.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { t } from './messages';
|
|
2
|
+
import { formatDate } from '../composables';
|
|
2
3
|
|
|
3
4
|
export const rules = {
|
|
4
|
-
recalculationMultiply: [
|
|
5
|
-
v =>
|
|
6
|
-
(v !== null && v !== '' && v >= 100) ||
|
|
7
|
-
t('toaster.valueShouldBeHigher', { text: 100 }),
|
|
8
|
-
],
|
|
5
|
+
recalculationMultiply: [v => (v !== null && v !== '' && v >= 100) || t('toaster.valueShouldBeHigher').replace('{text}', '100')],
|
|
9
6
|
recalculationAdditive: [
|
|
10
7
|
v =>
|
|
11
8
|
(v !== null && v !== '' && v <= 100 && v >= 0) ||
|
|
@@ -34,9 +31,7 @@ export const rules = {
|
|
|
34
31
|
return t('rules.required');
|
|
35
32
|
},
|
|
36
33
|
],
|
|
37
|
-
cyrillic: [
|
|
38
|
-
v => v === null || /^[\u0400-\u04FF ]+$/.test(v) || t('rules.cyrillic'),
|
|
39
|
-
],
|
|
34
|
+
cyrillic: [v => v === null || /^[\u0400-\u04FF ]+$/.test(v) || t('rules.cyrillic')],
|
|
40
35
|
email: [
|
|
41
36
|
v => {
|
|
42
37
|
if (v === '' || v === null) {
|
|
@@ -45,9 +40,7 @@ export const rules = {
|
|
|
45
40
|
if (
|
|
46
41
|
String(v)
|
|
47
42
|
.toLowerCase()
|
|
48
|
-
.match(
|
|
49
|
-
/^(([^<>()[\]\\.,;=\s@"]+(\.[^<>()[\]\\.,;=\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
50
|
-
)
|
|
43
|
+
.match(/^(([^<>()[\]\\.,;=\s@"]+(\.[^<>()[\]\\.,;=\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)
|
|
51
44
|
) {
|
|
52
45
|
return true;
|
|
53
46
|
} else {
|
|
@@ -57,9 +50,7 @@ export const rules = {
|
|
|
57
50
|
},
|
|
58
51
|
],
|
|
59
52
|
numbers: [v => /^[0-9]+$/.test(v) || t('rules.numbers')],
|
|
60
|
-
numbersSymbols: [
|
|
61
|
-
v => /^([0-9])|(\W|_)+$/.test(v) || t('rules.numbersSymbols'),
|
|
62
|
-
],
|
|
53
|
+
numbersSymbols: [v => /^([0-9])|(\W|_)+$/.test(v) || t('rules.numbersSymbols')],
|
|
63
54
|
ageExceeds: [v => v < 50 || t('rules.ageExceeds')],
|
|
64
55
|
sums: [
|
|
65
56
|
v => {
|
|
@@ -72,7 +63,7 @@ export const rules = {
|
|
|
72
63
|
],
|
|
73
64
|
iinRight: [
|
|
74
65
|
v => {
|
|
75
|
-
if (v.length !==
|
|
66
|
+
if (v.length !== useMask().iin.length) {
|
|
76
67
|
return t('rules.iinRight');
|
|
77
68
|
}
|
|
78
69
|
return true;
|
|
@@ -84,7 +75,7 @@ export const rules = {
|
|
|
84
75
|
if (v === null || v == '') {
|
|
85
76
|
return true;
|
|
86
77
|
}
|
|
87
|
-
if (v && v.length ===
|
|
78
|
+
if (v && v.length === useMask().phone.length) {
|
|
88
79
|
return true;
|
|
89
80
|
} else {
|
|
90
81
|
return t('rules.phoneFormat');
|
|
@@ -94,11 +85,7 @@ export const rules = {
|
|
|
94
85
|
date: [
|
|
95
86
|
v => {
|
|
96
87
|
if (v === null || v == '') return true;
|
|
97
|
-
if (
|
|
98
|
-
/^(0[1-9]|1[0-9]|2[0-9]|3[0-1])(-|\.)(0[1-9]|1[0-2])(-|\.)(19[0-9]{2}|20[0-9][0-9])$/.test(
|
|
99
|
-
v,
|
|
100
|
-
)
|
|
101
|
-
) {
|
|
88
|
+
if (/^(0[1-9]|1[0-9]|2[0-9]|3[0-1])(-|\.)(0[1-9]|1[0-2])(-|\.)(19[0-9]{2}|20[0-9][0-9])$/.test(v)) {
|
|
102
89
|
return true;
|
|
103
90
|
} else {
|
|
104
91
|
return t('rules.date');
|
|
@@ -108,13 +95,8 @@ export const rules = {
|
|
|
108
95
|
age: [v => /^\d+$/.test(v) || t('rules.age')],
|
|
109
96
|
birthDate: [
|
|
110
97
|
v => {
|
|
111
|
-
if (new Date(formatDate(v)) > new Date(Date.now()))
|
|
112
|
-
|
|
113
|
-
if (
|
|
114
|
-
/^(0[1-9]|1[0-9]|2[0-9]|3[0-1])(-|\.)(0[1-9]|1[0-2])(-|\.)(19[0-9]{2}|20[0-9][0-9])$/.test(
|
|
115
|
-
v,
|
|
116
|
-
)
|
|
117
|
-
) {
|
|
98
|
+
if (new Date(formatDate(v)) > new Date(Date.now())) return t('rules.exceedDate');
|
|
99
|
+
if (/^(0[1-9]|1[0-9]|2[0-9]|3[0-1])(-|\.)(0[1-9]|1[0-2])(-|\.)(19[0-9]{2}|20[0-9][0-9])$/.test(v)) {
|
|
118
100
|
return true;
|
|
119
101
|
} else {
|
|
120
102
|
return t('rules.date');
|
|
@@ -128,6 +110,20 @@ export const rules = {
|
|
|
128
110
|
return t('rules.coverPeriod');
|
|
129
111
|
}
|
|
130
112
|
return true;
|
|
113
|
+
} else {
|
|
114
|
+
return t('rules.coverPeriod');
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
coverPeriodFrom3to20: [
|
|
119
|
+
v => {
|
|
120
|
+
if (v !== null) {
|
|
121
|
+
if (v < 3 || v > 20) {
|
|
122
|
+
return t('productConditionsForm.coverPeriodFrom3to20');
|
|
123
|
+
}
|
|
124
|
+
return true;
|
|
125
|
+
} else {
|
|
126
|
+
return t('productConditionsForm.coverPeriodFrom3to20');
|
|
131
127
|
}
|
|
132
128
|
},
|
|
133
129
|
],
|
|
@@ -152,4 +148,6 @@ export const rules = {
|
|
|
152
148
|
}
|
|
153
149
|
},
|
|
154
150
|
],
|
|
151
|
+
policyholderAgeLimit: [v => v >= 18 || t('rules.policyholderAgeLimit')],
|
|
152
|
+
beneficiaryAgeLimit: [v => v <= 15 || t('rules.beneficiaryAgeLimit')],
|
|
155
153
|
};
|
package/types/index.ts
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
type MemberKeys = keyof ReturnType<typeof useFormStore>;
|
|
5
|
+
type MemberFormTypes = 'policyholderForm' | 'insuredForm' | 'beneficiaryForm' | 'beneficialOwnerForm' | 'policyholdersRepresentativeForm' | 'productConditionsForm';
|
|
6
|
+
type PanelTypes = 'settings' | 'panel';
|
|
7
|
+
type FileActions = 'view' | 'download';
|
|
8
|
+
type InputVariants = 'solo' | 'filled' | 'outlined' | 'plain' | 'underlined';
|
|
9
|
+
type InputTypes =
|
|
10
|
+
| 'button'
|
|
11
|
+
| 'checkbox'
|
|
12
|
+
| 'color'
|
|
13
|
+
| 'date'
|
|
14
|
+
| 'datetime-local'
|
|
15
|
+
| 'email'
|
|
16
|
+
| 'file'
|
|
17
|
+
| 'hidden'
|
|
18
|
+
| 'image'
|
|
19
|
+
| 'month'
|
|
20
|
+
| 'number'
|
|
21
|
+
| 'password'
|
|
22
|
+
| 'radio'
|
|
23
|
+
| 'range'
|
|
24
|
+
| 'reset'
|
|
25
|
+
| 'search'
|
|
26
|
+
| 'submit'
|
|
27
|
+
| 'tel'
|
|
28
|
+
| 'text'
|
|
29
|
+
| 'time'
|
|
30
|
+
| 'url'
|
|
31
|
+
| 'week';
|
|
32
|
+
type TaskListItem = {
|
|
33
|
+
addRegNumber: string | number;
|
|
34
|
+
applicationTaskId: string;
|
|
35
|
+
dateCreated: string;
|
|
36
|
+
historyStatus: string;
|
|
37
|
+
historyStatusTitle: string;
|
|
38
|
+
id: string;
|
|
39
|
+
iin: string;
|
|
40
|
+
insurerIin: string;
|
|
41
|
+
insurerLongName: string;
|
|
42
|
+
isTask: boolean | number;
|
|
43
|
+
longName: string;
|
|
44
|
+
number: string;
|
|
45
|
+
processCode: number;
|
|
46
|
+
processCodeTitle: string;
|
|
47
|
+
status: string;
|
|
48
|
+
userId: string;
|
|
49
|
+
userName: string;
|
|
50
|
+
};
|
|
51
|
+
type TaskHistory = {
|
|
52
|
+
appointmentDate: string | null;
|
|
53
|
+
comment: string | null;
|
|
54
|
+
dateCreated: string;
|
|
55
|
+
decisionCode: string | null;
|
|
56
|
+
decisionNameRu: string | null;
|
|
57
|
+
factEndDate: string;
|
|
58
|
+
id: string;
|
|
59
|
+
number: string;
|
|
60
|
+
planEndDate: string;
|
|
61
|
+
statusCode: string;
|
|
62
|
+
statusTitle: string;
|
|
63
|
+
userFullName: string | null;
|
|
64
|
+
userId: string | null;
|
|
65
|
+
violationText: string | null;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
type Item = {
|
|
69
|
+
itemCode: string;
|
|
70
|
+
itemId: number;
|
|
71
|
+
itemName: string;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
type GBDFLResponse = {
|
|
75
|
+
status: string;
|
|
76
|
+
statusName: string;
|
|
77
|
+
content: string;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
type FamilyInfoGKB = {
|
|
81
|
+
infoList: InfoListGKB;
|
|
82
|
+
status: string;
|
|
83
|
+
statusName: string;
|
|
84
|
+
content: null;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
type InfoListGKB = {
|
|
88
|
+
birthInfos: BirthInfoGKB[];
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
type BirthInfoGKB = {
|
|
92
|
+
actDate?: string;
|
|
93
|
+
actNumber?: string;
|
|
94
|
+
childBirthDate?: string;
|
|
95
|
+
childIIN?: string;
|
|
96
|
+
childLifeStatus?: number;
|
|
97
|
+
childName?: string;
|
|
98
|
+
childPatronymic?: string;
|
|
99
|
+
childSurName?: string;
|
|
100
|
+
fatherBirthDate?: string;
|
|
101
|
+
fatherLifeStatus?: number;
|
|
102
|
+
fatherIIN?: string;
|
|
103
|
+
fatherName?: string;
|
|
104
|
+
fatherPatronymic?: string;
|
|
105
|
+
fatherSurName?: string;
|
|
106
|
+
marriageActDate?: string;
|
|
107
|
+
marriageActNumber?: string;
|
|
108
|
+
marriageActPlace?: string;
|
|
109
|
+
motherApplication?: number;
|
|
110
|
+
motherBirthDate?: string;
|
|
111
|
+
motherLifeStatus?: string | null;
|
|
112
|
+
motherIIN?: string | null;
|
|
113
|
+
motherName?: string | null;
|
|
114
|
+
motherPatronymic?: string | null;
|
|
115
|
+
motherSurName?: string | null;
|
|
116
|
+
zagsCode?: string;
|
|
117
|
+
zagsNameKZ?: string;
|
|
118
|
+
zagsNameRU?: string;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
type AnketaBody = {
|
|
122
|
+
first: EachAnketa;
|
|
123
|
+
second: any[] | null;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
type EachAnketa = {
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
answerType: AnswerType;
|
|
130
|
+
definedAnswers: DefinedAnswers;
|
|
131
|
+
defaultAnswer: string;
|
|
132
|
+
questOrder: number;
|
|
133
|
+
answerId: null | string;
|
|
134
|
+
answerName: AnswerName | null;
|
|
135
|
+
answerText: null | string;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
enum AnswerName {
|
|
139
|
+
Нет = 'Нет',
|
|
140
|
+
Да = 'Да',
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
enum AnswerType {
|
|
144
|
+
N = 'N',
|
|
145
|
+
T = 'T',
|
|
146
|
+
D = 'D',
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
enum DefinedAnswers {
|
|
150
|
+
N = 'N',
|
|
151
|
+
Y = 'Y',
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
type AnketaFirst = {
|
|
155
|
+
id: string;
|
|
156
|
+
insuredId: string | null;
|
|
157
|
+
body: AnketaBody[];
|
|
158
|
+
type: 'health' | 'critical';
|
|
159
|
+
clientId: string | null;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
type AnketaSecond = {
|
|
163
|
+
id: string;
|
|
164
|
+
name: string;
|
|
165
|
+
answerType: AnswerType;
|
|
166
|
+
definedAnswers: DefinedAnswers;
|
|
167
|
+
defaultAnswer: string | null;
|
|
168
|
+
questOrder: number;
|
|
169
|
+
answerId: string | null;
|
|
170
|
+
answerName: string | null;
|
|
171
|
+
answerText: string | null;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
type SendOtpResponse = {
|
|
175
|
+
tokenId?: string;
|
|
176
|
+
errMessage?: string | null;
|
|
177
|
+
result?: string | null;
|
|
178
|
+
status?: string | number | null;
|
|
179
|
+
statusName?: string | null;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
type OtpDataType = { iin: string; phoneNumber: string; type: string; processInstanceId?: string | number };
|
|
183
|
+
|
|
184
|
+
type StartApplicationType = {
|
|
185
|
+
clientId: string | number | null;
|
|
186
|
+
iin: string;
|
|
187
|
+
longName: string;
|
|
188
|
+
processCode: number;
|
|
189
|
+
policyId: number;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
type ESBDValidationType = {
|
|
193
|
+
personType: number;
|
|
194
|
+
iin: string;
|
|
195
|
+
lastName: string;
|
|
196
|
+
firstName: string;
|
|
197
|
+
middleName: string;
|
|
198
|
+
birthDate: string;
|
|
199
|
+
sex: number;
|
|
200
|
+
docType: number;
|
|
201
|
+
docNumber: string;
|
|
202
|
+
docIssuedDate: string;
|
|
203
|
+
docIssuedBy: string;
|
|
204
|
+
activityKindId: number;
|
|
205
|
+
economicsSectorId: number;
|
|
206
|
+
resident: number;
|
|
207
|
+
countryId: number;
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
type ESBDResponseType = {
|
|
211
|
+
errorCode: number;
|
|
212
|
+
errorMsg: string;
|
|
213
|
+
esbdClientID: number;
|
|
214
|
+
verifiedDate: string;
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
type RecalculationDataType = {
|
|
218
|
+
signDate: string;
|
|
219
|
+
birthDate: string;
|
|
220
|
+
gender: number;
|
|
221
|
+
amount: number | null;
|
|
222
|
+
premium: number | null;
|
|
223
|
+
coverPeriod: string;
|
|
224
|
+
payPeriod: string;
|
|
225
|
+
indexRateId: string;
|
|
226
|
+
paymentPeriodId: string;
|
|
227
|
+
addCovers: AddCover[];
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
type RecalculationResponseType = {
|
|
231
|
+
amount: number;
|
|
232
|
+
premium: number;
|
|
233
|
+
mainCoverPremium: number;
|
|
234
|
+
addCovers: AddCover[];
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
type AddCover = {
|
|
238
|
+
id: string | null;
|
|
239
|
+
processInstanceId: string;
|
|
240
|
+
coverTypeId: string;
|
|
241
|
+
coverTypeName: string;
|
|
242
|
+
coverTypeCode: number;
|
|
243
|
+
coverSumId: string;
|
|
244
|
+
coverSumName: string;
|
|
245
|
+
coverSumCode: string;
|
|
246
|
+
amount: number;
|
|
247
|
+
premium: number;
|
|
248
|
+
isMigrate: boolean;
|
|
249
|
+
};
|
|
250
|
+
}
|
package/app.vue
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<button
|
|
3
|
-
v-if="!isLink"
|
|
4
|
-
type="button"
|
|
5
|
-
@click="$emit('clicked')"
|
|
6
|
-
:class="[
|
|
7
|
-
classes,
|
|
8
|
-
$libStyles.greenBtn,
|
|
9
|
-
$libStyles[`btnH${$capitalize(size)}`],
|
|
10
|
-
]"
|
|
11
|
-
>
|
|
12
|
-
{{ text }}
|
|
13
|
-
</button>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
export default {
|
|
18
|
-
props: {
|
|
19
|
-
text: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: 'Кнопка',
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: 'md',
|
|
26
|
-
},
|
|
27
|
-
classes: {
|
|
28
|
-
type: String,
|
|
29
|
-
default: '',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
</script>
|