hl-core 0.0.8 → 0.0.9-beta.2
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 +142 -101
- package/api/interceptors.ts +17 -13
- package/components/Button/Btn.vue +1 -1
- package/components/Button/ScrollButtons.vue +2 -2
- package/components/Complex/MessageBlock.vue +26 -0
- 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 +90 -42
- package/components/Form/FormSection.vue +4 -1
- package/components/Form/FormToggle.vue +1 -2
- package/components/Form/ManagerAttachment.vue +197 -0
- package/components/Form/ProductConditionsBlock.vue +68 -14
- package/components/Input/Datepicker.vue +45 -0
- package/components/Input/FileInput.vue +2 -3
- package/components/Input/FormInput.vue +31 -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 +4 -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 +59 -33
- package/components/Pages/Auth.vue +139 -46
- package/components/Pages/Documents.vue +7 -7
- package/components/Pages/InvoiceInfo.vue +30 -0
- package/components/Pages/MemberForm.vue +544 -293
- package/components/Pages/ProductAgreement.vue +4 -2
- package/components/Pages/ProductConditions.vue +673 -75
- package/components/Panel/PanelHandler.vue +304 -0
- package/components/Panel/PanelSelectItem.vue +1 -1
- package/components/Transitions/SlideTransition.vue +5 -0
- package/components/Utilities/Chip.vue +27 -0
- package/components/Utilities/JsonViewer.vue +27 -0
- package/composables/axios.ts +1 -1
- package/composables/classes.ts +223 -101
- package/composables/constants.ts +26 -51
- package/composables/index.ts +80 -2
- package/composables/styles.ts +15 -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 +13 -1
- package/package.json +43 -11
- package/pages/500.vue +2 -2
- package/pages/Token.vue +51 -0
- package/plugins/helperFunctionsPlugins.ts +6 -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} +65 -34
- package/types/enum.ts +83 -0
- package/types/env.d.ts +10 -0
- package/types/index.ts +262 -5
- package/store/data.store.js +0 -2482
- package/store/messages.ts +0 -429
|
@@ -7,16 +7,19 @@
|
|
|
7
7
|
$libStyles.textSimple,
|
|
8
8
|
disabled ? 'cursor-not-allowed opacity-50' : '',
|
|
9
9
|
]"
|
|
10
|
-
class="h-[60px] flex items-center justify-between hover:bg-[#A0B3D8] hover:!text-white pl-4 cursor-pointer transition-all"
|
|
10
|
+
class="h-[60px] flex items-center justify-between hover:bg-[#A0B3D8] hover:!text-white pl-4 cursor-pointer transition-all group"
|
|
11
11
|
>
|
|
12
12
|
<span>{{ menuItem.title }}</span>
|
|
13
|
-
<
|
|
13
|
+
<div class="flex items-center">
|
|
14
|
+
<i v-if="menuItem.icon" class="mdi text-xl pr-4" :class="[menuItem.icon]"></i>
|
|
15
|
+
<base-chip :chip="menuItem.chip" />
|
|
16
|
+
</div>
|
|
14
17
|
<v-tooltip v-if="menuItem.description" activator="parent" location="bottom">{{ menuItem.description }}</v-tooltip>
|
|
15
18
|
</div>
|
|
16
19
|
</template>
|
|
17
20
|
|
|
18
21
|
<script lang="ts">
|
|
19
|
-
import { MenuItem } from '
|
|
22
|
+
import { MenuItem } from '../../composables/classes';
|
|
20
23
|
|
|
21
24
|
export default defineComponent({
|
|
22
25
|
props: {
|
|
@@ -2,7 +2,13 @@
|
|
|
2
2
|
<base-fade-transition>
|
|
3
3
|
<section v-if="firstQuestionList && firstQuestionList.length && !firstPanel && !secondPanel" class="flex flex-col">
|
|
4
4
|
<section :class="[$libStyles.blueBgLight, $libStyles.rounded]" class="mx-[10px] my-[14px] p-4 flex flex-col gap-4">
|
|
5
|
-
<base-form-toggle
|
|
5
|
+
<base-form-toggle
|
|
6
|
+
v-model="answerToAll"
|
|
7
|
+
:title="$dataStore.t('questionnaireType.answerAllNo')"
|
|
8
|
+
:disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
9
|
+
:has-border="false"
|
|
10
|
+
@clicked="handleToggler"
|
|
11
|
+
/>
|
|
6
12
|
</section>
|
|
7
13
|
<v-form ref="vForm" class="max-h-[70vh] overflow-y-scroll" @submit="submitForm">
|
|
8
14
|
<section
|
|
@@ -18,7 +24,7 @@
|
|
|
18
24
|
:maska="$maska.threeDigit"
|
|
19
25
|
:readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
20
26
|
:rules="$rules.required"
|
|
21
|
-
|
|
27
|
+
/>
|
|
22
28
|
</section>
|
|
23
29
|
<section
|
|
24
30
|
v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'Y').length"
|
|
@@ -33,13 +39,17 @@
|
|
|
33
39
|
class="rounded-t-lg pl-6 py-1 cursor-pointer"
|
|
34
40
|
@click="openFirstPanel(question)"
|
|
35
41
|
>
|
|
36
|
-
{{ $t('questionnaireType.pleaseAnswer'
|
|
42
|
+
{{ $dataStore.t('questionnaireType.pleaseAnswer', { text: secondQuestionList.length }) }}
|
|
37
43
|
</div>
|
|
38
44
|
</base-fade-transition>
|
|
39
45
|
<span :class="[$libStyles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between">
|
|
40
46
|
{{ question.first.name }}
|
|
41
47
|
<base-fade-transition>
|
|
42
|
-
<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>
|
|
43
53
|
</base-fade-transition>
|
|
44
54
|
</span>
|
|
45
55
|
<div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$libStyles.textSimple]">
|
|
@@ -52,38 +62,45 @@
|
|
|
52
62
|
:readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
53
63
|
inline
|
|
54
64
|
>
|
|
55
|
-
<v-radio label="Да" value="Да"
|
|
56
|
-
<v-radio label="Нет" value="Нет"
|
|
65
|
+
<v-radio label="Да" value="Да" />
|
|
66
|
+
<v-radio label="Нет" value="Нет" />
|
|
57
67
|
</v-radio-group>
|
|
58
68
|
</div>
|
|
59
69
|
</base-form-text-section>
|
|
60
70
|
</section>
|
|
61
71
|
</v-form>
|
|
62
|
-
<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
|
+
/>
|
|
63
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
|
+
/>
|
|
64
89
|
<section
|
|
65
90
|
ref="firstPanelSection"
|
|
66
91
|
v-if="secondQuestionList && secondQuestionList.length && firstPanel"
|
|
67
|
-
class="flex flex-col px-[10px]
|
|
92
|
+
class="flex flex-col px-[10px] pb-[14px]"
|
|
68
93
|
:class="[$libStyles.scrollPage]"
|
|
69
94
|
>
|
|
70
|
-
<v-
|
|
71
|
-
icon="mdi mdi-close"
|
|
72
|
-
variant="text"
|
|
73
|
-
size="large"
|
|
74
|
-
@click="
|
|
75
|
-
firstPanel = false;
|
|
76
|
-
secondPanel = false;
|
|
77
|
-
"
|
|
78
|
-
></v-btn>
|
|
79
|
-
<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">
|
|
80
96
|
<base-form-text-section v-for="question in currentQuestion.second" :title="question.name" :key="question.name">
|
|
81
97
|
<base-form-input
|
|
82
98
|
v-if="question.definedAnswers === 'N'"
|
|
83
99
|
v-model="question.answerText"
|
|
84
100
|
class="border-t-[1px] border-t-[#F3F6FC]"
|
|
85
101
|
placeholder="Введите текст"
|
|
86
|
-
|
|
102
|
+
:readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
|
|
103
|
+
/>
|
|
87
104
|
<span v-else class="flex items-center justify-between p-4 cursor-pointer" :class="[$libStyles.textTitle, $libStyles.greenText]" @click="openSecondPanel(question)">
|
|
88
105
|
{{ question.answerName ? question.answerName : 'Выбрать вариант ответа' }}
|
|
89
106
|
<i class="mdi mdi-chevron-right text-[28px]"></i>
|
|
@@ -94,7 +111,7 @@
|
|
|
94
111
|
</base-fade-transition>
|
|
95
112
|
<Teleport v-if="secondPanel" to="#panel-actions">
|
|
96
113
|
<div :class="[$libStyles.scrollPage]" class="flex flex-col items-center">
|
|
97
|
-
<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" />
|
|
98
115
|
<div v-if="$dataStore.questionRefs && $dataStore.questionRefs.length && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
|
|
99
116
|
<base-panel-select-item
|
|
100
117
|
v-for="(item, index) of $dataStore.questionRefs.filter(i => i.nameRu && (i.nameRu as string).match(new RegExp(searchQuery, 'i')))"
|
|
@@ -102,16 +119,16 @@
|
|
|
102
119
|
:text="`${item.nameRu}`"
|
|
103
120
|
:selected="currentSecond!.answerId === item.ids"
|
|
104
121
|
@click="closeSecondPanel(item)"
|
|
105
|
-
|
|
122
|
+
/>
|
|
106
123
|
</div>
|
|
107
|
-
<base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50"
|
|
124
|
+
<base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50" />
|
|
108
125
|
</div>
|
|
109
126
|
</Teleport>
|
|
110
127
|
<base-scroll-buttons @up="scrollForm('up')" @down="scrollForm('down')" />
|
|
111
128
|
</template>
|
|
112
129
|
|
|
113
130
|
<script lang="ts">
|
|
114
|
-
import { Value } from '
|
|
131
|
+
import { Value } from '../../composables/classes';
|
|
115
132
|
|
|
116
133
|
export default defineComponent({
|
|
117
134
|
setup() {
|
|
@@ -126,14 +143,23 @@ export default defineComponent({
|
|
|
126
143
|
const firstPanel = ref<boolean>(false);
|
|
127
144
|
const secondPanel = ref<boolean>(false);
|
|
128
145
|
const surveyType = ref<'health' | 'critical'>('tab' in route.query && route.query.tab === 'criticalBase' ? 'critical' : 'health');
|
|
129
|
-
const whichSurvey = computed(() =>
|
|
130
|
-
|
|
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[]>([]);
|
|
131
156
|
const secondQuestionList = ref<AnketaSecond[]>([]);
|
|
132
157
|
const currentQuestion = ref<AnketaBody>();
|
|
133
158
|
const currentSecond = ref<AnketaSecond>();
|
|
134
159
|
const isPanelLoading = ref<boolean>(false);
|
|
135
160
|
const searchQuery = ref<string>('');
|
|
136
161
|
|
|
162
|
+
const whichMember = computed(() => ('member' in route.query && !!route.query.member ? (route.query.member as 'insured' | 'policyholder') : 'insured'));
|
|
137
163
|
const scrollForm = (direction: 'up' | 'down') => {
|
|
138
164
|
const scrollObject = { top: direction === 'up' ? 0 : screen.height * 10, behavior: 'smooth' };
|
|
139
165
|
if (firstPanel.value) {
|
|
@@ -153,19 +179,21 @@ export default defineComponent({
|
|
|
153
179
|
}
|
|
154
180
|
});
|
|
155
181
|
formStore[whichSurvey.value]!.type = surveyType.value;
|
|
156
|
-
const anketaToken = await dataStore.setSurvey(formStore[whichSurvey.value]);
|
|
157
|
-
|
|
182
|
+
const anketaToken = await dataStore.setSurvey(formStore[whichSurvey.value]!);
|
|
183
|
+
if (typeof anketaToken === 'string') {
|
|
184
|
+
formStore[whichSurvey.value]!.id = anketaToken;
|
|
185
|
+
}
|
|
158
186
|
isButtonLoading.value = false;
|
|
159
187
|
} else {
|
|
160
188
|
const errors = document.querySelector('.v-input--error');
|
|
161
189
|
if (errors) {
|
|
162
190
|
const errorText = errors.querySelector('.v-label.v-field-label');
|
|
163
191
|
if (errorText) {
|
|
164
|
-
dataStore.showToaster('error', dataStore.t('toaster.errorFormField'
|
|
192
|
+
dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: errorText.innerHTML?.replace(/[-<>!//.]/g, '') }));
|
|
165
193
|
} else {
|
|
166
194
|
const errorFieldText = errors.parentElement?.parentElement?.children[0].innerHTML;
|
|
167
195
|
if (errorFieldText) {
|
|
168
|
-
dataStore.showToaster('error', dataStore.t('toaster.errorFormField'
|
|
196
|
+
dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: errorFieldText }));
|
|
169
197
|
}
|
|
170
198
|
}
|
|
171
199
|
errors.scrollIntoView({
|
|
@@ -247,9 +275,10 @@ export default defineComponent({
|
|
|
247
275
|
await dataStore.getQuestionList(
|
|
248
276
|
surveyType.value,
|
|
249
277
|
formStore.applicationData.processInstanceId,
|
|
250
|
-
formStore.applicationData.insuredApp[0].id,
|
|
278
|
+
whichMember.value === 'insured' ? formStore.applicationData.insuredApp[0].id : formStore.applicationData.clientApp.id,
|
|
251
279
|
whichSurvey.value,
|
|
252
280
|
surveyType.value === 'health' ? 'surveyByHealthSecond' : 'surveyByCriticalSecond',
|
|
281
|
+
whichMember.value,
|
|
253
282
|
);
|
|
254
283
|
firstQuestionList.value = formStore[whichSurvey.value]!.body;
|
|
255
284
|
secondQuestionList.value = formStore[surveyType.value === 'health' ? 'surveyByHealthSecond' : 'surveyByCriticalSecond']!;
|
|
@@ -263,9 +292,6 @@ export default defineComponent({
|
|
|
263
292
|
await dataStore.definedAnswers(question.first.id, whichSurvey.value);
|
|
264
293
|
}),
|
|
265
294
|
);
|
|
266
|
-
if (formStore.isDisabled.surveyByHealthBase) {
|
|
267
|
-
dataStore.showToaster('error', dataStore.t('toaster.viewErrorText'));
|
|
268
|
-
}
|
|
269
295
|
};
|
|
270
296
|
|
|
271
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>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="w-full px-[10px] pt-[14px] flex flex-col gap-2" :class="[$libStyles.scrollPage]" v-if="formStore.signedDocumentList && formStore.signedDocumentList.length">
|
|
3
|
-
<base-content-block v-for="document of formStore.signedDocumentList
|
|
3
|
+
<base-content-block v-for="document of formStore.signedDocumentList" :key="document.id" :class="[$libStyles.textSimple]">
|
|
4
4
|
<h5 class="text-center font-medium mb-4">
|
|
5
5
|
{{ document.fileTypeName }}
|
|
6
6
|
</h5>
|
|
@@ -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>
|