hl-core 0.0.7-beta.2 → 0.0.7-beta.21
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 +323 -31
- package/api/interceptors.ts +10 -1
- package/components/Button/Btn.vue +7 -2
- package/components/Button/BtnIcon.vue +47 -0
- package/components/Button/ScrollButtons.vue +6 -0
- package/components/Complex/Content.vue +1 -1
- package/components/Complex/ContentBlock.vue +5 -0
- package/components/Complex/Page.vue +13 -2
- package/components/{Layout → Dialog}/Dialog.vue +7 -11
- 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 +40 -36
- package/components/Layout/Drawer.vue +44 -0
- package/components/Layout/Header.vue +26 -12
- package/components/Layout/Loader.vue +9 -6
- package/components/Layout/SettingsPanel.vue +48 -0
- package/components/List/ListEmpty.vue +22 -0
- package/components/Menu/MenuNav.vue +70 -30
- package/components/Menu/MenuNavItem.vue +8 -1
- 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/classes.ts +413 -207
- package/composables/constants.ts +27 -12
- package/composables/index.ts +73 -35
- package/composables/styles.ts +31 -7
- package/layouts/clear.vue +1 -1
- package/layouts/default.vue +72 -6
- package/layouts/full.vue +6 -0
- package/nuxt.config.ts +5 -2
- package/package.json +17 -11
- package/pages/500.vue +85 -0
- package/plugins/helperFunctionsPlugins.ts +10 -2
- package/plugins/storePlugin.ts +6 -5
- package/store/data.store.js +1858 -527
- package/store/member.store.ts +291 -0
- package/store/messages.ts +152 -34
- package/store/rules.js +26 -28
- package/tailwind.config.js +10 -0
- package/types/index.ts +250 -0
- package/models/index.ts +0 -23
- /package/store/{form.store.js → form.store.ts} +0 -0
package/composables/constants.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export const constants = Object.freeze({
|
|
2
|
-
products: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
|
|
7
12
|
editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
|
|
8
|
-
documentsLinkVisibleStatuses: [
|
|
9
|
-
'DocumentsSignedFrom',
|
|
10
|
-
'UnderwriterForm',
|
|
11
|
-
'AffilationResolutionForm',
|
|
12
|
-
'Completed',
|
|
13
|
-
],
|
|
13
|
+
documentsLinkVisibleStatuses: ['DocumentsSignedFrom', 'UnderwriterForm', 'AffilationResolutionForm', 'Completed', 'InsurancePremiumOnlinePaid'],
|
|
14
14
|
gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
|
|
15
15
|
types: {
|
|
16
16
|
string: 'string',
|
|
@@ -26,6 +26,11 @@ export const constants = Object.freeze({
|
|
|
26
26
|
agentMycar: 'AgentMycar',
|
|
27
27
|
analyst: 'Analyst',
|
|
28
28
|
upk: 'UPK',
|
|
29
|
+
financeCenter: 'FinanceCenter',
|
|
30
|
+
supervisor: 'Supervisor',
|
|
31
|
+
support: 'Support',
|
|
32
|
+
managerHalykBank: 'ManagerHalykBank',
|
|
33
|
+
serviceManager: 'ServiceManager',
|
|
29
34
|
},
|
|
30
35
|
actions: {
|
|
31
36
|
accept: 'accept',
|
|
@@ -38,13 +43,23 @@ export const constants = Object.freeze({
|
|
|
38
43
|
},
|
|
39
44
|
yearCases: [2, 0, 1, 1, 1, 2],
|
|
40
45
|
yearTitles: ['год', 'года', 'лет'],
|
|
46
|
+
panelActions: {
|
|
47
|
+
accept: 'accept',
|
|
48
|
+
claim: 'claim',
|
|
49
|
+
return: 'return',
|
|
50
|
+
reject: 'reject',
|
|
51
|
+
rejectclient: 'rejectclient',
|
|
52
|
+
},
|
|
41
53
|
postActions: {
|
|
54
|
+
font: 'font',
|
|
42
55
|
route: 'route',
|
|
43
56
|
applicationCreated: 'applicationCreated',
|
|
44
57
|
clipboard: 'clipboard',
|
|
45
58
|
toHomePage: 'toHomePage',
|
|
46
|
-
DOMevent: 'DOMevent',
|
|
47
59
|
toStatementHistory: 'toStatementHistory',
|
|
60
|
+
toAuth: 'toAuth',
|
|
61
|
+
DOMevent: 'DOMevent',
|
|
48
62
|
Error401: 'Error401',
|
|
63
|
+
Error500: 'Error500',
|
|
49
64
|
},
|
|
50
65
|
});
|
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,29 +115,23 @@ export const getFullNameShorted = (
|
|
|
102
115
|
}
|
|
103
116
|
};
|
|
104
117
|
|
|
105
|
-
export const parseProcents = (val: string | number) =>
|
|
106
|
-
|
|
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));
|
|
107
121
|
|
|
108
|
-
export const
|
|
109
|
-
val ? Number(((val as number) / 100).toFixed(2)) : Number(val);
|
|
122
|
+
export const sanitizeURL = (text: string) => (text ? text.replace(/\r?\n|\r|\\|"/g, '') : '');
|
|
110
123
|
|
|
111
|
-
export const
|
|
112
|
-
|
|
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
|
+
};
|
|
113
127
|
|
|
114
|
-
export const parseXML = (
|
|
115
|
-
xml: boolean | string = true,
|
|
116
|
-
withTag = false,
|
|
117
|
-
tag: string | null = null,
|
|
118
|
-
) => {
|
|
128
|
+
export const parseXML = (xml: boolean | string = true, withTag = false, tag: string | null = null) => {
|
|
119
129
|
if (xml) {
|
|
120
130
|
const localXml = xml as string;
|
|
121
131
|
if (withTag && tag !== null) {
|
|
122
132
|
const DOMparser = new DOMParser();
|
|
123
133
|
const xmLSerializer = new XMLSerializer();
|
|
124
|
-
const tagDOM = DOMparser.parseFromString(
|
|
125
|
-
localXml,
|
|
126
|
-
'text/xml',
|
|
127
|
-
).getElementsByTagName(tag);
|
|
134
|
+
const tagDOM = DOMparser.parseFromString(localXml, 'text/xml').getElementsByTagName(tag);
|
|
128
135
|
const tagXml = xmLSerializer.serializeToString(tagDOM[0]);
|
|
129
136
|
return xmlParser.parse(tagXml);
|
|
130
137
|
} else {
|
|
@@ -132,3 +139,34 @@ export const parseXML = (
|
|
|
132
139
|
}
|
|
133
140
|
}
|
|
134
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,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/clear.vue
CHANGED
package/layouts/default.vue
CHANGED
|
@@ -1,9 +1,75 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="[$libStyles.greenBg]"
|
|
4
|
-
class="
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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>
|
|
8
28
|
</div>
|
|
9
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
|
@@ -3,13 +3,16 @@ import path from 'path';
|
|
|
3
3
|
export default defineNuxtConfig({
|
|
4
4
|
ssr: false,
|
|
5
5
|
|
|
6
|
-
modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss'],
|
|
6
|
+
modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss', '@nuxt/devtools'],
|
|
7
7
|
|
|
8
8
|
imports: {
|
|
9
|
-
dirs: ['store', 'composables'
|
|
9
|
+
dirs: ['store', 'composables'],
|
|
10
10
|
},
|
|
11
11
|
|
|
12
12
|
vite: {
|
|
13
|
+
build: {
|
|
14
|
+
minify: false,
|
|
15
|
+
},
|
|
13
16
|
resolve: {
|
|
14
17
|
alias: [
|
|
15
18
|
{
|
package/package.json
CHANGED
|
@@ -1,42 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hl-core",
|
|
3
|
-
"version": "0.0.7-beta.
|
|
3
|
+
"version": "0.0.7-beta.21",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "nuxt.config.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"api/",
|
|
9
|
-
"models/",
|
|
10
9
|
"store/",
|
|
11
10
|
"layouts/",
|
|
12
11
|
"composables/",
|
|
13
12
|
"components/",
|
|
14
13
|
"plugins/",
|
|
14
|
+
"pages/",
|
|
15
|
+
"types/",
|
|
15
16
|
"nuxt.config.ts",
|
|
16
|
-
"tailwind.config.
|
|
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": "^
|
|
27
|
+
"@nuxt/devtools": "^0.4.1",
|
|
28
|
+
"@nuxt/types": "^2.16.3",
|
|
29
|
+
"nuxt": "3.4.1",
|
|
27
30
|
"prettier": "^2.8.4",
|
|
28
31
|
"typescript": "^4.9.5"
|
|
29
32
|
},
|
|
30
33
|
"dependencies": {
|
|
31
|
-
"@mdi/font": "^7.
|
|
32
|
-
"@nuxtjs/tailwindcss": "^6.
|
|
33
|
-
"@pinia/nuxt": "^0.4.
|
|
34
|
+
"@mdi/font": "^7.2.96",
|
|
35
|
+
"@nuxtjs/tailwindcss": "^6.6.6",
|
|
36
|
+
"@pinia/nuxt": "^0.4.8",
|
|
34
37
|
"animate.css": "^4.1.1",
|
|
35
|
-
"axios": "^1.3.
|
|
38
|
+
"axios": "^1.3.5",
|
|
36
39
|
"fast-xml-parser": "4.0.12",
|
|
37
40
|
"jwt-decode": "^3.1.2",
|
|
38
|
-
"
|
|
41
|
+
"maska": "1.5.0",
|
|
42
|
+
"pinia": "^2.0.34",
|
|
43
|
+
"v-idle-3": "^0.3.14",
|
|
39
44
|
"vue-toastification": "^2.0.0-rc.5",
|
|
40
|
-
"
|
|
45
|
+
"vue-uuid": "^3.0.0",
|
|
46
|
+
"vuetify": "^3.1.15"
|
|
41
47
|
}
|
|
42
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,11 +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';
|
|
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);
|
|
3
10
|
|
|
4
|
-
export default defineNuxtPlugin(() => {
|
|
5
11
|
return {
|
|
6
12
|
provide: {
|
|
7
13
|
capitalize: capitalize,
|
|
8
14
|
getFullNameShorted: getFullNameShorted,
|
|
15
|
+
libStyles: new Styles(),
|
|
16
|
+
maska: new Masks(),
|
|
9
17
|
reformatIin: reformatIin,
|
|
10
18
|
constants: constants,
|
|
11
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
|
});
|