hl-core 0.0.8 → 0.0.9-beta.2
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 +142 -101
- package/api/interceptors.ts +17 -13
- package/components/Button/Btn.vue +1 -1
- package/components/Button/ScrollButtons.vue +2 -2
- package/components/Complex/MessageBlock.vue +26 -0
- package/components/Complex/Page.vue +1 -1
- package/components/Dialog/Dialog.vue +9 -39
- package/components/Dialog/FamilyDialog.vue +7 -4
- package/components/Form/FormBlock.vue +90 -42
- package/components/Form/FormSection.vue +4 -1
- package/components/Form/FormToggle.vue +1 -2
- package/components/Form/ManagerAttachment.vue +197 -0
- package/components/Form/ProductConditionsBlock.vue +68 -14
- package/components/Input/Datepicker.vue +45 -0
- package/components/Input/FileInput.vue +2 -3
- package/components/Input/FormInput.vue +31 -7
- package/components/Input/PanelInput.vue +7 -2
- package/components/Input/RoundedInput.vue +2 -2
- package/components/Input/RoundedSelect.vue +137 -0
- package/components/Layout/Drawer.vue +4 -2
- package/components/Layout/Header.vue +40 -4
- package/components/Layout/Loader.vue +1 -1
- package/components/Layout/SettingsPanel.vue +51 -13
- package/components/Menu/MenuHover.vue +30 -0
- package/components/Menu/MenuNav.vue +29 -13
- package/components/Menu/MenuNavItem.vue +6 -3
- package/components/Pages/Anketa.vue +59 -33
- package/components/Pages/Auth.vue +139 -46
- package/components/Pages/Documents.vue +7 -7
- package/components/Pages/InvoiceInfo.vue +30 -0
- package/components/Pages/MemberForm.vue +544 -293
- package/components/Pages/ProductAgreement.vue +4 -2
- package/components/Pages/ProductConditions.vue +673 -75
- package/components/Panel/PanelHandler.vue +304 -0
- package/components/Panel/PanelSelectItem.vue +1 -1
- package/components/Transitions/SlideTransition.vue +5 -0
- package/components/Utilities/Chip.vue +27 -0
- package/components/Utilities/JsonViewer.vue +27 -0
- package/composables/axios.ts +1 -1
- package/composables/classes.ts +223 -101
- package/composables/constants.ts +26 -51
- package/composables/index.ts +80 -2
- package/composables/styles.ts +15 -3
- package/configs/i18n.ts +17 -0
- package/layouts/default.vue +6 -6
- package/locales/kz.json +585 -0
- package/locales/ru.json +587 -0
- package/nuxt.config.ts +13 -1
- package/package.json +43 -11
- package/pages/500.vue +2 -2
- package/pages/Token.vue +51 -0
- package/plugins/helperFunctionsPlugins.ts +6 -0
- package/plugins/storePlugin.ts +0 -1
- package/plugins/vuetifyPlugin.ts +8 -1
- package/store/data.store.ts +2649 -0
- package/store/form.store.ts +1 -1
- package/store/member.store.ts +164 -52
- package/store/{rules.js → rules.ts} +65 -34
- package/types/enum.ts +83 -0
- package/types/env.d.ts +10 -0
- package/types/index.ts +262 -5
- package/store/data.store.js +0 -2482
- package/store/messages.ts +0 -429
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<vue-date-picker
|
|
3
|
+
:model-value="modelValue"
|
|
4
|
+
:clearable="false"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:reaonly="readonly"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
locale="ru"
|
|
9
|
+
model-type="dd.MM.yyyy"
|
|
10
|
+
position="left"
|
|
11
|
+
menu-class-name="!left-[30vw] md:!left-[70vw] lg:!left-[75vw]"
|
|
12
|
+
:teleport="teleport"
|
|
13
|
+
:offset="-50"
|
|
14
|
+
:close-on-scroll="true"
|
|
15
|
+
:enable-time-picker="false"
|
|
16
|
+
cancel-text="Отменить"
|
|
17
|
+
select-text="Выбрать"
|
|
18
|
+
>
|
|
19
|
+
<template #trigger>
|
|
20
|
+
<v-icon icon="mdi mdi-calendar-blank-outline cursor-pointer" />
|
|
21
|
+
</template>
|
|
22
|
+
</vue-date-picker>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
export default defineComponent({
|
|
27
|
+
props: {
|
|
28
|
+
modelValue: {
|
|
29
|
+
required: false,
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
},
|
|
35
|
+
readonly: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false,
|
|
38
|
+
},
|
|
39
|
+
teleport: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: '.v-form',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
</script>
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
accept=".pdf,.doc,.jpeg,.jpg,.jpg"
|
|
13
13
|
truncate-length="15"
|
|
14
14
|
clear-icon="mdi mdi-close"
|
|
15
|
-
:label="$t('labels.chooseDoc')"
|
|
16
|
-
|
|
15
|
+
:label="$dataStore.t('labels.chooseDoc')"
|
|
16
|
+
/>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
19
19
|
<script lang="ts">
|
|
@@ -43,7 +43,6 @@ export default defineComponent({
|
|
|
43
43
|
top: 20px;
|
|
44
44
|
}
|
|
45
45
|
.file-input .v-field__append-inner {
|
|
46
|
-
padding-top: 18px;
|
|
47
46
|
padding-right: 6px;
|
|
48
47
|
}
|
|
49
48
|
.file-input .v-field__append-inner i {
|
|
@@ -19,17 +19,31 @@
|
|
|
19
19
|
:prepend-icon="prependIcon ? prependIcon : ''"
|
|
20
20
|
:append-icon="appendIcon ? appendIcon : ''"
|
|
21
21
|
:prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
|
|
22
|
-
:append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
|
|
23
22
|
:bg-color="bgColor ? bgColor : ''"
|
|
23
|
+
:suffix="suffix"
|
|
24
|
+
@input="$emit('input', $event)"
|
|
24
25
|
@keyup.enter.prevent="submitted"
|
|
25
26
|
@click:append="!props.readonly && $emit('append-out')"
|
|
26
27
|
@click:prepend="!props.readonly && $emit('prepend-out')"
|
|
27
|
-
@click:append-inner="!props.readonly && $emit('append')"
|
|
28
28
|
@click:prepend-inner="!props.readonly && $emit('prepend')"
|
|
29
|
+
@click:clear="!props.readonly && $emit('on-clear')"
|
|
29
30
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
30
31
|
>
|
|
32
|
+
<template v-if="appendInnerIcon && appendInnerIcon.length" v-slot:append-inner>
|
|
33
|
+
<v-icon
|
|
34
|
+
v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') === false"
|
|
35
|
+
:icon="appendInnerIcon"
|
|
36
|
+
@click="appendInnerIcon.includes('mdi-magnify') ? $emit('append') : !props.readonly && $emit('append')"
|
|
37
|
+
/>
|
|
38
|
+
<base-datepicker
|
|
39
|
+
v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') && !props.readonly"
|
|
40
|
+
:model-value="modelValue"
|
|
41
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
42
|
+
:teleport="teleport"
|
|
43
|
+
/>
|
|
44
|
+
</template>
|
|
31
45
|
<template v-if="loading" #loader>
|
|
32
|
-
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate
|
|
46
|
+
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate />
|
|
33
47
|
</template>
|
|
34
48
|
</v-text-field>
|
|
35
49
|
</template>
|
|
@@ -65,6 +79,10 @@ export default defineComponent({
|
|
|
65
79
|
type: String,
|
|
66
80
|
default: '',
|
|
67
81
|
},
|
|
82
|
+
suffix: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: '',
|
|
85
|
+
},
|
|
68
86
|
messages: {
|
|
69
87
|
type: [String, Array<string>],
|
|
70
88
|
},
|
|
@@ -108,11 +126,14 @@ export default defineComponent({
|
|
|
108
126
|
appendInnerIcon: {
|
|
109
127
|
type: String,
|
|
110
128
|
},
|
|
129
|
+
teleport: {
|
|
130
|
+
type: String,
|
|
131
|
+
},
|
|
111
132
|
bgColor: {
|
|
112
133
|
type: String,
|
|
113
134
|
},
|
|
114
135
|
},
|
|
115
|
-
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
|
|
136
|
+
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out', 'input', 'on-clear'],
|
|
116
137
|
|
|
117
138
|
setup(props, { emit }) {
|
|
118
139
|
const submitted = (event: any) => {
|
|
@@ -132,9 +153,9 @@ export default defineComponent({
|
|
|
132
153
|
border: none !important;
|
|
133
154
|
outline: none !important;
|
|
134
155
|
}
|
|
135
|
-
.form-input input {
|
|
156
|
+
/* .form-input input {
|
|
136
157
|
padding-top: 30px;
|
|
137
|
-
}
|
|
158
|
+
} */
|
|
138
159
|
.form-input .v-field {
|
|
139
160
|
box-shadow: none;
|
|
140
161
|
font-size: 14px;
|
|
@@ -143,7 +164,6 @@ export default defineComponent({
|
|
|
143
164
|
top: 20px;
|
|
144
165
|
}
|
|
145
166
|
.form-input .v-field__append-inner {
|
|
146
|
-
padding-top: 18px;
|
|
147
167
|
padding-right: 6px;
|
|
148
168
|
}
|
|
149
169
|
.form-input .v-field__append-inner i {
|
|
@@ -168,4 +188,8 @@ export default defineComponent({
|
|
|
168
188
|
.form-input .v-field--error {
|
|
169
189
|
border-color: #ff5449;
|
|
170
190
|
}
|
|
191
|
+
.form-input .v-text-field__suffix {
|
|
192
|
+
padding-top: 30px;
|
|
193
|
+
font-size: 16px !important;
|
|
194
|
+
}
|
|
171
195
|
</style>
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
:prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
|
|
22
22
|
:append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
|
|
23
23
|
:bg-color="bgColor ? bgColor : ''"
|
|
24
|
+
:suffix="suffix"
|
|
24
25
|
@keyup.enter.prevent="submitted"
|
|
25
26
|
@click:control="!props.readonly && $emit('append')"
|
|
26
27
|
@click:clear="(props.readonly ? false : clearable) && $emit('update:modelValue', new Value())"
|
|
@@ -31,13 +32,13 @@
|
|
|
31
32
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
32
33
|
>
|
|
33
34
|
<template v-if="loading" #loader>
|
|
34
|
-
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate
|
|
35
|
+
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate />
|
|
35
36
|
</template>
|
|
36
37
|
</v-text-field>
|
|
37
38
|
</template>
|
|
38
39
|
|
|
39
40
|
<script lang="ts">
|
|
40
|
-
import { Value } from '
|
|
41
|
+
import { Value } from '../../composables/classes';
|
|
41
42
|
|
|
42
43
|
export default defineComponent({
|
|
43
44
|
name: 'BasePanelInput',
|
|
@@ -115,6 +116,10 @@ export default defineComponent({
|
|
|
115
116
|
bgColor: {
|
|
116
117
|
type: String,
|
|
117
118
|
},
|
|
119
|
+
suffix: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: '',
|
|
122
|
+
},
|
|
118
123
|
},
|
|
119
124
|
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out', 'clear'],
|
|
120
125
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
29
29
|
>
|
|
30
30
|
<template v-if="loading" #loader>
|
|
31
|
-
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate
|
|
31
|
+
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate />
|
|
32
32
|
</template>
|
|
33
33
|
</v-text-field>
|
|
34
34
|
</template>
|
|
@@ -117,7 +117,7 @@ export default defineComponent({
|
|
|
117
117
|
|
|
118
118
|
return {
|
|
119
119
|
submitted,
|
|
120
|
-
props
|
|
120
|
+
props,
|
|
121
121
|
};
|
|
122
122
|
},
|
|
123
123
|
});
|
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
:clear-icon="clearIcon"
|
|
11
|
+
:color="color"
|
|
12
|
+
:hint="hint"
|
|
13
|
+
:clearable="props.readonly ? false : clearable"
|
|
14
|
+
:disabled="disabled"
|
|
15
|
+
:readonly="props.readonly"
|
|
16
|
+
:prepend-icon="prependIcon ? prependIcon : ''"
|
|
17
|
+
:append-icon="appendIcon ? appendIcon : ''"
|
|
18
|
+
:prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
|
|
19
|
+
:append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
|
|
20
|
+
:bg-color="bgColor ? bgColor : ''"
|
|
21
|
+
:items="items"
|
|
22
|
+
@click:append="!props.readonly && $emit('append-out')"
|
|
23
|
+
@click:prepend="!props.readonly && $emit('prepend-out')"
|
|
24
|
+
@click:append-inner="!props.readonly && $emit('append')"
|
|
25
|
+
@click:prepend-inner="!props.readonly && $emit('prepend')"
|
|
26
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
27
|
+
>
|
|
28
|
+
<template v-if="loading" #loader>
|
|
29
|
+
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate />
|
|
30
|
+
</template>
|
|
31
|
+
</v-select>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script lang="ts">
|
|
35
|
+
export default defineComponent({
|
|
36
|
+
name: 'BaseRoundedSelect',
|
|
37
|
+
props: {
|
|
38
|
+
modelValue: {
|
|
39
|
+
required: false,
|
|
40
|
+
},
|
|
41
|
+
loading: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: false,
|
|
44
|
+
},
|
|
45
|
+
items: {
|
|
46
|
+
type: Array<any>,
|
|
47
|
+
default: [],
|
|
48
|
+
},
|
|
49
|
+
clearable: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: true,
|
|
52
|
+
},
|
|
53
|
+
disabled: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
readonly: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false,
|
|
60
|
+
},
|
|
61
|
+
placeholder: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: '',
|
|
64
|
+
},
|
|
65
|
+
label: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: '',
|
|
68
|
+
},
|
|
69
|
+
hint: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: '',
|
|
72
|
+
},
|
|
73
|
+
rules: {
|
|
74
|
+
type: Array<any>,
|
|
75
|
+
default: [],
|
|
76
|
+
},
|
|
77
|
+
variant: {
|
|
78
|
+
type: String as PropType<InputVariants>,
|
|
79
|
+
default: 'solo',
|
|
80
|
+
},
|
|
81
|
+
color: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: '#009c73',
|
|
84
|
+
},
|
|
85
|
+
clearIcon: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: 'mdi-close',
|
|
88
|
+
},
|
|
89
|
+
prependIcon: {
|
|
90
|
+
type: String,
|
|
91
|
+
},
|
|
92
|
+
appendIcon: {
|
|
93
|
+
type: String,
|
|
94
|
+
},
|
|
95
|
+
prependInnerIcon: {
|
|
96
|
+
type: String,
|
|
97
|
+
},
|
|
98
|
+
appendInnerIcon: {
|
|
99
|
+
type: String,
|
|
100
|
+
},
|
|
101
|
+
bgColor: {
|
|
102
|
+
type: String,
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
|
|
106
|
+
|
|
107
|
+
setup(props, { emit }) {
|
|
108
|
+
const submitted = (event: any) => {
|
|
109
|
+
emit('submitted', event);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
submitted,
|
|
114
|
+
props,
|
|
115
|
+
};
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
</script>
|
|
119
|
+
|
|
120
|
+
<style>
|
|
121
|
+
.rounded-select input:focus {
|
|
122
|
+
border: none !important;
|
|
123
|
+
outline: none !important;
|
|
124
|
+
}
|
|
125
|
+
.rounded-select .v-label.v-field-label {
|
|
126
|
+
top: 20px;
|
|
127
|
+
}
|
|
128
|
+
.rounded-select .v-field {
|
|
129
|
+
border-radius: 8px;
|
|
130
|
+
border: 1px solid #dadada;
|
|
131
|
+
box-shadow: none;
|
|
132
|
+
font-size: 14px;
|
|
133
|
+
}
|
|
134
|
+
.rounded-select .v-field--error {
|
|
135
|
+
border-color: #ff5449;
|
|
136
|
+
}
|
|
137
|
+
</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 />
|
|
16
|
+
<slot name="panel"></slot>
|
|
15
17
|
</v-navigation-drawer>
|
|
16
18
|
</template>
|
|
17
19
|
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<header class="relative w-full h-[70px] text-center font-medium align-middle flex items-center border-b-[1px]" :class="[$libStyles.blueBgLight, $libStyles.textSimple]">
|
|
3
|
-
<i v-if="hasBack" @click="$emit('onBack')" class="absolute left-5 mdi text-xl cursor-pointer" :class="[backIcon]"></i>
|
|
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" @click="changeBridge('lka')" 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" @click="changeBridge('efo')" 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,37 @@
|
|
|
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="[$libStyles.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 pkg from '../../package.json';
|
|
53
|
+
const dialogSignOut = ref(false);
|
|
32
54
|
const dataStore = useDataStore();
|
|
33
55
|
|
|
34
56
|
const handleFontSize = (action: 'increase' | 'decrease') => {
|
|
35
57
|
if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
|
|
36
58
|
if (action === 'decrease' && dataStore.fontSize > 14) dataStore.fontSize -= 2;
|
|
37
|
-
if (dataStore.
|
|
59
|
+
if (dataStore.isBridge) {
|
|
38
60
|
dataStore.sendToChild(constants.postActions.font, dataStore.fontSize);
|
|
39
61
|
} else {
|
|
40
62
|
dataStore.sendToParent(constants.postActions.font, dataStore.fontSize);
|
|
@@ -42,7 +64,23 @@ const handleFontSize = (action: 'increase' | 'decrease') => {
|
|
|
42
64
|
};
|
|
43
65
|
|
|
44
66
|
const logoutUser = async () => {
|
|
45
|
-
|
|
67
|
+
dialogSignOut.value = false;
|
|
46
68
|
await dataStore.logoutUser();
|
|
47
69
|
};
|
|
70
|
+
|
|
71
|
+
const isProduction = import.meta.env.VITE_MODE === 'production';
|
|
72
|
+
|
|
73
|
+
const hasHistory = computed(() => {
|
|
74
|
+
return !dataStore.isLKA;
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
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');
|
|
85
|
+
};
|
|
48
86
|
</script>
|
|
@@ -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="[$libStyles.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
15
|
<section key="main" :class="[$libStyles.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>
|