hl-core 0.0.9-beta.3 → 0.0.9-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.
Files changed (72) hide show
  1. package/api/base.api.ts +862 -0
  2. package/api/index.ts +2 -620
  3. package/api/interceptors.ts +58 -14
  4. package/components/Button/Btn.vue +3 -3
  5. package/components/Complex/ContentBlock.vue +1 -1
  6. package/components/Complex/MessageBlock.vue +2 -2
  7. package/components/Complex/Page.vue +8 -2
  8. package/components/Complex/WhiteBlock.vue +7 -0
  9. package/components/Dialog/Dialog.vue +60 -15
  10. package/components/Dialog/FamilyDialog.vue +5 -5
  11. package/components/Form/DynamicForm.vue +99 -0
  12. package/components/Form/FormBlock.vue +36 -29
  13. package/components/Form/FormData.vue +48 -0
  14. package/components/Form/FormSection.vue +2 -2
  15. package/components/Form/FormTextSection.vue +3 -3
  16. package/components/Form/FormToggle.vue +3 -3
  17. package/components/Form/ManagerAttachment.vue +104 -52
  18. package/components/Form/ProductConditionsBlock.vue +73 -20
  19. package/components/Input/DynamicInput.vue +23 -0
  20. package/components/Input/EmptyFormField.vue +1 -1
  21. package/components/Input/FileInput.vue +15 -4
  22. package/components/Input/Monthpicker.vue +33 -0
  23. package/components/Input/PanelInput.vue +5 -1
  24. package/components/Input/RoundedEmptyField.vue +5 -0
  25. package/components/Input/RoundedSelect.vue +13 -0
  26. package/components/Input/SwitchInput.vue +64 -0
  27. package/components/Input/TextInput.vue +161 -0
  28. package/components/Layout/Drawer.vue +17 -4
  29. package/components/Layout/Header.vue +2 -2
  30. package/components/Layout/SettingsPanel.vue +10 -15
  31. package/components/List/ListEmpty.vue +1 -1
  32. package/components/Menu/MenuHover.vue +1 -1
  33. package/components/Menu/MenuNav.vue +3 -3
  34. package/components/Menu/MenuNavItem.vue +4 -4
  35. package/components/Pages/Anketa.vue +144 -65
  36. package/components/Pages/Auth.vue +21 -10
  37. package/components/Pages/ContragentForm.vue +505 -0
  38. package/components/Pages/Documents.vue +57 -11
  39. package/components/Pages/InvoiceInfo.vue +2 -2
  40. package/components/Pages/MemberForm.vue +253 -89
  41. package/components/Pages/ProductAgreement.vue +2 -11
  42. package/components/Pages/ProductConditions.vue +777 -164
  43. package/components/Panel/PanelHandler.vue +297 -54
  44. package/components/Panel/PanelSelectItem.vue +18 -3
  45. package/components/Panel/RightPanelCloser.vue +7 -0
  46. package/components/Utilities/IconBorder.vue +17 -0
  47. package/composables/axios.ts +1 -1
  48. package/composables/classes.ts +405 -9
  49. package/composables/constants.ts +40 -0
  50. package/composables/fields.ts +203 -0
  51. package/composables/index.ts +48 -0
  52. package/composables/styles.ts +22 -10
  53. package/configs/i18n.ts +0 -2
  54. package/layouts/default.vue +46 -4
  55. package/layouts/full.vue +1 -1
  56. package/locales/ru.json +428 -11
  57. package/nuxt.config.ts +1 -1
  58. package/package.json +30 -39
  59. package/pages/500.vue +2 -2
  60. package/pages/Token.vue +1 -0
  61. package/plugins/helperFunctionsPlugins.ts +6 -7
  62. package/plugins/vuetifyPlugin.ts +2 -0
  63. package/store/data.store.ts +936 -217
  64. package/store/extractStore.ts +17 -0
  65. package/store/form.store.ts +13 -1
  66. package/store/member.store.ts +1 -1
  67. package/store/rules.ts +38 -2
  68. package/types/enum.ts +8 -0
  69. package/types/form.ts +94 -0
  70. package/types/index.ts +162 -10
  71. package/components/Button/BtnIcon.vue +0 -47
  72. package/locales/kz.json +0 -590
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <base-fade-transition>
3
- <section v-if="firstQuestionList && firstQuestionList.length && !firstPanel && !secondPanel" class="flex flex-col">
4
- <section :class="[$libStyles.blueBgLight, $libStyles.rounded]" class="mx-[10px] my-[14px] p-4 flex flex-col gap-4">
3
+ <section v-if="firstQuestionList && firstQuestionList.length && !firstPanel && !secondPanel" class="flex flex-col shrink grow max-h-[90vh]">
4
+ <section :class="[$styles.blueBgLight, $styles.rounded]" class="mx-[10px] my-[14px] p-4 flex flex-col gap-4">
5
5
  <base-form-toggle
