hl-core 0.0.8-beta.4 → 0.0.8-beta.40
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 +117 -44
- package/api/interceptors.ts +17 -13
- package/components/Button/Btn.vue +1 -1
- package/components/Button/ScrollButtons.vue +2 -2
- package/components/Complex/Page.vue +1 -1
- package/components/Dialog/Dialog.vue +9 -39
- package/components/Dialog/FamilyDialog.vue +7 -4
- package/components/Form/FormBlock.vue +77 -33
- package/components/Form/FormSection.vue +4 -1
- package/components/Form/FormToggle.vue +2 -3
- package/components/Form/ManagerAttachment.vue +197 -0
- package/components/Form/ProductConditionsBlock.vue +60 -10
- package/components/Input/Datepicker.vue +6 -2
- package/components/Input/FileInput.vue +2 -2
- package/components/Input/FormInput.vue +29 -7
- package/components/Input/PanelInput.vue +7 -2
- package/components/Input/RoundedInput.vue +2 -2
- package/components/Input/RoundedSelect.vue +137 -0
- package/components/Layout/Drawer.vue +3 -2
- package/components/Layout/Header.vue +40 -4
- package/components/Layout/Loader.vue +1 -1
- package/components/Layout/SettingsPanel.vue +51 -13
- package/components/Menu/MenuHover.vue +30 -0
- package/components/Menu/MenuNav.vue +29 -13
- package/components/Menu/MenuNavItem.vue +6 -3
- package/components/Pages/Anketa.vue +51 -33
- package/components/Pages/Auth.vue +139 -46
- package/components/Pages/Documents.vue +6 -6
- package/components/Pages/InvoiceInfo.vue +30 -0
- package/components/Pages/MemberForm.vue +533 -292
- package/components/Pages/ProductAgreement.vue +4 -2
- package/components/Pages/ProductConditions.vue +509 -99
- package/components/Panel/PanelHandler.vue +93 -20
- package/components/Panel/PanelSelectItem.vue +1 -1
- package/components/Utilities/Chip.vue +27 -0
- package/components/Utilities/JsonViewer.vue +27 -0
- package/composables/axios.ts +1 -1
- package/composables/classes.ts +217 -97
- package/composables/constants.ts +26 -52
- package/composables/index.ts +80 -2
- package/composables/styles.ts +8 -3
- package/configs/i18n.ts +17 -0
- package/layouts/default.vue +6 -6
- package/locales/kz.json +585 -0
- package/locales/ru.json +587 -0
- package/nuxt.config.ts +9 -1
- package/package.json +41 -11
- package/pages/500.vue +2 -2
- 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.ts +2649 -0
- package/store/form.store.ts +1 -1
- package/store/member.store.ts +164 -52
- package/store/{rules.js → rules.ts} +63 -25
- package/types/enum.ts +83 -0
- package/types/env.d.ts +10 -0
- package/types/index.ts +211 -7
- package/store/data.store.js +0 -2508
- package/store/messages.ts +0 -434
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<section :class="[$libStyles.blueBgLight, $libStyles.rounded]" class="mx-[10px] my-[14px] p-4 flex flex-col gap-4">
|
|
5
5
|
<base-form-toggle
|
|
6
6
|
v-model="answerToAll"
|
|
7
|
-
:title="$t('questionnaireType.answerAllNo')"
|
|
7
|
+
:title="$dataStore.t('questionnaireType.answerAllNo')"
|
|
8
8
|
:disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
9
9
|
:has-border="false"
|
|
10
10
|
@clicked="handleToggler"
|
|
11
|
-
|
|
11
|
+
/>
|
|
12
12
|
</section>
|
|
13
13
|
<v-form ref="vForm" class="max-h-[70vh] overflow-y-scroll" @submit="submitForm">
|
|
14
14
|
<section
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
:maska="$maska.threeDigit"
|
|
25
25
|
:readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
26
26
|
:rules="$rules.required"
|
|
27
|
-
|
|
27
|
+
/>
|
|
28
28
|
</section>
|
|
29
29
|
<section
|
|
30
30
|
v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'Y').length"
|
|
@@ -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
|
+
{{ $dataStore.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]">
|
|
@@ -58,38 +62,45 @@
|
|
|
58
62
|
:readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
59
63
|
inline
|
|
60
64
|
>
|
|
61
|
-
<v-radio label="Да" value="Да"
|
|
62
|
-
<v-radio label="Нет" value="Нет"
|
|
65
|
+
<v-radio label="Да" value="Да" />
|
|
66
|
+
<v-radio label="Нет" value="Нет" />
|
|
63
67
|
</v-radio-group>
|
|
64
68
|
</div>
|
|
65
69
|
</base-form-text-section>
|
|
66
70
|
</section>
|
|
67
71
|
</v-form>
|
|
68
|
-
<base-btn
|
|
72
|
+
<base-btn
|
|
73
|
+
class="my-[14px] self-center"
|
|
74
|
+
:loading="isButtonLoading"
|
|
75
|
+
:disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
76
|
+
@click="submitForm"
|
|
77
|
+
:text="$dataStore.t('buttons.save')"
|
|
78
|
+
/>
|
|
69
79
|
</section>
|
|
80
|
+
<v-btn
|
|
81
|
+
v-if="secondQuestionList && secondQuestionList.length && firstPanel"
|
|
82
|
+
icon="mdi mdi-close"
|
|
83
|
+
class="ml-3 !absolute z-10"
|
|
84
|
+
@click="
|
|
85
|
+
firstPanel = false;
|
|
86
|
+
secondPanel = false;
|
|
87
|
+
"
|
|
88
|
+
/>
|
|
70
89
|
<section
|
|
71
90
|
ref="firstPanelSection"
|
|
72
91
|
v-if="secondQuestionList && secondQuestionList.length && firstPanel"
|
|
73
|
-
class="flex flex-col px-[10px]
|
|
92
|
+
class="flex flex-col px-[10px] pb-[14px]"
|
|
74
93
|
:class="[$libStyles.scrollPage]"
|
|
75
94
|
>
|
|
76
|
-
<v-
|
|
77
|
-
icon="mdi mdi-close"
|
|
78
|
-
variant="text"
|
|
79
|
-
size="large"
|
|
80
|
-
@click="
|
|
81
|
-
firstPanel = false;
|
|
82
|
-
secondPanel = false;
|
|
83
|
-
"
|
|
84
|
-
></v-btn>
|
|
85
|
-
<section v-if="currentQuestion" :class="[$libStyles.blueBgLight, $libStyles.rounded]" class="mx-[10px] my-[14px] p-4 flex flex-col gap-4">
|
|
95
|
+
<section v-if="currentQuestion" :class="[$libStyles.blueBgLight, $libStyles.rounded]" class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4">
|
|
86
96
|
<base-form-text-section v-for="question in currentQuestion.second" :title="question.name" :key="question.name">
|
|
87
97
|
<base-form-input
|
|
88
98
|
v-if="question.definedAnswers === 'N'"
|
|
89
99
|
v-model="question.answerText"
|
|
90
100
|
class="border-t-[1px] border-t-[#F3F6FC]"
|
|
91
101
|
placeholder="Введите текст"
|
|
92
|
-
|
|
102
|
+
:readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
103
|
+
/>
|
|
93
104
|
<span v-else class="flex items-center justify-between p-4 cursor-pointer" :class="[$libStyles.textTitle, $libStyles.greenText]" @click="openSecondPanel(question)">
|
|
94
105
|
{{ question.answerName ? question.answerName : 'Выбрать вариант ответа' }}
|
|
95
106
|
<i class="mdi mdi-chevron-right text-[28px]"></i>
|
|
@@ -100,7 +111,7 @@
|
|
|
100
111
|
</base-fade-transition>
|
|
101
112
|
<Teleport v-if="secondPanel" to="#panel-actions">
|
|
102
113
|
<div :class="[$libStyles.scrollPage]" class="flex flex-col items-center">
|
|
103
|
-
<base-rounded-input v-model="searchQuery" :label="$t('labels.search')" class="w-full p-2" :hide-details="true"
|
|
114
|
+
<base-rounded-input v-model="searchQuery" :label="$dataStore.t('labels.search')" class="w-full p-2" :hide-details="true" />
|
|
104
115
|
<div v-if="$dataStore.questionRefs && $dataStore.questionRefs.length && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
|
|
105
116
|
<base-panel-select-item
|
|
106
117
|
v-for="(item, index) of $dataStore.questionRefs.filter(i => i.nameRu && (i.nameRu as string).match(new RegExp(searchQuery, 'i')))"
|
|
@@ -108,16 +119,16 @@
|
|
|
108
119
|
:text="`${item.nameRu}`"
|
|
109
120
|
:selected="currentSecond!.answerId === item.ids"
|
|
110
121
|
@click="closeSecondPanel(item)"
|
|
111
|
-
|
|
122
|
+
/>
|
|
112
123
|
</div>
|
|
113
|
-
<base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50"
|
|
124
|
+
<base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50" />
|
|
114
125
|
</div>
|
|
115
126
|
</Teleport>
|
|
116
127
|
<base-scroll-buttons @up="scrollForm('up')" @down="scrollForm('down')" />
|
|
117
128
|
</template>
|
|
118
129
|
|
|
119
130
|
<script lang="ts">
|
|
120
|
-
import { Value } from '
|
|
131
|
+
import { Value } from '../../composables/classes';
|
|
121
132
|
|
|
122
133
|
export default defineComponent({
|
|
123
134
|
setup() {
|
|
@@ -132,14 +143,23 @@ export default defineComponent({
|
|
|
132
143
|
const firstPanel = ref<boolean>(false);
|
|
133
144
|
const secondPanel = ref<boolean>(false);
|
|
134
145
|
const surveyType = ref<'health' | 'critical'>('tab' in route.query && route.query.tab === 'criticalBase' ? 'critical' : 'health');
|
|
135
|
-
const whichSurvey = computed(() =>
|
|
136
|
-
|
|
146
|
+
const whichSurvey = computed(() =>
|
|
147
|
+
surveyType.value === 'health'
|
|
148
|
+
? whichMember.value === 'insured'
|
|
149
|
+
? 'surveyByHealthBase'
|
|
150
|
+
: 'surveyByHealthBasePolicyholder'
|
|
151
|
+
: whichMember.value === 'insured'
|
|
152
|
+
? 'surveyByCriticalBase'
|
|
153
|
+
: 'surveyByCriticalBasePolicyholder',
|
|
154
|
+
);
|
|
155
|
+
const firstQuestionList = ref<AnketaBody[]>([]);
|
|
137
156
|
const secondQuestionList = ref<AnketaSecond[]>([]);
|
|
138
157
|
const currentQuestion = ref<AnketaBody>();
|
|
139
158
|
const currentSecond = ref<AnketaSecond>();
|
|
140
159
|
const isPanelLoading = ref<boolean>(false);
|
|
141
160
|
const searchQuery = ref<string>('');
|
|
142
161
|
|
|
162
|
+
const whichMember = computed(() => ('member' in route.query && !!route.query.member ? (route.query.member as 'insured' | 'policyholder') : 'insured'));
|
|
143
163
|
const scrollForm = (direction: 'up' | 'down') => {
|
|
144
164
|
const scrollObject = { top: direction === 'up' ? 0 : screen.height * 10, behavior: 'smooth' };
|
|
145
165
|
if (firstPanel.value) {
|
|
@@ -159,7 +179,7 @@ export default defineComponent({
|
|
|
159
179
|
}
|
|
160
180
|
});
|
|
161
181
|
formStore[whichSurvey.value]!.type = surveyType.value;
|
|
162
|
-
const anketaToken = await dataStore.setSurvey(formStore[whichSurvey.value]);
|
|
182
|
+
const anketaToken = await dataStore.setSurvey(formStore[whichSurvey.value]!);
|
|
163
183
|
if (typeof anketaToken === 'string') {
|
|
164
184
|
formStore[whichSurvey.value]!.id = anketaToken;
|
|
165
185
|
}
|
|
@@ -169,11 +189,11 @@ export default defineComponent({
|
|
|
169
189
|
if (errors) {
|
|
170
190
|
const errorText = errors.querySelector('.v-label.v-field-label');
|
|
171
191
|
if (errorText) {
|
|
172
|
-
dataStore.showToaster('error', dataStore.t('toaster.errorFormField'
|
|
192
|
+
dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: errorText.innerHTML?.replace(/[-<>!//.]/g, '') }));
|
|
173
193
|
} else {
|
|
174
194
|
const errorFieldText = errors.parentElement?.parentElement?.children[0].innerHTML;
|
|
175
195
|
if (errorFieldText) {
|
|
176
|
-
dataStore.showToaster('error', dataStore.t('toaster.errorFormField'
|
|
196
|
+
dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: errorFieldText }));
|
|
177
197
|
}
|
|
178
198
|
}
|
|
179
199
|
errors.scrollIntoView({
|
|
@@ -255,9 +275,10 @@ export default defineComponent({
|
|
|
255
275
|
await dataStore.getQuestionList(
|
|
256
276
|
surveyType.value,
|
|
257
277
|
formStore.applicationData.processInstanceId,
|
|
258
|
-
formStore.applicationData.insuredApp[0].id,
|
|
278
|
+
whichMember.value === 'insured' ? formStore.applicationData.insuredApp[0].id : formStore.applicationData.clientApp.id,
|
|
259
279
|
whichSurvey.value,
|
|
260
280
|
surveyType.value === 'health' ? 'surveyByHealthSecond' : 'surveyByCriticalSecond',
|
|
281
|
+
whichMember.value,
|
|
261
282
|
);
|
|
262
283
|
firstQuestionList.value = formStore[whichSurvey.value]!.body;
|
|
263
284
|
secondQuestionList.value = formStore[surveyType.value === 'health' ? 'surveyByHealthSecond' : 'surveyByCriticalSecond']!;
|
|
@@ -271,9 +292,6 @@ export default defineComponent({
|
|
|
271
292
|
await dataStore.definedAnswers(question.first.id, whichSurvey.value);
|
|
272
293
|
}),
|
|
273
294
|
);
|
|
274
|
-
if (formStore.isDisabled.surveyByHealthBase) {
|
|
275
|
-
dataStore.showToaster('error', dataStore.t('toaster.viewErrorText'));
|
|
276
|
-
}
|
|
277
295
|
};
|
|
278
296
|
|
|
279
297
|
onMounted(async () => {
|
|
@@ -1,27 +1,79 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<section class="flex
|
|
3
|
-
|
|
4
|
-
<
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
v-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
2
|
+
<section class="flex h-full" :class="$libStyles.blueBgLight">
|
|
3
|
+
<!-- @vue-ignore -->
|
|
4
|
+
<aside :class="{ '!hidden': !$display().lgAndUp.value }" class="w-full lg:w-1/4 bg-white flex flex-col justify-between border-r-2 relative px-8">
|
|
5
|
+
<img draggable="false" class="w-[50%] mt-8" src="~/assets/auth-logo.svg" />
|
|
6
|
+
<div class="self-center flex flex-col items-center justify-center base-auth">
|
|
7
|
+
<v-carousel :show-arrows="false" color="#009C73">
|
|
8
|
+
<v-carousel-item v-for="(item, index) of carouselItems" :key="index">
|
|
9
|
+
<img draggable="false" class="mx-auto" :src="item.img" />
|
|
10
|
+
<div class="flex flex-col items-center justify-center mt-12 mb-8 text-center">
|
|
11
|
+
<h2 class="text-[22px] font-medium mb-1">{{ item.title }}</h2>
|
|
12
|
+
<h4 class="text-[16px]">{{ item.subtitle }}</h4>
|
|
13
|
+
</div>
|
|
14
|
+
</v-carousel-item>
|
|
15
|
+
</v-carousel>
|
|
16
|
+
</div>
|
|
17
|
+
<base-btn :text="$dataStore.t('buttons.more')" :disabled="true" class="mb-28" />
|
|
18
|
+
</aside>
|
|
19
|
+
<section v-if="isLogin" class="w-full lg:w-3/4 flex flex-col justify-center">
|
|
20
|
+
<!-- @vue-ignore -->
|
|
21
|
+
<img :class="{ '!block': !$display().lgAndUp.value }" draggable="false" class="hidden w-2/4 sm:w-1/3 mb-10 self-center" src="~/assets/auth-logo.svg" />
|
|
22
|
+
<div class="flex flex-col items-center mb-8 text-center">
|
|
23
|
+
<h1 class="text-[28px] font-medium mb-1">{{ $dataStore.t('labels.welcomeHL') }}</h1>
|
|
24
|
+
<span :class="[$libStyles.greyTextDark]" class="text-[16px]">{{ $dataStore.t('labels.needAuth') }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
<v-form ref="vForm" class="w-2/3 lg:w-[25vw] self-center">
|
|
27
|
+
<base-rounded-input class="mb-1" v-model.trim="login" :rules="$rules.required" :loading="authLoading" :placeholder="$dataStore.t('buttons.userLogin')" type="text" />
|
|
28
|
+
<base-rounded-input
|
|
29
|
+
class="mb-1"
|
|
30
|
+
v-model.trim="password"
|
|
31
|
+
:rules="$rules.required"
|
|
32
|
+
:loading="authLoading"
|
|
33
|
+
:placeholder="$dataStore.t('buttons.password')"
|
|
34
|
+
:append-inner-icon="showPassword ? 'mdi-eye-outline' : 'mdi-eye-off-outline'"
|
|
35
|
+
@append="showPassword = !showPassword"
|
|
36
|
+
:type="showPassword ? ('' as InputTypes) : 'password'"
|
|
37
|
+
/>
|
|
38
|
+
<span v-if="$dataStore.isLKA" class="inline-block w-full text-end mb-4" :class="[$libStyles.textSimple, $libStyles.greyTextDark]" @click="isLogin = false">{{
|
|
39
|
+
$dataStore.t('labels.resetPassword')
|
|
40
|
+
}}</span>
|
|
41
|
+
<base-btn :text="$dataStore.t('buttons.login')" :disabled="authLoading" :btn="$libStyles.greenBtn" @click="submitAuthForm" />
|
|
42
|
+
</v-form>
|
|
43
|
+
</section>
|
|
44
|
+
<section v-if="isLogin === false" class="w-full lg:w-3/4 flex flex-col justify-center items-center">
|
|
45
|
+
<div class="flex flex-col items-center mb-4">
|
|
46
|
+
<h1 class="text-[28px] font-medium mb-1">{{ $dataStore.t('labels.resetPassword') }}</h1>
|
|
47
|
+
<span :class="[$libStyles.greyTextDark]" class="text-[16px]">{{ $dataStore.t('labels.resetType') }}</span>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="p-[2px] mb-8 rounded-[12px] border-[1px] w-2/3 lg:w-[25vw]" :class="[$libStyles.whiteBg]">
|
|
50
|
+
<v-tabs v-model="resetPasswordType" density="compact" slider-color="#009c73" class="w-full base-reset-password rounded-[12px]" :class="[$libStyles.whiteBg]">
|
|
51
|
+
<v-tab :ripple="false" value="phone"> {{ $dataStore.t('form.phoneNumber') }} </v-tab>
|
|
52
|
+
<v-tab :ripple="false" value="email"> {{ $dataStore.t('form.email') }} </v-tab>
|
|
53
|
+
</v-tabs>
|
|
54
|
+
</div>
|
|
55
|
+
<v-form ref="vForm" class="w-2/3 lg:w-[25vw] self-center">
|
|
56
|
+
<base-rounded-input
|
|
57
|
+
v-if="resetPasswordType === 'phone'"
|
|
58
|
+
v-model.trim="phone"
|
|
59
|
+
:maska="$maska.phone"
|
|
60
|
+
:rules="$rules.required.concat($rules.phoneFormat)"
|
|
61
|
+
:loading="authLoading"
|
|
62
|
+
:placeholder="$dataStore.t('form.phoneNumber')"
|
|
63
|
+
type="text"
|
|
64
|
+
/>
|
|
65
|
+
<base-rounded-input
|
|
66
|
+
v-if="resetPasswordType === 'email'"
|
|
67
|
+
v-model.trim="email"
|
|
68
|
+
:rules="$rules.required.concat($rules.email)"
|
|
69
|
+
:loading="authLoading"
|
|
70
|
+
:placeholder="$dataStore.t('form.email')"
|
|
71
|
+
type="text"
|
|
72
|
+
/>
|
|
73
|
+
<span class="inline-block w-full text-end mb-4" :class="[$libStyles.textSimple, $libStyles.greyTextDark]" @click="isLogin = true">{{ $dataStore.t('buttons.login') }}</span>
|
|
74
|
+
<base-btn :text="$dataStore.t('buttons.reset')" :disabled="authLoading" :btn="$libStyles.greenBtn" @click="submitAuthForm" />
|
|
75
|
+
</v-form>
|
|
76
|
+
</section>
|
|
25
77
|
</section>
|
|
26
78
|
</template>
|
|
27
79
|
|
|
@@ -33,24 +85,32 @@ export default defineComponent({
|
|
|
33
85
|
const dataStore = useDataStore();
|
|
34
86
|
|
|
35
87
|
const vForm = ref<any>(null);
|
|
88
|
+
const isLogin = ref<boolean>(true);
|
|
89
|
+
const showPassword = ref<boolean>(false);
|
|
90
|
+
const phone = ref<string>();
|
|
91
|
+
const email = ref<string>();
|
|
92
|
+
const resetPasswordType = ref<string>();
|
|
36
93
|
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
94
|
+
const carouselItems = [
|
|
95
|
+
{
|
|
96
|
+
title: 'Все полисы в один клик!',
|
|
97
|
+
subtitle: 'Мгновенный доступ к информации о ваших полисах',
|
|
98
|
+
img: '/left-side-1.png',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: 'Все полисы в один клик!',
|
|
102
|
+
subtitle: 'Мгновенный доступ к информации о ваших полисах',
|
|
103
|
+
img: '/left-side-1.png',
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: 'Все полисы в один клик!',
|
|
107
|
+
subtitle: 'Мгновенный доступ к информации о ваших полисах',
|
|
108
|
+
img: '/left-side-1.png',
|
|
109
|
+
},
|
|
110
|
+
];
|
|
51
111
|
|
|
52
|
-
const login = ref<string>(
|
|
53
|
-
const password = ref<string>(
|
|
112
|
+
const login = ref<string>(getBaseCredentials()[useEnv().envMode].login);
|
|
113
|
+
const password = ref<string>(getBaseCredentials()[useEnv().envMode].password);
|
|
54
114
|
|
|
55
115
|
const numAttempts = ref(0);
|
|
56
116
|
|
|
@@ -68,24 +128,57 @@ export default defineComponent({
|
|
|
68
128
|
const submitAuthForm = async () => {
|
|
69
129
|
await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
70
130
|
if (v.valid) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
131
|
+
if (isLogin.value === true) {
|
|
132
|
+
authLoading.value = true;
|
|
133
|
+
await dataStore.loginUser(login.value, password.value, numAttempts.value);
|
|
134
|
+
numAttempts.value++;
|
|
135
|
+
authLoading.value = false;
|
|
136
|
+
if (!!dataStore.user.id) {
|
|
137
|
+
await router.push({ name: 'index' });
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
// TODO Reset password
|
|
77
141
|
}
|
|
78
142
|
}
|
|
79
143
|
});
|
|
80
144
|
};
|
|
81
145
|
|
|
82
146
|
return {
|
|
147
|
+
// State
|
|
83
148
|
login,
|
|
84
|
-
password,
|
|
85
149
|
vForm,
|
|
150
|
+
phone,
|
|
151
|
+
email,
|
|
152
|
+
isLogin,
|
|
153
|
+
password,
|
|
86
154
|
authLoading,
|
|
155
|
+
showPassword,
|
|
156
|
+
carouselItems,
|
|
157
|
+
resetPasswordType,
|
|
158
|
+
|
|
159
|
+
// Functions
|
|
87
160
|
submitAuthForm,
|
|
88
161
|
};
|
|
89
162
|
},
|
|
90
163
|
});
|
|
91
164
|
</script>
|
|
165
|
+
|
|
166
|
+
<style>
|
|
167
|
+
.base-auth .v-carousel__controls {
|
|
168
|
+
background: white !important;
|
|
169
|
+
}
|
|
170
|
+
.base-reset-password .v-tab__slider {
|
|
171
|
+
z-index: -1;
|
|
172
|
+
height: 100% !important;
|
|
173
|
+
border-radius: 12px;
|
|
174
|
+
}
|
|
175
|
+
.base-reset-password .v-tab {
|
|
176
|
+
width: 50%;
|
|
177
|
+
color: #566681;
|
|
178
|
+
text-transform: unset;
|
|
179
|
+
font-size: 12px;
|
|
180
|
+
}
|
|
181
|
+
.base-reset-password .v-tab--selected {
|
|
182
|
+
color: white !important;
|
|
183
|
+
}
|
|
184
|
+
</style>
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
</div>
|
|
15
15
|
</base-content-block>
|
|
16
16
|
</section>
|
|
17
|
-
<base-list-empty v-else
|
|
17
|
+
<base-list-empty v-else />
|
|
18
18
|
<Teleport v-if="$dataStore.panelAction === null" to="#panel-actions">
|
|
19
19
|
<base-fade-transition>
|
|
20
20
|
<div :class="[$libStyles.flexColNav]">
|
|
21
|
-
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')"
|
|
22
|
-
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')"
|
|
21
|
+
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Открыть" @click="getFile('view')" />
|
|
22
|
+
<base-btn :disabled="documentLoading" :loading="documentLoading" text="Скачать" @click="getFile('download')" />
|
|
23
23
|
</div>
|
|
24
24
|
</base-fade-transition>
|
|
25
25
|
</Teleport>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<script lang="ts">
|
|
29
|
-
import { DocumentItem } from '
|
|
29
|
+
import { DocumentItem } from '../../composables/classes';
|
|
30
30
|
|
|
31
31
|
export default defineComponent({
|
|
32
32
|
setup() {
|
|
@@ -40,9 +40,9 @@ export default defineComponent({
|
|
|
40
40
|
text: '',
|
|
41
41
|
});
|
|
42
42
|
const object_list = computed(() => Object.values(formStore.signedDocumentList));
|
|
43
|
-
const unSignedList = computed(() => document_list.value.filter(doc => doc.signed === false || doc.signed === null));
|
|
43
|
+
const unSignedList = computed(() => document_list.value.filter((doc: DocumentItem) => doc.signed === false || doc.signed === null));
|
|
44
44
|
const document_list = computed(() =>
|
|
45
|
-
object_list.value.filter(obj => {
|
|
45
|
+
object_list.value.filter((obj: DocumentItem) => {
|
|
46
46
|
if (obj.fileTypeCode === '19' || obj.fileTypeCode === '5') {
|
|
47
47
|
return obj;
|
|
48
48
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-4" :class="[$libStyles.scrollPage]" v-if="!!invoiceData">
|
|
3
|
+
<lazy-base-form-section :title="$dataStore.t('labels.jsonObject')">
|
|
4
|
+
<template #icon>
|
|
5
|
+
<v-btn icon="mdi mdi-content-copy !text-[18px]" size="x-small" variant="plain" color="#A0B3D8" @click="$dataStore.copyToClipboard(JSON.stringify(invoiceData))" />
|
|
6
|
+
</template>
|
|
7
|
+
<lazy-base-json-viewer :data="invoiceData" class="bg-white p-4 rounded" />
|
|
8
|
+
</lazy-base-form-section>
|
|
9
|
+
<lazy-base-form-section v-if="invoiceData.paymentLink && invoiceData.status !== 1" :title="$dataStore.t('labels.epayPage')" class="flex items-center">
|
|
10
|
+
<div class="w-full lg:w-[70%] bg-white">
|
|
11
|
+
<iframe :src="invoiceData.paymentLink" frameborder="0" class="w-full h-[70vh]"></iframe>
|
|
12
|
+
</div>
|
|
13
|
+
</lazy-base-form-section>
|
|
14
|
+
</section>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script lang="ts">
|
|
18
|
+
export default defineComponent({
|
|
19
|
+
setup() {
|
|
20
|
+
const formStore = useFormStore();
|
|
21
|
+
const invoiceData = formStore.invoiceData;
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
// State
|
|
25
|
+
formStore,
|
|
26
|
+
invoiceData,
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
</script>
|