hl-core 0.0.10-beta.16 → 0.0.10-beta.18

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/base.api.ts CHANGED
@@ -999,12 +999,13 @@ export class ApiClass {
999
999
  });
1000
1000
  }
1001
1001
 
1002
- async checkOsns(bin: string) {
1002
+ async checkOsns(bin: string, date: string) {
1003
1003
  return await this.axiosCall<boolean>({
1004
1004
  method: Methods.GET,
1005
1005
  url: `/${this.productUrl}/api/Application/CheckOSNS`,
1006
1006
  params: {
1007
1007
  bin,
1008
+ date,
1008
1009
  },
1009
1010
  });
1010
1011
  }
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <v-otp-input v-model="modelValue" class="base-otp-input" base-color="#A0B3D8" color="#FFF" />
3
+ </template>
4
+
5
+ <script setup lang="ts">
6
+ const modelValue = defineModel<string>();
7
+ </script>
8
+
9
+ <style>
10
+ .base-otp-input .v-otp-input__field {
11
+ font-size: 16px;
12
+ }
13
+ .base-otp-input .v-field {
14
+ width: 50px;
15
+ height: 60px;
16
+ border-radius: 8px;
17
+ }
18
+ .base-otp-input .v-otp-input__content {
19
+ gap: 24px;
20
+ }
21
+ .base-otp-input .v-otp-input__divider {
22
+ margin: 0 4px;
23
+ color: #b8b8b8;
24
+ }
25
+ </style>
@@ -702,18 +702,16 @@
702
702
  </Teleport>
703
703
  <Teleport v-if="isOtpPanelOpen && !member.hasAgreement" to="#right-panel-actions">
704
704
  <div :class="[$styles.flexColNav]">
705
- <base-fade-transition>
706
- <base-rounded-input
707
- v-if="otpCondition && member.otpTokenId"
708
- v-model="member.otpCode"
709
- :label="$dataStore.t('form.otpCode')"
710
- :maska="$maska.otp"
711
- :append-inner-icon="hasOtp ? 'mdi-cellphone-message text-[17px]' : ''"
712
- hide-details
713
- @keyup.enter.prevent="hasOtp ? checkOtp() : null"
714
- @input="onOtpCodeInput"
715
- />
716
- </base-fade-transition>
705
+ <base-animation>
706
+ <div v-if="otpCondition && member.otpTokenId" class="flex flex-col">
707
+ <base-form-section class="mt-0 py-2">
708
+ <base-otp-input v-model="member.otpCode" :length="4" @keyup.enter.prevent="hasOtp && checkOtp()" @input="onOtpCodeInput" />
709
+ </base-form-section>
710
+ <span class="text-center cursor-pointer mt-2" :class="[$styles.mutedText]" @click="sendOtp(false)"
711
+ >Не получили код? <span class="underline underline-offset-2">Отправить код заново</span></span
712
+ >
713
+ </div>
714
+ </base-animation>
717
715
  <base-btn v-if="!member.otpTokenId" :disabled="otpSending" :loading="otpSending" :text="$dataStore.t('buttons.sendOtp')" @click="sendOtp(false)" />
718
716
  <base-btn v-if="member.otpTokenId" :disabled="otpSending" :loading="otpSending" :text="$dataStore.t('buttons.check')" @click="checkOtp()" />
719
717
  </div>
@@ -721,12 +719,12 @@
721
719
  <Teleport v-if="isPositionPanelOpen" to="#right-panel-actions">
722
720
  <div :class="[$styles.scrollPage]" class="flex flex-col items-center">
723
721
  <base-rounded-input
724
- v-model="searchQuery"
725
- :label="$dataStore.t('labels.search')"
722
+ v-model.trim="searchQuery"
723
+ label="Выполните поиск должностей"
726
724
  class="w-full p-2"
727
725
  :hide-details="searchQuery.length >= 4"
728
- :rules="[searchQuery.length < 4 ? $dataStore.t('rules.searchQueryLen', { len: '4' }) : true]"
729
- :append-inner-icon="searchQuery.length < 4 ? '' : 'mdi mdi-magnify'"
726
+ :rules="[searchQuery.length < 4 ? $dataStore.t('rules.searchQueryLen') : true]"
727
+ append-inner-icon="mdi mdi-magnify"
730
728
  @append="searchPositions"
731
729
  />
732
730
  <base-animation>
@@ -973,7 +971,7 @@ export default {
973
971
  (whichForm.value === formStore.beneficiaryFormKey && member.value.iin !== formStore.policyholderForm.iin) ||
974
972
  (dataStore.isLifetrip && whichForm.value === formStore.insuredFormKey && member.value.isInsuredUnderage),
975
973
  );
976
- const hasWorkPositionDict = !useEnv().isProduction && dataStore.isBaiterek && dataStore.isEfoParent;
974
+ const hasWorkPositionDict = dataStore.isBaiterek && dataStore.isEfoParent;
977
975
 
978
976
  const birthDateRule = computed(() => {
979
977
  const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
@@ -1085,6 +1083,10 @@ export default {
1085
1083
  };
1086
1084
 
1087
1085
  const searchPositions = async () => {
1086
+ if (searchQuery.value.length < 4) {
1087
+ dataStore.showToaster('error', dataStore.t('rules.searchQueryLen'));
1088
+ return;
1089
+ }
1088
1090
  if (!isDisabled.value) {
1089
1091
  isPanelLoading.value = true;
1090
1092
  positionsList.value = await dataStore.getWorkPosition(searchQuery.value);
@@ -1123,6 +1125,7 @@ export default {
1123
1125
  isPositionPanelOpen.value = false;
1124
1126
  }
1125
1127
  if (type === 'workPosition') {
1128
+ dataStore.rightPanel.title = dataStore.t('form.jobPosition');
1126
1129
  isPositionPanelOpen.value = true;
1127
1130
  isOtpPanelOpen.value = false;
1128
1131
  isDocumentOpen.value = false;
@@ -1445,7 +1445,7 @@ export default defineComponent({
1445
1445
  if (calculatorForm.type.code === 'Single' && calculatorForm.startDate && calculatorForm.endDate) {
1446
1446
  const formattedStartDate = formatDate(calculatorForm.startDate);
1447
1447
  const formattedEndDate = formatDate(calculatorForm.endDate);
1448
- if (formattedStartDate && formattedEndDate && formattedStartDate.getTime() > formattedEndDate.getTime()) {
1448
+ if (formattedStartDate && formattedEndDate && formattedStartDate.getTime() >= formattedEndDate.getTime()) {
1449
1449
  return dataStore.showToaster('error', dataStore.t('toaster.startMoreEnd'));
1450
1450
  }
1451
1451
  }
@@ -474,7 +474,7 @@ export class Member extends Person {
474
474
  parsedDocument: any;
475
475
  hasAgreement: boolean | null;
476
476
  otpTokenId: string | null;
477
- otpCode: string | null;
477
+ otpCode: string;
478
478
  documentsList: Types.ContragentDocuments[];
479
479
  isInsuredUnderage?: boolean = false;
480
480
  bankInfo: BankInfoClass;
@@ -605,7 +605,7 @@ export class Member extends Person {
605
605
  this.homePhone = homePhone;
606
606
  this.email = email;
607
607
  this.otpTokenId = null;
608
- this.otpCode = null;
608
+ this.otpCode = '';
609
609
  this.address = address;
610
610
  this.familyStatus = familyStatus;
611
611
  this.isTerror = isTerror;
@@ -3,7 +3,7 @@ import { jwtDecode as jwt_decode } from 'jwt-decode';
3
3
  import { XMLParser } from 'fast-xml-parser';
4
4
  import { AxiosError } from 'axios';
5
5
  import { DocumentReaderApi, Scenario, TextFieldType, LCID } from '@regulaforensics/document-reader-webclient';
6
- import { PolicyholderClass } from '../composables/classes';
6
+ import { PolicyholderClass, Value } from '../composables/classes';
7
7
  import type { EnvModes, NestedKeyOf, ResponseStructure, Utils } from '../types';
8
8
 
9
9
  export const useEnv = () => {
@@ -17,7 +17,7 @@ export const useEnv = () => {
17
17
 
18
18
  export class Masks {
19
19
  numbers: string = '#*';
20
- otp: string = '# # # #';
20
+ otp: string = '####';
21
21
  spacedNumbers: string = '### ### ### ### ### ### ###';
22
22
  iin: string = '###-###-###-###';
23
23
  phone: string = '+7 (7##) ### ## ##';
@@ -275,6 +275,7 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
275
275
  if (beneficiary.id === 0) {
276
276
  beneficiary.registrationCity = new Value();
277
277
  beneficiary.registrationCountry = new Value();
278
+ beneficiary.birthPlace = new Value();
278
279
  beneficiary.registrationMicroDistrict = '';
279
280
  beneficiary.registrationNumberApartment = '';
280
281
  beneficiary.registrationNumberApartment = '';
@@ -297,6 +298,13 @@ export const setAddressBeneficiary = (whichIndex: number, sameAddress: boolean)
297
298
  const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
298
299
  beneficiary.registrationCity = city ?? new Value();
299
300
  }
301
+ const contragentData = beneficiary.response.contragent;
302
+ if (contragentData) {
303
+ const country = dataStore.countries.find((i: Value) => i.nameRu?.match(new RegExp(contragentData.birthPlace, 'i')));
304
+ beneficiary.birthPlace = country ?? new Value();
305
+ } else {
306
+ beneficiary.birthPlace = new Value();
307
+ }
300
308
  const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
301
309
  const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
302
310
  const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
@@ -334,6 +342,7 @@ export const setAddressInsured = (whichIndex: number, sameAddress: boolean) => {
334
342
  if (insured.id === 0) {
335
343
  insured.registrationCity = new Value();
336
344
  insured.registrationCountry = new Value();
345
+ insured.birthPlace = new Value();
337
346
  insured.registrationMicroDistrict = '';
338
347
  insured.registrationNumberApartment = '';
339
348
  insured.registrationNumberApartment = '';
@@ -356,6 +365,13 @@ export const setAddressInsured = (whichIndex: number, sameAddress: boolean) => {
356
365
  const city = dataStore.cities.find(i => i.nameRu === cityName.replace('г.', ''));
357
366
  insured.registrationCity = city ?? new Value();
358
367
  }
368
+ const contragentData = insured.response.contragent;
369
+ if (contragentData) {
370
+ const country = dataStore.countries.find((i: Value) => i.nameRu?.match(new RegExp(contragentData.birthPlace, 'i')));
371
+ insured.birthPlace = country ?? new Value();
372
+ } else {
373
+ insured.birthPlace = new Value();
374
+ }
359
375
  const province = dataStore.states.find(i => i.ids === benAddress[0].stateCode);
360
376
  const localityType = dataStore.localityTypes.find(i => i.nameRu === benAddress[0].cityTypeName);
361
377
  const region = dataStore.regions.find(i => i.ids == benAddress[0].regionCode);
@@ -15,24 +15,13 @@ export class Styles {
15
15
  blueTextLight: string = 'text-[#F3F6FC]';
16
16
 
17
17
  // Green
18
- greenBg: string =
19
- import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
20
- ? 'bg-[#DEBE8C]'
21
- : 'bg-[#009C73]';
22
- greenBgHover: string =
23
- import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
24
- ? 'bg-[#C19B5F]'
25
- : 'hover:bg-[#00a277]';
26
- greenBgLight: string =
27
- import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
28
- ? 'bg-[#e8d2af]'
29
- : 'bg-[#EAF6EF]';
18
+ greenBg: string = String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#DEBE8C]' : 'bg-[#009C73]';
19
+ greenBgHover: string = String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#C19B5F]' : 'hover:bg-[#00a277]';
20
+ greenBgLight: string = String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'bg-[#e8d2af]' : 'bg-[#EAF6EF]';
30
21
  greenText: string = '!text-[#009C73]';
31
22
  greenTextHover: string = 'hover:text-[#009C73]';
32
23
  greenBgLightHover: string =
33
- import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
34
- ? 'hover:bg-[#efdfc6]'
35
- : 'hover:bg-[#dbf0e4]';
24
+ String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' ? 'hover:bg-[#efdfc6]' : 'hover:bg-[#dbf0e4]';
36
25
 
37
26
  // Yellow
38
27
  yellowText: string = '!text-[#FAB31C]';
@@ -65,7 +54,7 @@ export class Styles {
65
54
  blueBorder: string = 'border-[1px] border-[#A0B3D8]';
66
55
  blueLightBorder: string = 'border-[1px] border-[#F3F6FC]';
67
56
  greenBorder: string =
68
- import.meta.env.VITE_PRODUCT === 'auletti' || import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'lka-auletti'
57
+ String(import.meta.env.VITE_PRODUCT).includes('auletti') || import.meta.env.VITE_PARENT_PRODUCT === 'auletti'
69
58
  ? 'border-[1px] border-[#DEBE8C]'
70
59
  : 'border-[1px] border-[#009C73]';
71
60
  redBorder: string = 'border-[1px] border-[#FD2D39]';
package/locales/ru.json CHANGED
@@ -119,7 +119,7 @@
119
119
  "courseChanged": "Изменился курс НБ РК, необходимо вернуть на доработку и сделать перерасчет",
120
120
  "noAmountBeforeTypeAndCountries": "Страховая сумма вычисляется после выбора полей типа поездки и страны поездки",
121
121
  "noMaxDaysBeforePeriod": "Количество дней пребывания вычисляется после выбора поля периода",
122
- "startMoreEnd": "Дата начала не должна превышать дату окончания поездки",
122
+ "startMoreEnd": "Дата начала не должна равняться или превышать дату окончания поездки",
123
123
  "passportNotFound": "Паспорт не найден",
124
124
  "wrongInn": "Неправильный ИНН",
125
125
  "underageShouldBeLess18": "Несовершеннолетний не может быть старше 18 лет",
@@ -863,7 +863,7 @@
863
863
  "agentCommission": "Агентская комиссия не должно превышать 50",
864
864
  "agePrePensionInsured": "Пороговое значение по возрасту с 55 по 63",
865
865
  "checkDate": "Укажите корректную дату",
866
- "searchQueryLen": "Поиск должности должен осуществляться по запросу не менее чем из {len} символов",
866
+ "searchQueryLen": "Поиск должности должен осуществляться по запросу не менее чем из 4 символов",
867
867
  "fixInsSumLimit": "Фиксированная сумма не должна превышать {sum}тг"
868
868
  },
869
869
  "code": "КСЭ",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.16",
3
+ "version": "0.0.10-beta.18",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
package/plugins/head.ts CHANGED
@@ -5,7 +5,7 @@ export default defineNuxtPlugin(() => {
5
5
  {
6
6
  rel: 'icon',
7
7
  type: 'image/x-icon',
8
- href: import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || import.meta.env.VITE_PRODUCT === 'auletti' ? '/logo-auletti.svg' : '/logo.svg',
8
+ href: import.meta.env.VITE_PARENT_PRODUCT === 'auletti' || String(import.meta.env.VITE_PRODUCT).includes('auletti') ? '/logo-auletti.svg' : '/logo.svg',
9
9
  },
10
10
  { rel: 'preconnect', href: 'https://fonts.googleapis.com' },
11
11
  { rel: 'preconnect', href: 'https://fonts.gstatic.com' },
@@ -3938,7 +3938,7 @@ export const useDataStore = defineStore('data', {
3938
3938
  const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn();
3939
3939
  return {
3940
3940
  invoiceInfo: this.isAdmin(),
3941
- toLKA: this.isAgent() || baseAccessRoles,
3941
+ toLKA: this.isAgent() || this.isManagerHalykBank() || baseAccessRoles,
3942
3942
  toAML: this.isCompliance() || baseAccessRoles,
3943
3943
  toAULETTI: this.isAgentAuletti() || baseAccessRoles,
3944
3944
  toLKA_A: this.isAgentAuletti() || baseAccessRoles,
@@ -308,11 +308,11 @@ export const useMemberStore = defineStore('members', {
308
308
  // TODO Доработать и менять значение hasAgreement.value => true
309
309
  this.dataStore.showToaster(otpResponse.status !== 2 ? 'error' : 'success', otpResponse.statusName, 3000);
310
310
  if (otpResponse.status === 2) {
311
- member.otpCode = null;
311
+ member.otpCode = '';
312
312
  return true;
313
313
  }
314
314
  if (otpResponse.status === 4 || otpResponse.status === 5) {
315
- member.otpCode = null;
315
+ member.otpCode = '';
316
316
  member.otpTokenId = null;
317
317
  return false;
318
318
  }
package/types/enum.ts CHANGED
@@ -60,6 +60,7 @@ export enum PostActions {
60
60
  applicationCreated = 'applicationCreated',
61
61
  clipboard = 'clipboard',
62
62
  toHomePage = 'toHomePage',
63
+ toHistory = 'toHistory',
63
64
  toStatementHistory = 'toStatementHistory',
64
65
  toAuth = 'toAuth',
65
66
  DOMevent = 'DOMevent',