6
6
  v-model="answerToAll"
7
7
  :title="$dataStore.t('questionnaireType.answerAllNo')"
@@ -10,10 +10,10 @@
10
10
  @clicked="handleToggler"
11
11
  />
12
12
  </section>
13
- <v-form ref="vForm" class="max-h-[70vh] overflow-y-scroll" @submit="submitForm">
13
+ <v-form ref="vForm" class="grow shrink overflow-y-scroll" @submit="submitForm">
14
14
  <section
15
15
  v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'N').length"
16
- :class="[$libStyles.blueBgLight, $libStyles.rounded]"
16
+ :class="[$styles.blueBgLight, $styles.rounded]"
17
17
  class="mx-[10px] p-4 flex flex-col gap-4"
18
18
  >
19
19
  <base-form-input
@@ -28,35 +28,35 @@
28
28
  </section>
29
29
  <section
30
30
  v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'Y').length"
31
- :class="[$libStyles.blueBgLight, $libStyles.rounded]"
31
+ :class="[$styles.blueBgLight, $styles.rounded]"
32
32
  class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
33
33
  >
34
34
  <base-form-text-section v-for="(question, index) in firstQuestionList.filter(i => i.first.definedAnswers === 'Y')" :key="index">
35
35
  <base-fade-transition>
36
36
  <div
37
- v-if="question.first.answerName === 'Да' && secondQuestionList"
38
- :class="[$libStyles.greenBg, $libStyles.whiteText, $libStyles.textSimple]"
37
+ v-if="question.first.answerName === 'Да' && question.second"
38
+ :class="[$styles.greenBg, $styles.whiteText, $styles.textSimple]"
39
39
  class="rounded-t-lg pl-6 py-1 cursor-pointer"
40
40
  @click="openFirstPanel(question)"
41
41
  >
42
- {{ $dataStore.t('questionnaireType.pleaseAnswer', { text: secondQuestionList.length }) }}
42
+ {{ $dataStore.t('questionnaireType.pleaseAnswer', { text: question.second.length }) }}
43
43
  </div>
44
44
  </base-fade-transition>
45
- <span :class="[$libStyles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between">
45
+ <span :class="[$styles.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
48
  <i
49
- v-if="question.first.answerName === 'Да' && secondQuestionList && secondQuestionList.length"
49
+ v-if="question.first.answerName === 'Да' && question.second && question.second.length"
50
50
  class="mdi mdi-chevron-right text-2xl cursor-pointer"
51
51
  @click="openFirstPanel(question)"
52
52
  ></i>
53
53
  </base-fade-transition>
54
54
  </span>
55
- <div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$libStyles.textSimple]">
55
+ <div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$styles.textSimple]">
56
56
  <v-radio-group
57
57
  v-model="question.first.answerName"
58
58
  class="anketa-radio"
59
- :true-icon="`mdi-radiobox-marked ${$libStyles.greenText}`"
59
+ :true-icon="`mdi-radiobox-marked ${$styles.greenText}`"
60
60
  false-icon="mdi-radiobox-blank text-[#636363]"
