hl-core 0.0.8-beta.9 → 0.0.9-beta.1
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 +100 -34
- 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 +51 -28
- package/components/Form/FormSection.vue +4 -1
- package/components/Form/FormToggle.vue +2 -3
- package/components/Form/ManagerAttachment.vue +21 -20
- 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 +49 -31
- 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 +503 -343
- package/components/Pages/ProductAgreement.vue +4 -2
- package/components/Pages/ProductConditions.vue +494 -95
- package/components/Panel/PanelHandler.vue +91 -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 +165 -81
- package/composables/constants.ts +25 -52
- package/composables/index.ts +80 -2
- package/composables/styles.ts +8 -3
- package/configs/i18n.ts +2 -4
- package/layouts/default.vue +6 -6
- package/locales/kz.json +532 -346
- package/locales/ru.json +210 -22
- package/nuxt.config.ts +1 -1
- package/package.json +38 -12
- package/pages/500.vue +2 -2
- package/pages/Token.vue +51 -0
- package/plugins/helperFunctionsPlugins.ts +2 -1
- package/plugins/vuetifyPlugin.ts +3 -1
- package/store/{data.store.js → data.store.ts} +1116 -752
- package/store/form.store.ts +1 -1
- package/store/member.store.ts +94 -72
- package/store/{rules.js → rules.ts} +54 -26
- package/types/enum.ts +83 -0
- package/types/env.d.ts +10 -0
- package/types/index.ts +197 -7
- package/locales/en.json +0 -399
|
@@ -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>
|