hl-core 0.0.8-beta.20 → 0.0.8-beta.21

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.
@@ -9,16 +9,16 @@
9
9
  <div class="mt-6 grid grid-cols-3 lg:grid-cols-5 auto-rows-fr items-center">
10
10
  <span v-if="hasSum" :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.requestedSumInsured') }}</span>
11
11
  <span v-if="hasPremium" :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.insurancePremiumPerMonth') }}</span>
12
- <span v-if="hasPolicyNumber" :class="[$libStyles.textSimple]" class="font-medium">{{ $t('buttons.InsuranceContract') }}</span>
13
- <span v-if="hasContractDate" :class="[$libStyles.textSimple]" class="font-medium">{{ $t('productConditionsForm.contractDate') }}</span>
12
+ <span v-if="hasPolicyNumber" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('buttons.InsuranceContract') }}</span>
13
+ <span v-if="hasContractDate" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.contractDate') }}</span>
14
14
  <span v-if="hasCoverPeriod" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.coverPeriod') }}</span>
15
15
  <span v-if="hasPayPeriod" :class="[$libStyles.textSimple]" class="font-medium hidden lg:block">{{ $t('productConditionsForm.payPeriod') }}</span>
16
16
  </div>
17
17
  <div class="grid grid-cols-3 lg:grid-cols-5 auto-rows-fr items-center">
18
18
  <span v-if="hasSum" :class="[amount === null && $libStyles.emptyBlockCol]">{{ amount }} </span>
19
19
  <span v-if="hasPremium" :class="[premium === null && $libStyles.emptyBlockCol]"> {{ premium }}</span>
20
- <span v-if="hasPolicyNumber" :class="[policyNumber === null && $libStyles.emptyBlockCol]"> {{ policyNumber }}</span>
21
- <span v-if="hasContractDate" :class="[policyNumber === null && $libStyles.emptyBlockCol]"> {{ contractDate }}</span>
20
+ <span v-if="hasPolicyNumber" :class="[policyNumber === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ policyNumber }}</span>
21
+ <span v-if="hasContractDate" :class="[policyNumber === null && $libStyles.emptyBlockCol]" class="hidden lg:block"> {{ contractDate }}</span>
22
22
  <span v-if="hasCoverPeriod" :class="[coverPeriod === null && $libStyles.emptyBlockCol]" class="hidden lg:block">{{ coverPeriod }} </span>
23
23
  <span v-if="hasPayPeriod" :class="[paymentPeriod === null && $libStyles.emptyBlockCol]" class="hidden lg:block">
24
24
  {{ paymentPeriod }}
@@ -9,7 +9,7 @@
9
9
  model-type="dd.MM.yyyy"
10
10
  position="left"
11
11
  menu-class-name="!left-[30vw] md:!left-[70vw] lg:!left-[75vw]"
12
- teleport=".v-form"
12
+ :teleport="teleport"
13
13
  :offset="-50"
14
14
  :close-on-scroll="true"
15
15
  :enable-time-picker="false"
@@ -36,6 +36,10 @@ export default defineComponent({
36
36
  type: Boolean,
37
37
  default: false,
38
38
  },
39
+ teleport: {
40
+ type: String,
41
+ default: '.v-form',
42
+ },
39
43
  },
40
44
  });
41
45
  </script>
@@ -29,8 +29,12 @@
29
29
  @update:modelValue="$emit('update:modelValue', $event)"
30
30
  >
31
31
  <template v-if="appendInnerIcon && appendInnerIcon.length" v-slot:append-inner>
32
- <v-icon v-if="appendInnerIcon !== 'mdi mdi-calendar-blank-outline'" :icon="appendInnerIcon" @click="!props.readonly && $emit('append')"></v-icon>
33
- <base-datepicker v-else :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)"></base-datepicker>
32
+ <v-icon
33
+ v-if="appendInnerIcon !== 'mdi mdi-calendar-blank-outline'"
34
+ :icon="appendInnerIcon"
35
+ @click="appendInnerIcon.includes('mdi-magnify') ? $emit('append') : !props.readonly && $emit('append')"
36
+ ></v-icon>
37
+ <base-datepicker v-else :model-value="modelValue" @update:modelValue="$emit('update:modelValue', $event)" :teleport="teleport"></base-datepicker>
34
38
  </template>
35
39
  <template v-if="loading" #loader>
36
40
  <v-progress-linear :active="loading" :color="color" absolute height="1" indeterminate></v-progress-linear>