61
61
  :rules="$rules.required"
62
62
  :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
@@ -68,49 +68,88 @@
68
68
  </div>
69
69
  </base-form-text-section>
70
70
  </section>
71
+ <section
72
+ v-if="firstQuestionList.filter(i => i.first.definedAnswers === 'D').length"
73
+ :class="[$styles.blueBgLight, $styles.rounded]"
74
+ class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
75
+ >
76
+ <base-form-text-section v-for="(question, index) in firstQuestionList.filter(i => i.first.definedAnswers === 'D')" :key="index">
77
+ <span :class="[$styles.textTitle]" class="border-b-[1px] border-b-[#F3F6FC] p-6 flex items-center justify-between"> {{ question.first.name }} </span>
78
+ <div class="flex items-center justify-start gap-5 px-4 pt-4" :class="[$styles.textSimple]">
79
+ <v-radio-group
80
+ v-model="question.first.answerName"
81
+ class="anketa-radio"
82
+ :true-icon="`mdi-radiobox-marked ${$styles.greenText}`"
83
+ false-icon="mdi-radiobox-blank text-[#636363]"
84
+ :rules="$rules.required"
85
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
86
+ inline
87
+ >
88
+ <v-radio label="Да" value="Да" />
89
+ <v-radio label="Нет" value="Нет" />
90
+ </v-radio-group>
91
+ </div>
92
+ <base-fade-transition>
93
+ <div v-if="question.first.answerName === 'Да'" :class="[$styles.whiteText, $styles.textSimple]">
94
+ <base-form-input
95
+ v-model="question.first.answerText"
96
+ :label="$dataStore.t('labels.inDetails')"
97
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
98
+ :rules="$rules.required"
99
+ />
100
+ </div>
101
+ </base-fade-transition>
102
+ </base-form-text-section>
103
+ </section>
71
104
  </v-form>
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
- />
105
+ <div class="px-[14px]">
106
+ <base-btn
107
+ class="my-[14px] self-center"
108
+ :loading="isButtonLoading"
109
+ :disabled="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
110
+ @click="submitForm"
111
+ :text="$dataStore.t('buttons.save')"
112
+ />
113
+ </div>
79
114
  </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
- "
115
+ <base-btn
116
+ v-if="currentQuestion && currentQuestion.second && currentQuestion.second.length && firstPanel"
117
+ class="!absolute z-10 my-[14px] self-center w-[96%] bottom-[-40px]"
118
+ :text="$dataStore.t('buttons.save')"
119
+ @click="submitSecondaryForm"
88
120
  />
89
- <section
90
- ref="firstPanelSection"
91
- v-if="secondQuestionList && secondQuestionList.length && firstPanel"
92
- class="flex flex-col px-[10px] pb-[14px]"
93
- :class="[$libStyles.scrollPage]"
94
- >
95
- <section v-if="currentQuestion" :class="[$libStyles.blueBgLight, $libStyles.rounded]" class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4">
121
+ <section ref="firstPanelSection" v-if="currentQuestion && currentQuestion.second && firstPanel" class="flex flex-col px-[10px] pb-[14px]" :class="[$styles.scrollPage]">
122
+ <v-form
123
+ v-if="currentQuestion"
124
+ :class="[$styles.blueBgLight, $styles.rounded]"
125
+ class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4"
126
+ ref="vSecondaryForm"
127
+ @submit="submitSecondaryForm"
128
+ >
96
129
  <base-form-text-section v-for="question in currentQuestion.second" :title="question.name" :key="question.name">
97
130
  <base-form-input
98
131
  v-if="question.definedAnswers === 'N'"
99
132
  v-model="question.answerText"
100
133
  class="border-t-[1px] border-t-[#F3F6FC]"
101
- placeholder="Введите текст"
134
+ :placeholder="$dataStore.t('labels.inputText')"
102
135
  :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
136
+ :rules="isSecondRequired ? $rules.required : []"
103
137
  />
