hl-core 0.0.10-beta.3 → 0.0.10-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/README.md +0 -2
- package/api/base.api.ts +300 -190
- package/api/interceptors.ts +3 -5
- package/components/Complex/TextBlock.vue +2 -0
- package/components/Dialog/Dialog.vue +7 -1
- package/components/Dialog/FamilyDialog.vue +2 -0
- package/components/Form/DigitalDocument.vue +52 -0
- package/components/Form/DynamicForm.vue +1 -0
- package/components/Form/FormData.vue +1 -0
- package/components/Form/ManagerAttachment.vue +17 -8
- package/components/Form/ProductConditionsBlock.vue +12 -6
- package/components/Input/Datepicker.vue +5 -0
- package/components/Input/DynamicInput.vue +2 -0
- package/components/Input/FormInput.vue +7 -0
- package/components/Input/OtpInput.vue +25 -0
- package/components/Input/PanelInput.vue +1 -0
- package/components/Input/RoundedInput.vue +4 -0
- package/components/Input/RoundedSelect.vue +4 -0
- package/components/Input/SwitchInput.vue +2 -0
- package/components/Input/TextInput.vue +2 -0
- package/components/Layout/Drawer.vue +2 -0
- package/components/Pages/Anketa.vue +166 -167
- package/components/Pages/Auth.vue +2 -0
- package/components/Pages/ContragentForm.vue +2 -1
- package/components/Pages/Documents.vue +429 -59
- package/components/Pages/MemberForm.vue +327 -159
- package/components/Pages/ProductConditions.vue +681 -150
- package/components/Panel/PanelHandler.vue +261 -114
- package/components/Transitions/Animation.vue +2 -0
- package/components/Utilities/Chip.vue +3 -1
- package/components/Utilities/JsonViewer.vue +1 -2
- package/composables/classes.ts +133 -42
- package/composables/constants.ts +41 -0
- package/composables/fields.ts +6 -4
- package/composables/index.ts +246 -7
- package/composables/styles.ts +8 -24
- package/configs/pwa.ts +1 -7
- package/layouts/clear.vue +1 -1
- package/layouts/default.vue +1 -1
- package/layouts/full.vue +1 -1
- package/locales/ru.json +44 -14
- package/nuxt.config.ts +10 -13
- package/package.json +13 -12
- package/plugins/head.ts +2 -1
- package/store/data.store.ts +670 -480
- package/store/member.store.ts +18 -6
- package/store/rules.ts +21 -2
- package/tsconfig.json +3 -0
- package/types/enum.ts +20 -2
- package/types/env.d.ts +2 -2
- package/types/form.ts +71 -74
- package/types/index.ts +916 -873
package/api/interceptors.ts
CHANGED
|
@@ -65,14 +65,12 @@ export default function (axios: AxiosInstance) {
|
|
|
65
65
|
dataStore.sendToParent(constants.postActions.Error401, 401);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
if (error.response.status >= 500) {
|
|
69
|
-
if (router.currentRoute.value.name !== 'Auth') {
|
|
70
|
-
dataStore.showToaster('error', error.stack ?? dataStore.t('toaster.error'), 5000);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
68
|
if (error.response.status === 403 && error.response.config.url) {
|
|
74
69
|
dataStore.showToaster('error', `Нет доступа на запрос: ${error.response.config.url.substring(error.response.config.url.lastIndexOf('/') + 1)}`, 5000);
|
|
75
70
|
}
|
|
71
|
+
if (error.response.status === 413) {
|
|
72
|
+
dataStore.showToaster('error', dataStore.t('error.exceedUploadLimitFile'), 5000);
|
|
73
|
+
}
|
|
76
74
|
}
|
|
77
75
|
}
|
|
78
76
|
return Promise.reject(error);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-dialog class="base-dialog" :model-value="Boolean(modelValue)" @update:modelValue="$emit('update:modelValue', $event)" :persistent="
|
|
2
|
+
<v-dialog class="base-dialog" :model-value="Boolean(modelValue)" @update:modelValue="$emit('update:modelValue', $event)" :persistent="persistent">
|
|
3
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
4
|
<div class="flex sm:flex-row flex-col place-items-center sm:place-items-start">
|
|
5
5
|
<div class="h-20 w-20 place-items-start pt-1">
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
</v-dialog>
|
|
36
36
|
</template>
|
|
37
37
|
<script lang="ts">
|
|
38
|
+
import type { Utils } from '../../types';
|
|
39
|
+
|
|
38
40
|
export default defineComponent({
|
|
39
41
|
name: 'BaseDialog',
|
|
40
42
|
props: {
|
|
@@ -42,6 +44,10 @@ export default defineComponent({
|
|
|
42
44
|
type: Boolean as PropType<boolean | null>,
|
|
43
45
|
default: false,
|
|
44
46
|
},
|
|
47
|
+
persistent: {
|
|
48
|
+
type: Boolean as PropType<boolean>,
|
|
49
|
+
default: true,
|
|
50
|
+
},
|
|
45
51
|
title: {
|
|
46
52
|
type: String,
|
|
47
53
|
default() {
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section v-if="member && member.iin" class="mb-2">
|
|
3
|
+
<base-form-section :title="`${title} ${number === 0 ? '' : number}`" class="mx-[10px] mt-[14px] d-flex">
|
|
4
|
+
<base-form-input v-model="member.iin" :label="$dataStore.t('form.iin')" :readonly="true" />
|
|
5
|
+
<base-form-input v-model.trim="member.longName" :label="$dataStore.t('labels.userFullName')" :readonly="true" />
|
|
6
|
+
<base-panel-input
|
|
7
|
+
v-if="!!member.digitalDocument"
|
|
8
|
+
v-model="member.digitalDocument.fileName"
|
|
9
|
+
label="Цифровой документ"
|
|
10
|
+
:readonly="disabled"
|
|
11
|
+
:clearable="!disabled"
|
|
12
|
+
append-inner-icon="mdi mdi-chevron-right"
|
|
13
|
+
@click="$emit('openPanel', member.digitalDocument)"
|
|
14
|
+
/>
|
|
15
|
+
<base-content-block
|
|
16
|
+
v-if="!disabled && !member.digitalDocument"
|
|
17
|
+
class="d-flex align-center justify-between !py-3.5 !pr-5"
|
|
18
|
+
:class="[$styles.whiteBg]"
|
|
19
|
+
@click="$emit('openDigitalDocPanel', member.iin)"
|
|
20
|
+
>
|
|
21
|
+
<p :class="[$styles.greyText]">Получить цифровой документ</p>
|
|
22
|
+
<div class="cursor-pointer">
|
|
23
|
+
<i class="mdi mdi-file-document text-xl" :class="[$styles.blueText]"></i>
|
|
24
|
+
</div>
|
|
25
|
+
</base-content-block>
|
|
26
|
+
</base-form-section>
|
|
27
|
+
</section>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import type { Base } from '../../types';
|
|
32
|
+
|
|
33
|
+
defineEmits(['openDigitalDocPanel', 'openPanel']);
|
|
34
|
+
defineProps({
|
|
35
|
+
title: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: '',
|
|
38
|
+
},
|
|
39
|
+
member: {
|
|
40
|
+
type: Object as PropType<Base.Document.Digital>,
|
|
41
|
+
default: null,
|
|
42
|
+
},
|
|
43
|
+
number: {
|
|
44
|
+
type: Number,
|
|
45
|
+
default: 0,
|
|
46
|
+
},
|
|
47
|
+
disabled: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
</script>
|
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
<script lang="ts">
|
|
107
107
|
import { Value } from '../../composables/classes';
|
|
108
108
|
import { watchDebounced } from '@vueuse/core';
|
|
109
|
+
import type { AgentData } from '../../types';
|
|
109
110
|
|
|
110
111
|
export default defineComponent({
|
|
111
112
|
props: {
|
|
@@ -138,35 +139,43 @@ export default defineComponent({
|
|
|
138
139
|
(route.params.taskId !== '0' && (!dataStore.isProcessEditable(formStore.applicationData.statusCode) || !dataStore.isTask())),
|
|
139
140
|
);
|
|
140
141
|
const isSaleChanellReadonly = computed(() => {
|
|
141
|
-
if (
|
|
142
|
+
if (!isReadonly.value) {
|
|
143
|
+
if (dataStore.isGons) return !dataStore.isServiceManager();
|
|
144
|
+
}
|
|
142
145
|
return isReadonly.value;
|
|
143
146
|
});
|
|
144
147
|
const isRegionReadonly = computed(() => {
|
|
145
|
-
if (
|
|
148
|
+
if (!isReadonly.value) {
|
|
149
|
+
if (dataStore.isGons) return !dataStore.isServiceManager() && !dataStore.isAgent();
|
|
150
|
+
}
|
|
146
151
|
return isReadonly.value;
|
|
147
152
|
});
|
|
148
153
|
const isManagerReadonly = computed(() => {
|
|
149
|
-
if (
|
|
154
|
+
if (!isReadonly.value) {
|
|
155
|
+
if (dataStore.isGons) return !dataStore.isServiceManager();
|
|
156
|
+
}
|
|
150
157
|
return isReadonly.value;
|
|
151
158
|
});
|
|
152
159
|
const isAgentReadonly = computed(() => {
|
|
153
|
-
if (
|
|
160
|
+
if (!isReadonly.value) {
|
|
161
|
+
if (dataStore.isGons) return !dataStore.isServiceManager();
|
|
162
|
+
if (dataStore.isPension) return true;
|
|
163
|
+
}
|
|
154
164
|
return isReadonly.value;
|
|
155
165
|
});
|
|
156
166
|
const isSaleChanellShown = computed(() => {
|
|
157
|
-
if (dataStore.isGons) return dataStore.
|
|
167
|
+
if (dataStore.isGons) return !dataStore.isAgent();
|
|
158
168
|
return true;
|
|
159
169
|
});
|
|
160
170
|
const isRegionShown = computed(() => {
|
|
161
|
-
if (dataStore.isGons) return dataStore.isServiceManager() || dataStore.isAgent();
|
|
162
171
|
return true;
|
|
163
172
|
});
|
|
164
173
|
const isManagerShown = computed(() => {
|
|
165
|
-
if (dataStore.isGons) return dataStore.
|
|
174
|
+
if (dataStore.isGons) return !dataStore.isAgent();
|
|
166
175
|
return true;
|
|
167
176
|
});
|
|
168
177
|
const isAgentShown = computed(() => {
|
|
169
|
-
if (dataStore.isGons
|
|
178
|
+
if (dataStore.isGons) return !dataStore.isAgent();
|
|
170
179
|
return true;
|
|
171
180
|
});
|
|
172
181
|
const openPanel = async (currentDict: ManagerAttachmentFiels, title: string) => {
|
|
@@ -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,7 @@
|
|
|
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"
|
|
42
43
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
43
44
|
/>
|
|
44
45
|
</template>
|
|
@@ -49,6 +50,8 @@
|
|
|
49
50
|
</template>
|
|
50
51
|
|
|
51
52
|
<script lang="ts">
|
|
53
|
+
import type { InputTypes, InputVariants } from '../../types';
|
|
54
|
+
|
|
52
55
|
export default defineComponent({
|
|
53
56
|
name: 'BaseFormInput',
|
|
54
57
|
props: {
|
|
@@ -118,6 +121,10 @@ export default defineComponent({
|
|
|
118
121
|
type: Date,
|
|
119
122
|
default: undefined,
|
|
120
123
|
},
|
|
124
|
+
maxDate: {
|
|
125
|
+
type: Date,
|
|
126
|
+
default: undefined,
|
|
127
|
+
},
|
|
121
128
|
prependIcon: {
|
|
122
129
|
type: String,
|
|
123
130
|
},
|
|
@@ -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>
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script lang="ts">
|
|
37
|
+
import type { InputTypes, InputVariants } from '../../types';
|
|
38
|
+
|
|
37
39
|
export default defineComponent({
|
|
38
40
|
name: 'BaseRoundedInput',
|
|
39
41
|
props: {
|
|
@@ -136,6 +138,8 @@ export default defineComponent({
|
|
|
136
138
|
border: 1px solid #dadada;
|
|
137
139
|
box-shadow: none;
|
|
138
140
|
font-size: 14px;
|
|
141
|
+
padding-top: 6px;
|
|
142
|
+
padding-bottom: 4px;
|
|
139
143
|
}
|
|
140
144
|
.rounded-input .v-field--error {
|
|
141
145
|
border-color: #ff5449;
|
|
@@ -35,6 +35,8 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<script lang="ts">
|
|
38
|
+
import type { InputVariants } from '../../types';
|
|
39
|
+
|
|
38
40
|
export default defineComponent({
|
|
39
41
|
name: 'BaseRoundedSelect',
|
|
40
42
|
props: {
|
|
@@ -148,6 +150,8 @@ export default defineComponent({
|
|
|
148
150
|
border: 1px solid #dadada;
|
|
149
151
|
box-shadow: none;
|
|
150
152
|
font-size: 14px;
|
|
153
|
+
padding-top: 6px;
|
|
154
|
+
padding-bottom: 4px;
|
|
151
155
|
}
|
|
152
156
|
.rounded-select .v-field--error {
|
|
153
157
|
border-color: #ff5449;
|