hl-core 0.0.9-beta.3 → 0.0.9-beta.31
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/base.api.ts +862 -0
- package/api/index.ts +2 -620
- package/api/interceptors.ts +58 -14
- package/components/Button/Btn.vue +3 -3
- package/components/Complex/ContentBlock.vue +1 -1
- package/components/Complex/MessageBlock.vue +2 -2
- package/components/Complex/Page.vue +8 -2
- package/components/Complex/WhiteBlock.vue +7 -0
- package/components/Dialog/Dialog.vue +60 -15
- package/components/Dialog/FamilyDialog.vue +5 -5
- package/components/Form/DynamicForm.vue +99 -0
- package/components/Form/FormBlock.vue +36 -29
- package/components/Form/FormData.vue +48 -0
- package/components/Form/FormSection.vue +2 -2
- package/components/Form/FormTextSection.vue +3 -3
- package/components/Form/FormToggle.vue +3 -3
- package/components/Form/ManagerAttachment.vue +104 -52
- package/components/Form/ProductConditionsBlock.vue +73 -20
- package/components/Input/DynamicInput.vue +23 -0
- package/components/Input/EmptyFormField.vue +1 -1
- package/components/Input/FileInput.vue +15 -4
- package/components/Input/Monthpicker.vue +33 -0
- package/components/Input/PanelInput.vue +5 -1
- package/components/Input/RoundedEmptyField.vue +5 -0
- package/components/Input/RoundedSelect.vue +13 -0
- package/components/Input/SwitchInput.vue +64 -0
- package/components/Input/TextInput.vue +161 -0
- package/components/Layout/Drawer.vue +17 -4
- package/components/Layout/Header.vue +2 -2
- package/components/Layout/SettingsPanel.vue +10 -15
- package/components/List/ListEmpty.vue +1 -1
- package/components/Menu/MenuHover.vue +1 -1
- package/components/Menu/MenuNav.vue +3 -3
- package/components/Menu/MenuNavItem.vue +4 -4
- package/components/Pages/Anketa.vue +144 -65
- package/components/Pages/Auth.vue +21 -10
- package/components/Pages/ContragentForm.vue +505 -0
- package/components/Pages/Documents.vue +57 -11
- package/components/Pages/InvoiceInfo.vue +2 -2
- package/components/Pages/MemberForm.vue +253 -89
- package/components/Pages/ProductAgreement.vue +2 -11
- package/components/Pages/ProductConditions.vue +777 -164
- package/components/Panel/PanelHandler.vue +297 -54
- package/components/Panel/PanelSelectItem.vue +18 -3
- package/components/Panel/RightPanelCloser.vue +7 -0
- package/components/Utilities/IconBorder.vue +17 -0
- package/composables/axios.ts +1 -1
- package/composables/classes.ts +405 -9
- package/composables/constants.ts +40 -0
- package/composables/fields.ts +203 -0
- package/composables/index.ts +48 -0
- package/composables/styles.ts +22 -10
- package/configs/i18n.ts +0 -2
- package/layouts/default.vue +46 -4
- package/layouts/full.vue +1 -1
- package/locales/ru.json +428 -11
- package/nuxt.config.ts +1 -1
- package/package.json +30 -39
- package/pages/500.vue +2 -2
- package/pages/Token.vue +1 -0
- package/plugins/helperFunctionsPlugins.ts +6 -7
- package/plugins/vuetifyPlugin.ts +2 -0
- package/store/data.store.ts +936 -217
- package/store/extractStore.ts +17 -0
- package/store/form.store.ts +13 -1
- package/store/member.store.ts +1 -1
- package/store/rules.ts +38 -2
- package/types/enum.ts +8 -0
- package/types/form.ts +94 -0
- package/types/index.ts +162 -10
- package/components/Button/BtnIcon.vue +0 -47
- package/locales/kz.json +0 -590
package/api/interceptors.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosInstance } from 'axios';
|
|
1
|
+
import { AxiosError, AxiosInstance } from 'axios';
|
|
2
2
|
|
|
3
3
|
export default function (axios: AxiosInstance) {
|
|
4
4
|
axios.interceptors.request.use(
|
|
@@ -7,9 +7,51 @@ export default function (axios: AxiosInstance) {
|
|
|
7
7
|
if (dataStore.accessToken) {
|
|
8
8
|
request.headers.Authorization = `Bearer ${dataStore.accessToken}`;
|
|
9
9
|
}
|
|
10
|
+
if (request.url && request.baseURL) {
|
|
11
|
+
const host = window.location.hostname;
|
|
12
|
+
if (host.startsWith('bpmsrv02')) {
|
|
13
|
+
if (request.baseURL === 'https://products.halyklife.kz/api/v1/insis') {
|
|
14
|
+
request.baseURL = 'http://bpmsrv02.halyklife.nb';
|
|
15
|
+
}
|
|
16
|
+
if (request.baseURL === 'https://products.halyklife.kz/efo/api') {
|
|
17
|
+
request.baseURL = 'http://efo-prod.halyklife.nb/api';
|
|
18
|
+
}
|
|
19
|
+
if (request.baseURL === 'https://products.halyklife.kz/aml/api') {
|
|
20
|
+
request.baseURL = 'http://aml-prod.halyklife.nb/api';
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (host.startsWith('vega')) {
|
|
24
|
+
if (request.baseURL === 'https://products.halyklife.kz/api/v1/test/insis') {
|
|
25
|
+
request.baseURL = 'http://vega:84';
|
|
26
|
+
}
|
|
27
|
+
if (request.baseURL === 'https://products.halyklife.kz/test/efo/api') {
|
|
28
|
+
request.baseURL = 'http://efo-dev.halyklife.nb/api';
|
|
29
|
+
}
|
|
30
|
+
if (request.baseURL === 'https://products.halyklife.kz/test/aml/api') {
|
|
31
|
+
request.baseURL = 'http://aml-dev.halyklife.nb/api';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (import.meta.env.VITE_ON_NEW_API === 'true') {
|
|
35
|
+
if (request.url.includes('api/Application')) {
|
|
36
|
+
if (request.baseURL === 'http://vega:84') {
|
|
37
|
+
request.baseURL = 'http://efo-dev.halyklife.nb/api';
|
|
38
|
+
}
|
|
39
|
+
if (request.baseURL === 'http://bpmsrv02.halyklife.nb') {
|
|
40
|
+
request.baseURL = 'http://efo-prod.halyklife.nb/api';
|
|
41
|
+
}
|
|
42
|
+
request.url = request.url.replace('/api/Application', '');
|
|
43
|
+
if (request.baseURL.includes('api/v1/insis')) {
|
|
44
|
+
request.baseURL = request.baseURL.replace('api/v1/insis', 'efo/api');
|
|
45
|
+
}
|
|
46
|
+
if (request.baseURL.includes('api/v1/test/insis')) {
|
|
47
|
+
request.baseURL = request.baseURL.replace('api/v1/test/insis', 'test/efo/api');
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
10
52
|
return request;
|
|
11
53
|
},
|
|
12
|
-
error => {
|
|
54
|
+
(error: AxiosError) => {
|
|
13
55
|
return Promise.reject(error);
|
|
14
56
|
},
|
|
15
57
|
);
|
|
@@ -17,22 +59,24 @@ export default function (axios: AxiosInstance) {
|
|
|
17
59
|
response => {
|
|
18
60
|
return response;
|
|
19
61
|
},
|
|
20
|
-
error => {
|
|
62
|
+
(error: AxiosError) => {
|
|
21
63
|
const dataStore = useDataStore();
|
|
22
64
|
if (!dataStore.isCalculator) {
|
|
23
65
|
const router = useRouter();
|
|
24
|
-
if (error.response.status
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
66
|
+
if (error && error.response && error.response.status) {
|
|
67
|
+
if (error.response.status === 401) {
|
|
68
|
+
dataStore.$reset();
|
|
69
|
+
localStorage.clear();
|
|
70
|
+
if (dataStore.isBridge) {
|
|
71
|
+
router.push({ name: 'Auth', query: { error: 401 } });
|
|
72
|
+
} else {
|
|
73
|
+
dataStore.sendToParent(constants.postActions.Error401, 401);
|
|
74
|
+
}
|
|
31
75
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
76
|
+
if (error.response.status >= 500) {
|
|
77
|
+
if (router.currentRoute.value.name !== 'Auth') {
|
|
78
|
+
dataStore.showToaster('error', error.stack ?? dataStore.t('toaster.error'), 5000);
|
|
79
|
+
}
|
|
36
80
|
}
|
|
37
81
|
}
|
|
38
82
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
3
|
type="button"
|
|
4
|
-
class="transition-all"
|
|
4
|
+
class="transition-all border-solid"
|
|
5
5
|
@click="$emit('clicked')"
|
|
6
6
|
:disabled="disabled || loading"
|
|
7
7
|
:class="[
|
|
8
8
|
disabled ? 'disabled' : '',
|
|
9
9
|
classes,
|
|
10
10
|
btn,
|
|
11
|
-
$
|
|
11
|
+
$styles[`btnH${$capitalize(size)}` as keyof typeof $styles],
|
|
12
12
|
]"
|
|
13
13
|
>
|
|
14
14
|
<base-loader v-if="loading" :size="24" color="#FFF" bg-color="" :width="2" />
|
|
15
|
-
<span v-if="!loading">{{ text }}</span>
|
|
15
|
+
<span class="!text-inherit" v-if="!loading">{{ text }}</span>
|
|
16
16
|
</button>
|
|
17
17
|
</template>
|
|
18
18
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="text-left p-6
|
|
3
|
-
<v-icon :icon="icon" class="mr-4"
|
|
2
|
+
<div class="text-left p-6" :class="[color, $styles.rounded, $styles.textTitle]">
|
|
3
|
+
<v-icon :icon="icon" class="mr-4" />
|
|
4
4
|
{{ text }}
|
|
5
5
|
</div>
|
|
6
6
|
</template>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<base-content class="flex-col" :class="[$
|
|
2
|
+
<base-content class="flex-col" :class="[$styles.whiteBg]">
|
|
3
3
|
<base-header
|
|
4
|
+
v-if="customHeader === false"
|
|
4
5
|
class="justify-center lg:pl-14"
|
|
5
6
|
:has-back="hasBack"
|
|
6
7
|
:back-icon="backIcon"
|
|
@@ -10,6 +11,7 @@
|
|
|
10
11
|
@onBack="$emit('onBack')"
|
|
11
12
|
@onMore="$emit('onMore')"
|
|
12
13
|
/>
|
|
14
|
+
<slot name="header"></slot>
|
|
13
15
|
<slot></slot>
|
|
14
16
|
</base-content>
|
|
15
17
|
</template>
|
|
@@ -31,12 +33,16 @@ export default defineComponent({
|
|
|
31
33
|
},
|
|
32
34
|
moreIcon: {
|
|
33
35
|
type: String,
|
|
34
|
-
default: 'mdi-
|
|
36
|
+
default: 'mdi-dots-vertical',
|
|
35
37
|
},
|
|
36
38
|
title: {
|
|
37
39
|
type: String,
|
|
38
40
|
default: '',
|
|
39
41
|
},
|
|
42
|
+
customHeader: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
40
46
|
},
|
|
41
47
|
emits: ['onBack', 'onMore'],
|
|
42
48
|
});
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-dialog :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)" :persistent="true">
|
|
3
|
-
<v-card class="self-center w-full sm:w-
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
<v-dialog class="base-dialog" :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)" :persistent="true">
|
|
3
|
+
<v-card class="self-center w-full sm:w-4/4 md:w-2/3 lg:w-[35%] xl:w-[500px] rounded-lg !p-[36px]">
|
|
4
|
+
<div class="flex sm:flex-row flex-col place-items-center sm:place-items-start">
|
|
5
|
+
<div class="h-20 w-20 place-items-start pt-1">
|
|
6
|
+
<div class="bg-[#F7F7F7] h-24 w-24 sm:h-16 sm:w-16 rounded grid place-items-center invisible sm:visible">
|
|
7
|
+
<i :class="'mdi-' + icon.mdi" class="mdi text-[100px] sm:text-[30px] color-blue visible !ml-[-10px] sm:!ml-[0px] mt-[-50px] sm:mt-0" :style="{ color: icon.color }"></i>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<v-card-title class="!text-center sm:!text-start text-[34px]">
|
|
11
|
+
<slot v-if="!title" name="title"></slot>
|
|
12
|
+
<div></div>
|
|
13
|
+
{{ title }}
|
|
14
|
+
<v-card-subtitle class="!p-0">
|
|
15
|
+
<slot v-if="!subtitle" name="subtitle"></slot>
|
|
16
|
+
{{ subtitle }}
|
|
17
|
+
</v-card-subtitle>
|
|
18
|
+
</v-card-title>
|
|
19
|
+
</div>
|
|
20
|
+
<v-card-actions class="!p-0 pt-5 gap-[16px] sm:flex-row flex-col place-items-stretch sm:place-items-center">
|
|
21
|
+
<base-btn v-if="actions === 'default'" class="px-6" size="sm" :text="confirm" :btn="$styles.whiteBorderBtn" :classes="$styles.blueText" @click="$emit('yes')" />
|
|
22
|
+
<base-btn v-if="actions === 'default'" class="px-6" size="sm" :text="$dataStore.t('confirm.cancel')" :btn="$styles.blueBtn" @click="$emit('no')" />
|
|
16
23
|
<slot v-if="actions !== 'default'" name="actions"></slot>
|
|
17
24
|
</v-card-actions>
|
|
18
25
|
</v-card>
|
|
@@ -29,7 +36,7 @@ export default defineComponent({
|
|
|
29
36
|
title: {
|
|
30
37
|
type: String,
|
|
31
38
|
default() {
|
|
32
|
-
return useDataStore().t('dialog.
|
|
39
|
+
return useDataStore().t('dialog.confirmDo');
|
|
33
40
|
},
|
|
34
41
|
},
|
|
35
42
|
subtitle: {
|
|
@@ -40,7 +47,45 @@ export default defineComponent({
|
|
|
40
47
|
type: String,
|
|
41
48
|
default: 'default',
|
|
42
49
|
},
|
|
50
|
+
confirm: {
|
|
51
|
+
type: String,
|
|
52
|
+
default() {
|
|
53
|
+
return useDataStore().t('confirm.yes');
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
icon: {
|
|
57
|
+
type: Object as PropType<{ mdi?: string; color?: string; bg?: string }>,
|
|
58
|
+
default: {
|
|
59
|
+
mdi: 'information',
|
|
60
|
+
color: '#FAB31C',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
43
63
|
},
|
|
44
64
|
emits: ['update:modelValue', 'yes', 'no'],
|
|
45
65
|
});
|
|
46
66
|
</script>
|
|
67
|
+
<style>
|
|
68
|
+
.base-dialog .v-card-title {
|
|
69
|
+
font-size: 18px;
|
|
70
|
+
}
|
|
71
|
+
.base-dialog .v-card-subtitle {
|
|
72
|
+
font-size: 14px;
|
|
73
|
+
}
|
|
74
|
+
@media (max-width: 640px) {
|
|
75
|
+
.base-dialog .v-card-title {
|
|
76
|
+
margin-top: 10px;
|
|
77
|
+
font-size: 20px;
|
|
78
|
+
}
|
|
79
|
+
.base-dialog .v-card-subtitle {
|
|
80
|
+
font-size: 14px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
.base-dialog .v-card-title,
|
|
84
|
+
.base-dialog .v-card-subtitle {
|
|
85
|
+
padding-top: 0;
|
|
86
|
+
flex: 1;
|
|
87
|
+
overflow-wrap: normal;
|
|
88
|
+
overflow: visible;
|
|
89
|
+
white-space: normal;
|
|
90
|
+
}
|
|
91
|
+
</style>
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
<v-list lines="two" v-if="formStore.birthInfos && formStore.birthInfos.length" class="w-full !py-0">
|
|
3
3
|
<v-list-item
|
|
4
4
|
@click="$emit('reset')"
|
|
5
|
-
:append-icon="selected && Object.keys(selected).length === 0 ? `mdi-radiobox-marked ${$
|
|
5
|
+
:append-icon="selected && Object.keys(selected).length === 0 ? `mdi-radiobox-marked ${$styles.greenText}` : 'mdi-radiobox-blank text-[#636363]'"
|
|
6
6
|
>
|
|
7
|
-
<v-list-item-title :class="[$
|
|
7
|
+
<v-list-item-title :class="[$styles.greenText, $styles.textTitle]">{{ $dataStore.t('form.notChosen') }}</v-list-item-title>
|
|
8
8
|
</v-list-item>
|
|
9
9
|
<v-list-item
|
|
10
10
|
v-for="familyMember of formStore.birthInfos"
|
|
11
11
|
:key="familyMember.childIIN"
|
|
12
12
|
@click="$emit('selectFamilyMember', familyMember)"
|
|
13
|
-
:append-icon="familyMember && selected && selected.childIIN === familyMember.childIIN ? `mdi-radiobox-marked ${$
|
|
13
|
+
:append-icon="familyMember && selected && selected.childIIN === familyMember.childIIN ? `mdi-radiobox-marked ${$styles.greenText}` : 'mdi-radiobox-blank text-[#636363]'"
|
|
14
14
|
>
|
|
15
|
-
<v-list-item-title :class="[$
|
|
15
|
+
<v-list-item-title :class="[$styles.greenText, $styles.textTitle]">{{
|
|
16
16
|
`${familyMember.childSurName} ${familyMember.childName} ${familyMember.childPatronymic ? familyMember.childPatronymic : ''}`
|
|
17
17
|
}}</v-list-item-title>
|
|
18
|
-
<v-list-item-subtitle :class="[$
|
|
18
|
+
<v-list-item-subtitle :class="[$styles.textSimple]"
|
|
19
19
|
><span>{{ `${$dataStore.t('form.iin')}:` }}</span
|
|
20
20
|
>{{ ` ${$reformatIin(familyMember.childIIN!)}` }}</v-list-item-subtitle
|
|
21
21
|
>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-form class="dynamic-form">
|
|
3
|
+
<base-form-section v-for="(section, sectionIndex) in form.sections" :key="sectionIndex" class="rounded-lg" :title="section.title">
|
|
4
|
+
<base-dynamic-input :fields="section.fields" @onClickField="onClickField" />
|
|
5
|
+
</base-form-section>
|
|
6
|
+
<Teleport v-if="isPanelOpen" to="#right-panel-actions">
|
|
7
|
+
<div :class="[$styles.scrollPage]" class="flex flex-col items-center">
|
|
8
|
+
<base-rounded-input v-model="searchQuery" :label="$dataStore.t('labels.search')" class="w-full p-2" :hide-details="true" />
|
|
9
|
+
<div v-if="panelList && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
|
|
10
|
+
<base-panel-select-item :text="$dataStore.t('form.notChosen')" :selected="panelValue.nameRu === null" @click="pickPanelValue(new Value())" />
|
|
11
|
+
<base-panel-select-item
|
|
12
|
+
v-for="(item, index) of panelList.filter(i => i.nameRu && (i.nameRu as string).match(new RegExp(searchQuery, 'i')))"
|
|
13
|
+
:key="index"
|
|
14
|
+
:text="(item.nameRu as string)"
|
|
15
|
+
:selected="item.nameRu === panelValue.nameRu"
|
|
16
|
+
@click="pickPanelValue(item)"
|
|
17
|
+
/>
|
|
18
|
+
</div>
|
|
19
|
+
<base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50" />
|
|
20
|
+
</div>
|
|
21
|
+
</Teleport>
|
|
22
|
+
</v-form>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts">
|
|
26
|
+
import { Value } from '#imports';
|
|
27
|
+
|
|
28
|
+
export default defineComponent({
|
|
29
|
+
props: {
|
|
30
|
+
form: {
|
|
31
|
+
type: Object as PropType<DynamicForm>,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
setup() {
|
|
36
|
+
const dataStore = useDataStore();
|
|
37
|
+
const isPanelOpen = ref<boolean>(false);
|
|
38
|
+
const panelValue = ref<Value>(new Value());
|
|
39
|
+
const panelList = ref<Value[]>([]);
|
|
40
|
+
const isPanelLoading = ref<boolean>(false);
|
|
41
|
+
const searchQuery = ref<string>('');
|
|
42
|
+
const listOfPanelTitles: {
|
|
43
|
+
[key in FetchFunctions]: string;
|
|
44
|
+
} = {
|
|
45
|
+
getResidents: 'form.signOfResidency',
|
|
46
|
+
getFamilyStatuses: 'form.familyStatus',
|
|
47
|
+
getRelationTypes: 'form.relations',
|
|
48
|
+
getCountries: 'form.Country',
|
|
49
|
+
getLocalityTypes: 'form.RegionType',
|
|
50
|
+
getStates: 'form.Province',
|
|
51
|
+
getCities: 'form.City',
|
|
52
|
+
getRegions: 'form.Region',
|
|
53
|
+
getDocumentTypes: 'form.documentType',
|
|
54
|
+
getTaxCountries: 'form.countryOfTaxResidency',
|
|
55
|
+
getCitizenshipCountries: 'form.countryOfCitizenship',
|
|
56
|
+
getSectorCodeList: 'form.economySectorCode',
|
|
57
|
+
getInsurancePay: 'form.insurancePay',
|
|
58
|
+
getEconomicActivityType: 'form.typeEconomicActivity',
|
|
59
|
+
getBanks: 'form.bankName',
|
|
60
|
+
getDocumentIssuers: 'form.documentIssuers',
|
|
61
|
+
getGenderList: 'form.gender',
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const currentField = ref<InputType | null>(null);
|
|
65
|
+
|
|
66
|
+
const pickPanelValue = (item: Value) => {
|
|
67
|
+
if (currentField.value) {
|
|
68
|
+
currentField.value.modelValue = item;
|
|
69
|
+
dataStore.rightPanel.open = false;
|
|
70
|
+
searchQuery.value = '';
|
|
71
|
+
currentField.value = null;
|
|
72
|
+
}
|
|
73
|
+
isPanelOpen.value = false;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const onClickField = async (field: InputType) => {
|
|
77
|
+
currentField.value = field;
|
|
78
|
+
if (field.fetchFrom) {
|
|
79
|
+
isPanelLoading.value = true;
|
|
80
|
+
isPanelOpen.value = true;
|
|
81
|
+
dataStore.rightPanel.open = true;
|
|
82
|
+
dataStore.rightPanel.title = dataStore.t(listOfPanelTitles[field.fetchFrom]);
|
|
83
|
+
panelList.value = (await dataStore[field.fetchFrom]()) as Value[];
|
|
84
|
+
isPanelLoading.value = false;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
return {
|
|
89
|
+
panelValue,
|
|
90
|
+
panelList,
|
|
91
|
+
isPanelOpen,
|
|
92
|
+
isPanelLoading,
|
|
93
|
+
searchQuery,
|
|
94
|
+
pickPanelValue,
|
|
95
|
+
onClickField,
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
</script>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="pt-3 rounded-lg border-[1px]" :class="[$
|
|
2
|
+
<div class="pt-3 rounded-lg border-[1px]" :class="[$styles.whiteBg, disabled && $styles.disabled]">
|
|
3
3
|
<div class="ml-5">
|
|
4
4
|
<div class="flex justify-between mr-5">
|
|
5
|
-
<p :class="[$
|
|
5
|
+
<p :class="[$styles.textTitle, $styles.greenText]">{{ title }}</p>
|
|
6
6
|
<div
|
|
7
7
|
v-if="isMultiple && more && !isShort && isActionsAvailable"
|
|
8
|
-
:class="[$
|
|
9
|
-
class="lg:flex transition-all rounded-lg h-[36px]
|
|
8
|
+
:class="[$styles.blueBg, $styles.whiteText, $styles.textSimple, disabled ? $styles.disabled : 'cursor-pointer']"
|
|
9
|
+
class="hidden lg:flex transition-all rounded-lg h-[36px] items-center font-medium justify-center opacity-50 hover:opacity-90 w-[120px]"
|
|
10
10
|
@click="!disabled && memberStore.addMember(whichForm)"
|
|
11
11
|
>
|
|
12
12
|
{{ $dataStore.t('buttons.add') }}
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
|
-
<p v-if="!!subtitle" :class="[$
|
|
15
|
+
<p v-if="!!subtitle" :class="[$styles.greyText, $styles.textSimple]">{{ subtitle }}</p>
|
|
16
16
|
</div>
|
|
17
17
|
<div
|
|
18
18
|
class="ml-5 mt-6 grid auto-rows-fr items-center"
|
|
19
19
|
:class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2 mb-6' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7 ']"
|
|
20
20
|
>
|
|
21
|
-
<span :class="[$
|
|
22
|
-
<span :class="[$
|
|
23
|
-
<span v-if="!isShort" :class="[$
|
|
24
|
-
<span v-if="!isShort" :class="[$
|
|
25
|
-
<span v-if="!isShort" :class="[$
|
|
26
|
-
<span v-if="!isShort" :class="[$
|
|
21
|
+
<span :class="[$styles.textSimple]" class="font-medium">{{ $dataStore.t('form.fullName') }}</span>
|
|
22
|
+
<span :class="[$styles.textSimple]" class="font-medium">{{ $dataStore.t('form.iin') }}</span>
|
|
23
|
+
<span v-if="!isShort" :class="[$styles.textSimple]" class="font-medium hidden lg:block"> {{ $dataStore.t('form.gender') }}</span>
|
|
24
|
+
<span v-if="!isShort" :class="[$styles.textSimple]" class="font-medium"> {{ $dataStore.t('form.birthDate') }} </span>
|
|
25
|
+
<span v-if="!isShort" :class="[$styles.textSimple]" class="font-medium hidden lg:block">{{ $dataStore.t('form.Country') }} </span>
|
|
26
|
+
<span v-if="!isShort" :class="[$styles.textSimple]" class="font-medium hidden lg:block"> {{ $dataStore.t('code') }}</span>
|
|
27
27
|
</div>
|
|
28
28
|
<div v-if="isMultiple && multipleMember !== null" class="ml-5 flex flex-col" :class="[isShort ? 'mb-6' : '']">
|
|
29
29
|
<div
|
|
@@ -32,16 +32,16 @@
|
|
|
32
32
|
class="grid auto-rows-fr items-center relative"
|
|
33
33
|
:class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7']"
|
|
34
34
|
>
|
|
35
|
-
<span :class="[getMemberInfo(each).fullName === null && $
|
|
36
|
-
<span :class="[getMemberInfo(each).iin === null && $
|
|
37
|
-
<span v-if="!isShort" :class="[getMemberInfo(each).gender === null && $
|
|
38
|
-
<span v-if="!isShort" :class="[getMemberInfo(each).birthDate === null && $
|
|
39
|
-
<span v-if="!isShort" :class="[getMemberInfo(each).birthPlace === null && $
|
|
40
|
-
<span v-if="!isShort" :class="[getMemberInfo(each).sectorCode === null && $
|
|
35
|
+
<span :class="[getMemberInfo(each).fullName === null && $styles.emptyBlockCol]">{{ getMemberInfo(each).fullName }}</span>
|
|
36
|
+
<span :class="[getMemberInfo(each).iin === null && $styles.emptyBlockCol]">{{ getMemberIIN(each) }}</span>
|
|
37
|
+
<span v-if="!isShort" :class="[getMemberInfo(each).gender === null && $styles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(each).gender }} </span>
|
|
38
|
+
<span v-if="!isShort" :class="[getMemberInfo(each).birthDate === null && $styles.emptyBlockCol]"> {{ getMemberInfo(each).birthDate }} </span>
|
|
39
|
+
<span v-if="!isShort" :class="[getMemberInfo(each).birthPlace === null && $styles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).birthPlace }} </span>
|
|
40
|
+
<span v-if="!isShort" :class="[getMemberInfo(each).sectorCode === null && $styles.emptyBlockCol]" class="hidden lg:block"> {{ getMemberInfo(each).sectorCode }} </span>
|
|
41
41
|
<div
|
|
42
42
|
v-if="!isShort"
|
|
43
43
|
class="rounded-br-lg transition-all h-[70px] w-[60px] place-self-end"
|
|
44
|
-
:class="[$
|
|
44
|
+
:class="[$styles.blueBgLight, $styles.blueBgLightHover, disabled ? $styles.disabled : 'cursor-pointer']"
|
|
45
45
|
@click="!disabled && $emit('onMore', { whichForm, index })"
|
|
46
46
|
>
|
|
47
47
|
<i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"></i>
|
|
@@ -53,22 +53,20 @@
|
|
|
53
53
|
class="ml-5 grid auto-rows-fr items-center relative"
|
|
54
54
|
:class="[isShort ? 'grid-cols-2 md:gap-5 md:grid-cols-2 lg:grid-cols-2' : 'grid-cols-4 md:gap-5 md:grid-cols-4 lg:grid-cols-7']"
|
|
55
55
|
>
|
|
56
|
-
<span :class="[getMemberInfo(singleMember).fullName === null && $
|
|
57
|
-
<span :class="[getMemberInfo(singleMember).iin === null && $
|
|
58
|
-
<span v-if="!isShort" :class="[getMemberInfo(singleMember).gender === null && $
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
<span v-if="!isShort" :class="[getMemberInfo(singleMember).birthDate === null && $libStyles.emptyBlockCol]"> {{ getMemberInfo(singleMember).birthDate }} </span>
|
|
62
|
-
<span v-if="!isShort" :class="[getMemberInfo(singleMember).birthPlace === null && $libStyles.emptyBlockCol]" class="hidden lg:block">
|
|
56
|
+
<span :class="[getMemberInfo(singleMember).fullName === null && $styles.emptyBlockCol]">{{ getMemberInfo(singleMember).fullName }}</span>
|
|
57
|
+
<span :class="[getMemberInfo(singleMember).iin === null && $styles.emptyBlockCol]">{{ getMemberInfo(singleMember).iin }}</span>
|
|
58
|
+
<span v-if="!isShort" :class="[getMemberInfo(singleMember).gender === null && $styles.emptyBlockCol]" class="hidden lg:block">{{ getMemberInfo(singleMember).gender }} </span>
|
|
59
|
+
<span v-if="!isShort" :class="[getMemberInfo(singleMember).birthDate === null && $styles.emptyBlockCol]"> {{ getMemberInfo(singleMember).birthDate }} </span>
|
|
60
|
+
<span v-if="!isShort" :class="[getMemberInfo(singleMember).birthPlace === null && $styles.emptyBlockCol]" class="hidden lg:block">
|
|
63
61
|
{{ getMemberInfo(singleMember).birthPlace }}
|
|
64
62
|
</span>
|
|
65
|
-
<span v-if="!isShort" :class="[getMemberInfo(singleMember).sectorCode === null && $
|
|
63
|
+
<span v-if="!isShort" :class="[getMemberInfo(singleMember).sectorCode === null && $styles.emptyBlockCol]" class="hidden lg:block">
|
|
66
64
|
{{ getMemberInfo(singleMember).sectorCode }}
|
|
67
65
|
</span>
|
|
68
66
|
<div
|
|
69
67
|
v-if="!isShort"
|
|
70
68
|
class="rounded-br-lg transition-all h-[70px] w-[60px] place-self-end"
|
|
71
|
-
:class="[$
|
|
69
|
+
:class="[$styles.blueBgLight, $styles.blueBgLightHover, disabled ? $styles.disabled : 'cursor-pointer']"
|
|
72
70
|
@click="!disabled && $emit('onMore', { whichForm })"
|
|
73
71
|
>
|
|
74
72
|
<i class="mdi mdi-dots-vertical text-xl absolute top-[20px] right-[20px]"></i>
|
|
@@ -76,8 +74,8 @@
|
|
|
76
74
|
</div>
|
|
77
75
|
<div
|
|
78
76
|
v-if="isMultiple && more && !isShort && isActionsAvailable"
|
|
79
|
-
:class="[$
|
|
80
|
-
class="lg:hidden transition-all rounded-b-lg h-[36px]
|
|
77
|
+
:class="[$styles.blueBg, $styles.whiteText, $styles.textSimple, disabled ? $styles.disabled : 'cursor-pointer']"
|
|
78
|
+
class="flex lg:hidden transition-all rounded-b-lg h-[36px] items-center font-medium justify-center opacity-50 hover:opacity-90"
|
|
81
79
|
@click="!disabled && memberStore.addMember(whichForm)"
|
|
82
80
|
>
|
|
83
81
|
{{ $dataStore.t('buttons.add') }}
|
|
@@ -118,6 +116,7 @@ export default defineComponent({
|
|
|
118
116
|
},
|
|
119
117
|
emits: ['onMore', 'addMember'],
|
|
120
118
|
setup(props) {
|
|
119
|
+
const dataStore = useDataStore();
|
|
121
120
|
const formStore = useFormStore();
|
|
122
121
|
const memberStore = useMemberStore();
|
|
123
122
|
const isMultiple = computed(() => [StoreMembers.insuredForm, StoreMembers.beneficiaryForm, StoreMembers.beneficialOwnerForm].includes(props.whichForm as StoreMembers));
|
|
@@ -130,6 +129,13 @@ export default defineComponent({
|
|
|
130
129
|
|
|
131
130
|
const isShort = computed(() => props.type === 'short');
|
|
132
131
|
const isActionsAvailable = computed(() => memberStore.isStatementEditible(props.whichForm));
|
|
132
|
+
const getMemberIIN = (each: Member) => {
|
|
133
|
+
const iin = getMemberInfo(each).iin;
|
|
134
|
+
if (dataStore.isFinCenter() && iin) {
|
|
135
|
+
return iin.replaceAll('-', '');
|
|
136
|
+
}
|
|
137
|
+
return iin;
|
|
138
|
+
};
|
|
133
139
|
|
|
134
140
|
const getMemberInfo = (memberData: Member) => {
|
|
135
141
|
return {
|
|
@@ -155,6 +161,7 @@ export default defineComponent({
|
|
|
155
161
|
isActionsAvailable,
|
|
156
162
|
|
|
157
163
|
// Functions
|
|
164
|
+
getMemberIIN,
|
|
158
165
|
getMemberInfo,
|
|
159
166
|
};
|
|
160
167
|
},
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bg-primary-light-blue rounded-lg mb-2">
|
|
3
|
+
<div class="bg-white rounded-lg pa-3 pa-sm-6">
|
|
4
|
+
<div class="items-center justify-between">
|
|
5
|
+
<p class="text-[#009C73] text-base">{{ props.control.title }}</p>
|
|
6
|
+
</div>
|
|
7
|
+
<v-row class="mt-1">
|
|
8
|
+
<v-col v-for="(label, index) in visibleLabels" :key="index" :cols="label.hideInMobile !== false ? label.size : 11 / visibleLabels.length">
|
|
9
|
+
<p class="text-sm font-medium">
|
|
10
|
+
{{ label.value }}
|
|
11
|
+
</p>
|
|
12
|
+
</v-col>
|
|
13
|
+
<v-col cols="1"></v-col>
|
|
14
|
+
</v-row>
|
|
15
|
+
<v-row v-if="props.control.entries && props.control.entries.length">
|
|
16
|
+
<v-col v-for="(label, index) in visibleLabels" :key="index" :cols="label.size ?? 11 / visibleLabels.length" class="flex items-center">
|
|
17
|
+
<p class="text-base">{{ props.control.entries[index].value }}</p>
|
|
18
|
+
</v-col>
|
|
19
|
+
<v-col cols="1" class="flex items-end justify-end">
|
|
20
|
+
<button v-if="!props.control.disabled" @click="$emit('onMore', { whichForm: control.key })">
|
|
21
|
+
<i class="mdi mdi-dots-vertical text-xl"></i>
|
|
22
|
+
</button>
|
|
23
|
+
</v-col>
|
|
24
|
+
</v-row>
|
|
25
|
+
<v-row v-else>
|
|
26
|
+
<v-col cols="11" class="flex items-center">
|
|
27
|
+
<span class="text-primary-blue text-base">{{ $dataStore.t('clients.necessaryFillForm') }} </span>
|
|
28
|
+
</v-col>
|
|
29
|
+
<v-col cols="1" class="flex items-end justify-end">
|
|
30
|
+
<button v-if="!props.control.disabled" @click="$emit('onMore', { whichForm: control.key })">
|
|
31
|
+
<i class="mdi mdi-dots-vertical text-xl"></i>
|
|
32
|
+
</button>
|
|
33
|
+
</v-col>
|
|
34
|
+
</v-row>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
<script setup lang="ts">
|
|
39
|
+
const display = useDisplayInfo();
|
|
40
|
+
const props = defineProps({
|
|
41
|
+
control: {
|
|
42
|
+
type: Object as PropType<FormBlock>,
|
|
43
|
+
required: true,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
const isDesktop = computed(() => display.lgAndUp.value);
|
|
47
|
+
const visibleLabels = computed(() => (isDesktop.value ? props.control.labels : props.control.labels.filter(l => l.hideInMobile === false)));
|
|
48
|
+
</script>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section :class="[$
|
|
3
|
-
<h2 :class="[$
|
|
2
|
+
<section :class="[$styles.blueBgLight, $styles.rounded]" class="mt-[14px] p-4 flex flex-col gap-[1px]">
|
|
3
|
+
<h2 :class="[$styles.textTitle]" class="font-medium text-center w-full mb-4">
|
|
4
4
|
{{ title }}
|
|
5
5
|
<slot name="icon"></slot>
|
|
6
6
|
</h2>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="flex flex-col justify-between rounded-lg" :class="[$
|
|
3
|
-
<span v-if="title" class="p-4" :class="[$
|
|
4
|
-
<span v-if="subtitle" class="p-4 text-[#99A3B3] border-t-[1px]" :class="[$
|
|
2
|
+
<div class="flex flex-col justify-between rounded-lg" :class="[$styles.whiteBg]">
|
|
3
|
+
<span v-if="title" class="p-4" :class="[$styles.textTitle]">{{ title }}</span>
|
|
4
|
+
<span v-if="subtitle" class="p-4 text-[#99A3B3] border-t-[1px]" :class="[$styles.textSimple]">{{ subtitle }}</span>
|
|
5
5
|
<slot></slot>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="h-[74px] !pl-2 md:!pl-5 flex items-center justify-start gap-4"
|
|
4
|
-
:class="[$
|
|
4
|
+
:class="[$styles.whiteBg, hasBorder ? 'border-[1px] rounded-lg' : 'border-b-[1px] border-b-[#f3f6fc] rounded']"
|
|
5
5
|
>
|
|
6
6
|
<v-switch
|
|
7
7
|
class="base-toggle"
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
hide-details
|
|
15
15
|
:disabled="disabled"
|
|
16
16
|
/>
|
|
17
|
-
<p :class="[$
|
|
18
|
-
<p class="mr-3" :class="[modelValue ? $
|
|
17
|
+
<p :class="[$styles.textSimple]">{{ `${title}` }}</p>
|
|
18
|
+
<p class="mr-3" :class="[modelValue ? $styles.greenText : '', $styles.textSimple]">{{ `${modelValue ? $dataStore.t('confirm.yes') : $dataStore.t('confirm.no')}` }}</p>
|
|
19
19
|
</div>
|
|
20
20
|
</template>
|
|
21
21
|
|