hl-core 0.0.7 → 0.0.8-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/.prettierrc +2 -1
- package/api/index.ts +562 -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 +139 -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/ManagerAttachment.vue +196 -0
- package/components/Form/ProductConditionsBlock.vue +72 -0
- package/components/Input/Datepicker.vue +41 -0
- package/components/Input/EmptyFormField.vue +5 -0
- package/components/Input/FileInput.vue +71 -0
- package/components/Input/FormInput.vue +183 -0
- package/components/Input/PanelInput.vue +133 -0
- package/components/Input/RoundedInput.vue +143 -0
- package/components/Layout/Drawer.vue +45 -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 +341 -0
- package/components/Pages/Auth.vue +91 -0
- package/components/Pages/Documents.vue +108 -0
- package/components/Pages/MemberForm.vue +1229 -0
- package/components/Pages/ProductAgreement.vue +18 -0
- package/components/Pages/ProductConditions.vue +659 -0
- package/components/Panel/PanelHandler.vue +233 -0
- package/components/Panel/PanelItem.vue +5 -0
- package/components/Panel/PanelSelectItem.vue +20 -0
- package/components/Transitions/FadeTransition.vue +5 -0
- package/components/Transitions/SlideTransition.vue +5 -0
- package/composables/axios.ts +11 -0
- package/composables/classes.ts +1179 -0
- package/composables/constants.ts +71 -0
- package/composables/index.ts +168 -2
- package/composables/styles.ts +48 -8
- package/configs/i18n.ts +19 -0
- package/layouts/clear.vue +3 -0
- package/layouts/default.vue +75 -0
- package/layouts/full.vue +6 -0
- package/locales/en.json +403 -0
- package/locales/kz.json +403 -0
- package/locales/ru.json +403 -0
- package/nuxt.config.ts +39 -5
- package/package.json +28 -10
- package/pages/500.vue +85 -0
- package/plugins/helperFunctionsPlugins.ts +19 -2
- package/plugins/storePlugin.ts +5 -7
- package/plugins/vuetifyPlugin.ts +15 -0
- package/store/data.store.js +2291 -8
- package/store/form.store.ts +8 -0
- package/store/member.store.ts +381 -0
- package/store/rules.js +52 -39
- package/tailwind.config.js +10 -0
- package/types/index.ts +317 -0
- package/app.vue +0 -3
- package/components/Button/GreenBtn.vue +0 -33
- package/store/app.store.js +0 -12
- package/store/messages.ts +0 -310
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export const constants = Object.freeze({
|
|
2
|
+
products: {
|
|
3
|
+
pensionannuity: 1,
|
|
4
|
+
baiterek: 3,
|
|
5
|
+
halykmycar: 5,
|
|
6
|
+
lifetrip: 7,
|
|
7
|
+
bolashak: 8,
|
|
8
|
+
liferenta: 9,
|
|
9
|
+
gons: 10,
|
|
10
|
+
halykkazyna: 11,
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
|
|
14
|
+
documentsLinkVisibleStatuses: ['DocumentsSignedFrom', 'UnderwriterForm', 'AffilationResolutionForm', 'Completed', 'InsurancePremiumOnlinePaid'],
|
|
15
|
+
gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
|
|
16
|
+
types: {
|
|
17
|
+
string: 'string',
|
|
18
|
+
array: 'object',
|
|
19
|
+
object: 'object',
|
|
20
|
+
},
|
|
21
|
+
roles: {
|
|
22
|
+
manager: 'Manager',
|
|
23
|
+
admin: 'Admin',
|
|
24
|
+
underwriter: 'Underwriter',
|
|
25
|
+
agent: 'Agent',
|
|
26
|
+
compliance: 'Compliance',
|
|
27
|
+
agentMycar: 'AgentMycar',
|
|
28
|
+
analyst: 'Analyst',
|
|
29
|
+
upk: 'UPK',
|
|
30
|
+
finCenter: 'FinCenter',
|
|
31
|
+
supervisor: 'Supervisor',
|
|
32
|
+
support: 'Support',
|
|
33
|
+
managerHalykBank: 'ManagerHalykBank',
|
|
34
|
+
serviceManager: 'ServiceManager',
|
|
35
|
+
drn: 'DRNSJ',
|
|
36
|
+
},
|
|
37
|
+
actions: {
|
|
38
|
+
accept: 'accept',
|
|
39
|
+
rejectclient: 'rejectclient',
|
|
40
|
+
reject: 'reject',
|
|
41
|
+
return: 'return',
|
|
42
|
+
claim: 'claim',
|
|
43
|
+
sign: 'sign',
|
|
44
|
+
pay: 'pay',
|
|
45
|
+
},
|
|
46
|
+
yearCases: [2, 0, 1, 1, 1, 2],
|
|
47
|
+
yearTitles: ['год', 'года', 'лет'],
|
|
48
|
+
panelActions: {
|
|
49
|
+
accept: 'accept',
|
|
50
|
+
claim: 'claim',
|
|
51
|
+
return: 'return',
|
|
52
|
+
reject: 'reject',
|
|
53
|
+
rejectclient: 'rejectclient',
|
|
54
|
+
},
|
|
55
|
+
postActions: {
|
|
56
|
+
font: 'font',
|
|
57
|
+
route: 'route',
|
|
58
|
+
applicationCreated: 'applicationCreated',
|
|
59
|
+
clipboard: 'clipboard',
|
|
60
|
+
toHomePage: 'toHomePage',
|
|
61
|
+
toStatementHistory: 'toStatementHistory',
|
|
62
|
+
toAuth: 'toAuth',
|
|
63
|
+
DOMevent: 'DOMevent',
|
|
64
|
+
Error401: 'Error401',
|
|
65
|
+
Error500: 'Error500',
|
|
66
|
+
},
|
|
67
|
+
currencySymbols: {
|
|
68
|
+
kzt: '₸',
|
|
69
|
+
usd: '$',
|
|
70
|
+
},
|
|
71
|
+
});
|
package/composables/index.ts
CHANGED
|
@@ -1,6 +1,172 @@
|
|
|
1
1
|
import { useDisplay } from 'vuetify';
|
|
2
|
+
import jwt_decode from 'jwt-decode';
|
|
3
|
+
import { XMLParser } from 'fast-xml-parser';
|
|
4
|
+
import { AxiosError } from 'axios';
|
|
5
|
+
|
|
6
|
+
export class Masks {
|
|
7
|
+
numbers: string = '#*';
|
|
8
|
+
otp: string = '# # # #';
|
|
9
|
+
iin: string = '###-###-###-###';
|
|
10
|
+
phone: string = '+7 (7##) ### ## ##';
|
|
11
|
+
date: string = '##.##.####';
|
|
12
|
+
post: string = '######';
|
|
13
|
+
threeDigit: string = '###';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const useMask = () => new Masks();
|
|
2
17
|
|
|
3
18
|
export const useDisplayInfo = useDisplay;
|
|
4
19
|
|
|
5
|
-
export const capitalize = (word: string): string =>
|
|
6
|
-
|
|
20
|
+
export const capitalize = (word: string): string => (word ? word.charAt(0).toUpperCase() + word.slice(1).toLowerCase() : word);
|
|
21
|
+
|
|
22
|
+
const xmlParser = new XMLParser({
|
|
23
|
+
numberParseOptions: {
|
|
24
|
+
hex: false,
|
|
25
|
+
leadingZeros: true,
|
|
26
|
+
skipLike: /[0-9]+/,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const getNumber = (number: string) => {
|
|
31
|
+
return number ? Number(number.replace(/\s/g, '')) : null;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const formatDate = (date: string) => {
|
|
35
|
+
if (date) {
|
|
36
|
+
const data = date.split('.');
|
|
37
|
+
const day = data[0];
|
|
38
|
+
const month = data[1];
|
|
39
|
+
const year = data[2];
|
|
40
|
+
return new Date(`${year}-${month}-${day}`);
|
|
41
|
+
} else {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const reformatDate = (date: string) => {
|
|
47
|
+
if (date) {
|
|
48
|
+
const data = new Date(date);
|
|
49
|
+
let day: string | number = data.getDate();
|
|
50
|
+
let month: string | number = data.getMonth() + 1;
|
|
51
|
+
if (month < 10) {
|
|
52
|
+
month = '0' + month;
|
|
53
|
+
}
|
|
54
|
+
if (day < 10) {
|
|
55
|
+
day = '0' + day;
|
|
56
|
+
}
|
|
57
|
+
const year = data.getFullYear();
|
|
58
|
+
return `${day}.${month}.${year}`;
|
|
59
|
+
} else {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const reformatIin = (iin: string) => {
|
|
65
|
+
if (!!iin) {
|
|
66
|
+
const matched = iin.match(/.{1,3}/g);
|
|
67
|
+
return matched ? matched.join('-') : '';
|
|
68
|
+
} else {
|
|
69
|
+
return '';
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export const formatPhone = (phone: string) => {
|
|
74
|
+
return phone?.replace(/(\(|\)|\+| )/g, '');
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const jwtDecode = (token: string): any => {
|
|
78
|
+
if (token) return jwt_decode(token);
|
|
79
|
+
else return null;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const isValidToken = (token: string) => {
|
|
83
|
+
return (new Date(jwtDecode(token).exp * 1000).getTime() - Date.now()) / 1000 > 0;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const isValidGUID = (value: string) => {
|
|
87
|
+
return !!value && value.length > 0 && /^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$/.test(value);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const getKeyWithPattern = (obj: any, key: string) => {
|
|
91
|
+
return Object.keys(obj).find(i => i.match(new RegExp(key, 'i'))) || null;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const getAgeByBirthDate = (rawDate: string) => {
|
|
95
|
+
const age = Math.abs(new Date(Date.now() - new Date(rawDate).getTime()).getUTCFullYear() - 1970);
|
|
96
|
+
if (new Date(rawDate) < new Date(Date.now()) && age >= 0) {
|
|
97
|
+
return age;
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export const getFullNameShorted = (text: string | null, fromWhichWord: number = 1) => {
|
|
102
|
+
if (text) {
|
|
103
|
+
const names = text.split(' ');
|
|
104
|
+
if (names.length > 1) {
|
|
105
|
+
let fullName = '';
|
|
106
|
+
names.forEach((name, index) => {
|
|
107
|
+
if (index >= fromWhichWord) fullName += ` ${name.charAt(0)}.`;
|
|
108
|
+
else fullName += `${name} `;
|
|
109
|
+
});
|
|
110
|
+
return fullName;
|
|
111
|
+
}
|
|
112
|
+
return text;
|
|
113
|
+
} else {
|
|
114
|
+
return '';
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export const parseProcents = (val: string | number) => (val ? Number(((val as number) * 100).toFixed(0)) : val);
|
|
119
|
+
|
|
120
|
+
export const formatProcents = (val: string | number) => (val ? Number(((val as number) / 100).toFixed(2)) : Number(val));
|
|
121
|
+
|
|
122
|
+
export const sanitizeURL = (text: string) => (text ? text.replace(/\r?\n|\r|\\|"/g, '') : '');
|
|
123
|
+
|
|
124
|
+
export const yearEnding = (number: number, titles: string[], cases: number[]) => {
|
|
125
|
+
return titles[number % 100 > 4 && number % 100 < 20 ? 2 : cases[number % 10 < 5 ? number % 10 : 5]];
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export const parseXML = (xml: boolean | string = true, withTag = false, tag: string | null = null) => {
|
|
129
|
+
if (xml) {
|
|
130
|
+
const localXml = xml as string;
|
|
131
|
+
if (withTag && tag !== null) {
|
|
132
|
+
const DOMparser = new DOMParser();
|
|
133
|
+
const xmLSerializer = new XMLSerializer();
|
|
134
|
+
const tagDOM = DOMparser.parseFromString(localXml, 'text/xml').getElementsByTagName(tag);
|
|
135
|
+
const tagXml = xmLSerializer.serializeToString(tagDOM[0]);
|
|
136
|
+
return xmlParser.parse(tagXml);
|
|
137
|
+
} else {
|
|
138
|
+
return xmlParser.parse(localXml);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export const ESBDMessage = (ESBDObject: any, initialPoint: any) => {
|
|
144
|
+
let result;
|
|
145
|
+
if (ESBDObject.errorCode === 2) {
|
|
146
|
+
if (ESBDObject.errorMsg.indexOf('EMSG') === -1) {
|
|
147
|
+
result = 'Клиент не является резидентом РК!';
|
|
148
|
+
} else {
|
|
149
|
+
result = ESBDObject.errorMsg.substring(ESBDObject.errorMsg.indexOf('EMSG') + 6, ESBDObject.errorMsg.lastIndexOf('EWS-100')).replace(initialPoint, '');
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
if (ESBDObject.errorCode === 3) {
|
|
153
|
+
return false;
|
|
154
|
+
}
|
|
155
|
+
if (ESBDObject.errorCode === 1) {
|
|
156
|
+
result = ESBDObject.errorMsg.substring(ESBDObject.errorMsg.indexOf(initialPoint), ESBDObject.errorMsg.lastIndexOf('ECL-0001')).replace(initialPoint, '');
|
|
157
|
+
}
|
|
158
|
+
if (ESBDObject.errorCode === 4) {
|
|
159
|
+
result = ESBDObject.errorMsg;
|
|
160
|
+
}
|
|
161
|
+
return result;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export const ErrorHandler = (err: unknown, errorText?: string) => {
|
|
165
|
+
console.log(err);
|
|
166
|
+
if (err instanceof AxiosError) {
|
|
167
|
+
if ('response' in err && err.response && err.response.data) {
|
|
168
|
+
useDataStore().showToaster('error', errorText ? errorText : err.response.data, 10000);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return false;
|
|
172
|
+
};
|
package/composables/styles.ts
CHANGED
|
@@ -5,28 +5,43 @@ export class Styles {
|
|
|
5
5
|
blackText: string = 'text-black';
|
|
6
6
|
bodyBg: string = '!bg-[#F5F5F5]';
|
|
7
7
|
|
|
8
|
+
whiteTextHover: string = 'hover:text-[#FFFFFF]';
|
|
8
9
|
// Blue
|
|
9
10
|
blueBg: string = 'bg-[#A0B3D8]';
|
|
11
|
+
blueBgHover: string = 'hover:bg-[#96abd6]';
|
|
10
12
|
blueBgLight: string = 'bg-[#F3F6FC]';
|
|
13
|
+
blueBgLightHover: string = 'hover:bg-[#f5f8fd]';
|
|
11
14
|
blueText: string = 'text-[#A0B3D8]';
|
|
12
15
|
blueTextLight: string = 'text-[#F3F6FC]';
|
|
13
16
|
|
|
14
17
|
// Green
|
|
15
18
|
greenBg: string = 'bg-[#009C73]';
|
|
19
|
+
greenBgHover: string = 'hover:bg-[#00a277]';
|
|
16
20
|
greenBgLight: string = 'bg-[#009C73]';
|
|
21
|
+
greenText: string = 'text-[#009C73]';
|
|
22
|
+
greenTextHover: string = 'hover:text-[#009C73]';
|
|
23
|
+
|
|
24
|
+
// Yellow
|
|
25
|
+
yellowText: string = 'text-[#FAB31C]';
|
|
26
|
+
yellowBg: string = 'bg-[#FAB31C]';
|
|
27
|
+
yellowBgHover: string = 'hover:bg-[#FAB31C]';
|
|
17
28
|
|
|
18
29
|
// Grey
|
|
19
|
-
greyBg: string = 'bg-[#
|
|
20
|
-
greyText: string = 'text-[#
|
|
21
|
-
greyTextLight: string = 'text-[#
|
|
30
|
+
greyBg: string = 'bg-[#B8B8B8]';
|
|
31
|
+
greyText: string = 'text-[#B8B8B8]';
|
|
32
|
+
greyTextLight: string = 'text-[#B8B8B8]';
|
|
22
33
|
greyIcon: string = 'text-[#DADADA]';
|
|
23
34
|
greyIconBg: string = 'bg-[#DADADA]';
|
|
24
35
|
greyBtnBg: string = 'bg-[#EEE6E6]';
|
|
25
36
|
greyBtnDisabledBg: string = 'bg-[#919191]';
|
|
26
|
-
|
|
37
|
+
blueLightBgHover: string = 'hover:bg-[#F3F6FC]';
|
|
27
38
|
// Red
|
|
28
|
-
redText: string = 'text-[#
|
|
29
|
-
redBg: string = 'bg-[#
|
|
39
|
+
redText: string = 'text-[#FF897D]';
|
|
40
|
+
redBg: string = 'bg-[#FF897D]';
|
|
41
|
+
redBgHover: string = 'hover:bg-[#ff9b91]';
|
|
42
|
+
// Error
|
|
43
|
+
errorBg: string = 'bg-[#FF5449]';
|
|
44
|
+
errorText: string = 'text-[#FF5449]';
|
|
30
45
|
|
|
31
46
|
// Border
|
|
32
47
|
rounded: string = 'rounded-[8px]';
|
|
@@ -37,14 +52,39 @@ export class Styles {
|
|
|
37
52
|
textBold: string = 'font-bold';
|
|
38
53
|
|
|
39
54
|
// Button
|
|
55
|
+
btnHSm: string = 'h-[40px]';
|
|
40
56
|
btnHMd: string = 'h-[60px]';
|
|
41
57
|
btnHLg: string = 'h-[60px]';
|
|
58
|
+
greenBtn: string;
|
|
59
|
+
blueBtn: string;
|
|
60
|
+
redBtn: string;
|
|
61
|
+
yellowBtn: string;
|
|
62
|
+
whiteBtn: string;
|
|
63
|
+
blueLightBtn: string;
|
|
42
64
|
|
|
43
65
|
// Complex
|
|
44
|
-
|
|
66
|
+
flexColNav: string;
|
|
67
|
+
emptyBlockCol: string;
|
|
68
|
+
scrollPage: string;
|
|
69
|
+
|
|
70
|
+
// Muted or disabled
|
|
71
|
+
mutedText: string = 'text-[#99A3B3]';
|
|
72
|
+
disabled: string = 'cursor-not-allowed opacity-50';
|
|
45
73
|
|
|
46
74
|
constructor() {
|
|
75
|
+
// Button
|
|
76
|
+
this.greenBtn = `${this.greenBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgHover}`;
|
|
77
|
+
this.redBtn = `${this.redBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.redBgHover}`;
|
|
78
|
+
this.yellowBtn = `${this.yellowBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.yellowBgHover}`;
|
|
79
|
+
this.blueBtn = `${this.blueBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgHover}`;
|
|
80
|
+
this.whiteBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover}`;
|
|
81
|
+
this.blueLightBtn = `${this.blueBgLight} ${this.greyTextLight} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover}`;
|
|
82
|
+
|
|
47
83
|
// Complex
|
|
48
|
-
this.
|
|
84
|
+
this.flexColNav = 'flex flex-col gap-[10px] px-2 pt-[14px]';
|
|
85
|
+
this.emptyBlockCol = 'w-[60px] sm:w-[100px] h-[30%] rounded-[8px] bg-[#f5f5f5]';
|
|
86
|
+
this.scrollPage = 'max-h-[90vh] overflow-y-scroll';
|
|
49
87
|
}
|
|
50
88
|
}
|
|
89
|
+
|
|
90
|
+
export const useStyles = () => new Styles();
|
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;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="h-full z-[1]" :class="[$dataStore.hasLayoutMargins ? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl' : '']">
|
|
3
|
+
<div :class="[$libStyles.greenBg]" class="hidden z-[-1] lg:block absolute left-0 top-0 h-[200px] w-full"></div>
|
|
4
|
+
<section class="flex h-full" :class="$libStyles.blueBgLight">
|
|
5
|
+
<base-menu-nav
|
|
6
|
+
v-if="$dataStore.showNav"
|
|
7
|
+
:selected="$dataStore.menu.selectedItem"
|
|
8
|
+
:title="$dataStore.menu.title ?? 'Страховые продукты'"
|
|
9
|
+
:has-back="$dataStore.menu.hasBack ?? false"
|
|
10
|
+
:back-icon="$dataStore.menu.backIcon ?? 'mdi-arrow-left'"
|
|
11
|
+
:has-more="'hasMore' in $route.meta && $route.meta.hasMore ? !!$route.meta.hasMore : false"
|
|
12
|
+
:hide-more-on-lg="true"
|
|
13
|
+
:class="{
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
'!hidden': !$display().lgAndUp.value && !!$dataStore.menu.selectedItem.title,
|
|
16
|
+
}"
|
|
17
|
+
@onBack="onBack"
|
|
18
|
+
@onMore="openSettings"
|
|
19
|
+
@onLink="onLink"
|
|
20
|
+
>
|
|
21
|
+
<template #end>
|
|
22
|
+
<base-loader v-if="$dataStore.menu.loading" class="self-center m-5 opacity-70"></base-loader>
|
|
23
|
+
</template>
|
|
24
|
+
</base-menu-nav>
|
|
25
|
+
<slot> </slot>
|
|
26
|
+
<base-settings-panel></base-settings-panel>
|
|
27
|
+
</section>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script setup lang="ts">
|
|
32
|
+
import { MenuItem } from '@/composables/classes';
|
|
33
|
+
const dataStore = useDataStore();
|
|
34
|
+
|
|
35
|
+
const openSettings = async () => {
|
|
36
|
+
dataStore.settings.open = true;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
const onLink = async (item: MenuItem) => {
|
|
40
|
+
if (dataStore.menu.onLink) await dataStore.menu.onLink(item);
|
|
41
|
+
if (typeof item.disabled === 'boolean' ? !item.disabled : true) dataStore.menu.selectedItem = item;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const onBack = async (item: MenuItem) => {
|
|
45
|
+
if (dataStore.menu.onBack) await dataStore.menu.onBack(item);
|
|
46
|
+
};
|
|
47
|
+
</script>
|
|
48
|
+
<style>
|
|
49
|
+
.mainpage,
|
|
50
|
+
span,
|
|
51
|
+
header,
|
|
52
|
+
*[class='text-[14px]'],
|
|
53
|
+
.v-label,
|
|
54
|
+
.text-\[14px\] {
|
|
55
|
+
font-size: v-bind('dataStore.fontSize + "px"') !important;
|
|
56
|
+
/* line-height: v-bind('dataStore.fontSize*1.5 + "px"') !important; */
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
*[class='text-[16px]'],
|
|
60
|
+
.text-\[16px\],
|
|
61
|
+
label .v-label .v-field-label,
|
|
62
|
+
.v-field__input,
|
|
63
|
+
.v-field,
|
|
64
|
+
.v-input {
|
|
65
|
+
font-size: v-bind('dataStore.fontSize+2 + "px"') !important;
|
|
66
|
+
/* line-height: v-bind('dataStore.fontSize*2 + "px"') !important; */
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.v-input__details,
|
|
70
|
+
.v-messages__message {
|
|
71
|
+
font-size: v-bind('dataStore.fontSize*0.8 + "px"') !important;
|
|
72
|
+
/* line-height: v-bind('dataStore.fontSize*1 + "px"') !important; */
|
|
73
|
+
padding-bottom: 3px;
|
|
74
|
+
}
|
|
75
|
+
</style>
|
package/layouts/full.vue
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="h-full z-[1]" :class="[$dataStore.hasLayoutMargins ? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl' : '']">
|
|
3
|
+
<div :class="[$libStyles.greenBg]" class="hidden lg:block absolute z-[-1] left-0 top-0 h-[200px] w-full"></div>
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|