hl-core 0.0.7-beta.9 → 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 +66 -47
- package/api/interceptors.ts +4 -4
- package/components/Button/Btn.vue +7 -2
- package/components/Button/ScrollButtons.vue +6 -0
- package/components/Complex/ContentBlock.vue +5 -0
- package/components/{Layout → Dialog}/Dialog.vue +3 -27
- 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 +35 -36
- package/components/Layout/Drawer.vue +18 -16
- package/components/Layout/Header.vue +4 -18
- package/components/Layout/Loader.vue +1 -7
- package/components/Layout/SettingsPanel.vue +17 -37
- package/components/List/ListEmpty.vue +22 -0
- package/components/Menu/MenuNav.vue +22 -20
- package/components/Menu/MenuNavItem.vue +6 -6
- 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 +2 -4
- package/components/Panel/PanelSelectItem.vue +20 -0
- package/components/Transitions/FadeTransition.vue +5 -0
- package/composables/classes.ts +299 -253
- package/composables/constants.ts +14 -7
- package/composables/index.ts +55 -60
- package/composables/styles.ts +31 -7
- package/layouts/default.vue +46 -26
- package/layouts/full.vue +2 -12
- package/nuxt.config.ts +3 -0
- package/package.json +13 -10
- package/pages/500.vue +40 -12
- package/plugins/helperFunctionsPlugins.ts +6 -2
- package/plugins/storePlugin.ts +6 -5
- package/store/data.store.js +781 -1880
- package/store/member.store.ts +291 -0
- package/store/messages.ts +66 -51
- package/store/rules.js +26 -28
- package/types/index.ts +250 -0
- package/composables/models.ts +0 -43
- /package/store/{form.store.js → form.store.ts} +0 -0
package/composables/constants.ts
CHANGED
|
@@ -10,13 +10,7 @@ export const constants = Object.freeze({
|
|
|
10
10
|
},
|
|
11
11
|
|
|
12
12
|
editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
|
|
13
|
-
documentsLinkVisibleStatuses: [
|
|
14
|
-
'DocumentsSignedFrom',
|
|
15
|
-
'UnderwriterForm',
|
|
16
|
-
'AffilationResolutionForm',
|
|
17
|
-
'Completed',
|
|
18
|
-
'InsurancePremiumOnlinePaid',
|
|
19
|
-
],
|
|
13
|
+
documentsLinkVisibleStatuses: ['DocumentsSignedFrom', 'UnderwriterForm', 'AffilationResolutionForm', 'Completed', 'InsurancePremiumOnlinePaid'],
|
|
20
14
|
gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
|
|
21
15
|
types: {
|
|
22
16
|
string: 'string',
|
|
@@ -32,6 +26,11 @@ export const constants = Object.freeze({
|
|
|
32
26
|
agentMycar: 'AgentMycar',
|
|
33
27
|
analyst: 'Analyst',
|
|
34
28
|
upk: 'UPK',
|
|
29
|
+
financeCenter: 'FinanceCenter',
|
|
30
|
+
supervisor: 'Supervisor',
|
|
31
|
+
support: 'Support',
|
|
32
|
+
managerHalykBank: 'ManagerHalykBank',
|
|
33
|
+
serviceManager: 'ServiceManager',
|
|
35
34
|
},
|
|
36
35
|
actions: {
|
|
37
36
|
accept: 'accept',
|
|
@@ -44,7 +43,15 @@ export const constants = Object.freeze({
|
|
|
44
43
|
},
|
|
45
44
|
yearCases: [2, 0, 1, 1, 1, 2],
|
|
46
45
|
yearTitles: ['год', 'года', 'лет'],
|
|
46
|
+
panelActions: {
|
|
47
|
+
accept: 'accept',
|
|
48
|
+
claim: 'claim',
|
|
49
|
+
return: 'return',
|
|
50
|
+
reject: 'reject',
|
|
51
|
+
rejectclient: 'rejectclient',
|
|
52
|
+
},
|
|
47
53
|
postActions: {
|
|
54
|
+
font: 'font',
|
|
48
55
|
route: 'route',
|
|
49
56
|
applicationCreated: 'applicationCreated',
|
|
50
57
|
clipboard: 'clipboard',
|
package/composables/index.ts
CHANGED
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
import { useDisplay } from 'vuetify';
|
|
2
2
|
import jwt_decode from 'jwt-decode';
|
|
3
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();
|
|
4
17
|
|
|
5
18
|
export const useDisplayInfo = useDisplay;
|
|
6
19
|
|
|
7
|
-
export const capitalize = (word: string): string =>
|
|
8
|
-
word ? word.charAt(0).toUpperCase() + word.slice(1).toLowerCase() : word;
|
|
20
|
+
export const capitalize = (word: string): string => (word ? word.charAt(0).toUpperCase() + word.slice(1).toLowerCase() : word);
|
|
9
21
|
|
|
10
22
|
const xmlParser = new XMLParser({
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
23
|
+
numberParseOptions: {
|
|
24
|
+
hex: false,
|
|
25
|
+
leadingZeros: true,
|
|
26
|
+
skipLike: /[0-9]+/,
|
|
27
|
+
},
|
|
15
28
|
});
|
|
16
29
|
|
|
30
|
+
export const getNumber = (number: string) => {
|
|
31
|
+
return number ? Number(number.replace(/\s/g, '')) : null;
|
|
32
|
+
};
|
|
33
|
+
|
|
17
34
|
export const formatDate = (date: string) => {
|
|
18
35
|
if (date) {
|
|
19
36
|
const data = date.split('.');
|
|
@@ -63,29 +80,25 @@ export const jwtDecode = (token: string): any => {
|
|
|
63
80
|
};
|
|
64
81
|
|
|
65
82
|
export const isValidToken = (token: string) => {
|
|
66
|
-
return (
|
|
67
|
-
(new Date(jwtDecode(token).exp * 1000).getTime() - Date.now()) / 1000 > 0
|
|
68
|
-
);
|
|
83
|
+
return (new Date(jwtDecode(token).exp * 1000).getTime() - Date.now()) / 1000 > 0;
|
|
69
84
|
};
|
|
70
85
|
|
|
71
86
|
export const isValidGUID = (value: string) => {
|
|
72
|
-
return (
|
|
73
|
-
!!value &&
|
|
74
|
-
value.length > 0 &&
|
|
75
|
-
/^(\{){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(
|
|
76
|
-
value,
|
|
77
|
-
)
|
|
78
|
-
);
|
|
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);
|
|
79
88
|
};
|
|
80
89
|
|
|
81
90
|
export const getKeyWithPattern = (obj: any, key: string) => {
|
|
82
91
|
return Object.keys(obj).find(i => i.match(new RegExp(key, 'i'))) || null;
|
|
83
92
|
};
|
|
84
93
|
|
|
85
|
-
export const
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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) => {
|
|
89
102
|
if (text) {
|
|
90
103
|
const names = text.split(' ');
|
|
91
104
|
if (names.length > 1) {
|
|
@@ -102,41 +115,23 @@ export const getFullNameShorted = (
|
|
|
102
115
|
}
|
|
103
116
|
};
|
|
104
117
|
|
|
105
|
-
export const parseProcents = (val: string | number) =>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
export const
|
|
112
|
-
|
|
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
|
-
];
|
|
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]];
|
|
124
126
|
};
|
|
125
127
|
|
|
126
|
-
export const parseXML = (
|
|
127
|
-
xml: boolean | string = true,
|
|
128
|
-
withTag = false,
|
|
129
|
-
tag: string | null = null,
|
|
130
|
-
) => {
|
|
128
|
+
export const parseXML = (xml: boolean | string = true, withTag = false, tag: string | null = null) => {
|
|
131
129
|
if (xml) {
|
|
132
130
|
const localXml = xml as string;
|
|
133
131
|
if (withTag && tag !== null) {
|
|
134
132
|
const DOMparser = new DOMParser();
|
|
135
133
|
const xmLSerializer = new XMLSerializer();
|
|
136
|
-
const tagDOM = DOMparser.parseFromString(
|
|
137
|
-
localXml,
|
|
138
|
-
'text/xml',
|
|
139
|
-
).getElementsByTagName(tag);
|
|
134
|
+
const tagDOM = DOMparser.parseFromString(localXml, 'text/xml').getElementsByTagName(tag);
|
|
140
135
|
const tagXml = xmLSerializer.serializeToString(tagDOM[0]);
|
|
141
136
|
return xmlParser.parse(tagXml);
|
|
142
137
|
} else {
|
|
@@ -151,27 +146,27 @@ export const ESBDMessage = (ESBDObject: any, initialPoint: any) => {
|
|
|
151
146
|
if (ESBDObject.errorMsg.indexOf('EMSG') === -1) {
|
|
152
147
|
result = 'Клиент не является резидентом РК!';
|
|
153
148
|
} else {
|
|
154
|
-
result = ESBDObject.errorMsg
|
|
155
|
-
.substring(
|
|
156
|
-
ESBDObject.errorMsg.indexOf('EMSG') + 6,
|
|
157
|
-
ESBDObject.errorMsg.lastIndexOf('EWS-100'),
|
|
158
|
-
)
|
|
159
|
-
.replace(initialPoint, '');
|
|
149
|
+
result = ESBDObject.errorMsg.substring(ESBDObject.errorMsg.indexOf('EMSG') + 6, ESBDObject.errorMsg.lastIndexOf('EWS-100')).replace(initialPoint, '');
|
|
160
150
|
}
|
|
161
151
|
}
|
|
162
152
|
if (ESBDObject.errorCode === 3) {
|
|
163
153
|
return false;
|
|
164
154
|
}
|
|
165
155
|
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, '');
|
|
156
|
+
result = ESBDObject.errorMsg.substring(ESBDObject.errorMsg.indexOf(initialPoint), ESBDObject.errorMsg.lastIndexOf('ECL-0001')).replace(initialPoint, '');
|
|
172
157
|
}
|
|
173
158
|
if (ESBDObject.errorCode === 4) {
|
|
174
159
|
result = ESBDObject.errorMsg;
|
|
175
160
|
}
|
|
176
161
|
return result;
|
|
177
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,10 +5,12 @@ 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]';
|
|
10
11
|
blueBgHover: string = 'hover:bg-[#96abd6]';
|
|
11
12
|
blueBgLight: string = 'bg-[#F3F6FC]';
|
|
13
|
+
blueBgLightHover: string = 'hover:bg-[#f5f8fd]';
|
|
12
14
|
blueText: string = 'text-[#A0B3D8]';
|
|
13
15
|
blueTextLight: string = 'text-[#F3F6FC]';
|
|
14
16
|
|
|
@@ -16,6 +18,11 @@ export class Styles {
|
|
|
16
18
|
greenBg: string = 'bg-[#009C73]';
|
|
17
19
|
greenBgHover: string = 'hover:bg-[#00a277]';
|
|
18
20
|
greenBgLight: string = 'bg-[#009C73]';
|
|
21
|
+
greenText: string = 'text-[#009C73]';
|
|
22
|
+
greenTextHover: string = 'hover:text-[#009C73]';
|
|
23
|
+
|
|
24
|
+
// Yellow
|
|
25
|
+
yellowText: string = 'text-[#FAB31C]';
|
|
19
26
|
|
|
20
27
|
// Grey
|
|
21
28
|
greyBg: string = 'bg-[#B8B8B8]';
|
|
@@ -25,11 +32,11 @@ export class Styles {
|
|
|
25
32
|
greyIconBg: string = 'bg-[#DADADA]';
|
|
26
33
|
greyBtnBg: string = 'bg-[#EEE6E6]';
|
|
27
34
|
greyBtnDisabledBg: string = 'bg-[#919191]';
|
|
28
|
-
|
|
35
|
+
blueLightBgHover: string = 'hover:bg-[#F3F6FC]';
|
|
29
36
|
// Red
|
|
30
|
-
redText: string = 'text-[#
|
|
31
|
-
redBg: string = 'bg-[#
|
|
32
|
-
|
|
37
|
+
redText: string = 'text-[#FF897D]';
|
|
38
|
+
redBg: string = 'bg-[#FF897D]';
|
|
39
|
+
redBgHover: string = 'hover:bg-[#ff9b91]';
|
|
33
40
|
// Error
|
|
34
41
|
errorBg: string = 'bg-[#FF5449]';
|
|
35
42
|
errorText: string = 'text-[#FF5449]';
|
|
@@ -46,14 +53,31 @@ export class Styles {
|
|
|
46
53
|
btnHSm: string = 'h-[40px]';
|
|
47
54
|
btnHMd: string = 'h-[60px]';
|
|
48
55
|
btnHLg: string = 'h-[60px]';
|
|
49
|
-
|
|
50
|
-
// Complex
|
|
51
56
|
greenBtn: string;
|
|
52
57
|
blueBtn: string;
|
|
58
|
+
redBtn: string;
|
|
59
|
+
whiteBtn: string;
|
|
60
|
+
blueLightBtn: string;
|
|
61
|
+
|
|
62
|
+
// Complex
|
|
63
|
+
flexColNav: string;
|
|
64
|
+
emptyBlockCol: string;
|
|
65
|
+
scrollPage: string;
|
|
66
|
+
|
|
67
|
+
// Muted or disabled
|
|
68
|
+
mutedText: string = 'text-[#99A3B3]';
|
|
53
69
|
|
|
54
70
|
constructor() {
|
|
55
|
-
//
|
|
71
|
+
// Button
|
|
56
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}`;
|
|
57
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
|
+
|
|
78
|
+
// Complex
|
|
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';
|
|
58
82
|
}
|
|
59
83
|
}
|
package/layouts/default.vue
CHANGED
|
@@ -1,43 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="
|
|
4
|
-
:class="[
|
|
5
|
-
$dataStore.hasLayoutMargins
|
|
6
|
-
? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl'
|
|
7
|
-
: '',
|
|
8
|
-
]"
|
|
9
|
-
>
|
|
10
|
-
<div
|
|
11
|
-
:class="[$libStyles.greenBg]"
|
|
12
|
-
class="hidden z-[-1] lg:block absolute left-0 top-0 h-[200px] w-full"
|
|
13
|
-
></div>
|
|
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>
|
|
14
4
|
<section class="flex h-full" :class="$libStyles.blueBgLight">
|
|
15
5
|
<base-menu-nav
|
|
16
6
|
v-if="$dataStore.showNav"
|
|
17
|
-
v-model="$dataStore.menu.selectedItem"
|
|
18
7
|
:selected="$dataStore.menu.selectedItem"
|
|
19
8
|
:title="$dataStore.menu.title ?? 'Страховые продукты'"
|
|
20
9
|
:has-back="$dataStore.menu.hasBack ?? false"
|
|
21
10
|
:back-icon="$dataStore.menu.backIcon ?? 'mdi-arrow-left'"
|
|
22
|
-
:has-more="
|
|
23
|
-
'hasMore' in $route.meta && $route.meta.hasMore
|
|
24
|
-
? !!$route.meta.hasMore
|
|
25
|
-
: false
|
|
26
|
-
"
|
|
11
|
+
:has-more="'hasMore' in $route.meta && $route.meta.hasMore ? !!$route.meta.hasMore : false"
|
|
27
12
|
:hide-more-on-lg="true"
|
|
28
13
|
:class="{
|
|
29
|
-
|
|
30
|
-
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
'!hidden': !$display().lgAndUp.value && !!$dataStore.menu.selectedItem.title,
|
|
31
16
|
}"
|
|
32
|
-
@onBack="
|
|
17
|
+
@onBack="onBack"
|
|
33
18
|
@onMore="openSettings"
|
|
34
|
-
@onLink="
|
|
19
|
+
@onLink="onLink"
|
|
35
20
|
>
|
|
36
21
|
<template #end>
|
|
37
|
-
<base-loader
|
|
38
|
-
v-if="$dataStore.menu.loading"
|
|
39
|
-
class="self-center m-5 opacity-70"
|
|
40
|
-
></base-loader>
|
|
22
|
+
<base-loader v-if="$dataStore.menu.loading" class="self-center m-5 opacity-70"></base-loader>
|
|
41
23
|
</template>
|
|
42
24
|
</base-menu-nav>
|
|
43
25
|
<slot> </slot>
|
|
@@ -47,9 +29,47 @@
|
|
|
47
29
|
</template>
|
|
48
30
|
|
|
49
31
|
<script setup lang="ts">
|
|
32
|
+
import { MenuItem } from '@/composables/classes';
|
|
50
33
|
const dataStore = useDataStore();
|
|
51
34
|
|
|
52
35
|
const openSettings = async () => {
|
|
53
36
|
dataStore.settings.open = true;
|
|
54
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
|
+
};
|
|
55
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
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
class="
|
|
4
|
-
:class="[
|
|
5
|
-
$dataStore.hasLayoutMargins
|
|
6
|
-
? 'lg:mx-[22px] lg:my-[33px] lg:shadow-xl'
|
|
7
|
-
: '',
|
|
8
|
-
]"
|
|
9
|
-
>
|
|
10
|
-
<div
|
|
11
|
-
:class="[$libStyles.greenBg]"
|
|
12
|
-
class="hidden lg:block absolute z-[-1] left-0 top-0 h-[200px] w-full"
|
|
13
|
-
></div>
|
|
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>
|
|
14
4
|
<slot></slot>
|
|
15
5
|
</div>
|
|
16
6
|
</template>
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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",
|
|
@@ -12,34 +12,37 @@
|
|
|
12
12
|
"components/",
|
|
13
13
|
"plugins/",
|
|
14
14
|
"pages/",
|
|
15
|
+
"types/",
|
|
15
16
|
"nuxt.config.ts",
|
|
16
17
|
"tailwind.config.js",
|
|
17
18
|
".prettierrc"
|
|
18
19
|
],
|
|
19
20
|
"scripts": {
|
|
20
21
|
"build": "nuxt build",
|
|
21
|
-
"dev": "nuxt dev",
|
|
22
|
+
"dev": "nuxt clean && nuxt dev",
|
|
22
23
|
"generate": "nuxt generate",
|
|
23
24
|
"preview": "nuxt preview"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
|
-
"@nuxt/devtools": "^0.
|
|
27
|
-
"nuxt": "^
|
|
27
|
+
"@nuxt/devtools": "^0.4.5",
|
|
28
|
+
"@nuxt/types": "^2.16.3",
|
|
29
|
+
"nuxt": "^3.4.3",
|
|
28
30
|
"prettier": "^2.8.4",
|
|
29
31
|
"typescript": "^4.9.5"
|
|
30
32
|
},
|
|
31
33
|
"dependencies": {
|
|
32
|
-
"@mdi/font": "^7.
|
|
33
|
-
"@nuxtjs/tailwindcss": "^6.6.
|
|
34
|
-
"@pinia/nuxt": "^0.4.
|
|
34
|
+
"@mdi/font": "^7.2.96",
|
|
35
|
+
"@nuxtjs/tailwindcss": "^6.6.7",
|
|
36
|
+
"@pinia/nuxt": "^0.4.9",
|
|
35
37
|
"animate.css": "^4.1.1",
|
|
36
|
-
"axios": "^1.
|
|
38
|
+
"axios": "^1.4.0",
|
|
37
39
|
"fast-xml-parser": "4.0.12",
|
|
38
40
|
"jwt-decode": "^3.1.2",
|
|
39
41
|
"maska": "1.5.0",
|
|
40
|
-
"pinia": "^2.0.
|
|
42
|
+
"pinia": "^2.0.35",
|
|
41
43
|
"v-idle-3": "^0.3.14",
|
|
42
44
|
"vue-toastification": "^2.0.0-rc.5",
|
|
43
|
-
"
|
|
45
|
+
"vue-uuid": "^3.0.0",
|
|
46
|
+
"vuetify": "^3.2.1"
|
|
44
47
|
}
|
|
45
48
|
}
|
package/pages/500.vue
CHANGED
|
@@ -1,17 +1,45 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<base-content
|
|
3
|
-
class="
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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>
|
|
11
41
|
<div class="text-center">
|
|
12
|
-
<h2 :class="[$
|
|
13
|
-
Сервис временно не доступен
|
|
14
|
-
</h2>
|
|
42
|
+
<h2 :class="[$libStyles.blackText]" class="text-[26px] leading-5 mb-5">Сервис временно не доступен</h2>
|
|
15
43
|
<p v-if="errorStack.length" class="mt-4 flex flex-col">
|
|
16
44
|
<span v-for="(error, index) of errorStack" :key="error">
|
|
17
45
|
<i v-if="index !== 0" class="mdi mdi-arrow-right"></i>
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { capitalize, getFullNameShorted, reformatIin } from '../composables';
|
|
1
|
+
import { capitalize, getFullNameShorted, reformatIin, Masks } from '../composables';
|
|
2
2
|
import { constants } from '../composables/constants';
|
|
3
|
+
import { Styles } from '../composables/styles';
|
|
3
4
|
import Vidle from 'v-idle-3';
|
|
4
5
|
import Maska from 'maska';
|
|
5
6
|
|
|
6
7
|
export default defineNuxtPlugin(nuxtApp => {
|
|
7
|
-
nuxtApp.vueApp.use(Vidle);
|
|
8
|
+
nuxtApp.vueApp.use(Vidle, {});
|
|
8
9
|
nuxtApp.vueApp.use(Maska);
|
|
10
|
+
|
|
9
11
|
return {
|
|
10
12
|
provide: {
|
|
11
13
|
capitalize: capitalize,
|
|
12
14
|
getFullNameShorted: getFullNameShorted,
|
|
15
|
+
libStyles: new Styles(),
|
|
16
|
+
maska: new Masks(),
|
|
13
17
|
reformatIin: reformatIin,
|
|
14
18
|
constants: constants,
|
|
15
19
|
},
|
package/plugins/storePlugin.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { useDataStore } from '../store/data.store';
|
|
2
|
-
import { Styles } from '../composables/styles';
|
|
3
2
|
|
|
4
3
|
export default defineNuxtPlugin(nuxtApp => {
|
|
4
|
+
const dataStore = useDataStore();
|
|
5
|
+
|
|
5
6
|
nuxtApp.vueApp.use(useDataStore().toast.default, {
|
|
6
7
|
transition: 'Vue-Toastification__fade',
|
|
7
8
|
maxToasts: 5,
|
|
@@ -10,10 +11,10 @@ export default defineNuxtPlugin(nuxtApp => {
|
|
|
10
11
|
|
|
11
12
|
return {
|
|
12
13
|
provide: {
|
|
13
|
-
dataStore:
|
|
14
|
-
|
|
15
|
-
t:
|
|
16
|
-
toast:
|
|
14
|
+
dataStore: dataStore,
|
|
15
|
+
rules: dataStore.rules,
|
|
16
|
+
t: dataStore.t,
|
|
17
|
+
toast: dataStore.showToaster,
|
|
17
18
|
},
|
|
18
19
|
};
|
|
19
20
|
});
|