104
- <span v-else class="flex items-center justify-between p-4 cursor-pointer" :class="[$libStyles.textTitle, $libStyles.greenText]" @click="openSecondPanel(question)">
105
- {{ question.answerName ? question.answerName : 'Выбрать вариант ответа' }}
106
- <i class="mdi mdi-chevron-right text-[28px]"></i>
107
- </span>
138
+ <base-panel-input
139
+ v-else
140
+ :class="[$styles.textTitle, $styles.greenText]"
141
+ :value="question.answerName ? question.answerName : 'Выбрать вариант ответа'"
142
+ :readonly="formStore.isDisabled[whichSurvey] || !$dataStore.isTask()"
143
+ :clearable="false"
144
+ :error-messages="isSecondRequired ? (question.answerName ? [] : ['Выбрать вариант ответа']) : []"
145
+ @click="openSecondPanel(question)"
146
+ ></base-panel-input>
108
147
  </base-form-text-section>
109
- </section>
148
+ </v-form>
110
149
  </section>
111
150
  </base-fade-transition>
112
- <Teleport v-if="secondPanel" to="#panel-actions">
113
- <div :class="[$libStyles.scrollPage]" class="flex flex-col items-center">
151
+ <Teleport v-if="secondPanel" to="#right-panel-actions">
152
+ <div :class="[$styles.scrollPage]" class="flex flex-col items-center">
114
153
  <base-rounded-input v-model="searchQuery" :label="$dataStore.t('labels.search')" class="w-full p-2" :hide-details="true" />
115
154
  <div v-if="$dataStore.questionRefs && $dataStore.questionRefs.length && isPanelLoading === false" class="w-full flex flex-col gap-2 p-2">
116
155
  <base-panel-select-item
@@ -124,7 +163,7 @@
124
163
  <base-loader v-if="isPanelLoading" class="absolute mt-10" :size="50" />
125
164
  </div>
126
165
  </Teleport>
127
- <base-scroll-buttons @up="scrollForm('up')" @down="scrollForm('down')" />
166
+ <base-scroll-buttons v-if="firstQuestionList && firstQuestionList.length" @up="scrollForm('up')" @down="scrollForm('down')" />
128
167
  </template>
129
168
 
130
169
  <script lang="ts">
