hl-core 0.0.7-beta.14 → 0.0.7-beta.16
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/components/Form/Documents.vue +109 -0
- package/components/Form/FormBlock.vue +22 -8
- package/components/Form/FormSection.vue +18 -0
- package/components/Form/FormToggle.vue +8 -1
- package/components/Form/MemberForm.vue +983 -0
- package/components/Form/ProductConditions.vue +43 -0
- package/components/Form/ProductConditionsBlock.vue +2 -2
- package/components/Input/EmptyFormField.vue +5 -0
- package/components/Input/FileInput.vue +71 -0
- package/components/Input/FormInput.vue +65 -15
- package/components/Input/PanelInput.vue +133 -0
- package/components/Input/RoundedInput.vue +31 -8
- package/components/Layout/Drawer.vue +1 -1
- package/components/Layout/SettingsPanel.vue +6 -1
- package/components/List/ListEmpty.vue +22 -0
- package/components/Menu/MenuNav.vue +8 -26
- package/components/Panel/PanelSelectItem.vue +20 -0
- package/composables/classes.ts +126 -110
- package/composables/constants.ts +2 -0
- package/composables/index.ts +7 -6
- package/layouts/default.vue +14 -4
- package/package.json +8 -6
- package/pages/500.vue +38 -1
- package/plugins/storePlugin.ts +1 -0
- package/store/data.store.js +255 -503
- package/store/member.store.ts +169 -18
- package/store/messages.ts +17 -7
- package/store/rules.js +1 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="flex flex-col gap-4 px-[10px]">
|
|
3
|
+
<v-form ref="vForm" @submit="submitForm">
|
|
4
|
+
<base-form-section :title="$t('generalConditions')">
|
|
5
|
+
<base-form-input
|
|
6
|
+
v-model="formStore.productConditionsForm.requestedSumInsured"
|
|
7
|
+
:rules="$dataStore.rules.numbers"
|
|
8
|
+
:label="$t('productConditionsForm.requestedSumInsured')"
|
|
9
|
+
></base-form-input>
|
|
10
|
+
<base-form-input
|
|
11
|
+
v-model="formStore.productConditionsForm.insurancePremiumPerMonth"
|
|
12
|
+
:rules="$dataStore.rules.numbers"
|
|
13
|
+
:label="$t('productConditionsForm.insurancePremiumAmount')"
|
|
14
|
+
></base-form-input>
|
|
15
|
+
</base-form-section>
|
|
16
|
+
</v-form>
|
|
17
|
+
<base-btn :text="$t('buttons.calculate')" @click="submitForm"></base-btn>
|
|
18
|
+
</section>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
export default defineComponent({
|
|
23
|
+
setup() {
|
|
24
|
+
const formStore = useFormStore();
|
|
25
|
+
const vForm = ref<any>();
|
|
26
|
+
|
|
27
|
+
const submitForm = async () => {
|
|
28
|
+
vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
29
|
+
console.log(v);
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
// State
|
|
35
|
+
formStore,
|
|
36
|
+
vForm,
|
|
37
|
+
|
|
38
|
+
// Functions
|
|
39
|
+
submitForm,
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="pt-3 pl-5 rounded border-[1px]" :class="[$libStyles.whiteBg]">
|
|
2
|
+
<div class="pt-3 pl-5 rounded-lg border-[1px]" :class="[$libStyles.whiteBg]">
|
|
3
3
|
<div>
|
|
4
4
|
<p :class="[$libStyles.textTitle, $libStyles.greenText]">
|
|
5
5
|
{{ $t('productConditions') }}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
{{ paymentPeriod }}
|
|
21
21
|
</span>
|
|
22
22
|
<div
|
|
23
|
-
class="transition-all h-[70px] w-[60px] relative place-self-end cursor-pointer"
|
|
23
|
+
class="rounded-br-lg transition-all h-[70px] w-[60px] relative place-self-end cursor-pointer"
|
|
24
24
|
:class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover]"
|
|
25
25
|
@click="$emit('onMore', { whichForm: 'productConditions' })"
|
|
26
26
|
>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-file-input
|
|
3
|
+
class="file-input"
|
|
4
|
+
:disabled="disabled"
|
|
5
|
+
prepend-icon=""
|
|
6
|
+
append-inner-icon="mdi mdi-file-document"
|
|
7
|
+
@click:append-inner="$emit('input', $event)"
|
|
8
|
+
@input="$emit('input', $event)"
|
|
9
|
+
variant="solo"
|
|
10
|
+
show-size
|
|
11
|
+
multiple
|
|
12
|
+
accept=".pdf,.doc,.jpeg,.jpg,.jpg"
|
|
13
|
+
truncate-length="15"
|
|
14
|
+
clear-icon="mdi mdi-close"
|
|
15
|
+
:label="$t('labels.chooseDoc')"
|
|
16
|
+
></v-file-input>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
props: {
|
|
22
|
+
disabled: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<style>
|
|
31
|
+
.file-input input:focus {
|
|
32
|
+
border: none !important;
|
|
33
|
+
outline: none !important;
|
|
34
|
+
}
|
|
35
|
+
.file-input input {
|
|
36
|
+
padding-top: 30px;
|
|
37
|
+
}
|
|
38
|
+
.file-input .v-field {
|
|
39
|
+
box-shadow: none;
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
}
|
|
42
|
+
.file-input .v-label.v-field-label {
|
|
43
|
+
top: 20px;
|
|
44
|
+
}
|
|
45
|
+
.file-input .v-field__append-inner {
|
|
46
|
+
padding-top: 18px;
|
|
47
|
+
padding-right: 6px;
|
|
48
|
+
}
|
|
49
|
+
.file-input .v-field__append-inner i {
|
|
50
|
+
color: #a0b3d8 !important;
|
|
51
|
+
margin-left: 10px;
|
|
52
|
+
margin-right: 4px;
|
|
53
|
+
}
|
|
54
|
+
.file-input {
|
|
55
|
+
border-bottom: 1px solid #f3f6fc;
|
|
56
|
+
}
|
|
57
|
+
.file-input.v-input--error {
|
|
58
|
+
border-color: #ff5449;
|
|
59
|
+
}
|
|
60
|
+
.file-input.v-input--error .v-input__details {
|
|
61
|
+
display: block;
|
|
62
|
+
}
|
|
63
|
+
.file-input .v-input__details {
|
|
64
|
+
display: none;
|
|
65
|
+
background-color: white;
|
|
66
|
+
padding-top: 0 !important;
|
|
67
|
+
}
|
|
68
|
+
.file-input .v-field--error {
|
|
69
|
+
border-color: #ff5449;
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -1,22 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-text-field
|
|
3
|
-
class="
|
|
3
|
+
class="form-input"
|
|
4
4
|
:model-value="modelValue"
|
|
5
5
|
v-maska="maska"
|
|
6
6
|
:rules="rules"
|
|
7
7
|
:loading="loading"
|
|
8
8
|
:placeholder="placeholder"
|
|
9
|
+
:label="label"
|
|
10
|
+
:messages="messages"
|
|
9
11
|
:type="type"
|
|
10
12
|
:variant="variant"
|
|
11
13
|
:clear-icon="clearIcon"
|
|
12
14
|
:color="color"
|
|
13
15
|
:hint="hint"
|
|
14
|
-
:clearable="clearable"
|
|
16
|
+
:clearable="readonly ? false : clearable"
|
|
15
17
|
:disabled="disabled"
|
|
16
|
-
:
|
|
18
|
+
:readonly="readonly"
|
|
19
|
+
:prepend-icon="prependIcon ? prependIcon : ''"
|
|
17
20
|
:append-icon="appendIcon ? appendIcon : ''"
|
|
21
|
+
:prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
|
|
22
|
+
:append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
|
|
18
23
|
:bg-color="bgColor ? bgColor : ''"
|
|
19
24
|
@keyup.enter.prevent="submitted"
|
|
25
|
+
@click:append="!readonly && $emit('append-out')"
|
|
26
|
+
@click:prepend="!readonly && $emit('prepend-out')"
|
|
27
|
+
@click:append-inner="!readonly && $emit('append')"
|
|
28
|
+
@click:prepend-inner="!readonly && $emit('prepend')"
|
|
20
29
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
21
30
|
>
|
|
22
31
|
<template v-if="loading" #loader>
|
|
@@ -32,8 +41,7 @@ export default defineComponent({
|
|
|
32
41
|
name: 'BaseRoundedInput',
|
|
33
42
|
props: {
|
|
34
43
|
modelValue: {
|
|
35
|
-
|
|
36
|
-
default: '',
|
|
44
|
+
required: false,
|
|
37
45
|
},
|
|
38
46
|
loading: {
|
|
39
47
|
type: Boolean,
|
|
@@ -47,9 +55,20 @@ export default defineComponent({
|
|
|
47
55
|
type: Boolean,
|
|
48
56
|
default: false,
|
|
49
57
|
},
|
|
58
|
+
readonly: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false,
|
|
61
|
+
},
|
|
50
62
|
placeholder: {
|
|
51
63
|
type: String,
|
|
52
|
-
default: '
|
|
64
|
+
default: '',
|
|
65
|
+
},
|
|
66
|
+
label: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: '',
|
|
69
|
+
},
|
|
70
|
+
messages: {
|
|
71
|
+
type: [String, Array<string>],
|
|
53
72
|
},
|
|
54
73
|
maska: {
|
|
55
74
|
type: String,
|
|
@@ -85,11 +104,17 @@ export default defineComponent({
|
|
|
85
104
|
appendIcon: {
|
|
86
105
|
type: String,
|
|
87
106
|
},
|
|
107
|
+
prependInnerIcon: {
|
|
108
|
+
type: String,
|
|
109
|
+
},
|
|
110
|
+
appendInnerIcon: {
|
|
111
|
+
type: String,
|
|
112
|
+
},
|
|
88
113
|
bgColor: {
|
|
89
114
|
type: String,
|
|
90
115
|
},
|
|
91
116
|
},
|
|
92
|
-
emits: ['update:modelValue', 'submitted'],
|
|
117
|
+
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
|
|
93
118
|
|
|
94
119
|
setup(props, { emit }) {
|
|
95
120
|
const submitted = (event: any) => {
|
|
@@ -104,19 +129,44 @@ export default defineComponent({
|
|
|
104
129
|
</script>
|
|
105
130
|
|
|
106
131
|
<style>
|
|
107
|
-
.
|
|
132
|
+
.form-input input:focus {
|
|
108
133
|
border: none !important;
|
|
109
134
|
outline: none !important;
|
|
110
135
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
136
|
+
.form-input input {
|
|
137
|
+
padding-top: 30px;
|
|
138
|
+
}
|
|
139
|
+
.form-input .v-field {
|
|
115
140
|
box-shadow: none;
|
|
116
141
|
font-size: 14px;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
142
|
+
}
|
|
143
|
+
.form-input .v-label.v-field-label {
|
|
144
|
+
top: 20px;
|
|
145
|
+
}
|
|
146
|
+
.form-input .v-field__append-inner {
|
|
147
|
+
padding-top: 18px;
|
|
148
|
+
padding-right: 6px;
|
|
149
|
+
}
|
|
150
|
+
.form-input .v-field__append-inner i {
|
|
151
|
+
color: #a0b3d8 !important;
|
|
152
|
+
margin-left: 10px;
|
|
153
|
+
margin-right: 4px;
|
|
154
|
+
}
|
|
155
|
+
.form-input {
|
|
156
|
+
border-bottom: 1px solid #f3f6fc;
|
|
157
|
+
}
|
|
158
|
+
.form-input.v-input--error {
|
|
159
|
+
border-color: #ff5449;
|
|
160
|
+
}
|
|
161
|
+
.form-input.v-input--error .v-input__details {
|
|
162
|
+
display: block;
|
|
163
|
+
}
|
|
164
|
+
.form-input .v-input__details {
|
|
165
|
+
display: none;
|
|
166
|
+
background-color: white;
|
|
167
|
+
padding-top: 0 !important;
|
|
168
|
+
}
|
|
169
|
+
.form-input .v-field--error {
|
|
120
170
|
border-color: #ff5449;
|
|
121
171
|
}
|
|
122
172
|
</style>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-text-field
|
|
3
|
+
class="form-input"
|
|
4
|
+
:model-value="modelValue"
|
|
5
|
+
v-maska="maska"
|
|
6
|
+
:rules="rules"
|
|
7
|
+
:loading="loading"
|
|
8
|
+
:placeholder="placeholder"
|
|
9
|
+
:label="label"
|
|
10
|
+
:messages="messages"
|
|
11
|
+
:type="type"
|
|
12
|
+
:variant="variant"
|
|
13
|
+
:clear-icon="clearIcon"
|
|
14
|
+
:color="color"
|
|
15
|
+
:hint="hint"
|
|
16
|
+
:clearable="clearable"
|
|
17
|
+
:disabled="disabled"
|
|
18
|
+
:readonly="true"
|
|
19
|
+
:prepend-icon="prependIcon ? prependIcon : ''"
|
|
20
|
+
:append-icon="appendIcon ? appendIcon : ''"
|
|
21
|
+
:prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
|
|
22
|
+
:append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
|
|
23
|
+
:bg-color="bgColor ? bgColor : ''"
|
|
24
|
+
@keyup.enter.prevent="submitted"
|
|
25
|
+
@click:control="!readonly && $emit('append')"
|
|
26
|
+
@click:clear="(readonly ? false : clearable) && $emit('update:modelValue', new Value())"
|
|
27
|
+
@click:append="!readonly && $emit('append-out')"
|
|
28
|
+
@click:prepend="!readonly && $emit('prepend-out')"
|
|
29
|
+
@click:append-inner="!readonly && $emit('append')"
|
|
30
|
+
@click:prepend-inner="!readonly && $emit('prepend')"
|
|
31
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
32
|
+
>
|
|
33
|
+
<template v-if="loading" #loader>
|
|
34
|
+
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate></v-progress-linear>
|
|
35
|
+
</template>
|
|
36
|
+
</v-text-field>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script lang="ts">
|
|
40
|
+
import { InputTypes } from '@/composables/models';
|
|
41
|
+
import { Value } from '@/composables/classes';
|
|
42
|
+
|
|
43
|
+
export default defineComponent({
|
|
44
|
+
name: 'BaseRoundedInput',
|
|
45
|
+
props: {
|
|
46
|
+
modelValue: {
|
|
47
|
+
required: false,
|
|
48
|
+
},
|
|
49
|
+
loading: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: false,
|
|
52
|
+
},
|
|
53
|
+
clearable: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: true,
|
|
56
|
+
},
|
|
57
|
+
disabled: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
default: false,
|
|
60
|
+
},
|
|
61
|
+
readonly: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false,
|
|
64
|
+
},
|
|
65
|
+
placeholder: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: '',
|
|
68
|
+
},
|
|
69
|
+
label: {
|
|
70
|
+
type: String,
|
|
71
|
+
default: '',
|
|
72
|
+
},
|
|
73
|
+
messages: {
|
|
74
|
+
type: [String, Array<string>],
|
|
75
|
+
},
|
|
76
|
+
maska: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: '',
|
|
79
|
+
},
|
|
80
|
+
hint: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: '',
|
|
83
|
+
},
|
|
84
|
+
rules: {
|
|
85
|
+
type: Array<any>,
|
|
86
|
+
default: [],
|
|
87
|
+
},
|
|
88
|
+
type: {
|
|
89
|
+
type: String as PropType<InputTypes>,
|
|
90
|
+
default: 'text',
|
|
91
|
+
},
|
|
92
|
+
variant: {
|
|
93
|
+
type: String as PropType<'solo' | 'filled' | 'outlined' | 'plain' | 'underlined'>,
|
|
94
|
+
default: 'solo',
|
|
95
|
+
},
|
|
96
|
+
color: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: '#009c73',
|
|
99
|
+
},
|
|
100
|
+
clearIcon: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: 'mdi-close',
|
|
103
|
+
},
|
|
104
|
+
prependIcon: {
|
|
105
|
+
type: String,
|
|
106
|
+
},
|
|
107
|
+
appendIcon: {
|
|
108
|
+
type: String,
|
|
109
|
+
},
|
|
110
|
+
prependInnerIcon: {
|
|
111
|
+
type: String,
|
|
112
|
+
},
|
|
113
|
+
appendInnerIcon: {
|
|
114
|
+
type: String,
|
|
115
|
+
},
|
|
116
|
+
bgColor: {
|
|
117
|
+
type: String,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out', 'clear'],
|
|
121
|
+
|
|
122
|
+
setup(props, { emit }) {
|
|
123
|
+
const submitted = (event: any) => {
|
|
124
|
+
emit('submitted', event);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
submitted,
|
|
129
|
+
Value,
|
|
130
|
+
};
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
</script>
|
|
@@ -6,17 +6,25 @@
|
|
|
6
6
|
:rules="rules"
|
|
7
7
|
:loading="loading"
|
|
8
8
|
:placeholder="placeholder"
|
|
9
|
+
:label="label"
|
|
9
10
|
:type="type"
|
|
10
11
|
:variant="variant"
|
|
11
12
|
:clear-icon="clearIcon"
|
|
12
13
|
:color="color"
|
|
13
14
|
:hint="hint"
|
|
14
|
-
:clearable="clearable"
|
|
15
|
+
:clearable="readonly ? false : clearable"
|
|
15
16
|
:disabled="disabled"
|
|
16
|
-
:
|
|
17
|
+
:readonly="readonly"
|
|
18
|
+
:prepend-icon="prependIcon ? prependIcon : ''"
|
|
17
19
|
:append-icon="appendIcon ? appendIcon : ''"
|
|
20
|
+
:prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
|
|
21
|
+
:append-inner-icon="appendInnerIcon ? appendInnerIcon : ''"
|
|
18
22
|
:bg-color="bgColor ? bgColor : ''"
|
|
19
23
|
@keyup.enter.prevent="submitted"
|
|
24
|
+
@click:append="!readonly && $emit('append-out')"
|
|
25
|
+
@click:prepend="!readonly && $emit('prepend-out')"
|
|
26
|
+
@click:append-inner="!readonly && $emit('append')"
|
|
27
|
+
@click:prepend-inner="!readonly && $emit('prepend')"
|
|
20
28
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
21
29
|
>
|
|
22
30
|
<template v-if="loading" #loader>
|
|
@@ -29,11 +37,11 @@
|
|
|
29
37
|
import { InputTypes } from '@/composables/models';
|
|
30
38
|
|
|
31
39
|
export default defineComponent({
|
|
40
|
+
extends: {},
|
|
32
41
|
name: 'BaseRoundedInput',
|
|
33
42
|
props: {
|
|
34
43
|
modelValue: {
|
|
35
|
-
|
|
36
|
-
default: '',
|
|
44
|
+
required: false,
|
|
37
45
|
},
|
|
38
46
|
loading: {
|
|
39
47
|
type: Boolean,
|
|
@@ -47,9 +55,17 @@ export default defineComponent({
|
|
|
47
55
|
type: Boolean,
|
|
48
56
|
default: false,
|
|
49
57
|
},
|
|
58
|
+
readonly: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false,
|
|
61
|
+
},
|
|
50
62
|
placeholder: {
|
|
51
63
|
type: String,
|
|
52
|
-
default: '
|
|
64
|
+
default: '',
|
|
65
|
+
},
|
|
66
|
+
label: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: '',
|
|
53
69
|
},
|
|
54
70
|
maska: {
|
|
55
71
|
type: String,
|
|
@@ -85,11 +101,17 @@ export default defineComponent({
|
|
|
85
101
|
appendIcon: {
|
|
86
102
|
type: String,
|
|
87
103
|
},
|
|
104
|
+
prependInnerIcon: {
|
|
105
|
+
type: String,
|
|
106
|
+
},
|
|
107
|
+
appendInnerIcon: {
|
|
108
|
+
type: String,
|
|
109
|
+
},
|
|
88
110
|
bgColor: {
|
|
89
111
|
type: String,
|
|
90
112
|
},
|
|
91
113
|
},
|
|
92
|
-
emits: ['update:modelValue', 'submitted'],
|
|
114
|
+
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
|
|
93
115
|
|
|
94
116
|
setup(props, { emit }) {
|
|
95
117
|
const submitted = (event: any) => {
|
|
@@ -108,14 +130,15 @@ export default defineComponent({
|
|
|
108
130
|
border: none !important;
|
|
109
131
|
outline: none !important;
|
|
110
132
|
}
|
|
111
|
-
|
|
133
|
+
.rounded-input .v-label.v-field-label {
|
|
134
|
+
top: 20px;
|
|
135
|
+
}
|
|
112
136
|
.rounded-input .v-field {
|
|
113
137
|
border-radius: 8px;
|
|
114
138
|
border: 1px solid #dadada;
|
|
115
139
|
box-shadow: none;
|
|
116
140
|
font-size: 14px;
|
|
117
141
|
}
|
|
118
|
-
|
|
119
142
|
.rounded-input .v-field--error {
|
|
120
143
|
border-color: #ff5449;
|
|
121
144
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:class="[$dataStore[whichPanel].overlay ? 'lg:!hidden' : '', $dataStore[whichPanel].open ? '!w-full lg:!w-[420px]' : 'lg:!w-[0px]']"
|
|
8
8
|
>
|
|
9
9
|
<base-header :title="panelTitle" :has-back="true" back-icon="mdi-close" class="justify-center" @onBack="closePanel"></base-header>
|
|
10
|
-
<div class="flex flex-col" id="panel-actions">
|
|
10
|
+
<div class="flex flex-col" :id="$dataStore.panelAction === null ? 'panel-actions' : ''">
|
|
11
11
|
<slot></slot>
|
|
12
12
|
</div>
|
|
13
13
|
</v-navigation-drawer>
|
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
<v-text-field v-model="$dataStore.user.fullName" :readonly="true" hide-details variant="plain" :label="$dataStore.user.roles?.join(', ')"></v-text-field>
|
|
10
10
|
<i class="mdi mdi-account-outline text-2xl text-[#A0B3D8]"></i
|
|
11
11
|
></base-panel-item>
|
|
12
|
-
<base-panel-item
|
|
12
|
+
<base-panel-item
|
|
13
|
+
v-for="panelItem of dataStore.settings.items.filter(i => ('show' in i ? i.show : true))"
|
|
14
|
+
:key="panelItem.title!"
|
|
15
|
+
class="cursor-pointer"
|
|
16
|
+
@click="panelItem.action ? panelItem.action() : null"
|
|
17
|
+
>
|
|
13
18
|
{{ panelItem.title }}
|
|
14
19
|
<i v-if="panelItem.icon" class="mdi text-xl text-[#A0B3D8]" :class="[panelItem.icon]"></i>
|
|
15
20
|
</base-panel-item>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="border-[1px] rounded-lg h-[80px] mx-[10px] mt-[14px] flex place-content-center" :class="[$libStyles.blueBgLight, $libStyles.textTitle]">
|
|
3
|
+
<div class="flex justify-center items-center font-medium gap-2 opacity-40">
|
|
4
|
+
{{ text }}
|
|
5
|
+
<i class="text-2xl mdi" :class="[icon ? icon : 'mdi-database-off-outline']"></i>
|
|
6
|
+
</div>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
export default defineComponent({
|
|
12
|
+
props: {
|
|
13
|
+
text: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: 'Отсутствуют данные',
|
|
16
|
+
},
|
|
17
|
+
icon: {
|
|
18
|
+
type: String,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
@onMore="$emit('onMore')"
|
|
13
13
|
></base-header>
|
|
14
14
|
<slot key="slot-content" name="content"></slot>
|
|
15
|
-
<section key="main" class="
|
|
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]">
|
|
@@ -31,27 +31,10 @@
|
|
|
31
31
|
<slot name="end"></slot>
|
|
32
32
|
<slot name="actions"></slot>
|
|
33
33
|
<base-fade-transition>
|
|
34
|
-
<div
|
|
35
|
-
v-if="$dataStore.buttons && $dataStore.buttons.length"
|
|
36
|
-
class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[30%] w-full pr-4"
|
|
37
|
-
>
|
|
34
|
+
<div v-if="$dataStore.buttons && $dataStore.buttons.length" class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[30%] w-full pr-4">
|
|
38
35
|
<div v-for="(item, index) of $dataStore.buttons" :key="index">
|
|
39
|
-
<transition
|
|
40
|
-
|
|
41
|
-
leave-active-class="animate__animated animate__fadeOut animate__faster"
|
|
42
|
-
>
|
|
43
|
-
<base-btn
|
|
44
|
-
v-if="
|
|
45
|
-
'show' in item && typeof item.show === 'boolean'
|
|
46
|
-
? item.show
|
|
47
|
-
: true
|
|
48
|
-
"
|
|
49
|
-
:text="item.title!"
|
|
50
|
-
:btn="item.color"
|
|
51
|
-
:disabled="!!item.disabled"
|
|
52
|
-
@click="item.action"
|
|
53
|
-
>
|
|
54
|
-
</base-btn>
|
|
36
|
+
<transition enter-active-class="animate__animated animate__fadeIn animate__faster" leave-active-class="animate__animated animate__fadeOut animate__faster">
|
|
37
|
+
<base-btn v-if="'show' in item ? item.show : true" :text="item.title!" :btn="item.color" :disabled="item.disabled" @click="item.action"> </base-btn>
|
|
55
38
|
</transition>
|
|
56
39
|
</div></div
|
|
57
40
|
></base-fade-transition>
|
|
@@ -94,22 +77,21 @@ export default defineComponent({
|
|
|
94
77
|
default: 'mdi-cog-outline',
|
|
95
78
|
},
|
|
96
79
|
},
|
|
97
|
-
emits: ['
|
|
80
|
+
emits: ['onLink', 'onBack', 'onMore', 'clicked'],
|
|
98
81
|
setup(props, { emit }) {
|
|
99
82
|
const dataStore = useDataStore();
|
|
100
83
|
const router = useRouter();
|
|
101
84
|
|
|
102
|
-
const pickItem = (item: MenuItem) => {
|
|
85
|
+
const pickItem = async (item: MenuItem) => {
|
|
103
86
|
if (item.title !== dataStore.menu.selectedItem.title) {
|
|
104
|
-
emit('update:modelValue', item);
|
|
105
87
|
if (typeof item.link === 'object') {
|
|
106
88
|
if (item.link && 'name' in item.link) {
|
|
107
|
-
router.push(item.link as RouteLocationNormalized);
|
|
89
|
+
await router.push(item.link as RouteLocationNormalized);
|
|
108
90
|
} else {
|
|
109
91
|
dataStore.showToaster('warning', 'Отсутствует ссылка для перехода');
|
|
110
92
|
}
|
|
111
93
|
} else {
|
|
112
|
-
|
|
94
|
+
emit('onLink', item);
|
|
113
95
|
}
|
|
114
96
|
}
|
|
115
97
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex justify-between px-4 items-center cursor-pointer h-[60px]" :class="[$libStyles.rounded, $libStyles.blueBgLight, $libStyles.blueBgLightHover]">
|
|
3
|
+
<span :class="[$libStyles.textSimple]">{{ text }}</span>
|
|
4
|
+
<i class="mdi text-xl" :class="[selected ? `mdi-radiobox-marked ${$libStyles.greenText}` : 'mdi-radiobox-blank text-[#636363]']"></i>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
props: {
|
|
11
|
+
text: {
|
|
12
|
+
type: [String, Number],
|
|
13
|
+
},
|
|
14
|
+
selected: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
</script>
|