hl-core 0.0.8-beta.3 → 0.0.8-beta.30
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 +81 -18
- package/api/interceptors.ts +17 -13
- package/components/Dialog/Dialog.vue +7 -37
- package/components/Form/FormBlock.vue +65 -28
- package/components/Form/FormSection.vue +4 -1
- package/components/Form/ManagerAttachment.vue +197 -0
- package/components/Form/ProductConditionsBlock.vue +64 -12
- package/components/Input/Datepicker.vue +5 -1
- package/components/Input/FormInput.vue +28 -7
- package/components/Input/PanelInput.vue +5 -0
- package/components/Input/RoundedSelect.vue +137 -0
- package/components/Layout/Drawer.vue +1 -0
- package/components/Layout/Header.vue +40 -4
- package/components/Layout/SettingsPanel.vue +39 -9
- package/components/Menu/MenuHover.vue +30 -0
- package/components/Menu/MenuNav.vue +28 -11
- package/components/Menu/MenuNavItem.vue +5 -2
- package/components/Pages/Anketa.vue +38 -21
- package/components/Pages/Auth.vue +149 -30
- package/components/Pages/InvoiceInfo.vue +30 -0
- package/components/Pages/MemberForm.vue +381 -144
- package/components/Pages/ProductConditions.vue +496 -17
- package/components/Panel/PanelHandler.vue +75 -2
- package/components/Utilities/Chip.vue +27 -0
- package/components/Utilities/JsonViewer.vue +27 -0
- package/composables/classes.ts +165 -25
- package/composables/constants.ts +13 -1
- package/composables/index.ts +58 -2
- package/composables/styles.ts +9 -3
- package/configs/i18n.ts +19 -0
- package/layouts/default.vue +2 -2
- package/locales/en.json +583 -0
- package/locales/kz.json +583 -0
- package/locales/ru.json +585 -0
- package/nuxt.config.ts +8 -0
- package/package.json +15 -9
- package/pages/500.vue +1 -1
- package/pages/Token.vue +51 -0
- package/plugins/helperFunctionsPlugins.ts +3 -0
- package/plugins/storePlugin.ts +0 -1
- package/plugins/vuetifyPlugin.ts +8 -1
- package/store/data.store.js +705 -624
- package/store/member.store.ts +147 -22
- package/store/rules.js +41 -3
- package/types/index.ts +39 -0
- package/store/messages.ts +0 -434
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="rounded-lg border-[1px]" :class="[$libStyles.whiteBg, disabled && $libStyles.disabled]">
|
|
3
|
+
<div class="mt-3 ml-5">
|
|
4
|
+
<p :class="[$libStyles.textTitle, $libStyles.greenText]">{{ $t('form.attachManager') }}</p>
|
|
5
|
+
</div>
|
|
6
|
+
<v-form ref="vForm" class="flex flex-col mt-1">
|
|
7
|
+
<base-panel-input
|
|
8
|
+
class="pl-1"
|
|
9
|
+
v-model="formStore.SaleChanellPolicy"
|
|
10
|
+
:value="formStore.SaleChanellPolicy.nameRu"
|
|
11
|
+
:readonly="isReadonly"
|
|
12
|
+
:clearable="!isReadonly"
|
|
13
|
+
:label="$t('form.salesChanell')"
|
|
14
|
+
:rules="$rules.objectRequired"
|
|
15
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
16
|
+
@append="openPanel('SaleChanellPolicy', $t('form.salesChanell'))"
|
|
17
|
+
></base-panel-input>
|
|
18
|
+
<base-panel-input
|
|
19
|
+
class="pl-1"
|
|
20
|
+
v-model="formStore.RegionPolicy"
|
|
21
|
+
:value="formStore.RegionPolicy.nameRu"
|
|
22
|
+
:readonly="isReadonly"
|
|
23
|
+
:clearable="!isReadonly"
|
|
24
|
+
:label="$t('form.Region')"
|
|
25
|
+
:rules="$rules.objectRequired"
|
|
26
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
27
|
+
@append="openPanel('RegionPolicy', $t('form.Region'))"
|
|
28
|
+
></base-panel-input>
|
|
29
|
+
<base-panel-input
|
|
30
|
+
class="pl-1"
|
|
31
|
+
v-model="formStore.ManagerPolicy"
|
|
32
|
+
:value="formStore.ManagerPolicy.nameRu"
|
|
33
|
+
:readonly="isReadonly"
|
|
34
|
+
:clearable="!isReadonly"
|
|
35
|
+
:label="$t('form.manager')"
|
|
36
|
+
:rules="$rules.objectRequired"
|
|
37
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
38
|
+
@append="openPanel('ManagerPolicy', $t('form.manager'))"
|
|
39
|
+
></base-panel-input>
|
|
40
|
+
<base-panel-input
|
|
41
|
+
class="pl-1"
|
|
42
|
+
v-model="formStore.AgentData"
|
|
43
|
+
:value="formStore.AgentData.fullName"
|
|
44
|
+
:readonly="isReadonly"
|
|
45
|
+
:clearable="!isReadonly"
|
|
46
|
+
:label="$t('form.agent')"
|
|
47
|
+
:rules="$rules.agentDataRequired"
|
|
48
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
49
|
+
@append="openPanel('AgentData', $t('form.agent'))"
|
|
50
|
+
></base-panel-input>
|
|
51
|
+
</v-form>
|
|
52
|
+
<Teleport v-if="isPanelOpen" to="#panel-actions">
|
|
53
|
+
<div :class="[$libStyles.scrollPage]" class="flex flex-col items-center">
|
|
54
|
+
<base-rounded-input
|
|
55
|
+
v-model.trim="searchQuery"
|
|
56
|
+
:label="$t('labels.search')"
|
|
57
|
+
class="w-full p-2"
|
|
58
|
+
:hide-details="true"
|
|
59
|
+
:append-inner-icon="currentDictName === 'AgentData' ? 'mdi mdi-magnify' : ''"
|
|
60
|
+
@append="searchAgent"
|
|
61
|
+
></base-rounded-input>
|
|
62
|
+
<div v-if="dictList && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
|
|
63
|
+
<div v-for="(item, index) in dictList" :key="item.id">
|
|
64
|
+
<base-panel-select-item
|
|
65
|
+
:key="index"
|
|
66
|
+
:text="currentDictName === 'AgentData' ? item.fullName : (item.nameRu as string)"
|
|
67
|
+
:selected="currentDictName === 'AgentData' ? item.fullName === panelValue.fullName : item.nameRu === panelValue.nameRu"
|
|
68
|
+
@click="pickPanelValue(item)"
|
|
69
|
+
></base-panel-select-item>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50"></base-loader>
|
|
73
|
+
</div>
|
|
74
|
+
</Teleport>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<script lang="ts">
|
|
79
|
+
import { Value } from '@/composables/classes';
|
|
80
|
+
|
|
81
|
+
export default defineComponent({
|
|
82
|
+
props: {
|
|
83
|
+
title: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: '',
|
|
86
|
+
},
|
|
87
|
+
disabled: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: false,
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
setup(props) {
|
|
93
|
+
const route = useRoute();
|
|
94
|
+
const dataStore = useDataStore();
|
|
95
|
+
const formStore = useFormStore();
|
|
96
|
+
const isPanelOpen = ref<boolean>(false);
|
|
97
|
+
const isPanelLoading = ref<boolean>(false);
|
|
98
|
+
const panelValue = ref<Value & AgentData>(new Value());
|
|
99
|
+
const searchQuery = ref<string>('');
|
|
100
|
+
const currentDictName = ref<string>();
|
|
101
|
+
|
|
102
|
+
const dictList = computed(() => {
|
|
103
|
+
if (!currentDictName.value) {
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
if (currentDictName.value === 'AgentData') {
|
|
107
|
+
return dataStore[currentDictName.value];
|
|
108
|
+
} else {
|
|
109
|
+
// @ts-ignore
|
|
110
|
+
return dataStore[currentDictName.value].filter((item: Value) => {
|
|
111
|
+
// @ts-ignore
|
|
112
|
+
return item.nameRu ? item.nameRu.toLowerCase().includes(searchQuery.value.toLowerCase()) : item.fullName.toLowerCase().includes(searchQuery.value.toLowerCase());
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
const isReadonly = computed(
|
|
117
|
+
() =>
|
|
118
|
+
props.disabled ||
|
|
119
|
+
route.params.taskId === '0' ||
|
|
120
|
+
!dataStore.isInitiator() ||
|
|
121
|
+
(route.params.taskId !== '0' && (!dataStore.isProcessEditable(formStore.applicationData.statusCode) || !dataStore.isTask())),
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
const openPanel = async (currentDict: string, title: string) => {
|
|
125
|
+
searchQuery.value = '';
|
|
126
|
+
if (dataStore.isTask() && !props.disabled) {
|
|
127
|
+
dataStore.panelAction = null;
|
|
128
|
+
dataStore.panel.open = true;
|
|
129
|
+
dataStore.panel.title = title;
|
|
130
|
+
currentDictName.value = currentDict;
|
|
131
|
+
|
|
132
|
+
if (currentDict === 'ManagerPolicy') {
|
|
133
|
+
isPanelLoading.value = true;
|
|
134
|
+
await dataStore.filterManagerByRegion(formStore.RegionPolicy?.ids);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
isPanelOpen.value = true;
|
|
138
|
+
panelValue.value = formStore[currentDict as keyof typeof formStore];
|
|
139
|
+
isPanelLoading.value = false;
|
|
140
|
+
} else {
|
|
141
|
+
dataStore.showToaster('error', dataStore.t('toaster.viewErrorText'));
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const searchAgent = async () => {
|
|
146
|
+
if (searchQuery.value) {
|
|
147
|
+
isPanelLoading.value = true;
|
|
148
|
+
await dataStore.searchAgentByName(searchQuery.value);
|
|
149
|
+
isPanelLoading.value = false;
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const pickPanelValue = (answer: any) => {
|
|
154
|
+
// @ts-ignore
|
|
155
|
+
formStore[currentDictName.value] = answer;
|
|
156
|
+
isPanelOpen.value = false;
|
|
157
|
+
dataStore.panel.open = false;
|
|
158
|
+
searchQuery.value = '';
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
watch(searchQuery, () => {
|
|
162
|
+
if (searchQuery.value === null) {
|
|
163
|
+
searchQuery.value = '';
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
watch(
|
|
168
|
+
() => formStore.RegionPolicy,
|
|
169
|
+
(val, oldVal) => {
|
|
170
|
+
if (val.ids !== oldVal.ids) {
|
|
171
|
+
formStore.ManagerPolicy = new Value();
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
);
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
// State
|
|
178
|
+
formStore,
|
|
179
|
+
isPanelOpen,
|
|
180
|
+
isPanelLoading,
|
|
181
|
+
panelValue,
|
|
182
|
+
searchQuery,
|
|
183
|
+
Value,
|
|
184
|
+
currentDictName,
|
|
185
|
+
|
|
186
|
+
// Computed
|
|
187
|
+
dictList,
|
|
188
|
+
isReadonly,
|
|
189
|
+
|
|
190
|
+
// Functions
|
|
191
|
+
openPanel,
|
|
192
|
+
searchAgent,
|
|
193
|
+
pickPanelValue,
|
|
194
|
+
};
|
|
195
|
+
},
|
|
196
|
+
});
|
|
197
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="pt-3 pl-5 rounded-lg border-[1px]" :class="[$libStyles.whiteBg]">
|
|
2
|
+
<div class="pt-3 pl-5 rounded-lg border-[1px]" :class="[$libStyles.whiteBg, disabled && $libStyles.disabled]">
|
|
3
3
|
<div>
|
|
4
4
|
<p :class="[$libStyles.textTitle, $libStyles.greenText]">
|
|
5
5
|
{{ $t('productConditions') }}
|
|
@@ -7,22 +7,26 @@
|
|
|
7
7
|
<p v-if="!!subtitle" :class="[$libStyles.greyText, $libStyles.textSimple]">{{ subtitle }}</p>
|
|
8
8
|
</div>
|
|
9
9
|
<div class="mt-6 grid grid-cols-3 lg:grid-cols-5 auto-rows-fr items-center">
|
|
10
|
-
<span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.requestedSumInsured') }}</span>
|
|
11
|
-
<span :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.insurancePremiumPerMonth') }}</span>
|
|
12
|
-
<span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('
|
|
13
|
-
<span :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.
|
|
10
|
+
<span v-if="hasSum" :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.requestedSumInsured') }}</span>
|
|
11
|
+
<span v-if="hasPremium" :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.insurancePremiumPerMonth') }}</span>
|
|
12
|
+
<span v-if="hasPolicyNumber" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('buttons.InsuranceContract') }}</span>
|
|
13
|
+
<span v-if="hasContractDate" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.contractDate') }}</span>
|
|
14
|
+
<span v-if="hasCoverPeriod" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.coverPeriod') }}</span>
|
|
15
|
+
<span v-if="hasPayPeriod" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.payPeriod') }}</span>
|
|
14
16
|
</div>
|
|
15
17
|
<div class="grid grid-cols-3 lg:grid-cols-5 auto-rows-fr items-center">
|
|
16
|
-
<span :class="[amount === null && $libStyles.emptyBlockCol]">{{ amount }} </span>
|
|
17
|
-
<span :class="[premium === null && $libStyles.emptyBlockCol]"> {{ premium }}</span>
|
|
18
|
-
<span :class="[
|
|
19
|
-
<span :class="[
|
|
18
|
+
<span v-if="hasSum" :class="[amount === null && $libStyles.emptyBlockCol]">{{ amount }} </span>
|
|
19
|
+
<span v-if="hasPremium" :class="[premium === null && $libStyles.emptyBlockCol]"> {{ premium }}</span>
|
|
20
|
+
<span v-if="hasPolicyNumber" :class="[policyNumber === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ policyNumber }}</span>
|
|
21
|
+
<span v-if="hasContractDate" :class="[policyNumber === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ contractDate }}</span>
|
|
22
|
+
<span v-if="hasCoverPeriod" :class="[coverPeriod === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ coverPeriod }} </span>
|
|
23
|
+
<span v-if="hasPayPeriod" :class="[paymentPeriod === null && $libStyles.emptyBlockCol]" class="hidden lg:block">
|
|
20
24
|
{{ paymentPeriod }}
|
|
21
25
|
</span>
|
|
22
26
|
<div
|
|
23
|
-
class="rounded-br-lg transition-all h-[70px] w-[60px] relative place-self-end
|
|
24
|
-
:class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover]"
|
|
25
|
-
@click="$emit('onMore', { whichForm: 'productConditions' })"
|
|
27
|
+
class="rounded-br-lg transition-all h-[70px] w-[60px] relative place-self-end"
|
|
28
|
+
:class="[$libStyles.blueBgLight, $libStyles.blueBgLightHover, disabled ? $libStyles.disabled : 'cursor-pointer']"
|
|
29
|
+
@click="!disabled && $emit('onMore', { whichForm: 'productConditions' })"
|
|
26
30
|
>
|
|
27
31
|
<i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"> </i>
|
|
28
32
|
</div>
|
|
@@ -37,8 +41,13 @@ export default defineComponent({
|
|
|
37
41
|
type: String,
|
|
38
42
|
default: '',
|
|
39
43
|
},
|
|
44
|
+
disabled: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false,
|
|
47
|
+
},
|
|
40
48
|
},
|
|
41
49
|
setup() {
|
|
50
|
+
const dataStore = useDataStore();
|
|
42
51
|
const formStore = useFormStore();
|
|
43
52
|
|
|
44
53
|
const amount = computed(() =>
|
|
@@ -47,12 +56,47 @@ export default defineComponent({
|
|
|
47
56
|
const premium = computed(() =>
|
|
48
57
|
formStore.productConditionsForm && formStore.productConditionsForm.insurancePremiumPerMonth ? formStore.productConditionsForm.insurancePremiumPerMonth : null,
|
|
49
58
|
);
|
|
59
|
+
const policyNumber = computed(() => (formStore.applicationData && formStore.applicationData.policyAppDto ? formStore.applicationData.policyAppDto.policyNumber : null));
|
|
60
|
+
const contractDate = computed(() =>
|
|
61
|
+
formStore.applicationData && formStore.applicationData.policyAppDto ? reformatDate(formStore.applicationData.policyAppDto.contractDate) : null,
|
|
62
|
+
);
|
|
50
63
|
const coverPeriod = computed(() => (formStore.productConditionsForm && formStore.productConditionsForm.coverPeriod ? formStore.productConditionsForm.coverPeriod : null));
|
|
51
64
|
const paymentPeriod = computed(() =>
|
|
52
65
|
formStore.productConditionsForm && formStore.productConditionsForm.paymentPeriod && !!formStore.productConditionsForm.paymentPeriod.nameRu
|
|
53
66
|
? formStore.productConditionsForm.paymentPeriod.nameRu
|
|
54
67
|
: null,
|
|
55
68
|
);
|
|
69
|
+
|
|
70
|
+
const hasSum = computed(() => {
|
|
71
|
+
return true;
|
|
72
|
+
});
|
|
73
|
+
const hasPremium = computed(() => {
|
|
74
|
+
return true;
|
|
75
|
+
});
|
|
76
|
+
const hasPolicyNumber = computed(() => {
|
|
77
|
+
if (dataStore.isFinCenter()) {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
return false;
|
|
81
|
+
});
|
|
82
|
+
const hasContractDate = computed(() => {
|
|
83
|
+
if (dataStore.isFinCenter()) {
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
});
|
|
88
|
+
const hasCoverPeriod = computed(() => {
|
|
89
|
+
if (dataStore.isFinCenter()) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
return true;
|
|
93
|
+
});
|
|
94
|
+
const hasPayPeriod = computed(() => {
|
|
95
|
+
if (dataStore.isFinCenter()) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
return true;
|
|
99
|
+
});
|
|
56
100
|
return {
|
|
57
101
|
// State
|
|
58
102
|
formStore,
|
|
@@ -60,8 +104,16 @@ export default defineComponent({
|
|
|
60
104
|
// Computed
|
|
61
105
|
amount,
|
|
62
106
|
premium,
|
|
107
|
+
policyNumber,
|
|
108
|
+
contractDate,
|
|
63
109
|
coverPeriod,
|
|
64
110
|
paymentPeriod,
|
|
111
|
+
hasSum,
|
|
112
|
+
hasPremium,
|
|
113
|
+
hasPolicyNumber,
|
|
114
|
+
hasContractDate,
|
|
115
|
+
hasPayPeriod,
|
|
116
|
+
hasCoverPeriod,
|
|
65
117
|
};
|
|
66
118
|
},
|
|
67
119
|
});
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
model-type="dd.MM.yyyy"
|
|
10
10
|
position="left"
|
|
11
11
|
menu-class-name="!left-[30vw] md:!left-[70vw] lg:!left-[75vw]"
|
|
12
|
-
teleport="
|
|
12
|
+
:teleport="teleport"
|
|
13
13
|
:offset="-50"
|
|
14
14
|
:close-on-scroll="true"
|
|
15
15
|
:enable-time-picker="false"
|
|
@@ -36,6 +36,10 @@ export default defineComponent({
|
|
|
36
36
|
type: Boolean,
|
|
37
37
|
default: false,
|
|
38
38
|
},
|
|
39
|
+
teleport: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: '.v-form',
|
|
42
|
+
},
|
|
39
43
|
},
|
|
40
44
|
});
|
|
41
45
|
</script>
|
|
@@ -20,16 +20,27 @@
|
|
|
20
20
|
:append-icon="appendIcon ? appendIcon : ''"
|
|
21
21
|
:prepend-inner-icon="prependInnerIcon ? prependInnerIcon : ''"
|
|
22
22
|
:bg-color="bgColor ? bgColor : ''"
|
|
23
|
+
:suffix="suffix"
|
|
24
|
+
@input="$emit('input', $event)"
|
|
23
25
|
@keyup.enter.prevent="submitted"
|
|
24
26
|
@click:append="!props.readonly && $emit('append-out')"
|
|
25
27
|
@click:prepend="!props.readonly && $emit('prepend-out')"
|
|
26
|
-
@click:append-inner="!props.readonly && $emit('append')"
|
|
27
28
|
@click:prepend-inner="!props.readonly && $emit('prepend')"
|
|
29
|
+
@click:clear="!props.readonly && $emit('on-clear')"
|
|
28
30
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
29
31
|
>
|
|
30
32
|
<template v-if="appendInnerIcon && appendInnerIcon.length" v-slot:append-inner>
|
|
31
|
-
<v-icon
|
|
32
|
-
|
|
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
|
+
></v-icon>
|
|
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
|
+
></base-datepicker>
|
|
33
44
|
</template>
|
|
34
45
|
<template v-if="loading" #loader>
|
|
35
46
|
<v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate></v-progress-linear>
|
|
@@ -68,6 +79,10 @@ export default defineComponent({
|
|
|
68
79
|
type: String,
|
|
69
80
|
default: '',
|
|
70
81
|
},
|
|
82
|
+
suffix: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: '',
|
|
85
|
+
},
|
|
71
86
|
messages: {
|
|
72
87
|
type: [String, Array<string>],
|
|
73
88
|
},
|
|
@@ -111,11 +126,14 @@ export default defineComponent({
|
|
|
111
126
|
appendInnerIcon: {
|
|
112
127
|
type: String,
|
|
113
128
|
},
|
|
129
|
+
teleport: {
|
|
130
|
+
type: String,
|
|
131
|
+
},
|
|
114
132
|
bgColor: {
|
|
115
133
|
type: String,
|
|
116
134
|
},
|
|
117
135
|
},
|
|
118
|
-
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
|
|
136
|
+
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out', 'input', 'on-clear'],
|
|
119
137
|
|
|
120
138
|
setup(props, { emit }) {
|
|
121
139
|
const submitted = (event: any) => {
|
|
@@ -135,9 +153,9 @@ export default defineComponent({
|
|
|
135
153
|
border: none !important;
|
|
136
154
|
outline: none !important;
|
|
137
155
|
}
|
|
138
|
-
.form-input input {
|
|
156
|
+
/* .form-input input {
|
|
139
157
|
padding-top: 30px;
|
|
140
|
-
}
|
|
158
|
+
} */
|
|
141
159
|
.form-input .v-field {
|
|
142
160
|
box-shadow: none;
|
|
143
161
|
font-size: 14px;
|
|
@@ -146,7 +164,6 @@ export default defineComponent({
|
|
|
146
164
|
top: 20px;
|
|
147
165
|
}
|
|
148
166
|
.form-input .v-field__append-inner {
|
|
149
|
-
padding-top: 18px;
|
|
150
167
|
padding-right: 6px;
|
|
151
168
|
}
|
|
152
169
|
.form-input .v-field__append-inner i {
|
|
@@ -171,4 +188,8 @@ export default defineComponent({
|
|
|
171
188
|
.form-input .v-field--error {
|
|
172
189
|
border-color: #ff5449;
|
|
173
190
|
}
|
|
191
|
+
.form-input .v-text-field__suffix {
|
|
192
|
+
padding-top: 30px;
|
|
193
|
+
font-size: 16px !important;
|
|
194
|
+
}
|
|
174
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())"
|
|
@@ -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
|
|
|
@@ -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></v-progress-linear>
|
|
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>
|
|
@@ -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>
|