hl-core 0.0.8-beta.11 → 0.0.8-beta.12

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.
@@ -27,7 +27,7 @@ export default defineComponent({
27
27
  },
28
28
  title: {
29
29
  type: String,
30
- default: '',
30
+ default: useDataStore().t('dialog.title'),
31
31
  },
32
32
  subtitle: {
33
33
  type: String,
@@ -13,6 +13,7 @@
13
13
  <slot></slot>
14
14
  </div>
15
15
  <base-panel-handler v-else></base-panel-handler>
16
+ <slot></slot>
16
17
  </v-navigation-drawer>
17
18
  </template>
18
19
 
@@ -139,6 +139,7 @@
139
139
  :clearable="!isDisabled"
140
140
  :rules="requestedSumInsured"
141
141
  :label="$t('productConditionsForm.requestedSumInsured')"
142
+ :suffix="$constants.currencySymbols.kzt"
142
143
  @input="onInputSum"
143
144
  ></base-form-input>
144
145
  <base-form-input
@@ -89,14 +89,6 @@
89
89
  </base-fade-transition>
90
90
  </div>
91
91
  </section>
92
- <section v-if="registerActions">
93
- <div :class="[$libStyles.flexColNav]">
94
- <v-form ref="vForm">
95
- <base-rounded-input v-model="actionCause" placeholder="№ ХХХХХХХХХ" :rules="$rules.required"></base-rounded-input>
96
- </v-form>
97
- <base-btn :text="$t('buttons.send')" :loading="loading" @click="submitForm"></base-btn>
98
- </div>
99
- </section>
100
92
  </template>
101
93
 
102
94
  <script lang="ts">
@@ -188,7 +180,6 @@ export default defineComponent({
188
180
  const acceptAction = computed(() => dataStore.panelAction === constants.actions.accept);
189
181
  const signingActions = computed(() => dataStore.panelAction === constants.actions.sign);
190
182
  const payingActions = computed(() => dataStore.panelAction === constants.actions.pay);
191
- const registerActions = computed(() => dataStore.panelAction === constants.actions.register);
192
183
  const paymentPeriod = computed(() => formStore.productConditionsForm.paymentPeriod.nameRu);
193
184
  const insurancePremiumPerMonth = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.insurancePremiumPerMonth));
194
185
  const requestedSumInsured = computed(() => dataStore.getNumberWithSpaces(formStore.productConditionsForm.requestedSumInsured));
@@ -216,7 +207,6 @@ export default defineComponent({
216
207
  signingActions,
217
208
  payingActions,
218
209
  acceptAction,
219
- registerActions,
220
210
  paymentPeriod,
221
211
  insurancePremiumPerMonth,
222
212
  requestedSumInsured,
@@ -265,9 +265,8 @@ class Person {
265
265
  getAgeByBirthDate() {
266
266
  const date = this.formatDate(this.birthDate);
267
267
  if (date) {
268
- const calcAge = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
269
- const age = calcAge === 0 ? 1 : calcAge;
270
- if (new Date(date) < new Date(Date.now()) && age > 0) {
268
+ const age = Math.abs(new Date(Date.now() - new Date(date).getTime()).getUTCFullYear() - 1970);
269
+ if (new Date(date) < new Date(Date.now()) && age >= 0) {
271
270
  return age.toString();
272
271
  }
273
272
  } else {
@@ -12,6 +12,8 @@ export const constants = Object.freeze({
12
12
 
13
13
  editableStatuses: ['StartForm', 'EditBeneficiaryForm', 'EditForm'],
14
14
  documentsLinkVisibleStatuses: ['DocumentsSignedFrom', 'UnderwriterForm', 'AffilationResolutionForm', 'Completed', 'InsurancePremiumOnlinePaid'],
15
+ returnStatementStatuses: ['DocumentsSignedFrom', 'WaitingInsurancePremiumForm', 'UnderwriterForm'],
16
+ cancelApplicationStatuses: ['StartForm', 'EditForm', 'WaitingInsurancePremiumForm', 'DocumentsSignedFrom'],
15
17
  gbdErrors: ['INVALID', 'TIMEOUT', 'ERROR', 'NOT_FOUND'],
16
18
  types: {
17
19
  string: 'string',
@@ -92,9 +92,8 @@ export const getKeyWithPattern = (obj: any, key: string) => {
92
92
  };
93
93
 
94
94
  export const getAgeByBirthDate = (rawDate: string) => {
95
- const calcAge = Math.abs(new Date(Date.now() - new Date(rawDate).getTime()).getUTCFullYear() - 1970);
96
- const age = calcAge === 0 ? 1 : calcAge;
97
- if (new Date(rawDate) < new Date(Date.now()) && age > 0) {
95
+ const age = Math.abs(new Date(Date.now() - new Date(rawDate).getTime()).getUTCFullYear() - 1970);
96
+ if (new Date(rawDate) < new Date(Date.now()) && age >= 0) {
98
97
  return age;
99
98
  }
100
99
  };
package/locales/en.json CHANGED
@@ -88,7 +88,8 @@
88
88
  "requiredInsured": "You need to specify insured person's data",
89
89
  "needToRecalculate": "You need to recalculate the product conditions",
90
90
  "noUrl": "No link available",
91
- "pickFamilyMember": "Pick a family member"
91
+ "pickFamilyMember": "Pick a family member",
92
+ "numberRegistered": "Регистрационный номер успешно записан в реестр"
92
93
  },
93
94
  "buttons": {
94
95
  "createStatement": "Create Statement",
@@ -282,7 +283,11 @@
282
283
  "information": "Additional Data",
283
284
  "policyNumber": "Policy Number",
284
285
  "statusCode": "Application Status",
285
- "initiator": "Initiator"
286
+ "initiator": "Initiator",
287
+ "iin&bin": "IIN/BIN",
288
+ "insurerIin": "Insured IIN",
289
+ "insurerLongName": "Insured Full Name",
290
+ "jsonObject": "JSON value"
286
291
  },
287
292
  "placeholders": {
288
293
  "login": "Login",
package/locales/kz.json CHANGED
@@ -88,7 +88,8 @@
88
88
  "requiredInsured": "Необходимо указать данные застрахованного",
89
89
  "needToRecalculate": "Необходимо пересчитать условия продукта",
90
90
  "noUrl": "Отсутствует ссылка",
91
- "pickFamilyMember": "Выберите члена семьи"
91
+ "pickFamilyMember": "Выберите члена семьи",
92
+ "numberRegistered": "Регистрационный номер успешно записан в реестр"
92
93
  },
93
94
  "buttons": {
94
95
  "createStatement": "Создать заявку",
@@ -282,7 +283,11 @@
282
283
  "information": "Дополнительные данные",
283
284
  "policyNumber": "Номер полиса",
284
285
  "statusCode": "Статус заявки",
285
- "initiator": "Инициатор"
286
+ "initiator": "Инициатор",
287
+ "iin&bin": "ИИН/БИН",
288
+ "insurerIin": "ИИН застрахованного",
289
+ "insurerLongName": "ФИО застрахованного",
290
+ "jsonObject": "JSON значение"
286
291
  },
287
292
  "placeholders": {
288
293
  "login": "Логин",
package/locales/ru.json CHANGED
@@ -88,7 +88,8 @@
88
88
  "requiredInsured": "Необходимо указать данные застрахованного",
89
89
  "needToRecalculate": "Необходимо пересчитать условия продукта",
90
90
  "noUrl": "Отсутствует ссылка",
91
- "pickFamilyMember": "Выберите члена семьи"
91
+ "pickFamilyMember": "Выберите члена семьи",
92
+ "numberRegistered": "Регистрационный номер успешно записан в реестр"
92
93
  },
93
94
  "buttons": {
94
95
  "createStatement": "Создать заявку",
@@ -282,7 +283,11 @@
282
283
  "information": "Дополнительные данные",
283
284
  "policyNumber": "Номер полиса",
284
285
  "statusCode": "Статус заявки",
285
- "initiator": "Инициатор"
286
+ "initiator": "Инициатор",
287
+ "iin&bin": "ИИН/БИН",
288
+ "insurerIin": "ИИН застрахованного",
289
+ "insurerLongName": "ФИО застрахованного",
290
+ "jsonObject": "JSON значение"
286
291
  },
287
292
  "placeholders": {
288
293
  "login": "Логин",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.8-beta.11",
3
+ "version": "0.0.8-beta.12",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -208,6 +208,20 @@ export const useDataStore = defineStore('data', {
208
208
  isProcessEditable(statusCode) {
209
209
  return !!constants.editableStatuses.find(status => status === statusCode);
210
210
  },
211
+ isProcessReturnable(statusCode) {
212
+ const getReturnableStatuses = () => {
213
+ const defaultStatuses = constants.returnStatementStatuses;
214
+ return defaultStatuses;
215
+ };
216
+ return !!getReturnableStatuses().find(status => status === statusCode);
217
+ },
218
+ isProcessCancel(statusCode) {
219
+ const getCanceleStatuses = () => {
220
+ const defaultStatuses = constants.cancelApplicationStatuses;
221
+ return defaultStatuses;
222
+ };
223
+ return !!getCanceleStatuses().find(status => status === statusCode);
224
+ },
211
225
  isTask() {
212
226
  return this.formStore.applicationData.processInstanceId !== 0 && this.formStore.applicationData.isTask;
213
227
  },
@@ -2320,9 +2334,9 @@ export const useDataStore = defineStore('data', {
2320
2334
  },
2321
2335
  hasPercentageOfPayoutAmount() {
2322
2336
  if (this.isKazyna) {
2323
- return false
2324
- };
2325
- return true
2337
+ return false;
2338
+ }
2339
+ return true;
2326
2340
  },
2327
2341
  },
2328
2342
  });