hl-core 0.0.8 → 0.0.9-beta.10
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 +202 -161
- package/api/interceptors.ts +23 -17
- package/components/Button/Btn.vue +4 -4
- package/components/Button/ScrollButtons.vue +2 -2
- package/components/Complex/ContentBlock.vue +1 -1
- package/components/Complex/MessageBlock.vue +26 -0
- package/components/Complex/Page.vue +8 -2
- package/components/Complex/WhiteBlock.vue +7 -0
- package/components/Dialog/Dialog.vue +9 -39
- package/components/Dialog/FamilyDialog.vue +10 -7
- package/components/Form/FormBlock.vue +91 -45
- package/components/Form/FormSection.vue +5 -2
- package/components/Form/FormTextSection.vue +3 -3
- package/components/Form/FormToggle.vue +4 -5
- package/components/Form/ManagerAttachment.vue +210 -0
- package/components/Form/ProductConditionsBlock.vue +70 -16
- package/components/Input/Datepicker.vue +45 -0
- package/components/Input/EmptyFormField.vue +1 -1
- package/components/Input/FileInput.vue +2 -3
- package/components/Input/FormInput.vue +31 -7
- package/components/Input/PanelInput.vue +7 -2
- package/components/Input/RoundedEmptyField.vue +5 -0
- package/components/Input/RoundedInput.vue +2 -2
- package/components/Input/RoundedSelect.vue +150 -0
- package/components/Layout/Drawer.vue +5 -2
- package/components/Layout/Header.vue +41 -5
- package/components/Layout/Loader.vue +1 -1
- package/components/Layout/SettingsPanel.vue +47 -13
- package/components/List/ListEmpty.vue +1 -1
- package/components/Menu/MenuHover.vue +30 -0
- package/components/Menu/MenuNav.vue +30 -14
- package/components/Menu/MenuNavItem.vue +10 -7
- package/components/Pages/Anketa.vue +68 -47
- package/components/Pages/Auth.vue +139 -46
- package/components/Pages/ContragentForm.vue +505 -0
- package/components/Pages/Documents.vue +11 -11
- package/components/Pages/InvoiceInfo.vue +30 -0
- package/components/Pages/MemberForm.vue +574 -316
- package/components/Pages/ProductAgreement.vue +2 -2
- package/components/Pages/ProductConditions.vue +671 -78
- package/components/Panel/PanelHandler.vue +309 -0
- package/components/Panel/PanelSelectItem.vue +3 -3
- package/components/Transitions/SlideTransition.vue +5 -0
- package/components/Utilities/Chip.vue +27 -0
- package/components/Utilities/IconBorder.vue +17 -0
- package/components/Utilities/JsonViewer.vue +27 -0
- package/composables/axios.ts +2 -2
- package/composables/classes.ts +227 -107
- package/composables/constants.ts +31 -51
- package/composables/index.ts +106 -2
- package/composables/styles.ts +33 -11
- package/configs/i18n.ts +15 -0
- package/layouts/default.vue +11 -8
- package/layouts/full.vue +1 -1
- package/locales/ru.json +647 -0
- package/nuxt.config.ts +14 -2
- package/package.json +35 -12
- package/pages/500.vue +4 -4
- package/pages/Token.vue +52 -0
- package/plugins/helperFunctionsPlugins.ts +11 -6
- package/plugins/storePlugin.ts +0 -1
- package/plugins/vuetifyPlugin.ts +8 -1
- package/store/data.store.ts +2666 -0
- package/store/form.store.ts +1 -1
- package/store/member.store.ts +164 -52
- package/store/rules.ts +193 -0
- package/types/enum.ts +83 -0
- package/types/env.d.ts +10 -0
- package/types/index.ts +279 -8
- package/components/Button/BtnIcon.vue +0 -47
- package/store/data.store.js +0 -2482
- package/store/messages.ts +0 -429
- package/store/rules.js +0 -153
package/composables/constants.ts
CHANGED
|
@@ -1,65 +1,45 @@
|
|
|
1
|
+
import { Actions, PostActions, Roles, Statuses } from '../types/enum';
|
|
2
|
+
|
|
1
3
|
export const constants = Object.freeze({
|
|
2
4
|
products: {
|
|
3
|
-
pensionannuity: 1,
|
|
4
5
|
baiterek: 3,
|
|
5
6
|
halykmycar: 5,
|
|
6
7
|
lifetrip: 7,
|
|
7
8
|
bolashak: 8,
|
|
8
9
|
liferenta: 9,
|
|
9
10
|
gons: 10,
|
|
11
|
+
halykkazyna: 11,
|
|
12
|
+
lifebusiness: 14,
|
|
10
13
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
|
|
15
|
-
types: {
|
|
16
|
-
string: 'string',
|
|
17
|
-
array: 'object',
|
|
18
|
-
object: 'object',
|
|
19
|
-
},
|
|
20
|
-
roles: {
|
|
21
|
-
manager: 'Manager',
|
|
22
|
-
admin: 'Admin',
|
|
23
|
-
underwriter: 'Underwriter',
|
|
24
|
-
agent: 'Agent',
|
|
25
|
-
compliance: 'Compliance',
|
|
26
|
-
agentMycar: 'AgentMycar',
|
|
27
|
-
analyst: 'Analyst',
|
|
28
|
-
upk: 'UPK',
|
|
29
|
-
financeCenter: 'FinanceCenter',
|
|
30
|
-
supervisor: 'Supervisor',
|
|
31
|
-
support: 'Support',
|
|
32
|
-
managerHalykBank: 'ManagerHalykBank',
|
|
33
|
-
serviceManager: 'ServiceManager',
|
|
34
|
-
},
|
|
35
|
-
actions: {
|
|
36
|
-
accept: 'accept',
|
|
37
|
-
rejectclient: 'rejectclient',
|
|
38
|
-
reject: 'reject',
|
|
39
|
-
return: 'return',
|
|
40
|
-
claim: 'claim',
|
|
41
|
-
signed: 'signed',
|
|
42
|
-
payed: 'payed',
|
|
14
|
+
amlProducts: {
|
|
15
|
+
checkcontragent: 1,
|
|
16
|
+
checkcontract: 2,
|
|
43
17
|
},
|
|
18
|
+
editableStatuses: [Statuses.StartForm, Statuses.EditBeneficiaryForm, Statuses.EditForm],
|
|
19
|
+
documentsLinkVisibleStatuses: [
|
|
20
|
+
Statuses.DocumentsSignedFrom,
|
|
21
|
+
Statuses.UnderwriterForm,
|
|
22
|
+
Statuses.AffilationResolutionForm,
|
|
23
|
+
Statuses.Completed,
|
|
24
|
+
Statuses.InsurancePremiumOnlinePaid,
|
|
25
|
+
],
|
|
26
|
+
returnStatementStatuses: [Statuses.DocumentsSignedFrom, Statuses.ContractSignedFrom, Statuses.WaitingInsurancePremiumForm, Statuses.UnderwriterForm],
|
|
27
|
+
cancelApplicationStatuses: [
|
|
28
|
+
Statuses.StartForm,
|
|
29
|
+
Statuses.EditForm,
|
|
30
|
+
Statuses.EditBeneficiaryForm,
|
|
31
|
+
Statuses.WaitingInsurancePremiumForm,
|
|
32
|
+
Statuses.DocumentsSignedFrom,
|
|
33
|
+
Statuses.ContractSignedFrom,
|
|
34
|
+
],
|
|
35
|
+
gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
|
|
36
|
+
roles: Roles,
|
|
37
|
+
actions: Actions,
|
|
38
|
+
postActions: PostActions,
|
|
44
39
|
yearCases: [2, 0, 1, 1, 1, 2],
|
|
45
40
|
yearTitles: ['год', 'года', 'лет'],
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return: 'return',
|
|
50
|
-
reject: 'reject',
|
|
51
|
-
rejectclient: 'rejectclient',
|
|
52
|
-
},
|
|
53
|
-
postActions: {
|
|
54
|
-
font: 'font',
|
|
55
|
-
route: 'route',
|
|
56
|
-
applicationCreated: 'applicationCreated',
|
|
57
|
-
clipboard: 'clipboard',
|
|
58
|
-
toHomePage: 'toHomePage',
|
|
59
|
-
toStatementHistory: 'toStatementHistory',
|
|
60
|
-
toAuth: 'toAuth',
|
|
61
|
-
DOMevent: 'DOMevent',
|
|
62
|
-
Error401: 'Error401',
|
|
63
|
-
Error500: 'Error500',
|
|
41
|
+
currencySymbols: {
|
|
42
|
+
kzt: '₸',
|
|
43
|
+
usd: '$',
|
|
64
44
|
},
|
|
65
45
|
});
|
package/composables/index.ts
CHANGED
|
@@ -3,6 +3,25 @@ import jwt_decode from 'jwt-decode';
|
|
|
3
3
|
import { XMLParser } from 'fast-xml-parser';
|
|
4
4
|
import { AxiosError } from 'axios';
|
|
5
5
|
|
|
6
|
+
export const getBaseCredentials = () => {
|
|
7
|
+
return {
|
|
8
|
+
production: { login: '', password: '' },
|
|
9
|
+
test: { login: '', password: '' },
|
|
10
|
+
development: { login: 'manager', password: 'asdqwe123' },
|
|
11
|
+
vercel: { login: '', password: 'asdqwe123' },
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const useEnv = () => {
|
|
16
|
+
return {
|
|
17
|
+
envMode: import.meta.env.VITE_MODE,
|
|
18
|
+
isDev: import.meta.env.VITE_MODE === 'development',
|
|
19
|
+
isTest: import.meta.env.VITE_MODE === 'test',
|
|
20
|
+
isVercel: import.meta.env.VITE_MODE === 'vercel',
|
|
21
|
+
isProduction: import.meta.env.VITE_MODE === 'production',
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
6
25
|
export class Masks {
|
|
7
26
|
numbers: string = '#*';
|
|
8
27
|
otp: string = '# # # #';
|
|
@@ -141,10 +160,11 @@ export const parseXML = (xml: boolean | string = true, withTag = false, tag: str
|
|
|
141
160
|
};
|
|
142
161
|
|
|
143
162
|
export const ESBDMessage = (ESBDObject: any, initialPoint: any) => {
|
|
163
|
+
return ESBDObject.errorMsg;
|
|
144
164
|
let result;
|
|
145
165
|
if (ESBDObject.errorCode === 2) {
|
|
146
166
|
if (ESBDObject.errorMsg.indexOf('EMSG') === -1) {
|
|
147
|
-
result = '
|
|
167
|
+
result = 'Контрагент не является резидентом РК!';
|
|
148
168
|
} else {
|
|
149
169
|
result = ESBDObject.errorMsg.substring(ESBDObject.errorMsg.indexOf('EMSG') + 6, ESBDObject.errorMsg.lastIndexOf('EWS-100')).replace(initialPoint, '');
|
|
150
170
|
}
|
|
@@ -165,8 +185,92 @@ export const ErrorHandler = (err: unknown, errorText?: string) => {
|
|
|
165
185
|
console.log(err);
|
|
166
186
|
if (err instanceof AxiosError) {
|
|
167
187
|
if ('response' in err && err.response && err.response.data) {
|
|
168
|
-
|
|
188
|
+
if ('status' in err.response && err.response.status === 403) {
|
|
189
|
+
useDataStore().showToaster('error', useDataStore().t('toaster.noPermission'), 10000);
|
|
190
|
+
} else if (err.response.data) {
|
|
191
|
+
useDataStore().showToaster('error', errorText ? errorText : err.response.data, 10000);
|
|
192
|
+
}
|
|
169
193
|
}
|
|
170
194
|
}
|
|
171
195
|
return false;
|
|
172
196
|
};
|
|
197
|
+
|
|
198
|
+
export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean) => {
|
|
199
|
+
const formStore = useFormStore();
|
|
200
|
+
const dataStore = useDataStore();
|
|
201
|
+
const beneficiary = formStore.beneficiaryForm[Number(whichIndex)];
|
|
202
|
+
const policyholder = formStore.policyholderForm;
|
|
203
|
+
if (sameAddress === true) {
|
|
204
|
+
beneficiary.registrationCity = policyholder.registrationCity;
|
|
205
|
+
beneficiary.registrationCountry = policyholder.registrationCountry;
|
|
206
|
+
beneficiary.birthPlace = policyholder.birthPlace;
|
|
207
|
+
beneficiary.registrationMicroDistrict = policyholder.registrationMicroDistrict;
|
|
208
|
+
beneficiary.registrationNumberApartment = policyholder.registrationNumberApartment;
|
|
209
|
+
beneficiary.registrationNumberApartment = policyholder.registrationNumberApartment;
|
|
210
|
+
beneficiary.registrationNumberHouse = policyholder.registrationNumberHouse;
|
|
211
|
+
beneficiary.registrationProvince = policyholder.registrationProvince;
|
|
212
|
+
beneficiary.registrationQuarter = policyholder.registrationQuarter;
|
|
213
|
+
beneficiary.registrationRegion = policyholder.registrationRegion;
|
|
214
|
+
beneficiary.registrationRegionType = policyholder.registrationRegionType;
|
|
215
|
+
beneficiary.registrationStreet = policyholder.registrationStreet;
|
|
216
|
+
} else {
|
|
217
|
+
if (beneficiary.id === 0) {
|
|
218
|
+
beneficiary.registrationCity = new Value();
|
|
219
|
+
beneficiary.registrationCountry = new Value();
|
|
220
|
+
beneficiary.registrationMicroDistrict = '';
|
|
221
|
+
beneficiary.registrationNumberApartment = '';
|
|
222
|
+
beneficiary.registrationNumberApartment = '';
|
|
223
|
+
beneficiary.registrationNumberHouse = '';
|
|
224
|
+
beneficiary.registrationProvince = new Value();
|
|
225
|
+
beneficiary.registrationQuarter = '';
|
|
226
|
+
beneficiary.registrationRegion = new Value();
|
|
227
|
+
beneficiary.registrationRegionType = new Value();
|
|
228
|
+
beneficiary.registrationStreet = '';
|
|
229
|
+
} else {
|
|
230
|
+
if (beneficiary.response && beneficiary.response.addresses && beneficiary.response.addresses.length) {
|
|
231
|
+
const benAddress = beneficiary.response.addresses;
|
|
232
|
+
const countryName = benAddress[0].countryName;
|
|
233
|
+
const cityName = benAddress[0].cityName;
|
|
234
|
+
if (countryName) {
|
|
235
|
+
const country = dataStore.countries.find(i => (i.nameRu as string).match(new RegExp(countryName, 'i')));
|
|
236
|
+
beneficiary.registrationCountry = country ?? new Value();
|
|
237
|
+
}
|
|
238
|
+
if (cityName) {
|
|
239
|
+
const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
|
|
240
|
+
beneficiary.registrationCity = city ?? new Value();
|
|
241
|
+
}
|
|
242
|
+
const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
|
|
243
|
+
const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
|
|
244
|
+
const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
|
|
245
|
+
beneficiary.registrationMicroDistrict = beneficiary.response?.addresses[0].microRaion ?? '';
|
|
246
|
+
beneficiary.registrationNumberApartment = beneficiary.response?.addresses[0].apartmentNumber ?? '';
|
|
247
|
+
beneficiary.registrationNumberHouse = beneficiary.response?.addresses[0].blockNumber ?? '';
|
|
248
|
+
beneficiary.registrationProvince = province ?? new Value();
|
|
249
|
+
beneficiary.registrationQuarter = beneficiary.response?.addresses[0].kvartal ?? '';
|
|
250
|
+
beneficiary.registrationRegion = region ?? new Value();
|
|
251
|
+
beneficiary.registrationRegionType = localityType ?? new Value();
|
|
252
|
+
beneficiary.registrationStreet = beneficiary.response?.addresses[0].streetName ?? '';
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
export const changeBridge = async (toBridge: 'efo' | 'lka', token: string) => {
|
|
259
|
+
const bridgeUrl = import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string;
|
|
260
|
+
if (!toBridge) return;
|
|
261
|
+
if (!bridgeUrl || !token) {
|
|
262
|
+
useDataStore().showToaster('error', `${useDataStore().t('toaster.noUrl')} [import.meta.env.VITE_${toBridge.toUpperCase()}_URL]`);
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
window.open(`${bridgeUrl}/#/Token?token=${token}`, '_blank');
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
export const getFirstDayOfMonth = (year: number, month: number) => {
|
|
269
|
+
const date = new Date();
|
|
270
|
+
return new Date(year, month, 1, (date.getTimezoneOffset() / 60) * -1).toISOString();
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
export const getLastDayOfMonth = (year: number, month: number) => {
|
|
274
|
+
const date = new Date();
|
|
275
|
+
return new Date(year, month + 1, 0, (date.getTimezoneOffset() / 60) * -1).toISOString();
|
|
276
|
+
};
|
package/composables/styles.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export class Styles {
|
|
2
2
|
// Base
|
|
3
|
-
whiteBg: string = 'bg-
|
|
4
|
-
whiteText: string = 'text-
|
|
5
|
-
blackText: string = 'text-
|
|
3
|
+
whiteBg: string = 'bg-[#FFF]';
|
|
4
|
+
whiteText: string = '!text-[#FFF]';
|
|
5
|
+
blackText: string = '!text-[#000]';
|
|
6
6
|
bodyBg: string = '!bg-[#F5F5F5]';
|
|
7
7
|
|
|
8
8
|
whiteTextHover: string = 'hover:text-[#FFFFFF]';
|
|
@@ -11,38 +11,50 @@ export class Styles {
|
|
|
11
11
|
blueBgHover: string = 'hover:bg-[#96abd6]';
|
|
12
12
|
blueBgLight: string = 'bg-[#F3F6FC]';
|
|
13
13
|
blueBgLightHover: string = 'hover:bg-[#f5f8fd]';
|
|
14
|
-
blueText: string = 'text-[#A0B3D8]';
|
|
14
|
+
blueText: string = '!text-[#A0B3D8]';
|
|
15
15
|
blueTextLight: string = 'text-[#F3F6FC]';
|
|
16
16
|
|
|
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
|
-
yellowText: string = 'text-[#FAB31C]';
|
|
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]';
|
|
29
|
-
greyText: string = 'text-[#B8B8B8]';
|
|
32
|
+
greyText: string = '!text-[#B8B8B8]';
|
|
30
33
|
greyTextLight: string = 'text-[#B8B8B8]';
|
|
31
34
|
greyIcon: string = 'text-[#DADADA]';
|
|
32
35
|
greyIconBg: string = 'bg-[#DADADA]';
|
|
33
36
|
greyBtnBg: string = 'bg-[#EEE6E6]';
|
|
34
37
|
greyBtnDisabledBg: string = 'bg-[#919191]';
|
|
35
38
|
blueLightBgHover: string = 'hover:bg-[#F3F6FC]';
|
|
39
|
+
greyTextDark: string = 'text-[#9197A1]';
|
|
40
|
+
|
|
36
41
|
// Red
|
|
37
|
-
redText: string = 'text-[#
|
|
42
|
+
redText: string = '!text-[#FD2D39]';
|
|
38
43
|
redBg: string = 'bg-[#FF897D]';
|
|
39
44
|
redBgHover: string = 'hover:bg-[#ff9b91]';
|
|
40
45
|
// Error
|
|
41
46
|
errorBg: string = 'bg-[#FF5449]';
|
|
42
|
-
errorText: string = 'text-[#FF5449]';
|
|
47
|
+
errorText: string = '!text-[#FF5449]';
|
|
43
48
|
|
|
44
49
|
// Border
|
|
45
50
|
rounded: string = 'rounded-[8px]';
|
|
51
|
+
roundedT: string = 'rounded-t-[8px]';
|
|
52
|
+
roundedB: string = 'rounded-b-[8px]';
|
|
53
|
+
blueBorder: string = 'border-[1px] border-[#A0B3D8]';
|
|
54
|
+
blueLightBorder: string = 'border-[1px] border-[#F3F6FC]';
|
|
55
|
+
greenBorder: string = 'border-[1px] border-[#009C73]';
|
|
56
|
+
redBorder: string = 'border-[1px] border-[#FD2D39]';
|
|
57
|
+
yellowBorder: string = 'border-[1px] border-[#FAB31C]';
|
|
46
58
|
|
|
47
59
|
// Text
|
|
48
60
|
textSimple: string = 'text-[14px] leading-5';
|
|
@@ -56,24 +68,32 @@ export class Styles {
|
|
|
56
68
|
greenBtn: string;
|
|
57
69
|
blueBtn: string;
|
|
58
70
|
redBtn: string;
|
|
71
|
+
yellowBtn: string;
|
|
59
72
|
whiteBtn: string;
|
|
73
|
+
whiteBtnBlueBr: string;
|
|
60
74
|
blueLightBtn: string;
|
|
75
|
+
greenLightBtn: string;
|
|
61
76
|
|
|
62
77
|
// Complex
|
|
63
78
|
flexColNav: string;
|
|
64
79
|
emptyBlockCol: string;
|
|
65
80
|
scrollPage: string;
|
|
81
|
+
flexCenter: string = 'flex items-center justify-center';
|
|
66
82
|
|
|
67
83
|
// Muted or disabled
|
|
68
|
-
mutedText: string = 'text-[#99A3B3]';
|
|
84
|
+
mutedText: string = '!text-[#99A3B3]';
|
|
85
|
+
disabled: string = 'cursor-not-allowed opacity-50';
|
|
69
86
|
|
|
70
87
|
constructor() {
|
|
71
88
|
// Button
|
|
72
89
|
this.greenBtn = `${this.greenBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgHover}`;
|
|
73
90
|
this.redBtn = `${this.redBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.redBgHover}`;
|
|
91
|
+
this.yellowBtn = `${this.yellowBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.yellowBgHover}`;
|
|
74
92
|
this.blueBtn = `${this.blueBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgHover}`;
|
|
93
|
+
this.whiteBtnBlueBr = `${this.whiteBg} ${this.blueText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover} ${this.blueBorder}`;
|
|
75
94
|
this.whiteBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover}`;
|
|
76
95
|
this.blueLightBtn = `${this.blueBgLight} ${this.greyTextLight} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover}`;
|
|
96
|
+
this.greenLightBtn = `${this.greenBgLight} ${this.greenText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgLightHover}`;
|
|
77
97
|
|
|
78
98
|
// Complex
|
|
79
99
|
this.flexColNav = 'flex flex-col gap-[10px] px-2 pt-[14px]';
|
|
@@ -81,3 +101,5 @@ export class Styles {
|
|
|
81
101
|
this.scrollPage = 'max-h-[90vh] overflow-y-scroll';
|
|
82
102
|
}
|
|
83
103
|
}
|
|
104
|
+
|
|
105
|
+
export const useStyles = () => new Styles();
|
package/configs/i18n.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createI18n } from 'vue-i18n';
|
|
2
|
+
import ru from '../locales/ru.json';
|
|
3
|
+
|
|
4
|
+
const instance = createI18n({
|
|
5
|
+
legacy: false,
|
|
6
|
+
globalInjection: true,
|
|
7
|
+
locale: 'ru',
|
|
8
|
+
messages: {
|
|
9
|
+
ru,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export default instance;
|
|
14
|
+
|
|
15
|
+
export const i18n = instance.global;
|
package/layouts/default.vue
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="h-full z-[1]" :class="[$dataStore.hasLayoutMargins ? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl' : '']">
|
|
3
|
-
<div :class="[$
|
|
4
|
-
<section class="flex h-full" :class="$
|
|
3
|
+
<div :class="[$styles.greenBg]" class="hidden z-[-1] lg:block absolute left-0 top-0 h-[200px] w-full"></div>
|
|
4
|
+
<section class="flex h-full" :class="$styles.blueBgLight">
|
|
5
5
|
<base-menu-nav
|
|
6
6
|
v-if="$dataStore.showNav"
|
|
7
7
|
:selected="$dataStore.menu.selectedItem"
|
|
8
8
|
:title="$dataStore.menu.title ?? 'Страховые продукты'"
|
|
9
9
|
:has-back="$dataStore.menu.hasBack ?? false"
|
|
10
10
|
:back-icon="$dataStore.menu.backIcon ?? 'mdi-arrow-left'"
|
|
11
|
+
:more-icon="$dataStore.menu.moreIcon ?? 'mdi-cog-outline'"
|
|
11
12
|
:has-more="'hasMore' in $route.meta && $route.meta.hasMore ? !!$route.meta.hasMore : false"
|
|
12
|
-
:hide-more-on-lg="true"
|
|
13
13
|
:class="{
|
|
14
14
|
// @ts-ignore
|
|
15
15
|
'!hidden': !$display().lgAndUp.value && !!$dataStore.menu.selectedItem.title,
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
@onLink="onLink"
|
|
20
20
|
>
|
|
21
21
|
<template #end>
|
|
22
|
-
<base-loader v-if="$dataStore.menu.loading" class="self-center m-5 opacity-70"
|
|
22
|
+
<base-loader v-if="$dataStore.menu.loading" class="self-center m-5 opacity-70" />
|
|
23
23
|
</template>
|
|
24
24
|
</base-menu-nav>
|
|
25
|
-
<slot
|
|
26
|
-
<base-settings-panel
|
|
25
|
+
<slot></slot>
|
|
26
|
+
<base-settings-panel />
|
|
27
27
|
</section>
|
|
28
28
|
</div>
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script setup lang="ts">
|
|
32
|
-
import { MenuItem } from '
|
|
32
|
+
import { MenuItem } from '../composables/classes';
|
|
33
33
|
const dataStore = useDataStore();
|
|
34
34
|
|
|
35
35
|
const openSettings = async () => {
|
|
@@ -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) => {
|
|
@@ -72,4 +72,7 @@ label .v-label .v-field-label,
|
|
|
72
72
|
/* line-height: v-bind('dataStore.fontSize*1 + "px"') !important; */
|
|
73
73
|
padding-bottom: 3px;
|
|
74
74
|
}
|
|
75
|
+
.v-card {
|
|
76
|
+
border-radius: 8px !important;
|
|
77
|
+
}
|
|
75
78
|
</style>
|
package/layouts/full.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="h-full z-[1]" :class="[$dataStore.hasLayoutMargins ? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl' : '']">
|
|
3
|
-
<div :class="[$
|
|
3
|
+
<div :class="[$styles.greenBg]" class="hidden lg:block absolute z-[-1] left-0 top-0 h-[200px] w-full"></div>
|
|
4
4
|
<slot></slot>
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|