@@ -116,6 +120,9 @@ export default defineComponent({
116
120
  appendInnerIcon: {
117
121
  type: String,
118
122
  },
123
+ teleport: {
124
+ type: String,
125
+ },
119
126
  bgColor: {
120
127
  type: String,
121
128
  },
@@ -64,7 +64,7 @@ const hasHistory = computed(() => {
64
64
  });
65
65
 
66
66
  const openHistory = async () => {
67
- dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.product);
67
+ dataStore.sendToParent(constants.postActions.toStatementHistory, dataStore.isBridge ? '' : dataStore.product);
68
68
  };
69
69
 
70
70
  const changeBridge = async (toBridge: 'efo' | 'lka') => {
@@ -32,7 +32,7 @@
32
32
  <slot name="end"></slot>
33
33
  <slot name="actions"></slot>
34
34
  <base-fade-transition>
35
- <div v-if="$dataStore.buttons && $dataStore.buttons.length" class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[30%] w-full pr-4">
35
+ <div v-if="$dataStore.buttons && $dataStore.buttons.length" class="flex flex-col gap-[10px] justify-self-end absolute bottom-5 lg:bottom-[10%] w-full pr-4">
36
36
  <div v-for="(item, index) of $dataStore.buttons" :key="index">
37
37
  <transition enter-active-class="animate__animated animate__fadeIn animate__faster" leave-active-class="animate__animated animate__fadeOut animate__faster">
38
38
  <base-btn
@@ -71,22 +71,22 @@
71
71
  </v-form>
72
72
  <base-btn class="my-[14px] self-center" :loading="isButtonLoading" :disabled="formStore.isDisabled[whichSurvey]" @click="submitForm" :text="$t('buttons.save')"></base-btn>
73
73
  </section>
74
+ <v-btn
75
+ v-if="secondQuestionList && secondQuestionList.length && firstPanel"
76
+ icon="mdi mdi-close"
77
+ class="ml-3 !absolute"
78
+ @click="
79
+ firstPanel = false;
80
+ secondPanel = false;
81
+ "
82
+ ></v-btn>
74
83
  <section
75
84
  ref="firstPanelSection"
76
85
  v-if="secondQuestionList && secondQuestionList.length && firstPanel"
77
- class="flex flex-col px-[10px] py-[14px]"
86
+ class="flex flex-col px-[10px] pb-[14px]"
78
87
  :class="[$libStyles.scrollPage]"
79
88
  >
80
- <v-btn
81
- icon="mdi mdi-close"
82
- variant="text"
83
- size="large"
84
- @click="
85
- firstPanel = false;
86
- secondPanel = false;
87
- "
88
- ></v-btn>
89
- <section v-if="currentQuestion" :class="[$libStyles.blueBgLight, $libStyles.rounded]" class="mx-[10px] my-[14px] p-4 flex flex-col gap-4">
89
+ <section v-if="currentQuestion" :class="[$libStyles.blueBgLight, $libStyles.rounded]" class="mx-[10px] mt-[14px] p-4 flex flex-col gap-4">
90
90
  <base-form-text-section v-for="question in currentQuestion.second" :title="question.name" :key="question.name">
91
91
  <base-form-input
92
92
  v-if="question.definedAnswers === 'N'"
@@ -2,16 +2,6 @@
2
2
  <section class="flex flex-col gap-4 px-[10px]">
3
3
  <v-form v-if="member" ref="vForm" @submit="submitForm" class="max-h-[82svh] overflow-y-scroll">
4
4
  <base-form-section :title="$t('form.personalData')">
5
- <base-form-input
6
- v-model="member.iin"
7
- :label="$t('form.iin')"
8
- :maska="$maska.iin"
9
- :readonly="isDisabled || isIinPhoneDisabled"
10
- :clearable="!isDisabled"
11
- :append-inner-icon="showSaveButton ? 'mdi mdi-magnify' : ''"
12
- @append="searchMember"
13
- :rules="$rules.required.concat($rules.iinRight)"
14
- ></base-form-input>
15
5
  <base-form-input
16
6
  v-model="member.phoneNumber"
17
7
  :label="$t('form.phoneNumber')"
@@ -23,6 +13,16 @@
23
13
  @keyup.enter.prevent="otpCondition ? openCustomPanel('otp') : null"
24
14
  :rules="phoneRule"
25
15
  ></base-form-input>
16
+ <base-form-input
17
+ v-model="member.iin"
18
+ :label="$t('form.iin')"
19
+ :maska="$maska.iin"
20
+ :readonly="isDisabled || isIinPhoneDisabled"
21
+ :clearable="!isDisabled"
22
+ :append-inner-icon="showSaveButton ? 'mdi mdi-magnify' : ''"
23
+ @append="searchMember"
24
+ :rules="$rules.required.concat($rules.iinRight)"
25
+ ></base-form-input>
26
26
  <base-form-input
27
27
  v-model="member.lastName"
28
28
  :readonly="isDisabled || isFromGBD"
@@ -543,7 +543,7 @@ export default {
543
543
  const hasOtp = computed(() => member.value.otpCode && member.value.otpCode.length === useMask().otp.length);
544
544
  const isDisabled = computed(() => !memberStore.isStatementEditible(whichForm.value as string));
545
545
  const isTask = computed(() => route.params.taskId === '0' || dataStore.isTask());
546
- const isIinPhoneDisabled = computed(() => formStore.applicationData && 'regNumber' in formStore.applicationData && whichForm.value === formStore.policyholderFormKey);
546
+ const isIinPhoneDisabled = computed(() => member.value.hasAgreement);
547
547
  const isFromGBD = computed(() => !!member.value.gosPersonData);
548
548
  const showSaveButton = computed(() => {
549
549
  const generalCondition = !isDisabled.value && !!isTask.value && !!dataStore.isInitiator();
@@ -828,6 +828,7 @@ export class DataStoreClass {
828
828
  beneficialOwnerApp: MemberSettings;
829
829
  spokesmanApp: MemberSettings;
830
830
  };
831
+ iframeLoading: boolean;
831
832
  hasLayoutMargins: boolean;
832
833
  readonly product: string | null;
833
834
  showNav: boolean;
@@ -952,6 +953,7 @@ export class DataStoreClass {
952
953
  hasAttachment: true,
953
954
  hasAffiliation: true,
954
955
  };
956
+ this.iframeLoading = false;
955
957
  this.hasLayoutMargins = true;
956
958
  this.processIndexRate = [];
957
959
  this.processPaymentPeriod = [];
@@ -68,6 +68,7 @@ export const constants = Object.freeze({
68
68
  DOMevent: 'DOMevent',
69
69
  Error401: 'Error401',
70
70
  Error500: 'Error500',
71
+ iframeLoaded: 'iframeLoaded',
71
72
  },
72
73
  currencySymbols: {
73
74
  kzt: '₸',
@@ -165,7 +165,11 @@ export const ErrorHandler = (err: unknown, errorText?: string) => {
165
165
  console.log(err);
166
166
  if (err instanceof AxiosError) {
167
167
  if ('response' in err && err.response && err.response.data) {
168
- useDataStore().showToaster('error', errorText ? errorText : err.response.data, 10000);
168
+ if ('status' in err.response && err.response.status === 403) {
169
+ useDataStore().showToaster('error', useDataStore().t('toaster.noPermission'), 10000);
170
+ } else if (err.response.data) {
171
+ useDataStore().showToaster('error', errorText ? errorText : err.response.data, 10000);
172
+ }
169
173
  }
170
174
  }
171
175
  return false;
package/locales/en.json CHANGED
@@ -95,9 +95,11 @@
95
95
  "insured": "застрахованный",
96
96
  "beneficiary": "выгодоприобретатель",
97
97
  "beneficialOwner": "бенефициарный собственник",
98
- "spokesman": "представитель страхователя"
98
+ "spokesman": "представитель страхователя",
99
+ "noPermission": "You have no permission on {text}"
99
100
  },
100
101
  "buttons": {
102
+ "dataInput": "Input",
101
103
  "createStatement": "Create Statement",
102
104
  "add": "Add",
103
105
  "userLogin": "Login",
@@ -261,7 +263,7 @@
261
263
  "riskGroup": "Risk Group",
262
264
  "requestedProductConditions": "Requested Insurance Conditions",
263
265
  "coverPeriodFrom3to20": "Insurance Period (from 3 to 20 years)",
264
- "insurancePremiumAmount": "Insurance Premium Amount",
266
+ "insurancePremiumAmount": "Insurance Premium Amount in tenge",
265
267
  "insurancePremiumAmountInDollar": "Amount of the Insurance premium (insurance fee) in dollars",
266
268
  "coverPeriodFrom2to22": "Cover Period (from 2y to 20y)",
267
269
  "dollarExchangeRateNBRK": "NBRK dollar exchange rate",
package/locales/kz.json CHANGED
@@ -95,9 +95,11 @@
95
95
  "insured": "застрахованный",
96
96
  "beneficiary": "выгодоприобретатель",
97
97
  "beneficialOwner": "бенефициарный собственник",
98
- "spokesman": "представитель страхователя"
98
+ "spokesman": "представитель страхователя",
99
+ "noPermission": "Сұрау салуға рұқсатыңыз жоқ {text}"
99
100
  },
100
101
  "buttons": {
102
+ "dataInput": "Енгізу",
101
103
  "createStatement": "Заявка жасау",
102
104
  "add": "Қосу",
103
105
  "userLogin": "Кіру",
@@ -262,7 +264,7 @@
262
264
  "requestedProductConditions": "Талап етілетін сақтандыру шарттары",
263
265
  "coverPeriodFrom3to20": "Страховық мерзім (3-тен 20 жылға дейін)",
264
266
  "coverPeriodFrom2to20": "Страховық мерзім (2-тен 20 жылға дейін)",
265
- "insurancePremiumAmount": "Сақтандыру сыйлықақысы өлшемі (страховой взнос)",
267
+ "insurancePremiumAmount": "Сақтандыру сыйлықақысы өлшемі (страховой взнос) в тенге",
266
268
  "insurancePremiumAmountInDollar": "Сақтандыру сыйлықақысы өлшемі доллармен (страховой взнос)",
267
269
  "dollarExchangeRateNBRK": "Доллардың НБРК айырымы",
268
270
  "contractDate": "Контракт күні"
package/locales/ru.json CHANGED
@@ -95,9 +95,11 @@
95
95
  "insured": "застрахованный",
96
96
  "beneficiary": "выгодоприобретатель",
97
97
  "beneficialOwner": "бенефициарный собственник",
98
- "spokesman": "представитель страхователя"
98
+ "spokesman": "представитель страхователя",
99
+ "noPermission": "У вас нет привилегии на запрос {text}"
99
100
  },
100
101
  "buttons": {
102
+ "dataInput": "Ввод данных",
101
103
  "createStatement": "Создать заявку",
102
104
  "add": "Добавить",
103
105
  "userLogin": "Логин",
@@ -262,7 +264,7 @@
262
264
  "requestedProductConditions": "Запрашиваемые условия страхования",
263
265
  "coverPeriodFrom3to20": "Срок страхования (от 3-х до 20 лет)",
264
266
  "coverPeriodFrom2to22": "Срок страхования (от 2-х до 20 лет)",
265
- "insurancePremiumAmount": "Размер Страховой премии (страховой взнос)",
267
+ "insurancePremiumAmount": "Размер Страховой премии (страховой взнос) в тенге",
266
268
  "insurancePremiumAmountInDollar": "Размер Страховой премии (страховой взнос) в долларах",
267
269
  "dollarExchangeRateNBRK": "Курс доллара НБРК",
268
270
  "contractDate": "Дата контракта"
@@ -504,7 +506,7 @@
504
506
  "firstName": "Имя",
505
507
  "middleName": "Отчество",
506
508
  "birthDate": "Дата рождения",
507
- "signDate": "Дата расчета",
509
+ "signDate": "Дата",
508
510
  "age": "Возраст",
509
511
  "gender": "Пол",
510
512
  "familyStatus": "Семейное положение",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.8-beta.20",
3
+ "version": "0.0.8-beta.21",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -50,6 +50,6 @@
50
50
  "vue-json-pretty": "^2.2.4",
51
51
  "vue-toastification": "^2.0.0-rc.5",
52
52
  "vue-uuid": "^3.0.0",
53
- "vuetify": "^3.3.1"
53
+ "vuetify": "^3.3.4"
54
54
  }
55
55
  }
@@ -8,7 +8,9 @@ import * as directives from 'vuetify/directives';
8
8
  export default defineNuxtPlugin(nuxtApp => {
9
9
  const vuetify = createVuetify({
10
10
  ssr: false,
11
- components,
11
+ components: {
12
+ ...components,
13
+ },
12
14
  directives,
13
15
  defaults: {
14
16
  VForm: {
@@ -168,6 +168,9 @@ export const useDataStore = defineStore('data', {
168
168
  }
169
169
  }
170
170
  },
171
+ getUserData() {
172
+ return this.accessToken ? jwtDecode(this.accessToken) : null;
173
+ },
171
174
  isRole(whichRole) {
172
175
  if (this.user.roles.length === 0) {
173
176
  this.getUserRoles();
@@ -1860,7 +1863,7 @@ export const useDataStore = defineStore('data', {
1860
1863
  const data = {
1861
1864
  processInstanceId: this.formStore.applicationData.processInstanceId,
1862
1865
  regNumber: this.formStore.finCenterData.regNumber,
1863
- date: this.formStore.finCenterData.date,
1866
+ date: formatDate(this.formStore.finCenterData.date),
1864
1867
  };
1865
1868
  const result = await this.api.registerNumber(data);
1866
1869
  return result;