hl-core 0.0.8 → 0.0.9-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.ts +202 -161
- package/api/interceptors.ts +23 -17
- package/components/Button/Btn.vue +4 -4
- package/components/Button/ScrollButtons.vue +2 -2
- package/components/Complex/ContentBlock.vue +1 -1
- package/components/Complex/MessageBlock.vue +26 -0
- package/components/Complex/Page.vue +8 -2
- package/components/Complex/WhiteBlock.vue +7 -0
- package/components/Dialog/Dialog.vue +9 -39
- package/components/Dialog/FamilyDialog.vue +10 -7
- package/components/Form/FormBlock.vue +91 -45
- package/components/Form/FormSection.vue +5 -2
- package/components/Form/FormTextSection.vue +3 -3
- package/components/Form/FormToggle.vue +4 -5
- package/components/Form/ManagerAttachment.vue +210 -0
- package/components/Form/ProductConditionsBlock.vue +70 -16
- package/components/Input/Datepicker.vue +45 -0
- package/components/Input/EmptyFormField.vue +1 -1
- package/components/Input/FileInput.vue +2 -3
- package/components/Input/FormInput.vue +31 -7
- package/components/Input/PanelInput.vue +7 -2
- package/components/Input/RoundedEmptyField.vue +5 -0
- package/components/Input/RoundedInput.vue +2 -2
- package/components/Input/RoundedSelect.vue +150 -0
- package/components/Layout/Drawer.vue +5 -2
- package/components/Layout/Header.vue +41 -5
- package/components/Layout/Loader.vue +1 -1
- package/components/Layout/SettingsPanel.vue +47 -13
- package/components/List/ListEmpty.vue +1 -1
- package/components/Menu/MenuHover.vue +30 -0
- package/components/Menu/MenuNav.vue +30 -14
- package/components/Menu/MenuNavItem.vue +10 -7
- package/components/Pages/Anketa.vue +68 -47
- package/components/Pages/Auth.vue +139 -46
- package/components/Pages/ContragentForm.vue +505 -0
- package/components/Pages/Documents.vue +11 -11
- package/components/Pages/InvoiceInfo.vue +30 -0
- package/components/Pages/MemberForm.vue +574 -316
- package/components/Pages/ProductAgreement.vue +2 -2
- package/components/Pages/ProductConditions.vue +671 -78
- package/components/Panel/PanelHandler.vue +309 -0
- package/components/Panel/PanelSelectItem.vue +3 -3
- package/components/Transitions/SlideTransition.vue +5 -0
- package/components/Utilities/Chip.vue +27 -0
- package/components/Utilities/IconBorder.vue +17 -0
- package/components/Utilities/JsonViewer.vue +27 -0
- package/composables/axios.ts +2 -2
- package/composables/classes.ts +227 -107
- package/composables/constants.ts +31 -51
- package/composables/index.ts +106 -2
- package/composables/styles.ts +33 -11
- package/configs/i18n.ts +15 -0
- package/layouts/default.vue +11 -8
- package/layouts/full.vue +1 -1
- package/locales/ru.json +647 -0
- package/nuxt.config.ts +14 -2
- package/package.json +35 -12
- package/pages/500.vue +4 -4
- package/pages/Token.vue +52 -0
- package/plugins/helperFunctionsPlugins.ts +11 -6
- package/plugins/storePlugin.ts +0 -1
- package/plugins/vuetifyPlugin.ts +8 -1
- package/store/data.store.ts +2666 -0
- package/store/form.store.ts +1 -1
- package/store/member.store.ts +164 -52
- package/store/rules.ts +193 -0
- package/types/enum.ts +83 -0
- package/types/env.d.ts +10 -0
- package/types/index.ts +279 -8
- package/components/Button/BtnIcon.vue +0 -47
- package/store/data.store.js +0 -2482
- package/store/messages.ts +0 -429
- package/store/rules.js +0 -153
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-select
|
|
3
|
+
class="rounded-select"
|
|
4
|
+
:model-value="modelValue"
|
|
5
|
+
:rules="rules"
|
|
6
|
+
:loading="loading"
|
|
7
|
+
:placeholder="placeholder"
|
|
8
|
+
:label="label"
|
|
9
|
+
:variant="variant"
|
|
10
|
+
:density="(density as any)"
|
|
11
|
+
:menu-icon="menuIcon"
|
|
12
|
+
:clear-icon="clearIcon"
|
|
13
|
+
:color="color"
|
|
14
|
+
:hint="hint"
|
|
15
|
+
:clearable="props.readonly ? false : clearable"
|
|
16
|
+
:disabled="disabled"
|
|
17
|
+
:readonly="props.readonly"
|
|
18
|
+
:prepend-icon="prependIcon ? prependIcon : ''"
|
|
19
|
+
:append-icon="appendIcon ? appendIcon : ''"
|
|
20
|
+
:prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
|
|
21
|
+
:append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
|
|
22
|
+
:bg-color="bgColor ? bgColor : ''"
|
|
23
|
+
:items="items"
|
|
24
|
+
@click:append="!props.readonly && $emit('append-out')"
|
|
25
|
+
@click:prepend="!props.readonly && $emit('prepend-out')"
|
|
26
|
+
@click:append-inner="!props.readonly && $emit('append')"
|
|
27
|
+
@click:prepend-inner="!props.readonly && $emit('prepend')"
|
|
28
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
29
|
+
>
|
|
30
|
+
<template v-if="loading" #loader>
|
|
31
|
+
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate />
|
|
32
|
+
</template>
|
|
33
|
+
</v-select>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script lang="ts">
|
|
37
|
+
export default defineComponent({
|
|
38
|
+
name: 'BaseRoundedSelect',
|
|
39
|
+
props: {
|
|
40
|
+
modelValue: {
|
|
41
|
+
required: false,
|
|
42
|
+
},
|
|
43
|
+
loading: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
47
|
+
items: {
|
|
48
|
+
type: Array<any>,
|
|
49
|
+
default: [],
|
|
50
|
+
},
|
|
51
|
+
clearable: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: true,
|
|
54
|
+
},
|
|
55
|
+
disabled: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false,
|
|
58
|
+
},
|
|
59
|
+
readonly: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
63
|
+
placeholder: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: '',
|
|
66
|
+
},
|
|
67
|
+
label: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: '',
|
|
70
|
+
},
|
|
71
|
+
hint: {
|
|
72
|
+
type: String,
|
|
73
|
+
default: '',
|
|
74
|
+
},
|
|
75
|
+
rules: {
|
|
76
|
+
type: Array<any>,
|
|
77
|
+
default: [],
|
|
78
|
+
},
|
|
79
|
+
variant: {
|
|
80
|
+
type: String as PropType<InputVariants>,
|
|
81
|
+
default: 'solo',
|
|
82
|
+
},
|
|
83
|
+
density: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: 'compact',
|
|
86
|
+
},
|
|
87
|
+
color: {
|
|
88
|
+
type: String,
|
|
89
|
+
default: '#009c73',
|
|
90
|
+
},
|
|
91
|
+
menuIcon: {
|
|
92
|
+
type: String,
|
|
93
|
+
default: 'mdi-chevron-down',
|
|
94
|
+
},
|
|
95
|
+
clearIcon: {
|
|
96
|
+
type: String,
|
|
97
|
+
default: 'mdi-close',
|
|
98
|
+
},
|
|
99
|
+
prependIcon: {
|
|
100
|
+
type: String,
|
|
101
|
+
},
|
|
102
|
+
appendIcon: {
|
|
103
|
+
type: String,
|
|
104
|
+
},
|
|
105
|
+
prependInnerIcon: {
|
|
106
|
+
type: String,
|
|
107
|
+
},
|
|
108
|
+
appendInnerIcon: {
|
|
109
|
+
type: String,
|
|
110
|
+
},
|
|
111
|
+
bgColor: {
|
|
112
|
+
type: String,
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
|
|
116
|
+
|
|
117
|
+
setup(props, { emit }) {
|
|
118
|
+
const submitted = (event: any) => {
|
|
119
|
+
emit('submitted', event);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
submitted,
|
|
124
|
+
props,
|
|
125
|
+
};
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
</script>
|
|
129
|
+
|
|
130
|
+
<style>
|
|
131
|
+
.rounded-select input:focus {
|
|
132
|
+
border: none !important;
|
|
133
|
+
outline: none !important;
|
|
134
|
+
}
|
|
135
|
+
.rounded-select.v-input {
|
|
136
|
+
flex: unset !important;
|
|
137
|
+
}
|
|
138
|
+
.rounded-select .v-label.v-field-label {
|
|
139
|
+
top: 20px;
|
|
140
|
+
}
|
|
141
|
+
.rounded-select .v-field {
|
|
142
|
+
border-radius: 8px;
|
|
143
|
+
border: 1px solid #dadada;
|
|
144
|
+
box-shadow: none;
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
}
|
|
147
|
+
.rounded-select .v-field--error {
|
|
148
|
+
border-color: #ff5449;
|
|
149
|
+
}
|
|
150
|
+
</style>
|
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
:disable-resize-watcher="true"
|
|
9
9
|
:disable-route-watcher="true"
|
|
10
10
|
>
|
|
11
|
-
<base-header :title="panelTitle" :has-back="true" back-icon="mdi-close" class="justify-center" @onBack="closePanel"
|
|
12
|
-
<div class="flex flex-col"
|
|
11
|
+
<base-header :title="panelTitle" :has-back="true" back-icon="mdi-close" class="justify-center" @onBack="closePanel" />
|
|
12
|
+
<div v-if="$dataStore.panelAction === null" class="flex flex-col" id="panel-actions">
|
|
13
13
|
<slot></slot>
|
|
14
14
|
</div>
|
|
15
|
+
<base-panel-handler v-else @task="$emit('task', $event)" />
|
|
16
|
+
<slot name="panel"></slot>
|
|
15
17
|
</v-navigation-drawer>
|
|
16
18
|
</template>
|
|
17
19
|
|
|
@@ -28,6 +30,7 @@ export default defineComponent({
|
|
|
28
30
|
default: 'panel',
|
|
29
31
|
},
|
|
30
32
|
},
|
|
33
|
+
emits: ['task'],
|
|
31
34
|
setup(props) {
|
|
32
35
|
const dataStore = useDataStore();
|
|
33
36
|
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<header class="relative w-full h-[70px] text-center font-medium align-middle flex items-center border-b-[1px]" :class="[$
|
|
3
|
-
<i v-if="hasBack" @click="$emit('onBack')" class="absolute left-5 mdi text-xl cursor-pointer" :class="[backIcon]"></i>
|
|
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
|
+
<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
|
-
<i
|
|
5
|
+
<i
|
|
6
|
+
v-if="hasMore"
|
|
7
|
+
@click="$emit('onMore')"
|
|
8
|
+
class="mdi absolute right-5 text-xl cursor-pointer transition-all"
|
|
9
|
+
:class="[moreIcon, hideMoreOnLg ? 'lg:!hidden' : '', moreIconAnim]"
|
|
10
|
+
>
|
|
11
|
+
</i>
|
|
6
12
|
</header>
|
|
7
13
|
</template>
|
|
8
14
|
|
|
@@ -35,14 +41,44 @@ export default defineComponent({
|
|
|
35
41
|
},
|
|
36
42
|
},
|
|
37
43
|
emits: ['onBack', 'onMore'],
|
|
38
|
-
setup() {
|
|
44
|
+
setup(props) {
|
|
39
45
|
const dataStore = useDataStore();
|
|
40
46
|
|
|
41
47
|
const onClickOutside = () => {
|
|
42
48
|
dataStore.settings.open = false;
|
|
43
49
|
};
|
|
44
50
|
|
|
45
|
-
|
|
51
|
+
const backIconAnim = computed(() => {
|
|
52
|
+
const icon = props.backIcon;
|
|
53
|
+
switch (icon) {
|
|
54
|
+
case 'mdi-arrow-left':
|
|
55
|
+
case 'mdi-account-arrow-left':
|
|
56
|
+
return 'hover:-translate-x-[2px]';
|
|
57
|
+
case 'mdi-close':
|
|
58
|
+
return 'hover:scale-110';
|
|
59
|
+
default:
|
|
60
|
+
return '';
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const moreIconAnim = computed(() => {
|
|
65
|
+
const icon = props.moreIcon;
|
|
66
|
+
switch (icon) {
|
|
67
|
+
case 'mdi-cog-outline':
|
|
68
|
+
return 'hover:rotate-[30deg]';
|
|
69
|
+
default:
|
|
70
|
+
return '';
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
// Computed
|
|
76
|
+
backIconAnim,
|
|
77
|
+
moreIconAnim,
|
|
78
|
+
|
|
79
|
+
// Functions
|
|
80
|
+
onClickOutside,
|
|
81
|
+
};
|
|
46
82
|
},
|
|
47
83
|
});
|
|
48
84
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-progress-circular :size="size" :width="width" :indeterminate="indeterminate" :color="color" :bg-color="bgColor"
|
|
2
|
+
<v-progress-circular :size="size" :width="width" :indeterminate="indeterminate" :color="color" :bg-color="bgColor" />
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="ts">
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<base-drawer :panel-title="$dataStore.menu.title" which-panel="settings">
|
|
3
3
|
<base-panel-item>
|
|
4
|
-
<v-btn size="x-small" icon="mdi-minus" color="#A0B3D8" class="text-white" variant="flat" @click="handleFontSize('decrease')"
|
|
4
|
+
<v-btn size="x-small" icon="mdi-minus" color="#A0B3D8" class="text-white" variant="flat" @click="handleFontSize('decrease')" />
|
|
5
5
|
Шрифт
|
|
6
|
-
<v-btn size="x-small" icon="mdi-plus" color="#A0B3D8" class="text-white" variant="flat" @click="handleFontSize('increase')"
|
|
6
|
+
<v-btn size="x-small" icon="mdi-plus" color="#A0B3D8" class="text-white" variant="flat" @click="handleFontSize('increase')" />
|
|
7
7
|
</base-panel-item>
|
|
8
8
|
<base-panel-item>
|
|
9
|
-
<v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')"
|
|
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 && !isProduction && $dataStore.accessToken" @click="changeBridge('lka', $dataStore.accessToken)" class="cursor-pointer">
|
|
13
|
+
{{ $dataStore.t('labels.lkaLong') }}
|
|
14
|
+
<i class="mdi mdi-chevron-right text-2xl text-[#A0B3D8]"></i
|
|
15
|
+
></base-panel-item>
|
|
16
|
+
<base-panel-item v-if="$dataStore.isLKA && $dataStore.accessToken" @click="changeBridge('efo', $dataStore.accessToken)" class="cursor-pointer">
|
|
17
|
+
{{ $dataStore.t('labels.efoLong') }}
|
|
18
|
+
<i class="mdi mdi-web text-2xl text-[#A0B3D8]"></i
|
|
19
|
+
></base-panel-item>
|
|
12
20
|
<base-panel-item
|
|
13
|
-
v-for="panelItem of dataStore.settings.items.filter(i =>
|
|
21
|
+
v-for="panelItem of dataStore.settings.items.filter(i => $dataStore.filters.show(i))"
|
|
14
22
|
:key="panelItem.title!"
|
|
15
23
|
class="cursor-pointer"
|
|
16
24
|
@click="panelItem.action ? panelItem.action() : null"
|
|
@@ -18,23 +26,39 @@
|
|
|
18
26
|
{{ panelItem.title }}
|
|
19
27
|
<i v-if="panelItem.icon" class="mdi text-xl text-[#A0B3D8]" :class="[panelItem.icon]"></i>
|
|
20
28
|
</base-panel-item>
|
|
21
|
-
<base-panel-item
|
|
22
|
-
|
|
23
|
-
<i class="mdi mdi-
|
|
29
|
+
<base-panel-item v-if="hasHistory" @click="openHistory" class="cursor-pointer">
|
|
30
|
+
{{ $dataStore.t('historyStatementsAndStatuses') }}
|
|
31
|
+
<i class="mdi mdi-history text-xl text-[#A0B3D8]"></i>
|
|
24
32
|
</base-panel-item>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
<base-panel-item @click="dialogSignOut = true" class="cursor-pointer" :class="[$styles.redText]">
|
|
34
|
+
{{ $dataStore.t('buttons.logout') }}
|
|
35
|
+
<i class="mdi mdi-logout text-xl"></i>
|
|
36
|
+
</base-panel-item>
|
|
37
|
+
<div v-if="$dataStore.settings.open && 'version' in pkg && pkg.version" class="absolute bottom-2 w-full flex items-center justify-center opacity-30 text-sm">
|
|
38
|
+
<p>{{ pkg.version }}</p>
|
|
39
|
+
</div>
|
|
40
|
+
<base-dialog
|
|
41
|
+
v-model="dialogSignOut"
|
|
42
|
+
:title="$dataStore.t('dialog.exit')"
|
|
43
|
+
:subtitle="$dataStore.t('dialog.dataWillClear')"
|
|
44
|
+
actions="default"
|
|
45
|
+
@yes="logoutUser"
|
|
46
|
+
@no="dialogSignOut = false"
|
|
47
|
+
/>
|
|
48
|
+
</base-drawer>
|
|
28
49
|
</template>
|
|
29
50
|
|
|
30
51
|
<script lang="ts" setup>
|
|
31
|
-
|
|
52
|
+
import { changeBridge } from '#imports';
|
|
53
|
+
|
|
54
|
+
import pkg from '../../package.json';
|
|
55
|
+
const dialogSignOut = ref(false);
|
|
32
56
|
const dataStore = useDataStore();
|
|
33
57
|
|
|
34
58
|
const handleFontSize = (action: 'increase' | 'decrease') => {
|
|
35
59
|
if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
|
|
36
60
|
if (action === 'decrease' && dataStore.fontSize > 14) dataStore.fontSize -= 2;
|
|
37
|
-
if (dataStore.
|
|
61
|
+
if (dataStore.isBridge) {
|
|
38
62
|
dataStore.sendToChild(constants.postActions.font, dataStore.fontSize);
|
|
39
63
|
} else {
|
|
40
64
|
dataStore.sendToParent(constants.postActions.font, dataStore.fontSize);
|
|
@@ -42,7 +66,17 @@ const handleFontSize = (action: 'increase' | 'decrease') => {
|
|
|
42
66
|
};
|
|
43
67
|
|
|
44
68
|
const logoutUser = async () => {
|
|
45
|
-
|
|
69
|
+
dialogSignOut.value = false;
|
|
46
70
|
await dataStore.logoutUser();
|
|
47
71
|
};
|
|
72
|
+
|
|
73
|
+
const isProduction = import.meta.env.VITE_MODE === 'production';
|
|
74
|
+
|
|
75
|
+
const hasHistory = computed(() => {
|
|
76
|
+
return !dataStore.isLKA;
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const openHistory = async () => {
|
|
80
|
+
dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge ? '' : dataStore.product);
|
|
81
|
+
};
|
|
48
82
|
</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>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-menu v-if="items.length" :activator="activator" location="bottom center" :offset="top" transition="scale-transition">
|
|
3
|
+
<base-form-text-section class="p-4 border-[1px] flex flex-col gap-3 elevation-3 w-[250px]">
|
|
4
|
+
<div v-for="item of items.filter(i => $dataStore.filters.show(i))" :key="item.id">
|
|
5
|
+
<base-menu-nav-item :class="[$styles.textSimple]" :menu-item="item" @click="$emit(item.id)" />
|
|
6
|
+
</div>
|
|
7
|
+
</base-form-text-section>
|
|
8
|
+
</v-menu>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { MenuItem } from '../../composables/classes';
|
|
13
|
+
|
|
14
|
+
export default defineComponent({
|
|
15
|
+
props: {
|
|
16
|
+
items: {
|
|
17
|
+
type: Array as PropType<MenuItem[]>,
|
|
18
|
+
default: [],
|
|
19
|
+
},
|
|
20
|
+
activator: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: 'parent',
|
|
23
|
+
},
|
|
24
|
+
top: {
|
|
25
|
+
type: Number,
|
|
26
|
+
default: 10,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
@@ -6,21 +6,21 @@
|
|
|
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="hideOnLg"
|
|
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]">
|
|
19
|
-
<div v-for="(item, index) of $dataStore.menuItems.filter(i =>
|
|
19
|
+
<div v-for="(item, index) of $dataStore.menuItems.filter(i => $dataStore.filters.show(i))" :key="index">
|
|
20
20
|
<base-menu-nav-item
|
|
21
21
|
:menu-item="item"
|
|
22
22
|
:selected="!!selected.title && !!item.title && selected.title === item.title"
|
|
23
|
-
:disabled="
|
|
23
|
+
:disabled="$dataStore.filters.disabled(item)"
|
|
24
24
|
@click.left="pickItem(item)"
|
|
25
25
|
@click.middle="openTab(item)"
|
|
26
26
|
>
|
|
@@ -32,10 +32,17 @@
|
|
|
32
32
|
<slot name="end"></slot>
|
|
33
33
|
<slot name="actions"></slot>
|
|
34
34
|
<base-fade-transition>
|
|
35
|
-
<div v-if="$dataStore.buttons && $dataStore.buttons.length" class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[
|
|
35
|
+
<div v-if="$dataStore.buttons && $dataStore.buttons.length" class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[10%] w-full pr-4">
|
|
36
36
|
<div v-for="(item, index) of $dataStore.buttons" :key="index">
|
|
37
37
|
<transition enter-active-class="animate__animated animate__fadeIn animate__faster" leave-active-class="animate__animated animate__fadeOut animate__faster">
|
|
38
|
-
<base-btn
|
|
38
|
+
<base-btn
|
|
39
|
+
v-if="$dataStore.filters.show(item)"
|
|
40
|
+
:text="item.title!"
|
|
41
|
+
:btn="item.color"
|
|
42
|
+
:disabled="item.disabled"
|
|
43
|
+
:loading="$dataStore.isButtonsLoading"
|
|
44
|
+
@click="item.action"
|
|
45
|
+
/>
|
|
39
46
|
</transition>
|
|
40
47
|
</div></div
|
|
41
48
|
></base-fade-transition>
|
|
@@ -44,7 +51,7 @@
|
|
|
44
51
|
</template>
|
|
45
52
|
|
|
46
53
|
<script lang="ts">
|
|
47
|
-
import { MenuItem } from '
|
|
54
|
+
import { MenuItem } from '../../composables/classes';
|
|
48
55
|
import { RouteLocationNormalized } from 'vue-router';
|
|
49
56
|
|
|
50
57
|
export default defineComponent({
|
|
@@ -69,10 +76,6 @@ export default defineComponent({
|
|
|
69
76
|
type: Boolean,
|
|
70
77
|
default: false,
|
|
71
78
|
},
|
|
72
|
-
hideMoreOnLg: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
default: false,
|
|
75
|
-
},
|
|
76
79
|
moreIcon: {
|
|
77
80
|
type: String,
|
|
78
81
|
default: 'mdi-cog-outline',
|
|
@@ -84,7 +87,7 @@ export default defineComponent({
|
|
|
84
87
|
const router = useRouter();
|
|
85
88
|
|
|
86
89
|
const pickItem = async (item: MenuItem) => {
|
|
87
|
-
if (item.title !== dataStore.menu.selectedItem.title &&
|
|
90
|
+
if (item.title !== dataStore.menu.selectedItem.title && !dataStore.filters.disabled(item)) {
|
|
88
91
|
if (typeof item.link === 'object') {
|
|
89
92
|
if (item.link && 'name' in item.link) {
|
|
90
93
|
await router.push(item.link as RouteLocationNormalized);
|
|
@@ -102,7 +105,20 @@ export default defineComponent({
|
|
|
102
105
|
}
|
|
103
106
|
};
|
|
104
107
|
|
|
105
|
-
|
|
108
|
+
const hideOnLg = computed(() => {
|
|
109
|
+
switch (router.currentRoute.value.name) {
|
|
110
|
+
case 'Insurance-Product':
|
|
111
|
+
case 'Menu':
|
|
112
|
+
case 'History':
|
|
113
|
+
case 'Main':
|
|
114
|
+
case 'taskId':
|
|
115
|
+
return false;
|
|
116
|
+
default:
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
return { pickItem, openTab, hideOnLg };
|
|
106
122
|
},
|
|
107
123
|
});
|
|
108
124
|
</script>
|
|
@@ -1,22 +1,25 @@
|
|
|
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
|
-
class="h-[60px] flex items-center justify-between hover:bg-[#A0B3D8] hover:!text-white pl-4 cursor-pointer transition-all"
|
|
10
|
+
class="h-[60px] flex items-center justify-between hover:bg-[#A0B3D8] hover:!text-white pl-4 cursor-pointer transition-all group"
|
|
11
11
|
>
|
|
12
12
|
<span>{{ menuItem.title }}</span>
|
|
13
|
-
<
|
|
13
|
+
<div class="flex items-center">
|
|
14
|
+
<i v-if="menuItem.icon" class="mdi text-xl pr-4" :class="[menuItem.icon]"></i>
|
|
15
|
+
<base-chip :chip="menuItem.chip" />
|
|
16
|
+
</div>
|
|
14
17
|
<v-tooltip v-if="menuItem.description" activator="parent" location="bottom">{{ menuItem.description }}</v-tooltip>
|
|
15
18
|
</div>
|
|
16
19
|
</template>
|
|
17
20
|
|
|
18
21
|
<script lang="ts">
|
|
19
|
-
import { MenuItem } from '
|
|
22
|
+
import { MenuItem } from '../../composables/classes';
|
|
20
23
|
|
|
21
24
|
export default defineComponent({
|
|
22
25
|
props: {
|