hl-core 0.0.10-beta.45 → 0.0.10-beta.46

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.
@@ -339,10 +339,10 @@
339
339
  v-if="hasWorkPositionDict"
340
340
  v-model.trim="member.jobPosition"
341
341
  :label="$dataStore.t('form.jobPosition')"
342
- :readonly="isDisabled || member.positionCode !== 'other'"
343
342
  :clearable="!isDisabled"
344
343
  :rules="$rules.required"
345
344
  append-inner-icon="mdi-chevron-right"
345
+ readonly
346
346
  @click="openCustomPanel('workPosition')"
347
347
  />
348
348
  <base-form-input
@@ -749,7 +749,7 @@
749
749
  />
750
750
  </div>
751
751
  <div v-if="searchQuery && positionsList !== null && !positionsList.length && isPanelLoading === false" class="w-full flex flex-col items-center gap-2 px-2">
752
- <base-btn :text="$dataStore.t('buttons.add')" @click="pickPosition({ workPositionName: searchQuery, workPositionCode: 'other' })" />
752
+ <!-- <base-btn :text="$dataStore.t('buttons.add')" @click="pickPosition({ workPositionName: searchQuery, workPositionCode: 'other' })" /> -->
753
753
  <span :class="[$styles.mutedText]">{{ $dataStore.t('toaster.notFound') }}</span>
754
754
  </div>
755
755
  </base-animation>
@@ -1408,7 +1408,7 @@ export default defineComponent({
1408
1408
  }
1409
1409
  };
1410
1410
 
1411
- const pickPanelValue = (item: Value) => {
1411
+ const pickPanelValue = async (item: Value) => {
1412
1412
  dataStore.rightPanel.open = false;
1413
1413
  isPanelOpen.value = false;
1414
1414
  isMultiplePanelOpen.value = false;
@@ -1429,9 +1429,22 @@ export default defineComponent({
1429
1429
  } else {
1430
1430
  // @ts-ignore
1431
1431
  productConditionsForm[currentPanel.value] = item.nameRu === null ? new Value() : item;
1432
- if (currentPanel.value === 'paymentPeriod' && hasProcessIndexRate.value && item.code === 'single') {
1433
- const defaultIndexRate = dataStore.processIndexRate.find((i: any) => i.isDefault === true);
1434
- if (defaultIndexRate) productConditionsForm.processIndexRate = defaultIndexRate;
1432
+ if (currentPanel.value === 'paymentPeriod' && item.code === 'single') {
1433
+ if (hasProcessIndexRate.value) {
1434
+ const defaultIndexRate = dataStore.processIndexRate.find((i: any) => i.isDefault === true);
1435
+ if (defaultIndexRate) productConditionsForm.processIndexRate = defaultIndexRate;
1436
+ }
1437
+ if (whichProduct.value === 'bolashak') {
1438
+ const termCover = additionalTerms.value?.findIndex(i => i.coverTypeCode === 10);
1439
+ if (termCover !== -1) {
1440
+ const termList = await dataStore.getAdditionalInsuranceTermsAnswers(additionalTerms.value[termCover].coverTypeId);
1441
+ const defaultTermValue = termList?.find(i => i.isDefault === true);
1442
+ if (defaultTermValue) {
1443
+ additionalTerms.value[termCover].coverSumId = String(defaultTermValue.id);
1444
+ additionalTerms.value[termCover].coverSumName = String(defaultTermValue.nameRu);
1445
+ }
1446
+ }
1447
+ }
1435
1448
  }
1436
1449
  }
1437
1450
  };
@@ -1796,7 +1809,9 @@ export default defineComponent({
1796
1809
 
1797
1810
  const filterTermConditions = (term: AddCover) => {
1798
1811
  if (term.coverTypeCode === 10 && !props.isCalculator) {
1799
- return !!formStore.insuredForm.find((member: Member) => member.iin === formStore.policyholderForm.iin) === false;
1812
+ const isSinglePeriod = whichProduct.value === 'bolashak' ? productConditionsForm.paymentPeriod?.code === 'single' : false;
1813
+ const isDifferentClients = !!formStore.insuredForm.find((member: Member) => member.iin === formStore.policyholderForm.iin) === false;
1814
+ return isDifferentClients && !isSinglePeriod;
1800
1815
  }
1801
1816
  return true;
1802
1817
  };
@@ -861,6 +861,7 @@ export class RoleController {
861
861
  isUKP = () => this.isRole(constants.roles.UKP);
862
862
  isDpDirector = () => this.isRole(constants.roles.DpDirector);
863
863
  isSecurity = () => this.isRole(constants.roles.Security);
864
+ isURAP = () => this.isRole(constants.roles.URAP);
864
865
  hasAccess = () => {
865
866
  const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn() || this.isDsuioOrv();
866
867
  return {
@@ -914,6 +915,7 @@ export class RoleController {
914
915
  this.isUKP() ||
915
916
  this.isDpDirector() ||
916
917
  this.isSecurity() ||
918
+ this.isURAP() ||
917
919
  baseAccessRoles,
918
920
  };
919
921
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.45",
3
+ "version": "0.0.10-beta.46",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -1971,7 +1971,7 @@ export const useDataStore = defineStore('data', {
1971
1971
  this.isGons || product === 'gons' ? this.getNumberWithSpacesAfterComma(calculationResponse.premium) : this.getNumberWithSpaces(calculationResponse.premium);
1972
1972
 
1973
1973
  this.formStore.additionalInsuranceTermsWithout = calculationResponse.addCovers;
1974
- if (this.isKazyna || product === 'halykkazyna' || ((this.isGons || product === 'gons') && !useEnv().isProduction)) {
1974
+ if (this.isKazyna || product === 'halykkazyna' || this.isGons || product === 'gons') {
1975
1975
  if (this.formStore.productConditionsForm.insurancePremiumPerMonthInDollar != null) {
1976
1976
  this.formStore.productConditionsForm.requestedSumInsuredInDollar = this.getNumberWithSpaces(calculationResponse.amountInCurrency);
1977
1977
  } else {
package/types/enum.ts CHANGED
@@ -122,6 +122,7 @@ export enum Roles {
122
122
  UKP = 'UKP',
123
123
  DpDirector = 'DpDirector',
124
124
  Security = 'Security',
125
+ URAP = 'URAP',
125
126
  }
126
127
 
127
128
  export enum Statuses {