hl-core 0.0.8-beta.2 → 0.0.8-beta.20
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 +42 -14
- package/api/interceptors.ts +1 -1
- package/components/Dialog/Dialog.vue +6 -3
- package/components/Form/FormBlock.vue +63 -28
- package/components/Form/FormSection.vue +4 -1
- package/components/Form/ManagerAttachment.vue +196 -0
- package/components/Form/ProductConditionsBlock.vue +64 -12
- package/components/Input/FormInput.vue +12 -3
- package/components/Input/PanelInput.vue +5 -0
- package/components/Layout/Drawer.vue +1 -0
- package/components/Layout/Header.vue +40 -4
- package/components/Layout/SettingsPanel.vue +35 -8
- package/components/Menu/MenuHover.vue +30 -0
- package/components/Menu/MenuNav.vue +27 -10
- package/components/Pages/Anketa.vue +8 -4
- package/components/Pages/Auth.vue +147 -30
- package/components/Pages/InvoiceInfo.vue +30 -0
- package/components/Pages/MemberForm.vue +274 -79
- package/components/Pages/ProductConditions.vue +291 -7
- package/components/Panel/PanelHandler.vue +74 -1
- package/components/Utilities/JsonViewer.vue +27 -0
- package/composables/classes.ts +126 -23
- package/composables/constants.ts +11 -1
- package/composables/styles.ts +9 -3
- package/configs/i18n.ts +19 -0
- package/layouts/default.vue +2 -2
- package/locales/en.json +558 -0
- package/locales/kz.json +558 -0
- package/locales/ru.json +558 -0
- package/nuxt.config.ts +8 -0
- package/package.json +7 -2
- package/pages/500.vue +1 -1
- package/pages/Token.vue +51 -0
- package/plugins/helperFunctionsPlugins.ts +2 -0
- package/plugins/storePlugin.ts +0 -1
- package/plugins/vuetifyPlugin.ts +5 -0
- package/store/data.store.js +472 -530
- package/store/member.store.ts +120 -15
- package/store/rules.js +27 -3
- package/types/index.ts +34 -0
- package/store/messages.ts +0 -434
|
@@ -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
|
|
13
|
-
<span :class="[$libStyles.textSimple]" class="font-medium
|
|
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">{{ $t('buttons.InsuranceContract') }}</span>
|
|
13
|
+
<span v-if="hasContractDate" :class="[$libStyles.textSimple]" class="font-medium">{{ $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]"> {{ policyNumber }}</span>
|
|
21
|
+
<span v-if="hasContractDate" :class="[policyNumber === null && $libStyles.emptyBlockCol]"> {{ 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
|
});
|
|
@@ -20,15 +20,16 @@
|
|
|
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')"
|
|
28
29
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
29
30
|
>
|
|
30
31
|
<template v-if="appendInnerIcon && appendInnerIcon.length" v-slot:append-inner>
|
|
31
|
-
<v-icon v-if="appendInnerIcon !== 'mdi mdi-calendar-blank-outline'" icon="appendInnerIcon"></v-icon>
|
|
32
|
+
<v-icon v-if="appendInnerIcon !== 'mdi mdi-calendar-blank-outline'" :icon="appendInnerIcon" @click="!props.readonly && $emit('append')"></v-icon>
|
|
32
33
|
<base-datepicker v-else :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)"></base-datepicker>
|
|
33
34
|
</template>
|
|
34
35
|
<template v-if="loading" #loader>
|
|
@@ -68,6 +69,10 @@ export default defineComponent({
|
|
|
68
69
|
type: String,
|
|
69
70
|
default: '',
|
|
70
71
|
},
|
|
72
|
+
suffix: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: '',
|
|
75
|
+
},
|
|
71
76
|
messages: {
|
|
72
77
|
type: [String, Array<string>],
|
|
73
78
|
},
|
|
@@ -115,7 +120,7 @@ export default defineComponent({
|
|
|
115
120
|
type: String,
|
|
116
121
|
},
|
|
117
122
|
},
|
|
118
|
-
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out'],
|
|
123
|
+
emits: ['update:modelValue', 'submitted', 'prepend', 'append', 'prepend-out', 'append-out', 'input'],
|
|
119
124
|
|
|
120
125
|
setup(props, { emit }) {
|
|
121
126
|
const submitted = (event: any) => {
|
|
@@ -171,4 +176,8 @@ export default defineComponent({
|
|
|
171
176
|
.form-input .v-field--error {
|
|
172
177
|
border-color: #ff5449;
|
|
173
178
|
}
|
|
179
|
+
.form-input .v-text-field__suffix {
|
|
180
|
+
padding-top: 30px;
|
|
181
|
+
font-size: 16px !important;
|
|
182
|
+
}
|
|
174
183
|
</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
|
|
|
@@ -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>
|
|
@@ -9,8 +9,16 @@
|
|
|
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 v-if="$dataStore.isEFO" @click="changeBridge('lka')" class="cursor-pointer">
|
|
13
|
+
{{ $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
|
+
{{ $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,28 @@
|
|
|
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
|
+
{{ $t('historyStatementsAndStatuses') }}
|
|
31
|
+
<i class="mdi mdi-history text-xl text-[#A0B3D8]"></i>
|
|
32
|
+
</base-panel-item>
|
|
33
|
+
<base-panel-item @click="dialogSignOut = true" class="cursor-pointer" :class="[$libStyles.redText]">
|
|
34
|
+
{{ $t('buttons.logout') }}
|
|
35
|
+
<i class="mdi mdi-logout text-xl"></i>
|
|
24
36
|
</base-panel-item>
|
|
25
37
|
|
|
26
|
-
<base-dialog v-model="
|
|
38
|
+
<base-dialog v-model="dialogSignOut" :title="$t('dialog.exit')" :subtitle="$t('dialog.dataWillClear')" actions="default" @yes="logoutUser" @no="dialogSignOut = false">
|
|
39
|
+
</base-dialog
|
|
27
40
|
></base-drawer>
|
|
28
41
|
</template>
|
|
29
42
|
|
|
30
43
|
<script lang="ts" setup>
|
|
31
|
-
const
|
|
44
|
+
const dialogSignOut = ref(false);
|
|
32
45
|
const dataStore = useDataStore();
|
|
33
46
|
|
|
34
47
|
const handleFontSize = (action: 'increase' | 'decrease') => {
|
|
35
48
|
if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
|
|
36
49
|
if (action === 'decrease' && dataStore.fontSize > 14) dataStore.fontSize -= 2;
|
|
37
|
-
if (dataStore.
|
|
50
|
+
if (dataStore.isBridge) {
|
|
38
51
|
dataStore.sendToChild(constants.postActions.font, dataStore.fontSize);
|
|
39
52
|
} else {
|
|
40
53
|
dataStore.sendToParent(constants.postActions.font, dataStore.fontSize);
|
|
@@ -42,7 +55,21 @@ const handleFontSize = (action: 'increase' | 'decrease') => {
|
|
|
42
55
|
};
|
|
43
56
|
|
|
44
57
|
const logoutUser = async () => {
|
|
45
|
-
|
|
58
|
+
dialogSignOut.value = false;
|
|
46
59
|
await dataStore.logoutUser();
|
|
47
60
|
};
|
|
61
|
+
|
|
62
|
+
const hasHistory = computed(() => {
|
|
63
|
+
return !dataStore.isLKA;
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const openHistory = async () => {
|
|
67
|
+
dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.product);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const changeBridge = async (toBridge: 'efo' | 'lka') => {
|
|
71
|
+
const bridgeUrl = import.meta.env[`VITE_${toBridge.toUpperCase()}_URL`] as string;
|
|
72
|
+
if (!bridgeUrl) return;
|
|
73
|
+
window.open(`${bridgeUrl}/#/Token?token=${dataStore.accessToken}`, '_blank');
|
|
74
|
+
};
|
|
48
75
|
</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)"></base-menu-nav-item>
|
|
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,7 +6,7 @@
|
|
|
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')"
|
|
@@ -16,11 +16,11 @@
|
|
|
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
|
>
|
|
@@ -35,7 +35,15 @@
|
|
|
35
35
|
<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">
|
|
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
|
+
>
|
|
46
|
+
</base-btn>
|
|
39
47
|
</transition>
|
|
40
48
|
</div></div
|
|
41
49
|
></base-fade-transition>
|
|
@@ -69,10 +77,6 @@ export default defineComponent({
|
|
|
69
77
|
type: Boolean,
|
|
70
78
|
default: false,
|
|
71
79
|
},
|
|
72
|
-
hideMoreOnLg: {
|
|
73
|
-
type: Boolean,
|
|
74
|
-
default: false,
|
|
75
|
-
},
|
|
76
80
|
moreIcon: {
|
|
77
81
|
type: String,
|
|
78
82
|
default: 'mdi-cog-outline',
|
|
@@ -84,7 +88,7 @@ export default defineComponent({
|
|
|
84
88
|
const router = useRouter();
|
|
85
89
|
|
|
86
90
|
const pickItem = async (item: MenuItem) => {
|
|
87
|
-
if (item.title !== dataStore.menu.selectedItem.title &&
|
|
91
|
+
if (item.title !== dataStore.menu.selectedItem.title && !dataStore.filters.disabled(item)) {
|
|
88
92
|
if (typeof item.link === 'object') {
|
|
89
93
|
if (item.link && 'name' in item.link) {
|
|
90
94
|
await router.push(item.link as RouteLocationNormalized);
|
|
@@ -102,7 +106,20 @@ export default defineComponent({
|
|
|
102
106
|
}
|
|
103
107
|
};
|
|
104
108
|
|
|
105
|
-
|
|
109
|
+
const hideOnLg = computed(() => {
|
|
110
|
+
switch (router.currentRoute.value.name) {
|
|
111
|
+
case 'Insurance-Product':
|
|
112
|
+
case 'Menu':
|
|
113
|
+
case 'History':
|
|
114
|
+
case 'Main':
|
|
115
|
+
case 'taskId':
|
|
116
|
+
return false;
|
|
117
|
+
default:
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
return { pickItem, openTab, hideOnLg };
|
|
106
123
|
},
|
|
107
124
|
});
|
|
108
125
|
</script>
|
|
@@ -39,13 +39,17 @@
|
|
|
39
39
|
class="rounded-t-lg pl-6 py-1 cursor-pointer"
|
|
40
40
|
@click="openFirstPanel(question)"
|
|
41
41
|
>
|
|
42
|
-
{{ $t('questionnaireType.pleaseAnswer'
|
|
42
|
+
{{ $t('questionnaireType.pleaseAnswer', { text: secondQuestionList.length }) }}
|
|
43
43
|
</div>
|
|
44
44
|
</base-fade-transition>
|
|
45
45
|
<span :class="[$libStyles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between">
|
|
46
46
|
{{ question.first.name }}
|
|
47
47
|
<base-fade-transition>
|
|
48
|
-
<i
|
|
48
|
+
<i
|
|
49
|
+
v-if="question.first.answerName === 'Да' && secondQuestionList && secondQuestionList.length"
|
|
50
|
+
class="mdi mdi-chevron-right text-2xl cursor-pointer"
|
|
51
|
+
@click="openFirstPanel(question)"
|
|
52
|
+
></i>
|
|
49
53
|
</base-fade-transition>
|
|
50
54
|
</span>
|
|
51
55
|
<div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$libStyles.textSimple]">
|
|
@@ -169,11 +173,11 @@ export default defineComponent({
|
|
|
169
173
|
if (errors) {
|
|
170
174
|
const errorText = errors.querySelector('.v-label.v-field-label');
|
|
171
175
|
if (errorText) {
|
|
172
|
-
dataStore.showToaster('error', dataStore.t('toaster.errorFormField'
|
|
176
|
+
dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: errorText.innerHTML?.replace(/[-<>!//.]/g, '') }));
|
|
173
177
|
} else {
|
|
174
178
|
const errorFieldText = errors.parentElement?.parentElement?.children[0].innerHTML;
|
|
175
179
|
if (errorFieldText) {
|
|
176
|
-
dataStore.showToaster('error', dataStore.t('toaster.errorFormField'
|
|
180
|
+
dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: errorFieldText }));
|
|
177
181
|
}
|
|
178
182
|
}
|
|
179
183
|
errors.scrollIntoView({
|