@@ -137,6 +176,7 @@ export default defineComponent({
137
176
  const formStore = useFormStore();
138
177
  const dataStore = useDataStore();
139
178
  const vForm = ref<any>();
179
+ const vSecondaryForm = ref<any>();
140
180
  const firstPanelSection = ref<any>();
141
181
  const isButtonLoading = ref<boolean>(false);
142
182
  const answerToAll = ref<boolean>(false);
@@ -153,13 +193,13 @@ export default defineComponent({
153
193
  : 'surveyByCriticalBasePolicyholder',
154
194
  );
155
195
  const firstQuestionList = ref<AnketaBody[]>([]);
156
- const secondQuestionList = ref<AnketaSecond[]>([]);
157
196
  const currentQuestion = ref<AnketaBody>();
158
197
  const currentSecond = ref<AnketaSecond>();
159
198
  const isPanelLoading = ref<boolean>(false);
160
199
  const searchQuery = ref<string>('');
161
200
 
162
201
  const whichMember = computed(() => ('member' in route.query && !!route.query.member ? (route.query.member as 'insured' | 'policyholder') : 'insured'));
202
+ const isSecondRequired = computed(() => dataStore.controls.isSecondAnketaRequired);
163
203
  const scrollForm = (direction: 'up' | 'down') => {
164
204
  const scrollObject = { top: direction === 'up' ? 0 : screen.height * 10, behavior: 'smooth' };
165
205
  if (firstPanel.value) {
@@ -173,11 +213,28 @@ export default defineComponent({
173
213
  await vForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
174
214
  if (v.valid) {
175
215
  isButtonLoading.value = true;
176
- formStore[whichSurvey.value]!.body.forEach((survey: AnketaBody) => {
177
- if (survey.first.answerText === 'Нет') {
178
- survey.second = [];
179
- }
180
- });
216
+ const isValid = dataStore.validateAnketa(whichSurvey.value);
217
+ if (!isValid) {
218
+ isButtonLoading.value = false;
219
+ return false;
220
+ }
221
+ if (formStore[whichSurvey.value] && formStore[whichSurvey.value]?.body) {
222
+ formStore[whichSurvey.value]?.body.forEach(question => {
223
+ if (question.first.definedAnswers === 'Y' && question.first.answerName?.match(new RegExp('Нет', 'i')) && question.second && question.second.length) {
224
+ question.second.forEach(second => {
225
+ if (second.definedAnswers === 'N') {
226
+ second.answerText = null;
227
+ } else {
228
+ second.answerId = null;
229
+ second.answerName = null;
230
+ }
231
+ });
232
+ }
233
+ if (question.first.definedAnswers === 'D' && question.first.answerName?.match(new RegExp('Нет', 'i')) && question.first.answerText) {
234
+ question.first.answerText = null;
235
+ }
236
+ });
237
+ }
181
238
  formStore[whichSurvey.value]!.type = surveyType.value;
182
239
  const anketaToken = await dataStore.setSurvey(formStore[whichSurvey.value]!);
183
240
  if (typeof anketaToken === 'string') {
@@ -206,13 +263,36 @@ export default defineComponent({
206
263
  });
207
264
  };
208
265
 
209
- const openFirstPanel = async (question: AnketaBody) => {
210
- currentQuestion.value = question;
211
- formStore[whichSurvey.value]!.body.forEach((question_object: AnketaBody) => {
212
- if ((question_object.first.id === question.first.id && question_object.second && !question_object.second.length) || question_object.second == null) {
213
- question_object.second = JSON.parse(JSON.stringify(formStore[surveyType.value === 'health' ? 'surveyByHealthSecond' : 'surveyByCriticalSecond']));
266
+ const submitSecondaryForm = async () => {
267
+ await vSecondaryForm.value.validate().then(async (v: { valid: Boolean; errors: any }) => {
268
+ if (v.valid) {
269
+ if (isSecondRequired.value && currentQuestion.value && currentQuestion.value.second) {
270
+ const hasError = currentQuestion.value.second.find(second => (second.definedAnswers === 'N' ? !second.answerText : !second.answerName));
271
+ if (hasError) {
272
+ dataStore.showToaster('error', dataStore.t('toaster.emptySecondAnketa', { text: hasError.name }), 5000);
273
+ return false;
274
+ }
275
+ }
276
+ firstPanel.value = false;
277
+ secondPanel.value = false;
278
+ } else {
279
+ const errors = document.querySelector('.v-input--error');
280
+ if (errors) {
281
+ const errorText = errors.parentElement?.children[0].innerHTML;
282
+ if (errorText) {
283
+ dataStore.showToaster('error', dataStore.t('toaster.errorFormField', { text: errorText?.replace(/[-<>!//.]/g, '') }));
284
+ }
285
+ errors.scrollIntoView({
286
+ behavior: 'smooth',
287
+ block: 'center',
288
+ inline: 'nearest',
289
+ });
290
+ }
214
291
  }
215
292
  });
293
+ };
294
+ const openFirstPanel = async (question: AnketaBody) => {
295
+ currentQuestion.value = question;
216
296
  firstPanel.value = true;
217
297
  secondPanel.value = false;
218
298
  };
@@ -224,8 +304,8 @@ export default defineComponent({
224
304
  await dataStore.getQuestionRefs(question.id);
225
305
  secondPanel.value = true;
226
306
  dataStore.panelAction = null;
227
- dataStore.panel.open = true;
228
- dataStore.panel.title = question.name;
307
+ dataStore.rightPanel.open = true;
308
+ dataStore.rightPanel.title = question.name;
229
309
  isPanelLoading.value = false;
230
310
  };
231
311
 
@@ -236,12 +316,11 @@ export default defineComponent({
236
316
  }
237
317
  secondPanel.value = false;
238
318
  dataStore.panelAction = null;
239
- dataStore.panel.open = false;
319
+ dataStore.rightPanel.open = false;
240
320
  dataStore.questionRefs = [];
241
321
  };
242
322
 
243
323
  const getDefinedAnswerId = async (id: string, value: any, index: number) => {
244
- // @ts-ignore
245
324
  await dataStore.definedAnswers(id, whichSurvey.value, value, index);
246
325
  };
247
326
 
@@ -277,18 +356,16 @@ export default defineComponent({
277
356
  formStore.applicationData.processInstanceId,
278
357
  whichMember.value === 'insured' ? formStore.applicationData.insuredApp[0].id : formStore.applicationData.clientApp.id,
279
358
  whichSurvey.value,
280
- surveyType.value === 'health' ? 'surveyByHealthSecond' : 'surveyByCriticalSecond',
281
359
  whichMember.value,
282
360
  );
283
361
  firstQuestionList.value = formStore[whichSurvey.value]!.body;
284
- secondQuestionList.value = formStore[surveyType.value === 'health' ? 'surveyByHealthSecond' : 'surveyByCriticalSecond']!;
285
362
  formStore[whichSurvey.value]!.type = surveyType.value;
286
363
  const negativeAnswer = firstQuestionList.value.every(i => i.first.answerName === 'Нет');
287
364
  if (negativeAnswer) {
288
365
  answerToAll.value = true;
289
366
  }
290
367
  await Promise.allSettled(
291
- firstQuestionList.value.map(async (question: any) => {
368
+ firstQuestionList.value.map(async question => {
292
369
  await dataStore.definedAnswers(question.first.id, whichSurvey.value);
293
370
  }),
294
371
  );
@@ -299,9 +376,9 @@ export default defineComponent({
299
376
  });
300
377
 
301
378
  watch(
302
- () => dataStore.panel.open,
379
+ () => dataStore.rightPanel.open,
303
380
  () => {
304
- if (dataStore.panel.open === false) {
381
+ if (dataStore.rightPanel.open === false) {
305
382
  secondPanel.value = false;
306
383
  dataStore.panelAction = null;
307
384
  }
@@ -313,7 +390,7 @@ export default defineComponent({
313
390
  () => firstQuestionList.value,
314
391
  value => {
315
392
  if (value) {
316
- const hasPositiveAnswer = value.some(i => i.first.definedAnswers === 'Y' && i.first.answerName !== 'Нет');
393
+ const hasPositiveAnswer = value.some(i => (i.first.definedAnswers === 'Y' || i.first.definedAnswers === 'D') && i.first.answerName !== 'Нет');
317
394
  answerToAll.value = !hasPositiveAnswer;
318
395
  }
319
396
  },
@@ -325,10 +402,10 @@ export default defineComponent({
325
402
  return {
326
403
  // State
327
404
  vForm,
405
+ vSecondaryForm,
328
406
  formStore,
329
407
  answerToAll,
330
408
  firstQuestionList,
331
- secondQuestionList,
332
409
  whichSurvey,
333
410
  isButtonLoading,
334
411
  firstPanel,
@@ -338,9 +415,11 @@ export default defineComponent({
338
415
  isPanelLoading,
339
416
  searchQuery,
340
417
  firstPanelSection,
418
+ isSecondRequired,
341
419
 
342
420
  // Functions
343
421
  submitForm,
422
+ submitSecondaryForm,
344
423
  getDefinedAnswerId,
345
424
  scrollForm,
346
425
  handleToggler,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <section class="flex h-full" :class="$libStyles.blueBgLight">
2
+ <section class="flex h-full" :class="$styles.blueBgLight">
3
3
  <!-- @vue-ignore -->
4
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
5
  <img draggable="false" class="w-[50%] mt-8" src="~/assets/auth-logo.svg" />
@@ -21,10 +21,18 @@
21
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
22
  <div class="flex flex-col items-center mb-8 text-center">
23
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>
24
+ <span :class="[$styles.greyTextDark]" class="text-[16px]">{{ $dataStore.t('labels.needAuth') }}</span>
25
25
  </div>
26
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" />
27
+ <base-rounded-input
28
+ class="mb-1"
29
+ v-model.trim="login"
30
+ :rules="$rules.required"
31
+ :loading="authLoading"
32
+ :placeholder="$dataStore.t('buttons.userLogin')"
33
+ type="text"
34
+ @keyup.enter="submitAuthForm"
35
+ />
28
36
  <base-rounded-input
29
37
  class="mb-1"
30
38
  v-model.trim="password"
@@ -34,20 +42,21 @@
34
42
  :append-inner-icon="showPassword ? 'mdi-eye-outline' : 'mdi-eye-off-outline'"
35
43
  @append="showPassword = !showPassword"
36
44
  :type="showPassword ? ('' as InputTypes) : 'password'"
45
+ @keyup.enter="submitAuthForm"
37
46
  />
38
- <span v-if="$dataStore.isLKA" class="inline-block w-full text-end mb-4" :class="[$libStyles.textSimple, $libStyles.greyTextDark]" @click="isLogin = false">{{
47
+ <span v-if="$dataStore.isLKA" class="inline-block w-full text-end mb-4" :class="[$styles.textSimple, $styles.greyTextDark]" @click="isLogin = false">{{
39
48
  $dataStore.t('labels.resetPassword')
40
49
  }}</span>
41
- <base-btn :text="$dataStore.t('buttons.login')" :disabled="authLoading" :btn="$libStyles.greenBtn" @click="submitAuthForm" />
50
+ <base-btn :text="$dataStore.t('buttons.login')" :disabled="authLoading" :btn="$styles.greenBtn" @click="submitAuthForm" />
42
51
  </v-form>
43
52
  </section>
44
53
  <section v-if="isLogin === false" class="w-full lg:w-3/4 flex flex-col justify-center items-center">
45
54
  <div class="flex flex-col items-center mb-4">
46
55
  <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>
56
+ <span :class="[$styles.greyTextDark]" class="text-[16px]">{{ $dataStore.t('labels.resetType') }}</span>
48
57
  </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]">
58
+ <div class="p-[2px] mb-8 rounded-[12px] border-[1px] w-2/3 lg:w-[25vw]" :class="[$styles.whiteBg]">
59
+ <v-tabs v-model="resetPasswordType" density="compact" slider-color="#009c73" class="w-full base-reset-password rounded-[12px]" :class="[$styles.whiteBg]">
51
60
  <v-tab :ripple="false" value="phone"> {{ $dataStore.t('form.phoneNumber') }} </v-tab>
52
61
  <v-tab :ripple="false" value="email"> {{ $dataStore.t('form.email') }} </v-tab>
53
62
  </v-tabs>
@@ -61,6 +70,7 @@
61
70
  :loading="authLoading"
62
71
  :placeholder="$dataStore.t('form.phoneNumber')"
63
72
  type="text"
73
+ @keyup.enter="submitAuthForm"
64
74
  />
65
75
  <base-rounded-input
66
76
  v-if="resetPasswordType === 'email'"
@@ -69,9 +79,10 @@
69
79
  :loading="authLoading"
70
80
  :placeholder="$dataStore.t('form.email')"
71
81
  type="text"
82
+ @keyup.enter="submitAuthForm"
72
83
  />
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" />
84
+ <span class="inline-block w-full text-end mb-4" :class="[$styles.textSimple, $styles.greyTextDark]" @click="isLogin = true">{{ $dataStore.t('buttons.login') }}</span>
85
+ <base-btn :text="$dataStore.t('buttons.reset')" :disabled="authLoading" :btn="$styles.greenBtn" @click="submitAuthForm" />
75
86
  </v-form>
76
87
  </section>
77
88
  </section>