hl-core 0.0.7 → 0.0.8-beta.10
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/.prettierrc +2 -1
- package/api/index.ts +562 -0
- package/api/interceptors.ts +38 -0
- package/components/Button/Btn.vue +57 -0
- package/components/Button/BtnIcon.vue +47 -0
- package/components/Button/ScrollButtons.vue +6 -0
- package/components/Button/SortArrow.vue +21 -0
- package/components/Complex/Content.vue +5 -0
- package/components/Complex/ContentBlock.vue +5 -0
- package/components/Complex/Page.vue +43 -0
- package/components/Dialog/Dialog.vue +76 -0
- package/components/Dialog/FamilyDialog.vue +39 -0
- package/components/Form/FormBlock.vue +139 -0
- package/components/Form/FormSection.vue +18 -0
- package/components/Form/FormTextSection.vue +20 -0
- package/components/Form/FormToggle.vue +52 -0
- package/components/Form/ManagerAttachment.vue +196 -0
- package/components/Form/ProductConditionsBlock.vue +72 -0
- package/components/Input/Datepicker.vue +41 -0
- package/components/Input/EmptyFormField.vue +5 -0
- package/components/Input/FileInput.vue +71 -0
- package/components/Input/FormInput.vue +183 -0
- package/components/Input/PanelInput.vue +133 -0
- package/components/Input/RoundedInput.vue +143 -0
- package/components/Layout/Drawer.vue +45 -0
- package/components/Layout/Header.vue +48 -0
- package/components/Layout/Loader.vue +35 -0
- package/components/Layout/SettingsPanel.vue +48 -0
- package/components/List/ListEmpty.vue +22 -0
- package/components/Menu/MenuNav.vue +108 -0
- package/components/Menu/MenuNavItem.vue +37 -0
- package/components/Pages/Anketa.vue +341 -0
- package/components/Pages/Auth.vue +91 -0
- package/components/Pages/Documents.vue +108 -0
- package/components/Pages/MemberForm.vue +1229 -0
- package/components/Pages/ProductAgreement.vue +18 -0
- package/components/Pages/ProductConditions.vue +659 -0
- package/components/Panel/PanelHandler.vue +233 -0
- package/components/Panel/PanelItem.vue +5 -0
- package/components/Panel/PanelSelectItem.vue +20 -0
- package/components/Transitions/FadeTransition.vue +5 -0
- package/components/Transitions/SlideTransition.vue +5 -0
- package/composables/axios.ts +11 -0
- package/composables/classes.ts +1179 -0
- package/composables/constants.ts +71 -0
- package/composables/index.ts +168 -2
- package/composables/styles.ts +48 -8
- package/configs/i18n.ts +19 -0
- package/layouts/clear.vue +3 -0
- package/layouts/default.vue +75 -0
- package/layouts/full.vue +6 -0
- package/locales/en.json +403 -0
- package/locales/kz.json +403 -0
- package/locales/ru.json +403 -0
- package/nuxt.config.ts +39 -5
- package/package.json +28 -10
- package/pages/500.vue +85 -0
- package/plugins/helperFunctionsPlugins.ts +19 -2
- package/plugins/storePlugin.ts +5 -7
- package/plugins/vuetifyPlugin.ts +15 -0
- package/store/data.store.js +2291 -8
- package/store/form.store.ts +8 -0
- package/store/member.store.ts +381 -0
- package/store/rules.js +52 -39
- package/tailwind.config.js +10 -0
- package/types/index.ts +317 -0
- package/app.vue +0 -3
- package/components/Button/GreenBtn.vue +0 -33
- package/store/app.store.js +0 -12
- package/store/messages.ts +0 -310
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section v-if="sendingActions">
|
|
3
|
+
<div :class="[$libStyles.flexColNav]">
|
|
4
|
+
<v-form ref="vForm">
|
|
5
|
+
<base-rounded-input v-model="actionCause" placeholder="Причина" :rules="$rules.required"></base-rounded-input>
|
|
6
|
+
</v-form>
|
|
7
|
+
<base-btn :text="buttonText" :loading="loading" @click="submitForm"></base-btn>
|
|
8
|
+
</div>
|
|
9
|
+
</section>
|
|
10
|
+
<section v-if="acceptAction">
|
|
11
|
+
<div :class="[$libStyles.flexColNav]">
|
|
12
|
+
<base-content-block class="flex flex-col gap-3">
|
|
13
|
+
<span
|
|
14
|
+
>{{ `Сумма страховой премии ${paymentPeriod}:` }} <b>{{ `${insurancePremiumPerMonth}₸` }}</b></span
|
|
15
|
+
>
|
|
16
|
+
<span
|
|
17
|
+
>{{ `Запрашиваемая страховая сумма: ` }} <b>{{ `${requestedSumInsured}₸` }}</b>
|
|
18
|
+
</span>
|
|
19
|
+
</base-content-block>
|
|
20
|
+
<base-btn :text="$t('confirm.yes')" @click="handleTask"></base-btn>
|
|
21
|
+
<base-btn :btn="$libStyles.blueLightBtn" :text="$t('confirm.no')" @click="closePanel"></base-btn>
|
|
22
|
+
</div>
|
|
23
|
+
</section>
|
|
24
|
+
<section v-if="signingActions" class="relative">
|
|
25
|
+
<div>
|
|
26
|
+
<base-fade-transition>
|
|
27
|
+
<div v-if="!isSendNumberOpen" :class="[$libStyles.flexColNav]">
|
|
28
|
+
<div :class="[$libStyles.blueBgLight]" class="rounded-lg p-4">
|
|
29
|
+
<v-expansion-panels v-if="formStore.signUrls && formStore.signUrls.length" variant="accordion" multiple>
|
|
30
|
+
<v-expansion-panel v-for="signUrl of formStore.signUrls" :key="signUrl.iin!" class="border-[1px]" elevation="0" bg-color="#FFF">
|
|
31
|
+
<v-expansion-panel-title class="h-[80px]" :class="$libStyles.textTitle">{{ `${signUrl.longName} - ${signUrl.iin}` }}</v-expansion-panel-title>
|
|
32
|
+
<v-expansion-panel-text class="border-t-[1px]">
|
|
33
|
+
<section class="flex flex-col gap-4 py-3" :class="$libStyles.textSimple">
|
|
34
|
+
<base-btn :loading="loading" :text="$t('sign.copyCloud')" @click="$dataStore.copyToClipboard(signUrl.uri)"></base-btn>
|
|
35
|
+
<base-btn :loading="loading" :btn="$libStyles.blueLightBtn" :text="$t('sign.recipientNumber')" @click="openSmsPanel(signUrl)"></base-btn>
|
|
36
|
+
</section>
|
|
37
|
+
</v-expansion-panel-text>
|
|
38
|
+
</v-expansion-panel>
|
|
39
|
+
</v-expansion-panels>
|
|
40
|
+
<base-list-empty v-else></base-list-empty>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div v-if="isSendNumberOpen" :class="[$libStyles.flexColNav]">
|
|
44
|
+
<i
|
|
45
|
+
class="mdi mdi-arrow-left cursor-pointer absolute text-xl left-0 top-0 rounded-br-full bg-white border-[1px] pb-3 pt-1 pl-1 pr-3"
|
|
46
|
+
@click="isSendNumberOpen = false"
|
|
47
|
+
></i>
|
|
48
|
+
<base-form-section :title="selectedClient && selectedClient.longName ? selectedClient.longName : ''">
|
|
49
|
+
<v-form ref="vForm">
|
|
50
|
+
<base-rounded-input
|
|
51
|
+
v-model="phoneNumber"
|
|
52
|
+
:maska="$maska.phone"
|
|
53
|
+
:rules="$rules.required.concat($rules.phoneFormat)"
|
|
54
|
+
:label="$t('form.phoneNumber')"
|
|
55
|
+
placeholder="+7 7"
|
|
56
|
+
></base-rounded-input>
|
|
57
|
+
</v-form>
|
|
58
|
+
<base-btn :text="$t('buttons.sendSMS')" :loading="loading" @click="submitForm"></base-btn
|
|
59
|
+
></base-form-section>
|
|
60
|
+
</div>
|
|
61
|
+
</base-fade-transition>
|
|
62
|
+
</div>
|
|
63
|
+
</section>
|
|
64
|
+
<section v-if="payingActions" class="relative">
|
|
65
|
+
<div>
|
|
66
|
+
<base-fade-transition>
|
|
67
|
+
<div v-if="!isSendNumberOpen" :class="[$libStyles.flexColNav]">
|
|
68
|
+
<base-btn :loading="loading" :text="$t('payment.copyUrl')" @click="$dataStore.copyToClipboard(formStore.epayLink)"></base-btn>
|
|
69
|
+
<base-btn :loading="loading" :btn="$libStyles.blueLightBtn" :text="$t('payment.recipientNumber')" @click="openEpayPanel"></base-btn>
|
|
70
|
+
</div>
|
|
71
|
+
<div v-if="isSendNumberOpen" :class="[$libStyles.flexColNav]">
|
|
72
|
+
<i
|
|
73
|
+
class="mdi mdi-arrow-left cursor-pointer absolute text-xl left-0 top-0 rounded-br-full bg-white border-[1px] pb-3 pt-1 pl-1 pr-3"
|
|
74
|
+
@click="isSendNumberOpen = false"
|
|
75
|
+
></i>
|
|
76
|
+
<base-form-section title="">
|
|
77
|
+
<v-form ref="vForm">
|
|
78
|
+
<base-rounded-input
|
|
79
|
+
v-model="phoneNumber"
|
|
80
|
+
:maska="$maska.phone"
|
|
81
|
+
:rules="$rules.required.concat($rules.phoneFormat)"
|
|
82
|
+
:label="$t('form.phoneNumber')"
|
|
83
|
+
placeholder="+7 7"
|
|
84
|
+
></base-rounded-input>
|
|
85
|
+
</v-form>
|
|
86
|
+
<base-btn :text="$t('buttons.sendSMS')" :loading="loading" @click="submitForm"></base-btn>
|
|
87
|
+
</base-form-section>
|
|
88
|
+
</div>
|
|
89
|
+
</base-fade-transition>
|
|
90
|
+
</div>
|
|
91
|
+
</section>
|
|
92
|
+
</template>
|
|
93
|
+
|
|
94
|
+
<script lang="ts">
|
|
95
|
+
export default defineComponent({
|
|
96
|
+
setup() {
|
|
97
|
+
const route = useRoute();
|
|
98
|
+
const dataStore = useDataStore();
|
|
99
|
+
const formStore = useFormStore();
|
|
100
|
+
const actionCause = ref<string>('');
|
|
101
|
+
const loading = ref<boolean>(false);
|
|
102
|
+
const vForm = ref<any>();
|
|
103
|
+
const isSendNumberOpen = ref<boolean>(false);
|
|
104
|
+
const phoneNumber = ref<string | null>(formStore.policyholderForm.phoneNumber ?? '');
|
|
105
|
+
const selectedClient = ref<SignUrlType>();
|
|
106
|
+
|
|
107
|
+
const openSmsPanel = (signInfo: SignUrlType) => {
|
|
108
|
+
if (signInfo) {
|
|
109
|
+
isSendNumberOpen.value = true;
|
|
110
|
+
selectedClient.value = signInfo;
|
|
111
|
+
phoneNumber.value = signInfo.phoneNumber;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const openEpayPanel = () => {
|
|
116
|
+
isSendNumberOpen.value = true;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const closePanel = () => {
|
|
120
|
+
dataStore.panel.open = false;
|
|
121
|
+
dataStore.panelAction = null;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const submitForm = async () => {
|
|
125
|
+
await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
|
|
126
|
+
if (v.valid) {
|
|
127
|
+
loading.value = true;
|
|
128
|
+
switch (dataStore.panelAction) {
|
|
129
|
+
case constants.actions.pay:
|
|
130
|
+
await dataStore.sendSMS('PayUrl', phoneNumber.value, formStore.epayLink);
|
|
131
|
+
break;
|
|
132
|
+
case constants.actions.sign:
|
|
133
|
+
await dataStore.sendSMS('SignUrl', phoneNumber.value, selectedClient.value?.uri);
|
|
134
|
+
break;
|
|
135
|
+
default:
|
|
136
|
+
await handleTask();
|
|
137
|
+
}
|
|
138
|
+
loading.value = false;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const handleTask = async () => {
|
|
144
|
+
loading.value = true;
|
|
145
|
+
await dataStore.handleTask(dataStore.panelAction, route.params.taskId, actionCause.value);
|
|
146
|
+
loading.value = false;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
const buttonText = computed(() => {
|
|
150
|
+
switch (dataStore.panelAction) {
|
|
151
|
+
case constants.actions.reject:
|
|
152
|
+
case constants.actions.rejectclient:
|
|
153
|
+
return dataStore.t('buttons.rejectStatement');
|
|
154
|
+
case constants.actions.return:
|
|
155
|
+
return dataStore.t('buttons.returnStatement');
|
|
156
|
+
case constants.actions.accept:
|
|
157
|
+
return dataStore.t('buttons.approve');
|
|
158
|
+
case constants.actions.sign:
|
|
159
|
+
return dataStore.t('buttons.sign');
|
|
160
|
+
case constants.actions.pay:
|
|
161
|
+
return dataStore.t('buttons.pay');
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
watch(
|
|
166
|
+
() => dataStore.panelAction,
|
|
167
|
+
val => {
|
|
168
|
+
if (!!val) {
|
|
169
|
+
dataStore.panel.title = buttonText.value!;
|
|
170
|
+
dataStore.panel.open = true;
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
{ immediate: true },
|
|
174
|
+
);
|
|
175
|
+
const sendingActions = computed(
|
|
176
|
+
() => dataStore.panelAction === constants.actions.reject || dataStore.panelAction === constants.actions.return || dataStore.panelAction === constants.actions.rejectclient,
|
|
177
|
+
);
|
|
178
|
+
const acceptAction = computed(() => dataStore.panelAction === constants.actions.accept);
|
|
179
|
+
const signingActions = computed(() => dataStore.panelAction === constants.actions.sign);
|
|
180
|
+
const payingActions = computed(() => dataStore.panelAction === constants.actions.pay);
|
|
181
|
+
const paymentPeriod = computed(() => formStore.productConditionsForm.paymentPeriod.nameRu);
|
|
182
|
+
const insurancePremiumPerMonth = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.insurancePremiumPerMonth));
|
|
183
|
+
const requestedSumInsured = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.requestedSumInsured));
|
|
184
|
+
|
|
185
|
+
return {
|
|
186
|
+
// State
|
|
187
|
+
formStore,
|
|
188
|
+
loading,
|
|
189
|
+
actionCause,
|
|
190
|
+
vForm,
|
|
191
|
+
isSendNumberOpen,
|
|
192
|
+
phoneNumber,
|
|
193
|
+
selectedClient,
|
|
194
|
+
|
|
195
|
+
// Functions
|
|
196
|
+
closePanel,
|
|
197
|
+
submitForm,
|
|
198
|
+
handleTask,
|
|
199
|
+
openSmsPanel,
|
|
200
|
+
openEpayPanel,
|
|
201
|
+
|
|
202
|
+
// Computed
|
|
203
|
+
buttonText,
|
|
204
|
+
sendingActions,
|
|
205
|
+
signingActions,
|
|
206
|
+
payingActions,
|
|
207
|
+
acceptAction,
|
|
208
|
+
paymentPeriod,
|
|
209
|
+
insurancePremiumPerMonth,
|
|
210
|
+
requestedSumInsured,
|
|
211
|
+
};
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
</script>
|
|
215
|
+
|
|
216
|
+
<style>
|
|
217
|
+
.v-expansion-panel-title__overlay {
|
|
218
|
+
background: #ffffff;
|
|
219
|
+
}
|
|
220
|
+
.v-expansion-panel-title {
|
|
221
|
+
height: 70px !important;
|
|
222
|
+
padding: 10px 20px !important;
|
|
223
|
+
}
|
|
224
|
+
.v-expansion-panels--variant-accordion > :last-child {
|
|
225
|
+
border-top-left-radius: 0.5rem !important;
|
|
226
|
+
border-top-right-radius: 0.5rem !important;
|
|
227
|
+
border-top-left-radius: 0.5rem !important;
|
|
228
|
+
border-radius: 0.5rem !important;
|
|
229
|
+
}
|
|
230
|
+
.v-expansion-panel-text__wrapper {
|
|
231
|
+
padding: 10px 20px !important;
|
|
232
|
+
}
|
|
233
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex justify-between px-4 items-center cursor-pointer h-[60px]" :class="[$libStyles.rounded, $libStyles.blueBgLight, $libStyles.blueBgLightHover]">
|
|
3
|
+
<span :class="[$libStyles.textSimple]">{{ text }}</span>
|
|
4
|
+
<i class="mdi text-xl" :class="[selected ? `mdi-radiobox-marked ${$libStyles.greenText}` : 'mdi-radiobox-blank text-[#636363]']"></i>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
props: {
|
|
11
|
+
text: {
|
|
12
|
+
type: [String, Number],
|
|
13
|
+
},
|
|
14
|
+
selected: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
|
+
</script>
|