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
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
},
|
|
11
|
+
|
|
12
|
+
editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
|
|
13
|
+
documentsLinkVisibleStatuses: ['DocumentsSignedFrom', 'UnderwriterForm', 'AffilationResolutionForm', 'Completed', 'InsurancePremiumOnlinePaid'],
|
|
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',
|
|
43
|
+
},
|
|
44
|
+
yearCases: [2, 0, 1, 1, 1, 2],
|
|
45
|
+
yearTitles: ['год', 'года', 'лет'],
|
|
46
|
+
panelActions: {
|
|
47
|
+
accept: 'accept',
|
|
48
|
+
claim: 'claim',
|
|
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',
|
|
64
|
+
},
|
|
65
|
+
});
|
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,41 @@ 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]';
|
|
17
26
|
|
|
18
27
|
// Grey
|
|
19
|
-
greyBg: string = 'bg-[#
|
|
20
|
-
greyText: string = 'text-[#
|
|
21
|
-
greyTextLight: string = 'text-[#
|
|
28
|
+
greyBg: string = 'bg-[#B8B8B8]';
|
|
29
|
+
greyText: string = 'text-[#B8B8B8]';
|
|
30
|
+
greyTextLight: string = 'text-[#B8B8B8]';
|
|
22
31
|
greyIcon: string = 'text-[#DADADA]';
|
|
23
32
|
greyIconBg: string = 'bg-[#DADADA]';
|
|
24
33
|
greyBtnBg: string = 'bg-[#EEE6E6]';
|
|
25
34
|
greyBtnDisabledBg: string = 'bg-[#919191]';
|
|
26
|
-
|
|
35
|
+
blueLightBgHover: string = 'hover:bg-[#F3F6FC]';
|
|
27
36
|
// Red
|
|
28
|
-
redText: string = 'text-[#
|
|
29
|
-
redBg: string = 'bg-[#
|
|
37
|
+
redText: string = 'text-[#FF897D]';
|
|
38
|
+
redBg: string = 'bg-[#FF897D]';
|
|
39
|
+
redBgHover: string = 'hover:bg-[#ff9b91]';
|
|
40
|
+
// Error
|
|
41
|
+
errorBg: string = 'bg-[#FF5449]';
|
|
42
|
+
errorText: string = 'text-[#FF5449]';
|
|
30
43
|
|
|
31
44
|
// Border
|
|
32
45
|
rounded: string = 'rounded-[8px]';
|
|
@@ -37,14 +50,34 @@ export class Styles {
|
|
|
37
50
|
textBold: string = 'font-bold';
|
|
38
51
|
|
|
39
52
|
// Button
|
|
53
|
+
btnHSm: string = 'h-[40px]';
|
|
40
54
|
btnHMd: string = 'h-[60px]';
|
|
41
55
|
btnHLg: string = 'h-[60px]';
|
|
56
|
+
greenBtn: string;
|
|
57
|
+
blueBtn: string;
|
|
58
|
+
redBtn: string;
|
|
59
|
+
whiteBtn: string;
|
|
60
|
+
blueLightBtn: string;
|
|
42
61
|
|
|
43
62
|
// Complex
|
|
44
|
-
|
|
63
|
+
flexColNav: string;
|
|
64
|
+
emptyBlockCol: string;
|
|
65
|
+
scrollPage: string;
|
|
66
|
+
|
|
67
|
+
// Muted or disabled
|
|
68
|
+
mutedText: string = 'text-[#99A3B3]';
|
|
45
69
|
|
|
46
70
|
constructor() {
|
|
71
|
+
// Button
|
|
72
|
+
this.greenBtn = `${this.greenBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.greenBgHover}`;
|
|
73
|
+
this.redBtn = `${this.redBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.redBgHover}`;
|
|
74
|
+
this.blueBtn = `${this.blueBg} ${this.whiteText} ${this.textTitle} ${this.rounded} w-full ${this.blueBgHover}`;
|
|
75
|
+
this.whiteBtn = ` ${this.blackText} ${this.textTitle} ${this.rounded} w-full ${this.blueLightBgHover}`;
|
|
76
|
+
this.blueLightBtn = `${this.blueBgLight} ${this.greyTextLight} ${this.textTitle} ${this.rounded} w-full ${this.blueBgLightHover}`;
|
|
77
|
+
|
|
47
78
|
// Complex
|
|
48
|
-
this.
|
|
79
|
+
this.flexColNav = 'flex flex-col gap-[10px] px-2 pt-[14px]';
|
|
80
|
+
this.emptyBlockCol = 'w-[60px] sm:w-[100px] h-[30%] rounded-[8px] bg-[#f5f5f5]';
|
|
81
|
+
this.scrollPage = 'max-h-[90vh] overflow-y-scroll';
|
|
49
82
|
}
|
|
50
83
|
}
|
|
@@ -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>
|
package/nuxt.config.ts
CHANGED
|
@@ -1,13 +1,35 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
|
|
1
3
|
export default defineNuxtConfig({
|
|
2
4
|
ssr: false,
|
|
3
5
|
|
|
4
|
-
modules: [
|
|
5
|
-
'@pinia/nuxt',
|
|
6
|
-
'@nuxtjs/tailwindcss',
|
|
7
|
-
],
|
|
6
|
+
modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss', '@nuxt/devtools'],
|
|
8
7
|
|
|
9
8
|
imports: {
|
|
10
|
-
dirs: ['store'],
|
|
9
|
+
dirs: ['store', 'composables'],
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
vite: {
|
|
13
|
+
build: {
|
|
14
|
+
minify: false,
|
|
15
|
+
},
|
|
16
|
+
resolve: {
|
|
17
|
+
alias: [
|
|
18
|
+
{
|
|
19
|
+
find: '@',
|
|
20
|
+
replacement: path.resolve(__dirname, '.'),
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
vue: {
|
|
25
|
+
template: {
|
|
26
|
+
compilerOptions: {
|
|
27
|
+
isCustomElement: tag => {
|
|
28
|
+
return tag.startsWith('Base');
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
11
33
|
},
|
|
12
34
|
|
|
13
35
|
components: [{ path: './components', prefix: 'Base', pathPrefix: false }],
|
package/package.json
CHANGED
|
@@ -1,36 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "nuxt.config.ts",
|
|
7
7
|
"files": [
|
|
8
|
+
"api/",
|
|
8
9
|
"store/",
|
|
10
|
+
"layouts/",
|
|
9
11
|
"composables/",
|
|
10
12
|
"components/",
|
|
11
13
|
"plugins/",
|
|
12
|
-
"
|
|
14
|
+
"pages/",
|
|
15
|
+
"types/",
|
|
13
16
|
"nuxt.config.ts",
|
|
17
|
+
"tailwind.config.js",
|
|
14
18
|
".prettierrc"
|
|
15
19
|
],
|
|
16
20
|
"scripts": {
|
|
17
21
|
"build": "nuxt build",
|
|
18
|
-
"dev": "nuxt dev",
|
|
22
|
+
"dev": "nuxt clean && nuxt dev",
|
|
19
23
|
"generate": "nuxt generate",
|
|
20
|
-
"preview": "nuxt preview"
|
|
21
|
-
"postinstall": "nuxt prepare"
|
|
24
|
+
"preview": "nuxt preview"
|
|
22
25
|
},
|
|
23
26
|
"devDependencies": {
|
|
24
|
-
"nuxt": "^
|
|
27
|
+
"@nuxt/devtools": "^0.4.5",
|
|
28
|
+
"@nuxt/types": "^2.16.3",
|
|
29
|
+
"nuxt": "^3.4.3",
|
|
25
30
|
"prettier": "^2.8.4",
|
|
26
31
|
"typescript": "^4.9.5"
|
|
27
32
|
},
|
|
28
33
|
"dependencies": {
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"@pinia/nuxt": "^0.4.
|
|
32
|
-
"
|
|
34
|
+
"@mdi/font": "^7.2.96",
|
|
35
|
+
"@nuxtjs/tailwindcss": "^6.6.7",
|
|
36
|
+
"@pinia/nuxt": "^0.4.9",
|
|
37
|
+
"animate.css": "^4.1.1",
|
|
38
|
+
"axios": "^1.4.0",
|
|
39
|
+
"fast-xml-parser": "4.0.12",
|
|
40
|
+
"jwt-decode": "^3.1.2",
|
|
41
|
+
"maska": "1.5.0",
|
|
42
|
+
"pinia": "^2.0.35",
|
|
43
|
+
"v-idle-3": "^0.3.14",
|
|
33
44
|
"vue-toastification": "^2.0.0-rc.5",
|
|
34
|
-
"
|
|
45
|
+
"vue-uuid": "^3.0.0",
|
|
46
|
+
"vuetify": "^3.2.1"
|
|
35
47
|
}
|
|
36
48
|
}
|
package/pages/500.vue
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<base-content class="!w-full flex-col justify-center items-center gap-[100px]" :class="[$libStyles.blueBgLight]">
|
|
3
|
+
<svg class="w-[240px] lg:w-[330px]" draggable="false" width="277" height="99" viewBox="0 0 277 99" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<path
|
|
5
|
+
fill-rule="evenodd"
|
|
6
|
+
clip-rule="evenodd"
|
|
7
|
+
d="M4.71582 49.276L22.23 31.722V20.791H33.1373L50.6508 3.23633L68.1656 20.791H79.0725V31.722L96.5866 49.276L79.0725 66.83V77.7616H68.1656L50.6508 95.3156L33.1373 77.7616H22.23V66.83L4.71582 49.276Z"
|
|
8
|
+
fill="#FAB31C"
|
|
9
|
+
/>
|
|
10
|
+
<path
|
|
11
|
+
fill-rule="evenodd"
|
|
12
|
+
clip-rule="evenodd"
|
|
13
|
+
d="M10.4575 49.2765L50.6515 8.99177L90.8453 49.2765L50.6515 89.5616L10.4575 49.2765ZM18.1699 16.7215H34.3263L50.6515 0.359375L66.9767 16.7215H83.1329V32.9144L99.4581 49.2765L83.1329 65.6388V81.8316H66.9767L50.6515 98.1939L34.3263 81.8316H18.1699V65.6388L1.84473 49.2765L18.1699 32.9144V16.7215ZM33.1372 20.7908H22.2302V31.7225L18.1699 35.7916V35.7919L4.71585 49.2765L18.1699 62.7612V62.7616L22.2302 66.8307V77.7623H33.1372L37.197 81.8316H37.1973L50.6515 95.3162L64.1056 81.8316H64.106L68.1656 77.7623H79.0726V66.8307L83.1329 62.7616V62.7612L96.5869 49.2765L83.1329 35.7919V35.7916L79.0726 31.7225V20.7908H68.1656L64.106 16.7215H64.1056L50.6515 3.23684L33.1372 20.7908Z"
|
|
14
|
+
fill="#007556"
|
|
15
|
+
/>
|
|
16
|
+
<path
|
|
17
|
+
fill-rule="evenodd"
|
|
18
|
+
clip-rule="evenodd"
|
|
19
|
+
d="M10.4575 49.2766L50.6515 8.99152L90.8453 49.2766L50.6515 89.5616L10.4575 49.2766ZM18.1699 16.7215H34.3263L50.6515 0.359375L66.9767 16.7215H83.1329V32.9145L99.4581 49.2766L83.1329 65.6387V81.8317H66.9767L50.6515 98.194L34.3263 81.8317H18.1699V65.6387L1.84473 49.2766L18.1699 32.9145V16.7215ZM33.1372 20.7908H22.2302V31.7226L18.1699 35.7917V35.7919L4.71585 49.2766L18.1699 62.7612V62.7617L22.2302 66.8306V77.7623H33.1372L37.197 81.8317H37.1973L50.6515 95.3163L64.1056 81.8317H64.106L68.1656 77.7623H79.0726V66.8306L83.1329 62.7617V62.7612L96.5869 49.2766L83.1329 35.7919V35.7917L79.0726 31.7226V20.7908H68.1656L64.106 16.7215H64.1056L50.6515 3.23685L33.1372 20.7908Z"
|
|
20
|
+
fill="#007556"
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
fill-rule="evenodd"
|
|
24
|
+
clip-rule="evenodd"
|
|
25
|
+
d="M103.444 44.505V16.1172H110.411V26.9039H131.969V16.1172H138.868V44.505H131.969V32.5436H110.411V44.505H103.444ZM143.851 82.3333H136.985V53.9455H143.851V82.3333ZM141.116 44.505L157.93 16.1172H164.572L181.643 44.505H173.894L170.322 38.2725H151.588L148.016 44.505H141.116ZM154.524 33.0914H167.508L160.91 21.2639L154.524 33.0914ZM182.595 44.505V16.1172H189.562V39.1898H211.767V44.505H182.595ZM216.796 44.505V31.7486L201.322 16.1172H210.644L220.747 26.7022L230.985 16.1172H239.1L223.695 31.6257V44.505H216.796ZM239.707 44.505V16.1172H246.675V27.5861L263.199 16.1172H273.201L253.607 29.265L275.389 44.505H264.47L246.675 31.6927V44.505H239.707ZM103.444 82.3333V53.9455H110.411V77.0181H132.616V82.3333H103.444ZM150.375 82.3333V53.9455H180.429V59.0253H157.342V66.4331H169.768V71.7145H157.342V82.3333H150.375ZM185.793 82.3333V53.9455H216.182V58.9581H192.759V65.1458H206.402V70.0362H192.759V77.0181H216.538V82.3333H185.793Z"
|
|
26
|
+
fill="#007556"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
fill-rule="evenodd"
|
|
30
|
+
clip-rule="evenodd"
|
|
31
|
+
d="M60.951 49.9793C65.2122 42.4323 60.8026 30.509 51.0674 31.0783C46.6279 31.3381 42.5865 34.5876 42.4003 39.8699C42.2502 44.1278 45.4845 48.0783 50.854 48.0243C53.7034 47.9957 56.7358 45.9668 56.6787 41.9752C56.6265 38.3346 53.5233 36.7166 51.8336 36.7166C50.1439 36.7166 47.5242 38.7708 48.8529 40.7693C49.8055 42.2018 51.359 40.5982 51.359 40.5982C51.359 40.5982 53.2787 39.8856 53.8091 41.78C54.3221 43.6119 53.1829 45.375 50.2985 45.2986C47.2422 45.2228 44.888 42.9387 45.0589 39.8753C45.2109 36.7927 47.603 34.1518 51.5516 34.1518C55.4816 34.1518 59.2067 38.0003 59.2067 42.2819C59.2067 46.1009 57.0171 50.8789 51.0582 51.2818C44.4053 51.7316 38.8187 47.2962 38.8187 40.5223C38.7721 33.0533 44.1879 28.4587 50.7133 28.7989C63.38 29.4592 65.7246 43.1718 60.951 49.9793Z"
|
|
32
|
+
fill="#FAB31C"
|
|
33
|
+
/>
|
|
34
|
+
<path
|
|
35
|
+
fill-rule="evenodd"
|
|
36
|
+
clip-rule="evenodd"
|
|
37
|
+
d="M72.9649 36.8647C72.9649 34.7167 69.2856 34.5419 69.2856 36.8647V49.0899L55.9915 61.0849V87.4434L65.606 78.3645V64.5387L72.9649 57.9474V36.8647ZM28.3359 36.8647C28.3359 34.7167 32.0153 34.5419 32.0153 36.8647V49.0899L45.3094 61.0849V87.4434L35.6949 78.3645V64.5387L28.3359 57.9474V36.8647Z"
|
|
38
|
+
fill="#FAB31C"
|
|
39
|
+
/>
|
|
40
|
+
</svg>
|
|
41
|
+
<div class="text-center">
|
|
42
|
+
<h2 :class="[$libStyles.blackText]" class="text-[26px] leading-5 mb-5">Сервис временно не доступен</h2>
|
|
43
|
+
<p v-if="errorStack.length" class="mt-4 flex flex-col">
|
|
44
|
+
<span v-for="(error, index) of errorStack" :key="error">
|
|
45
|
+
<i v-if="index !== 0" class="mdi mdi-arrow-right"></i>
|
|
46
|
+
{{ error }}</span
|
|
47
|
+
>
|
|
48
|
+
</p>
|
|
49
|
+
</div>
|
|
50
|
+
<base-btn text="На главную" @click="goBack" class="!w-fit px-14"></base-btn>
|
|
51
|
+
</base-content>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script lang="ts">
|
|
55
|
+
export default defineComponent({
|
|
56
|
+
setup() {
|
|
57
|
+
definePageMeta({ layout: 'full' });
|
|
58
|
+
|
|
59
|
+
const dataStore = useDataStore();
|
|
60
|
+
const router = useRouter();
|
|
61
|
+
const route = useRoute();
|
|
62
|
+
const errorStack = ref([] as string[]);
|
|
63
|
+
|
|
64
|
+
onMounted(() => {
|
|
65
|
+
if (route.query && route.query.stack) {
|
|
66
|
+
const queryError = (route.query.stack as string).split(' at ');
|
|
67
|
+
errorStack.value = queryError;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const goBack = () => {
|
|
72
|
+
if (dataStore.isEFO) {
|
|
73
|
+
router.push({ name: 'Auth' });
|
|
74
|
+
} else {
|
|
75
|
+
dataStore.sendToParent(constants.postActions.Error500, 500);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
errorStack,
|
|
81
|
+
goBack,
|
|
82
|
+
};
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
</script>
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import { capitalize } from '../composables';
|
|
1
|
+
import { capitalize, getFullNameShorted, reformatIin, Masks } from '../composables';
|
|
2
|
+
import { constants } from '../composables/constants';
|
|
3
|
+
import { Styles } from '../composables/styles';
|
|
4
|
+
import Vidle from 'v-idle-3';
|
|
5
|
+
import Maska from 'maska';
|
|
6
|
+
|
|
7
|
+
export default defineNuxtPlugin(nuxtApp => {
|
|
8
|
+
nuxtApp.vueApp.use(Vidle, {});
|
|
9
|
+
nuxtApp.vueApp.use(Maska);
|
|
2
10
|
|
|
3
|
-
export default defineNuxtPlugin(() => {
|
|
4
11
|
return {
|
|
5
12
|
provide: {
|
|
6
13
|
capitalize: capitalize,
|
|
14
|
+
getFullNameShorted: getFullNameShorted,
|
|
15
|
+
libStyles: new Styles(),
|
|
16
|
+
maska: new Masks(),
|
|
17
|
+
reformatIin: reformatIin,
|
|
18
|
+
constants: constants,
|
|
7
19
|
},
|
|
8
20
|
};
|
|
9
21
|
});
|
package/plugins/storePlugin.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useAppStore } from '../store/app.store';
|
|
2
1
|
import { useDataStore } from '../store/data.store';
|
|
3
|
-
import { Styles } from '../composables/styles';
|
|
4
2
|
|
|
5
3
|
export default defineNuxtPlugin(nuxtApp => {
|
|
4
|
+
const dataStore = useDataStore();
|
|
5
|
+
|
|
6
6
|
nuxtApp.vueApp.use(useDataStore().toast.default, {
|
|
7
7
|
transition: 'Vue-Toastification__fade',
|
|
8
8
|
maxToasts: 5,
|
|
@@ -11,11 +11,10 @@ export default defineNuxtPlugin(nuxtApp => {
|
|
|
11
11
|
|
|
12
12
|
return {
|
|
13
13
|
provide: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
toast: useDataStore().showToaster,
|
|
14
|
+
dataStore: dataStore,
|
|
15
|
+
rules: dataStore.rules,
|
|
16
|
+
t: dataStore.t,
|
|
17
|
+
toast: dataStore.showToaster,
|
|
19
18
|
},
|
|
20
19
|
};
|
|
21
20
|
});
|
package/plugins/vuetifyPlugin.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '@mdi/font/css/materialdesignicons.css';
|
|
2
|
+
import 'animate.css';
|
|
2
3
|
import 'vuetify/styles';
|
|
3
4
|
import { createVuetify } from 'vuetify';
|
|
4
5
|
import * as components from 'vuetify/components';
|
|
@@ -9,6 +10,15 @@ export default defineNuxtPlugin(nuxtApp => {
|
|
|
9
10
|
ssr: false,
|
|
10
11
|
components,
|
|
11
12
|
directives,
|
|
13
|
+
theme: {
|
|
14
|
+
themes: {
|
|
15
|
+
light: {
|
|
16
|
+
colors: {
|
|
17
|
+
error: '#FF5449',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
12
22
|
});
|
|
13
23
|
|
|
14
24
|
nuxtApp.vueApp.use(vuetify);
|