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

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.
@@ -155,24 +155,28 @@ export default defineComponent({
155
155
  );
156
156
  const isSaleChanellReadonly = computed(() => {
157
157
  if (!isReadonly.value) {
158
+ if (dataStore.isTravelAgent()) return true;
158
159
  if (dataStore.isGons) return !dataStore.isServiceManager();
159
160
  }
160
161
  return isReadonly.value;
161
162
  });
162
163
  const isRegionReadonly = computed(() => {
163
164
  if (!isReadonly.value) {
165
+ if (dataStore.isTravelAgent()) return true;
164
166
  if (dataStore.isGons) return !dataStore.isServiceManager() && !dataStore.isAgent();
165
167
  }
166
168
  return isReadonly.value;
167
169
  });
168
170
  const isManagerReadonly = computed(() => {
169
171
  if (!isReadonly.value) {
172
+ if (dataStore.isTravelAgent()) return true;
170
173
  if (dataStore.isGons) return !dataStore.isServiceManager();
171
174
  }
172
175
  return isReadonly.value;
173
176
  });
174
177
  const isAgentReadonly = computed(() => {
175
178
  if (!isReadonly.value) {
179
+ if (dataStore.isTravelAgent()) return true;
176
180
  if (dataStore.isGons) return !dataStore.isServiceManager();
177
181
  if (dataStore.isPension) return true;
178
182
  }
@@ -1745,7 +1745,7 @@ export default {
1745
1745
  dataStore.isLoading = true;
1746
1746
  const docTypeCodes = {
1747
1747
  '1UDL': 1,
1748
- PS: 2,
1748
+ PS: 11,
1749
1749
  SBI: 3,
1750
1750
  VNZ: 4,
1751
1751
  };
@@ -815,9 +815,10 @@ export class RoleController {
815
815
  const dataStore = useDataStore();
816
816
  const hasAccessByProduct = (() => {
817
817
  const product = productFromExternal as Projects;
818
- if (dataStore.isLifetrip || product === 'lifetrip') return this.isBranchDirector();
818
+ if (dataStore.isLifetrip || product === 'lifetrip') return this.isBranchDirector() || this.isTravelAgent();
819
819
  if (dataStore.isPension || product === 'pensionannuitynew') return this.isBranchDirector() || this.isExecutor();
820
820
  if (dataStore.isLifeBusiness || product === 'lifebusiness') return this.isHeadManager() || this.isBranchDirector();
821
+ if (dataStore.isCritical || product === 'criticalillness') return this.isBranchDirector();
821
822
  return false;
822
823
  })();
823
824
  return this.isManager() || this.isAgent() || this.isAgentMycar() || this.isManagerHalykBank() || this.isServiceManager() || this.isAgentAuletti() || hasAccessByProduct;
@@ -862,6 +863,7 @@ export class RoleController {
862
863
  isDpDirector = () => this.isRole(constants.roles.DpDirector);
863
864
  isSecurity = () => this.isRole(constants.roles.Security);
864
865
  isURAP = () => this.isRole(constants.roles.URAP);
866
+ isTravelAgent = () => this.isRole(constants.roles.TravelAgent);
865
867
  hasAccess = () => {
866
868
  const baseAccessRoles = this.isAdmin() || this.isSupport() || this.isAnalyst() || this.isDrn() || this.isDsuioOrv();
867
869
  return {
@@ -871,7 +873,17 @@ export class RoleController {
871
873
  toAML: this.isCompliance() || baseAccessRoles,
872
874
  toAULETTI: this.isAgentAuletti() || this.isManagerAuletti() || baseAccessRoles,
873
875
  toLKA_A: this.isAgentAuletti() || baseAccessRoles,
874
- toUU: this.isServiceManager() || this.isAccountant() || this.isAdjuster() || this.isHeadAdjuster() || this.isArchivist() || this.isSecurity() || baseAccessRoles,
876
+ toUU:
877
+ this.isDsuio() ||
878
+ this.isActuary() ||
879
+ this.isUSNSACCINS() ||
880
+ this.isServiceManager() ||
881
+ this.isAccountant() ||
882
+ this.isAdjuster() ||
883
+ this.isHeadAdjuster() ||
884
+ this.isArchivist() ||
885
+ this.isSecurity() ||
886
+ baseAccessRoles,
875
887
  toDSO:
876
888
  this.isDsuio() ||
877
889
  this.isActuary() ||
@@ -916,6 +928,7 @@ export class RoleController {
916
928
  this.isDpDirector() ||
917
929
  this.isSecurity() ||
918
930
  this.isURAP() ||
931
+ this.isTravelAgent() ||
919
932
  baseAccessRoles,
920
933
  };
921
934
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hl-core",
3
- "version": "0.0.10-beta.46",
3
+ "version": "0.0.10-beta.48",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "nuxt.config.ts",
@@ -1530,9 +1530,13 @@ export const useDataStore = defineStore('data', {
1530
1530
  },
1531
1531
  async getCurrencies() {
1532
1532
  try {
1533
- const currencies = await this.api.getCurrencies();
1534
- this.currencies = currencies;
1535
- return currencies;
1533
+ const makeCall = !this.isLKA && !this.isLKA_A;
1534
+ if (makeCall) {
1535
+ const currencies = await this.api.getCurrencies();
1536
+ this.currencies = currencies;
1537
+ return currencies;
1538
+ }
1539
+ return null;
1536
1540
  } catch (err) {
1537
1541
  console.log(err);
1538
1542
  }
package/store/rules.ts CHANGED
@@ -227,7 +227,7 @@ export const rules = {
227
227
  },
228
228
  ],
229
229
  policyholderAgeLimit: [(v: any) => v >= 18 || t('rules.policyholderAgeLimit')],
230
- beneficiaryAgeLimit: [(v: any) => v <= 15 || t('rules.beneficiaryAgeLimit')],
230
+ beneficiaryAgeLimit: [(v: any) => v < 15 || t('rules.beneficiaryAgeLimit')],
231
231
  dateInPast: [
232
232
  (v: any) => {
233
233
  const givenDate = new Date(formatDate(v)!);
package/types/enum.ts CHANGED
@@ -123,6 +123,7 @@ export enum Roles {
123
123
  DpDirector = 'DpDirector',
124
124
  Security = 'Security',
125
125
  URAP = 'URAP',
126
+ TravelAgent = 'TravelAgent',
126
127
  }
127
128
 
128
129
  export enum Statuses {