hl-core 0.0.10-beta.7 → 0.0.10-beta.70
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/README.md +0 -2
- package/api/base.api.ts +425 -134
- package/api/interceptors.ts +162 -62
- package/components/Dialog/Dialog.vue +5 -1
- package/components/Dialog/DigitalDocumentsDialog.vue +129 -0
- package/components/Dialog/FamilyDialog.vue +15 -4
- package/components/Form/DigitalDocument.vue +52 -0
- package/components/Form/FormSource.vue +30 -0
- package/components/Form/ManagerAttachment.vue +85 -11
- package/components/Form/ProductConditionsBlock.vue +12 -6
- package/components/Input/Datepicker.vue +5 -0
- package/components/Input/FileInput.vue +1 -1
- package/components/Input/FormInput.vue +7 -0
- package/components/Input/OtpInput.vue +25 -0
- package/components/Input/RoundedInput.vue +2 -0
- package/components/Input/RoundedSelect.vue +2 -0
- package/components/Input/TextAreaField.vue +71 -0
- package/components/Input/TextHint.vue +13 -0
- package/components/Layout/SettingsPanel.vue +2 -1
- package/components/Menu/MenuNav.vue +2 -1
- package/components/Pages/Anketa.vue +207 -176
- package/components/Pages/Auth.vue +10 -3
- package/components/Pages/ContragentForm.vue +24 -18
- package/components/Pages/Documents.vue +488 -66
- package/components/Pages/MemberForm.vue +1009 -268
- package/components/Pages/ProductConditions.vue +1424 -273
- package/components/Panel/PanelHandler.vue +329 -126
- package/components/Utilities/Chip.vue +1 -1
- package/components/Utilities/JsonViewer.vue +1 -2
- package/composables/classes.ts +136 -20
- package/composables/constants.ts +168 -1
- package/composables/index.ts +467 -9
- package/composables/styles.ts +8 -24
- package/configs/i18n.ts +2 -0
- package/configs/pwa.ts +1 -7
- package/layouts/clear.vue +1 -1
- package/layouts/default.vue +2 -2
- package/layouts/full.vue +1 -1
- package/locales/kz.json +1239 -0
- package/locales/ru.json +133 -21
- package/nuxt.config.ts +8 -6
- package/package.json +14 -13
- package/plugins/head.ts +7 -1
- package/plugins/helperFunctionsPlugins.ts +1 -0
- package/store/data.store.ts +1080 -552
- package/store/member.store.ts +19 -8
- package/store/rules.ts +75 -8
- package/types/enum.ts +52 -2
- package/types/index.ts +143 -6
|
@@ -55,6 +55,18 @@
|
|
|
55
55
|
append-inner-icon="mdi mdi-chevron-right"
|
|
56
56
|
@append="openPanel('AgentData', $dataStore.t('form.agent'))"
|
|
57
57
|
/>
|
|
58
|
+
<base-panel-input
|
|
59
|
+
v-if="isExecutorShown"
|
|
60
|
+
class="pl-1 pt-1"
|
|
61
|
+
v-model="formStore.ExecutorGPH"
|
|
62
|
+
:value="formStore.ExecutorGPH?.nameRu"
|
|
63
|
+
:readonly="isExecutorReadonly"
|
|
64
|
+
:clearable="!isExecutorReadonly"
|
|
65
|
+
:label="$dataStore.t('form.executor')"
|
|
66
|
+
:rules="$rules.objectRequired"
|
|
67
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
68
|
+
@append="openPanel('ExecutorGPH', $dataStore.t('form.executor'))"
|
|
69
|
+
/>
|
|
58
70
|
</v-form>
|
|
59
71
|
</v-expansion-panel-text>
|
|
60
72
|
</v-expansion-panel>
|
|
@@ -71,7 +83,7 @@
|
|
|
71
83
|
/>
|
|
72
84
|
<div v-if="isPanelLoading === false" class="w-full">
|
|
73
85
|
<div v-if="currentDictName === 'AgentData'" class="w-full flex flex-col gap-2 p-2">
|
|
74
|
-
<div v-for="(agent, index) of
|
|
86
|
+
<div v-for="(agent, index) of agentDataFiltered" :key="index">
|
|
75
87
|
<div
|
|
76
88
|
class="flex justify-between p-4 items-center cursor-pointer"
|
|
77
89
|
:class="[$styles.rounded, $styles.blueBgLight, $styles.blueBgLightHover]"
|
|
@@ -90,7 +102,10 @@
|
|
|
90
102
|
</div>
|
|
91
103
|
</div>
|
|
92
104
|
</div>
|
|
93
|
-
<div
|
|
105
|
+
<div
|
|
106
|
+
v-if="currentDictName === 'ManagerPolicy' || currentDictName === 'RegionPolicy' || currentDictName === 'SaleChanellPolicy' || currentDictName === 'ExecutorGPH'"
|
|
107
|
+
class="w-full flex flex-col gap-2 p-2"
|
|
108
|
+
>
|
|
94
109
|
<div v-for="(item, index) in $dataStore[currentDictName].filter(i => (i.nameRu as string).toLowerCase().includes(searchQuery.toLowerCase()))" :key="index">
|
|
95
110
|
<base-panel-select-item :key="index" :text="item.nameRu ?? ''" :selected="item.ids === (panelValue as Value).ids" @click="pickPanelValue(item)" />
|
|
96
111
|
</div>
|
|
@@ -120,7 +135,7 @@ export default defineComponent({
|
|
|
120
135
|
},
|
|
121
136
|
},
|
|
122
137
|
setup(props) {
|
|
123
|
-
type ManagerAttachmentFiels = 'SaleChanellPolicy' | 'RegionPolicy' | 'ManagerPolicy' | 'AgentData';
|
|
138
|
+
type ManagerAttachmentFiels = 'SaleChanellPolicy' | 'RegionPolicy' | 'ManagerPolicy' | 'AgentData' | 'ExecutorGPH';
|
|
124
139
|
type FieldTypes = Value | AgentData;
|
|
125
140
|
const route = useRoute();
|
|
126
141
|
const dataStore = useDataStore();
|
|
@@ -139,37 +154,88 @@ export default defineComponent({
|
|
|
139
154
|
(route.params.taskId !== '0' && (!dataStore.isProcessEditable(formStore.applicationData.statusCode) || !dataStore.isTask())),
|
|
140
155
|
);
|
|
141
156
|
const isSaleChanellReadonly = computed(() => {
|
|
142
|
-
if (
|
|
157
|
+
if (!isReadonly.value) {
|
|
158
|
+
if (dataStore.isTravelAgent()) return true;
|
|
159
|
+
if (dataStore.isGons) {
|
|
160
|
+
return !dataStore.isServiceManager() &&
|
|
161
|
+
!dataStore.isChiefManagerNSZH() &&
|
|
162
|
+
!dataStore.isChiefSalesManager() &&
|
|
163
|
+
!dataStore.isSalesManager() &&
|
|
164
|
+
!dataStore.isManager();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
143
167
|
return isReadonly.value;
|
|
144
168
|
});
|
|
145
169
|
const isRegionReadonly = computed(() => {
|
|
146
|
-
if (
|
|
170
|
+
if (!isReadonly.value) {
|
|
171
|
+
if (dataStore.isTravelAgent()) return true;
|
|
172
|
+
if (dataStore.isGons) {
|
|
173
|
+
return !dataStore.isServiceManager() &&
|
|
174
|
+
!dataStore.isAgent() &&
|
|
175
|
+
!dataStore.isChiefManagerNSZH() &&
|
|
176
|
+
!dataStore.isChiefSalesManager() &&
|
|
177
|
+
!dataStore.isSalesManager() &&
|
|
178
|
+
!dataStore.isManager();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
147
181
|
return isReadonly.value;
|
|
148
182
|
});
|
|
149
183
|
const isManagerReadonly = computed(() => {
|
|
150
|
-
if (
|
|
184
|
+
if (!isReadonly.value) {
|
|
185
|
+
if (dataStore.isTravelAgent()) return true;
|
|
186
|
+
if (dataStore.isGons) {
|
|
187
|
+
return !dataStore.isServiceManager() &&
|
|
188
|
+
!dataStore.isChiefManagerNSZH() &&
|
|
189
|
+
!dataStore.isChiefSalesManager() &&
|
|
190
|
+
!dataStore.isSalesManager() &&
|
|
191
|
+
!dataStore.isManager();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
151
194
|
return isReadonly.value;
|
|
152
195
|
});
|
|
153
196
|
const isAgentReadonly = computed(() => {
|
|
154
|
-
if (
|
|
197
|
+
if (!isReadonly.value) {
|
|
198
|
+
if (dataStore.isTravelAgent()) return true;
|
|
199
|
+
if (dataStore.isPension) return true;
|
|
200
|
+
if (dataStore.isGons) {
|
|
201
|
+
return !dataStore.isServiceManager() &&
|
|
202
|
+
!dataStore.isChiefManagerNSZH() &&
|
|
203
|
+
!dataStore.isChiefSalesManager() &&
|
|
204
|
+
!dataStore.isSalesManager() &&
|
|
205
|
+
!dataStore.isManager();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return isReadonly.value;
|
|
209
|
+
});
|
|
210
|
+
const isExecutorReadonly = computed(() => {
|
|
211
|
+
if (!isReadonly.value) {
|
|
212
|
+
if (dataStore.isPension) return dataStore.isExecutor() || !dataStore.isInitiator();
|
|
213
|
+
}
|
|
155
214
|
return isReadonly.value;
|
|
156
215
|
});
|
|
157
216
|
const isSaleChanellShown = computed(() => {
|
|
158
|
-
if (dataStore.isGons) return dataStore.
|
|
217
|
+
if (dataStore.isGons) return !dataStore.isAgent();
|
|
159
218
|
return true;
|
|
160
219
|
});
|
|
161
220
|
const isRegionShown = computed(() => {
|
|
162
|
-
if (dataStore.isGons) return dataStore.isServiceManager() || dataStore.isAgent();
|
|
163
221
|
return true;
|
|
164
222
|
});
|
|
165
223
|
const isManagerShown = computed(() => {
|
|
166
|
-
if (dataStore.isGons) return dataStore.
|
|
224
|
+
if (dataStore.isGons) return !dataStore.isAgent();
|
|
167
225
|
return true;
|
|
168
226
|
});
|
|
169
227
|
const isAgentShown = computed(() => {
|
|
170
|
-
if (dataStore.isGons
|
|
228
|
+
if (dataStore.isGons) return !dataStore.isAgent();
|
|
171
229
|
return true;
|
|
172
230
|
});
|
|
231
|
+
const agentDataFiltered = computed(() => {
|
|
232
|
+
if (formStore.RegionPolicy?.nameRu && searchQuery.value === 'Без агента') {
|
|
233
|
+
return dataStore.AgentData.filter(i => String(i.officeId) === String(formStore.RegionPolicy.ids));
|
|
234
|
+
} else {
|
|
235
|
+
return dataStore.AgentData;
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
const isExecutorShown = dataStore.isPension;
|
|
173
239
|
const openPanel = async (currentDict: ManagerAttachmentFiels, title: string) => {
|
|
174
240
|
searchQuery.value = '';
|
|
175
241
|
if (dataStore.isTask() && !props.disabled) {
|
|
@@ -182,6 +248,10 @@ export default defineComponent({
|
|
|
182
248
|
isPanelLoading.value = true;
|
|
183
249
|
await dataStore.filterManagerByRegion(formStore.RegionPolicy.ids as string);
|
|
184
250
|
}
|
|
251
|
+
if (currentDict === 'ExecutorGPH' && formStore.RegionPolicy.ids) {
|
|
252
|
+
isPanelLoading.value = true;
|
|
253
|
+
await dataStore.filterExecutorByRegion(formStore.RegionPolicy.ids as string);
|
|
254
|
+
}
|
|
185
255
|
|
|
186
256
|
isPanelOpen.value = true;
|
|
187
257
|
panelValue.value = formStore[currentDict];
|
|
@@ -266,10 +336,14 @@ export default defineComponent({
|
|
|
266
336
|
isRegionReadonly,
|
|
267
337
|
isManagerReadonly,
|
|
268
338
|
isAgentReadonly,
|
|
339
|
+
isExecutorReadonly,
|
|
269
340
|
isSaleChanellShown,
|
|
270
341
|
isRegionShown,
|
|
271
342
|
isManagerShown,
|
|
272
343
|
isAgentShown,
|
|
344
|
+
isExecutorShown,
|
|
345
|
+
agentDataFiltered,
|
|
346
|
+
|
|
273
347
|
// Functions
|
|
274
348
|
openPanel,
|
|
275
349
|
searchAgent,
|
|
@@ -75,12 +75,18 @@ export default defineComponent({
|
|
|
75
75
|
const dataStore = useDataStore();
|
|
76
76
|
const formStore = useFormStore();
|
|
77
77
|
|
|
78
|
-
const amount = computed(() =>
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
formStore.productConditionsForm && formStore.productConditionsForm.
|
|
83
|
-
);
|
|
78
|
+
const amount = computed(() => {
|
|
79
|
+
if (dataStore.isGons && formStore.productConditionsForm && formStore.productConditionsForm.currency.code === 'USD') {
|
|
80
|
+
return formStore.productConditionsForm.requestedSumInsuredInDollar;
|
|
81
|
+
}
|
|
82
|
+
return formStore.productConditionsForm && formStore.productConditionsForm.requestedSumInsured ? formStore.productConditionsForm.requestedSumInsured : null;
|
|
83
|
+
});
|
|
84
|
+
const premium = computed(() => {
|
|
85
|
+
if (dataStore.isGons && formStore.productConditionsForm && formStore.productConditionsForm.currency.code === 'USD') {
|
|
86
|
+
return formStore.productConditionsForm.insurancePremiumPerMonthInDollar;
|
|
87
|
+
}
|
|
88
|
+
return formStore.productConditionsForm && formStore.productConditionsForm.insurancePremiumPerMonth ? formStore.productConditionsForm.insurancePremiumPerMonth : null;
|
|
89
|
+
});
|
|
84
90
|
const policyNumber = computed(() => (formStore.applicationData && formStore.applicationData.policyAppDto ? formStore.applicationData.policyAppDto.policyNumber : null));
|
|
85
91
|
const contractDate = computed(() =>
|
|
86
92
|
formStore.applicationData && formStore.applicationData.policyAppDto && formStore.applicationData.policyAppDto.contractDate
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
:enable-time-picker="false"
|
|
14
14
|
:six-weeks="true"
|
|
15
15
|
:min-date="minDate"
|
|
16
|
+
:max-date="maxDate"
|
|
16
17
|
cancel-text="Отменить"
|
|
17
18
|
select-text="Выбрать"
|
|
18
19
|
>
|
|
@@ -43,6 +44,10 @@ export default defineComponent({
|
|
|
43
44
|
type: Date,
|
|
44
45
|
required: false,
|
|
45
46
|
},
|
|
47
|
+
maxDate: {
|
|
48
|
+
type: Date,
|
|
49
|
+
required: false,
|
|
50
|
+
},
|
|
46
51
|
},
|
|
47
52
|
});
|
|
48
53
|
</script>
|
|
@@ -39,6 +39,9 @@
|
|
|
39
39
|
v-if="appendInnerIcon.includes('mdi-calendar-blank-outline') && !props.readonly"
|
|
40
40
|
:model-value="modelValue"
|
|
41
41
|
:min-date="minDate"
|
|
42
|
+
:max-date="maxDate"
|
|
43
|
+
:min="minDate"
|
|
44
|
+
:max="maxDate"
|
|
42
45
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
43
46
|
/>
|
|
44
47
|
</template>
|
|
@@ -120,6 +123,10 @@ export default defineComponent({
|
|
|
120
123
|
type: Date,
|
|
121
124
|
default: undefined,
|
|
122
125
|
},
|
|
126
|
+
maxDate: {
|
|
127
|
+
type: Date,
|
|
128
|
+
default: undefined,
|
|
129
|
+
},
|
|
123
130
|
prependIcon: {
|
|
124
131
|
type: String,
|
|
125
132
|
},
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-otp-input v-model="modelValue" class="base-otp-input" base-color="#A0B3D8" color="#FFF" />
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup lang="ts">
|
|
6
|
+
const modelValue = defineModel<string>();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<style>
|
|
10
|
+
.base-otp-input .v-otp-input__field {
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
}
|
|
13
|
+
.base-otp-input .v-field {
|
|
14
|
+
width: 50px;
|
|
15
|
+
height: 60px;
|
|
16
|
+
border-radius: 8px;
|
|
17
|
+
}
|
|
18
|
+
.base-otp-input .v-otp-input__content {
|
|
19
|
+
gap: 24px;
|
|
20
|
+
}
|
|
21
|
+
.base-otp-input .v-otp-input__divider {
|
|
22
|
+
margin: 0 4px;
|
|
23
|
+
color: #b8b8b8;
|
|
24
|
+
}
|
|
25
|
+
</style>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-textarea
|
|
3
|
+
class="form-input"
|
|
4
|
+
:label="label"
|
|
5
|
+
:model-value="modelValue"
|
|
6
|
+
:disabled="disabled"
|
|
7
|
+
:variant="variant"
|
|
8
|
+
:readonly="props.readonly"
|
|
9
|
+
:color="color"
|
|
10
|
+
:rows="rows"
|
|
11
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
12
|
+
auto-grow
|
|
13
|
+
></v-textarea>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script lang="ts">
|
|
17
|
+
import type { InputVariants } from '../../types';
|
|
18
|
+
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
props: {
|
|
21
|
+
modelValue: {
|
|
22
|
+
required: false,
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: '',
|
|
27
|
+
},
|
|
28
|
+
disabled: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false,
|
|
31
|
+
},
|
|
32
|
+
variant: {
|
|
33
|
+
type: String as PropType<InputVariants>,
|
|
34
|
+
default: 'solo',
|
|
35
|
+
},
|
|
36
|
+
readonly: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false,
|
|
39
|
+
},
|
|
40
|
+
color: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: '#009c73',
|
|
43
|
+
},
|
|
44
|
+
rows: {
|
|
45
|
+
type: Number,
|
|
46
|
+
default: 5,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
emits: ['update:modelValue'],
|
|
50
|
+
|
|
51
|
+
setup(props, { emit }) {
|
|
52
|
+
return {
|
|
53
|
+
props,
|
|
54
|
+
};
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<style>
|
|
60
|
+
.form-input input:focus {
|
|
61
|
+
border: none !important;
|
|
62
|
+
outline: none !important;
|
|
63
|
+
}
|
|
64
|
+
.form-input .v-field {
|
|
65
|
+
box-shadow: none;
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
}
|
|
68
|
+
.form-input .v-label.v-field-label {
|
|
69
|
+
top: 20px;
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -62,11 +62,12 @@
|
|
|
62
62
|
<script lang="ts" setup>
|
|
63
63
|
import { changeBridge } from '#imports';
|
|
64
64
|
|
|
65
|
-
import
|
|
65
|
+
import packageJson from '../../package.json';
|
|
66
66
|
const dialogSignOut = ref(false);
|
|
67
67
|
const dataStore = useDataStore();
|
|
68
68
|
const router = useRouter();
|
|
69
69
|
const commitVersion = String(import.meta.env.VITE_COMMIT_VERSION ?? '');
|
|
70
|
+
const pkg = packageJson as { version: string };
|
|
70
71
|
|
|
71
72
|
const handleFontSize = (action: 'increase' | 'decrease') => {
|
|
72
73
|
if (action === 'increase' && dataStore.fontSize < 24) dataStore.fontSize += 2;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@onMore="$emit('onMore')"
|
|
16
16
|
/>
|
|
17
17
|
<slot key="slot-content" name="content"></slot>
|
|
18
|
-
<section key="main" :class="[$styles.flexColNav]">
|
|
18
|
+
<section key="main" class="max-h-[90dvh] overflow-y-scroll" :class="[$styles.flexColNav]">
|
|
19
19
|
<slot name="start"></slot>
|
|
20
20
|
<base-fade-transition>
|
|
21
21
|
<div v-if="$dataStore.menuItems && $dataStore.menuItems.length" class="flex flex-col gap-[10px]">
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
<div v-if="$dataStore.buttons && $dataStore.buttons.length" class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[10%] w-full pr-4">
|
|
39
39
|
<div v-for="(item, index) of $dataStore.buttons" :key="index">
|
|
40
40
|
<transition enter-active-class="animate__animated animate__fadeIn animate__faster" leave-active-class="animate__animated animate__fadeOut animate__faster">
|
|
41
|
+
<!-- @vue-ignore -->
|
|
41
42
|
<base-btn
|
|
42
43
|
v-if="$dataStore.filters.show(item)"
|
|
43
44
|
:text="item.title!"
|