hl-core 0.0.8-beta.36 → 0.0.8-beta.37

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.
@@ -122,7 +122,6 @@
122
122
  :label="$dataStore.t('form.percentageOfPayoutAmount')"
123
123
  :rules="$rules.required.concat($rules.numbers)"
124
124
  />
125
- <base-form-toggle v-if="$dataStore.isGons" :disabled="isDisabled" :has-border="false" v-model="member.isPdl" :title="$dataStore.t('isMemberIPDL')" />
126
125
  </base-form-section>
127
126
  <base-form-section :title="$dataStore.t('policyholdersRepresentative.PowerOfAttorney')" v-if="whichForm === formStore.policyholdersRepresentativeFormKey">
128
127
  <base-form-input
@@ -240,13 +239,7 @@
240
239
  <base-form-input v-model.trim="member.jobPlace" :label="$dataStore.t('form.jobPlace')" :readonly="isDisabled" :clearable="!isDisabled" :rules="$rules.required" />
241
240
  </base-form-section>
242
241
  <base-form-section :title="$dataStore.t('form.placeRegistration')" v-if="$dataStore.hasPlaceSection(whichForm)">
243
- <base-form-toggle
244
- v-if="whichForm === formStore.beneficiaryFormKey"
245
- v-model="sameAddress"
246
- :disabled="isDisabled"
247
- :has-border="false"
248
- :title="$dataStore.t('form.sameAddress')"
249
- />
242
+ <base-form-toggle v-if="hasSameAddressToggle" v-model="sameAddress" :disabled="isDisabled" :has-border="false" :title="$dataStore.t('form.sameAddress')" />
250
243
  <base-panel-input
251
244
  v-model="member.registrationCountry"
252
245
  :value="member.registrationCountry.nameRu"
@@ -433,6 +426,7 @@
433
426
  />
434
427
  </base-fade-transition>
435
428
  <base-panel-input
429
+ v-if="hasSignOfIPDL"
436
430
  v-model="member.signOfIPDL"
437
431
  :value="member.signOfIPDL.nameRu"
438
432
  :label="$dataStore.t('form.signOfIPDL')"
@@ -667,6 +661,13 @@ export default {
667
661
  }
668
662
  return false;
669
663
  });
664
+ const hasSignOfIPDL = computed(() => {
665
+ if (dataStore.isGons) {
666
+ return false;
667
+ }
668
+ return true;
669
+ });
670
+ const hasSameAddressToggle = computed(() => whichForm.value === formStore.beneficiaryFormKey && member.value.iin !== formStore.policyholderForm.iin);
670
671
 
671
672
  const birthDateRule = computed(() => {
672
673
  const baseDateRule = dataStore.rules.required.concat(dataStore.rules.birthDate);
@@ -1355,6 +1356,8 @@ export default {
1355
1356
  hasGKB,
1356
1357
  hasFamilyStatus,
1357
1358
  hasInsurancePay,
1359
+ hasSignOfIPDL,
1360
+ hasSameAddressToggle,
1358
1361
 
1359
1362
  // Rules
1360
1363
  ageRule,
@@ -287,8 +287,8 @@
287
287
  v-if="filterTermConditions(term)"
288
288
  v-model="additionalTerms[index]"
289
289
  :value="term.coverSumName"
290
- :readonly="isDisabled"
291
- :clearable="!isDisabled"
290
+ :readonly="isTermsDisabled"
291
+ :clearable="!isTermsDisabled"
292
292
  :label="term.coverTypeName"
293
293
  append-inner-icon="mdi mdi-chevron-right"
294
294
  :suffix="!!term.amount ? `${formatTermValue(term.amount)} ${currencySymbolsAddTerm}` : ''"
@@ -392,6 +392,12 @@ export default defineComponent({
392
392
  }
393
393
  });
394
394
  const isDisabled = computed(() => (dataStore.isCalculator ? false : !memberStore.isStatementEditible(formStore.productConditionsFormKey)));
395
+ const isTermsDisabled = computed(() => {
396
+ if (dataStore.isGons) {
397
+ return true;
398
+ }
399
+ return isDisabled.value;
400
+ });
395
401
  const isTask = computed(() => (route.params.taskId === '0' && props.isRecalculation === true) || dataStore.isTask());
396
402
  const isRecalculationDisabled = computed(() => formStore.isDisabled.recalculationForm);
397
403
  const isUnderwriterRole = computed(() => dataStore.isUnderwriter() || dataStore.isAdmin() || dataStore.isSupport());
@@ -611,6 +617,7 @@ export default defineComponent({
611
617
 
612
618
  const onInputInsurancePremiumPerMonthInDollar = (event: Event) => {
613
619
  if (event.target && 'value' in event.target && event.target.value && dataStore.currencies.usd) {
620
+ whichSum.value = 'insurancePremiumPerMonth';
614
621
  const calculatedPremium = getNumber(event.target.value as string);
615
622
  if (calculatedPremium) {
616
623
  productConditionsForm.insurancePremiumPerMonthInDollar = dataStore.getNumberWithSpaces(productConditionsForm.insurancePremiumPerMonthInDollar);
@@ -631,6 +638,7 @@ export default defineComponent({
631
638
 
632
639
  const onInputSumDollar = (event: Event) => {
633
640
  if (event.target && 'value' in event.target && event.target.value && dataStore.currencies.usd) {
641
+ whichSum.value = 'requestedSumInsured';
634
642
  const calculatedSum = getNumber(event.target.value as string);
635
643
  if (calculatedSum) {
636
644
  productConditionsForm.requestedSumInsuredInDollar = dataStore.getNumberWithSpaces(productConditionsForm.requestedSumInsuredInDollar);
@@ -888,6 +896,7 @@ export default defineComponent({
888
896
  // Computed
889
897
  isTask,
890
898
  isDisabled,
899
+ isTermsDisabled,
891
900
  isUnderwriterForm,
892
901
  insurancePremiumPerMonth,
893
902
  requestedSumInsured,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.8-beta.36",
3
+ "version": "0.0.8-beta.37",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -1521,8 +1521,10 @@ export const useDataStore = defineStore('data', {
1521
1521
  }
1522
1522
  if (this.formStore.productConditionsForm.insurancePremiumPerMonth != null) {
1523
1523
  this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(result.value);
1524
+ this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(applicationData.policyAppDto.premium);
1524
1525
  } else {
1525
1526
  this.formStore.productConditionsForm.insurancePremiumPerMonth = this.getNumberWithSpaces(result.value);
1527
+ this.formStore.productConditionsForm.requestedSumInsured = this.getNumberWithSpaces(applicationData.policyAppDto.amount);
1526
1528
  }
1527
1529
  if (this.isLiferenta) {
1528
1530
  this.formStore.productConditionsForm.amountAnnuityPayments = this.getNumberWithSpaces(applicationData.policyAppDto.annuityMonthPay);