hl-core 0.0.9-beta.3 → 0.0.9-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/base.api.ts +862 -0
- package/api/index.ts +2 -620
- package/api/interceptors.ts +58 -14
- package/components/Button/Btn.vue +3 -3
- package/components/Complex/ContentBlock.vue +1 -1
- package/components/Complex/MessageBlock.vue +2 -2
- package/components/Complex/Page.vue +8 -2
- package/components/Complex/WhiteBlock.vue +7 -0
- package/components/Dialog/Dialog.vue +60 -15
- package/components/Dialog/FamilyDialog.vue +5 -5
- package/components/Form/DynamicForm.vue +99 -0
- package/components/Form/FormBlock.vue +36 -29
- package/components/Form/FormData.vue +48 -0
- package/components/Form/FormSection.vue +2 -2
- package/components/Form/FormTextSection.vue +3 -3
- package/components/Form/FormToggle.vue +3 -3
- package/components/Form/ManagerAttachment.vue +104 -52
- package/components/Form/ProductConditionsBlock.vue +73 -20
- package/components/Input/DynamicInput.vue +23 -0
- package/components/Input/EmptyFormField.vue +1 -1
- package/components/Input/FileInput.vue +15 -4
- package/components/Input/Monthpicker.vue +33 -0
- package/components/Input/PanelInput.vue +5 -1
- package/components/Input/RoundedEmptyField.vue +5 -0
- package/components/Input/RoundedSelect.vue +13 -0
- package/components/Input/SwitchInput.vue +64 -0
- package/components/Input/TextInput.vue +161 -0
- package/components/Layout/Drawer.vue +17 -4
- package/components/Layout/Header.vue +2 -2
- package/components/Layout/SettingsPanel.vue +10 -15
- package/components/List/ListEmpty.vue +1 -1
- package/components/Menu/MenuHover.vue +1 -1
- package/components/Menu/MenuNav.vue +3 -3
- package/components/Menu/MenuNavItem.vue +4 -4
- package/components/Pages/Anketa.vue +144 -65
- package/components/Pages/Auth.vue +21 -10
- package/components/Pages/ContragentForm.vue +505 -0
- package/components/Pages/Documents.vue +57 -11
- package/components/Pages/InvoiceInfo.vue +2 -2
- package/components/Pages/MemberForm.vue +253 -89
- package/components/Pages/ProductAgreement.vue +2 -11
- package/components/Pages/ProductConditions.vue +777 -164
- package/components/Panel/PanelHandler.vue +297 -54
- package/components/Panel/PanelSelectItem.vue +18 -3
- package/components/Panel/RightPanelCloser.vue +7 -0
- package/components/Utilities/IconBorder.vue +17 -0
- package/composables/axios.ts +1 -1
- package/composables/classes.ts +405 -9
- package/composables/constants.ts +40 -0
- package/composables/fields.ts +203 -0
- package/composables/index.ts +48 -0
- package/composables/styles.ts +22 -10
- package/configs/i18n.ts +0 -2
- package/layouts/default.vue +46 -4
- package/layouts/full.vue +1 -1
- package/locales/ru.json +428 -11
- package/nuxt.config.ts +1 -1
- package/package.json +30 -39
- package/pages/500.vue +2 -2
- package/pages/Token.vue +1 -0
- package/plugins/helperFunctionsPlugins.ts +6 -7
- package/plugins/vuetifyPlugin.ts +2 -0
- package/store/data.store.ts +936 -217
- package/store/extractStore.ts +17 -0
- package/store/form.store.ts +13 -1
- package/store/member.store.ts +1 -1
- package/store/rules.ts +38 -2
- package/types/enum.ts +8 -0
- package/types/form.ts +94 -0
- package/types/index.ts +162 -10
- package/components/Button/BtnIcon.vue +0 -47
- package/locales/kz.json +0 -590
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="base-text-input flex justify-between items-center pr-4 mb-[1px] bg-[#fff]" @click="$emit('onClickField')">
|
|
3
|
+
<v-text-field v-model="control.modelValue" v-bind="textFieldProps" v-maska="mask">
|
|
4
|
+
<div v-if="hasSuffix" class="absolute top-[27px] left-[18px] flex items-center justify-center">
|
|
5
|
+
<p class="opacity-0 inline-block mr-[2px]">{{ control.modelValue }}</p>
|
|
6
|
+
<span>{{ suffix }}</span>
|
|
7
|
+
</div>
|
|
8
|
+
</v-text-field>
|
|
9
|
+
<v-icon v-if="control.iconName" :icon="`mdi cursor-pointer ${iconsList[control.iconName]}`" color="#A0B3D8" />
|
|
10
|
+
<vue-date-picker v-if="control.maska === 'date'" v-model="control.modelValue" v-bind="datePickerProps" @update:modelValue="$emit('update:modelValue', $event)">
|
|
11
|
+
<template #trigger>
|
|
12
|
+
<v-icon icon="mdi mdi-calendar-blank-outline cursor-pointer" color="#a0b3d8" />
|
|
13
|
+
</template>
|
|
14
|
+
</vue-date-picker>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
const iconsList: { [key: string]: string } = {
|
|
20
|
+
arrowRight: 'mdi-chevron-right',
|
|
21
|
+
search: 'mdi-magnify',
|
|
22
|
+
sms: 'mdi-message-text',
|
|
23
|
+
clear: 'mdi-close',
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const suffixList: { [key: string]: string } = {
|
|
27
|
+
kzt: '₸',
|
|
28
|
+
usd: '$',
|
|
29
|
+
percent: '%',
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default defineComponent({
|
|
33
|
+
props: {
|
|
34
|
+
control: {
|
|
35
|
+
type: Object as PropType<InputType>,
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
setup(props) {
|
|
40
|
+
const mask = computed(() => (props.control.maska ? useMask()[props.control.maska] : ''));
|
|
41
|
+
const dataStore = useDataStore();
|
|
42
|
+
|
|
43
|
+
const textFieldProps = computed(() => {
|
|
44
|
+
return {
|
|
45
|
+
label: props.control.label,
|
|
46
|
+
placeholder: props.control.placeholder,
|
|
47
|
+
disabled: props.control.disabled,
|
|
48
|
+
maxLength: props.control.maxLength,
|
|
49
|
+
readonly: props.control.readonly || props.control.iconName === 'arrowRight',
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const datePickerProps = computed(() => {
|
|
54
|
+
return {
|
|
55
|
+
locale: 'ru',
|
|
56
|
+
flow: ['calendar'],
|
|
57
|
+
modelType: 'dd.MM.yyyy',
|
|
58
|
+
enableTimePicker: false,
|
|
59
|
+
altPosition: () => ({ top: 0, left: -275 }),
|
|
60
|
+
clearable: false,
|
|
61
|
+
disabled: props.control.disabled,
|
|
62
|
+
readonly: props.control.readonly,
|
|
63
|
+
selectText: 'Выбрать',
|
|
64
|
+
cancelText: 'Закрыть',
|
|
65
|
+
offset: '-50',
|
|
66
|
+
class: 'max-w-max z-[10]',
|
|
67
|
+
closeOnScroll: true,
|
|
68
|
+
transitions: false,
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const hasSuffix = computed(() => {
|
|
73
|
+
return props.control.suffix && props.control.type === 'number' && props.control.modelValue;
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const suffix = computed(() => {
|
|
77
|
+
return hasSuffix.value ? suffixList[props.control.suffix!] : '';
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
const onClickIcon = async () => {
|
|
81
|
+
if (props.control.fetchFrom) {
|
|
82
|
+
dataStore.rightPanel.open = true;
|
|
83
|
+
dataStore.rightPanel.title = 'test panel name';
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
// State
|
|
89
|
+
datePickerProps,
|
|
90
|
+
textFieldProps,
|
|
91
|
+
hasSuffix,
|
|
92
|
+
mask,
|
|
93
|
+
suffix,
|
|
94
|
+
iconsList,
|
|
95
|
+
// Functions
|
|
96
|
+
onClickIcon,
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
});
|
|
100
|
+
</script>
|
|
101
|
+
<style>
|
|
102
|
+
.base-text-input .v-field__append-inner i {
|
|
103
|
+
color: #a0b3d8 !important;
|
|
104
|
+
margin-left: 10px;
|
|
105
|
+
margin-right: 4px;
|
|
106
|
+
}
|
|
107
|
+
.base-text-input .v-field__append-inner {
|
|
108
|
+
margin-top: 12px;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
padding-right: 6px;
|
|
111
|
+
}
|
|
112
|
+
.base-text-input .v-field__outline,
|
|
113
|
+
.base-text-input .v-field__overlay,
|
|
114
|
+
.base-text-input .v-field__loader {
|
|
115
|
+
display: none !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.base-text-input .v-input__prepend {
|
|
119
|
+
padding-top: 0;
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
}
|
|
123
|
+
.base-text-input .v-field__append-inner {
|
|
124
|
+
display: flex;
|
|
125
|
+
padding: 0;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.base-text-input .v-file-input {
|
|
131
|
+
padding: 0px;
|
|
132
|
+
}
|
|
133
|
+
.base-text-input .v-messages,
|
|
134
|
+
.base-text-input .v-messages__message,
|
|
135
|
+
.base-text-input .v-input__details {
|
|
136
|
+
min-height: unset !important;
|
|
137
|
+
}
|
|
138
|
+
.base-text-input .v-messages__message {
|
|
139
|
+
transition: all 0.5s;
|
|
140
|
+
margin-bottom: 10px;
|
|
141
|
+
}
|
|
142
|
+
.base-text-input .v-input__details {
|
|
143
|
+
padding-bottom: 0 !important;
|
|
144
|
+
padding-top: 0 !important;
|
|
145
|
+
}
|
|
146
|
+
.base-text-input .dp__action_buttons button {
|
|
147
|
+
padding: 6px 9px;
|
|
148
|
+
height: unset;
|
|
149
|
+
}
|
|
150
|
+
.base-text-input .dp__action_select {
|
|
151
|
+
background: #a0b3d8;
|
|
152
|
+
color: white;
|
|
153
|
+
}
|
|
154
|
+
.base-text-input .dp__action_select:hover {
|
|
155
|
+
background: #97acd6;
|
|
156
|
+
}
|
|
157
|
+
.base-text-input .dp__active_date,
|
|
158
|
+
.base-text-input .dp__overlay_cell_active {
|
|
159
|
+
background: #a0b3d8;
|
|
160
|
+
}
|
|
161
|
+
</style>
|
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
<v-navigation-drawer
|
|
3
3
|
v-model="$dataStore[whichPanel].open"
|
|
4
4
|
:temporary="$dataStore[whichPanel].overlay"
|
|
5
|
-
location="
|
|
6
|
-
class="sm:!w-[400px]
|
|
7
|
-
:class="[
|
|
5
|
+
:location="side"
|
|
6
|
+
class="sm:!w-[400px]"
|
|
7
|
+
:class="[
|
|
8
|
+
$dataStore[whichPanel].overlay ? 'lg:!hidden' : '',
|
|
9
|
+
$dataStore[whichPanel].open ? '!w-full lg:!w-1/4' : 'lg:!w-[0px]',
|
|
10
|
+
side === 'left' ? '!left-0 !absolute' : '!right-0',
|
|
11
|
+
side === 'right' && $dataStore[whichPanel].open ? 'lg:!relative' : '',
|
|
12
|
+
]"
|
|
8
13
|
:disable-resize-watcher="true"
|
|
9
14
|
:disable-route-watcher="true"
|
|
10
15
|
>
|
|
@@ -12,7 +17,10 @@
|
|
|
12
17
|
<div v-if="$dataStore.panelAction === null" class="flex flex-col" id="panel-actions">
|
|
13
18
|
<slot></slot>
|
|
14
19
|
</div>
|
|
15
|
-
<
|
|
20
|
+
<div v-if="side === 'right'" class="flex flex-col" id="right-panel-actions">
|
|
21
|
+
<slot></slot>
|
|
22
|
+
</div>
|
|
23
|
+
<base-panel-handler v-else @task="$emit('task', $event)" />
|
|
16
24
|
<slot name="panel"></slot>
|
|
17
25
|
</v-navigation-drawer>
|
|
18
26
|
</template>
|
|
@@ -29,7 +37,12 @@ export default defineComponent({
|
|
|
29
37
|
type: String as PropType<PanelTypes>,
|
|
30
38
|
default: 'panel',
|
|
31
39
|
},
|
|
40
|
+
side: {
|
|
41
|
+
type: String as PropType<'left' | 'right'>,
|
|
42
|
+
default: 'left',
|
|
43
|
+
},
|
|
32
44
|
},
|
|
45
|
+
emits: ['task'],
|
|
33
46
|
setup(props) {
|
|
34
47
|
const dataStore = useDataStore();
|
|
35
48
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<header class="relative w-full h-[70px] text-center font-medium align-middle flex items-center border-b-[1px]" :class="[$
|
|
2
|
+
<header class="relative w-full h-[70px] text-center font-medium align-middle flex items-center border-b-[1px]" :class="[$styles.blueBgLight, $styles.textSimple]">
|
|
3
3
|
<i v-if="hasBack" @click="$emit('onBack')" class="absolute left-5 mdi text-xl cursor-pointer transition-all" :class="[backIcon, backIconAnim]"></i>
|
|
4
4
|
<span class="mx-10">{{ title }}</span>
|
|
5
5
|
<i
|
|
@@ -33,7 +33,7 @@ export default defineComponent({
|
|
|
33
33
|
},
|
|
34
34
|
moreIcon: {
|
|
35
35
|
type: String,
|
|
36
|
-
default: 'mdi-
|
|
36
|
+
default: 'mdi-dots-vertical',
|
|
37
37
|
},
|
|
38
38
|
title: {
|
|
39
39
|
type: String,
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
<v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')" />
|
|
10
10
|
<i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
|
|
11
11
|
></base-panel-item>
|
|
12
|
-
<base-panel-item v-if="$dataStore.isEFO &&
|
|
12
|
+
<base-panel-item v-if="$dataStore.isEFO && $dataStore.accessToken && $dataStore.hasAccess().toLKA" @click="changeBridge('lka', $dataStore.accessToken)" class="cursor-pointer">
|
|
13
13
|
{{ $dataStore.t('labels.lkaLong') }}
|
|
14
14
|
<i class="mdi mdi-chevron-right text-2xl text-[#A0B3D8]"></i
|
|
15
15
|
></base-panel-item>
|
|
16
|
-
<base-panel-item v-if="$dataStore.isLKA" @click="changeBridge('efo')" class="cursor-pointer">
|
|
16
|
+
<base-panel-item v-if="$dataStore.isLKA && $dataStore.accessToken" @click="changeBridge('efo', $dataStore.accessToken)" class="cursor-pointer">
|
|
17
17
|
{{ $dataStore.t('labels.efoLong') }}
|
|
18
18
|
<i class="mdi mdi-web text-2xl text-[#A0B3D8]"></i
|
|
19
19
|
></base-panel-item>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
{{ $dataStore.t('historyStatementsAndStatuses') }}
|
|
31
31
|
<i class="mdi mdi-history text-xl text-[#A0B3D8]"></i>
|
|
32
32
|
</base-panel-item>
|
|
33
|
-
<base-panel-item @click="dialogSignOut = true" class="cursor-pointer" :class="[$
|
|
33
|
+
<base-panel-item @click="dialogSignOut = true" class="cursor-pointer" :class="[$styles.redText]">
|
|
34
34
|
{{ $dataStore.t('buttons.logout') }}
|
|
35
35
|
<i class="mdi mdi-logout text-xl"></i>
|
|
36
36
|
</base-panel-item>
|
|
@@ -39,9 +39,10 @@
|
|
|
39
39
|
</div>
|
|
40
40
|
<base-dialog
|
|
41
41
|
v-model="dialogSignOut"
|
|
42
|
-
:title="$dataStore.t('dialog.
|
|
43
|
-
:subtitle="$dataStore.t('dialog.dataWillClear')"
|
|
44
|
-
|
|
42
|
+
:title="$dataStore.t('dialog.confirmExit')"
|
|
43
|
+
:subtitle="$dataStore.t('dialog.exit') + $dataStore.t('dialog.dataWillClear')"
|
|
44
|
+
:confirm="$dataStore.t('confirm.exit')"
|
|
45
|
+
:icon="{ mdi: 'exit-to-app', color: '#FD2D39' }"
|
|
45
46
|
@yes="logoutUser"
|
|
46
47
|
@no="dialogSignOut = false"
|
|
47
48
|
/>
|
|
@@ -49,6 +50,8 @@
|
|
|
49
50
|
</template>
|
|
50
51
|
|
|
51
52
|
<script lang="ts" setup>
|
|
53
|
+
import { changeBridge } from '#imports';
|
|
54
|
+
|
|
52
55
|
import pkg from '../../package.json';
|
|
53
56
|
const dialogSignOut = ref(false);
|
|
54
57
|
const dataStore = useDataStore();
|
|
@@ -68,19 +71,11 @@ const logoutUser = async () => {
|
|
|
68
71
|
await dataStore.logoutUser();
|
|
69
72
|
};
|
|
70
73
|
|
|
71
|
-
const isProduction = import.meta.env.VITE_MODE === 'production';
|
|
72
|
-
|
|
73
74
|
const hasHistory = computed(() => {
|
|
74
75
|
return !dataStore.isLKA;
|
|
75
76
|
});
|
|
76
77
|
|
|
77
78
|
const openHistory = async () => {
|
|
78
|
-
dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge ? '' : dataStore.product);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
const changeBridge = async (toBridge: 'efo' | 'lka') => {
|
|
82
|
-
const bridgeUrl = import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string;
|
|
83
|
-
if (!bridgeUrl) return;
|
|
84
|
-
window.open(`${bridgeUrl}/#/Token?token=${dataStore.accessToken}`, '_blank');
|
|
79
|
+
dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge || dataStore.isDSO || dataStore.isUU ? '' : dataStore.product);
|
|
85
80
|
};
|
|
86
81
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="border-[1px] rounded-lg h-[80px] mx-[10px] mt-[14px] flex place-content-center" :class="[$
|
|
2
|
+
<div class="border-[1px] rounded-lg h-[80px] mx-[10px] mt-[14px] flex place-content-center" :class="[$styles.blueBgLight, $styles.textTitle]">
|
|
3
3
|
<div class="flex justify-center items-center font-medium gap-2 opacity-40">
|
|
4
4
|
{{ text }}
|
|
5
5
|
<i class="text-2xl mdi" :class="[icon ? icon : 'mdi-database-off-outline']"></i>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<v-menu v-if="items.length" :activator="activator" location="bottom center" :offset="top" transition="scale-transition">
|
|
3
3
|
<base-form-text-section class="p-4 border-[1px] flex flex-col gap-3 elevation-3 w-[250px]">
|
|
4
4
|
<div v-for="item of items.filter(i => $dataStore.filters.show(i))" :key="item.id">
|
|
5
|
-
<base-menu-nav-item :class="[$
|
|
5
|
+
<base-menu-nav-item :class="[$styles.textSimple]" :menu-item="item" @click="$emit(item.id)" />
|
|
6
6
|
</div>
|
|
7
7
|
</base-form-text-section>
|
|
8
8
|
</v-menu>
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
:has-back="hasBack"
|
|
7
7
|
:back-icon="backIcon"
|
|
8
8
|
:has-more="hasMore"
|
|
9
|
-
:hide-more-on-lg="
|
|
9
|
+
:hide-more-on-lg="false"
|
|
10
10
|
:more-icon="moreIcon"
|
|
11
11
|
@onBack="$emit('onBack')"
|
|
12
12
|
@onMore="$emit('onMore')"
|
|
13
13
|
/>
|
|
14
14
|
<slot key="slot-content" name="content"></slot>
|
|
15
|
-
<section key="main" :class="[$
|
|
15
|
+
<section key="main" :class="[$styles.flexColNav]">
|
|
16
16
|
<slot name="start"></slot>
|
|
17
17
|
<base-fade-transition>
|
|
18
18
|
<div v-if="$dataStore.menuItems && $dataStore.menuItems.length" class="flex flex-col gap-[10px]">
|
|
@@ -78,7 +78,7 @@ export default defineComponent({
|
|
|
78
78
|
},
|
|
79
79
|
moreIcon: {
|
|
80
80
|
type: String,
|
|
81
|
-
default: 'mdi-
|
|
81
|
+
default: 'mdi-dots-vertical',
|
|
82
82
|
},
|
|
83
83
|
},
|
|
84
84
|
emits: ['onLink', 'onBack', 'onMore', 'clicked'],
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
:class="[
|
|
4
|
-
selected ? $
|
|
5
|
-
selected ? $
|
|
6
|
-
$
|
|
7
|
-
$
|
|
4
|
+
selected ? $styles.blueBg : $styles.blueBgLight,
|
|
5
|
+
selected ? $styles.whiteText : $styles.blackText,
|
|
6
|
+
$styles.rounded,
|
|
7
|
+
$styles.textSimple,
|
|
8
8
|
disabled ? 'cursor-not-allowed opacity-50' : '',
|
|
9
9
|
]"
|
|
10
10
|
class="h-[60px] flex items-center justify-between hover:bg-[#A0B3D8] hover:!text-white pl-4 cursor-pointer transition-all group"
|