monkey-front-core 0.0.331 → 0.0.332

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.
@@ -2889,48 +2889,20 @@ class MonkeyEcxCommonsService {
2889
2889
  this.__handledError = null;
2890
2890
  this.flagValidator = false;
2891
2891
  }
2892
- async continueResolve(otherArgs) {
2892
+ async resolve(route, state, otherArgs) {
2893
+ if (JSON.stringify(route?.queryParams) === '{}') {
2894
+ this.__data = null;
2895
+ this.__page = null;
2896
+ }
2893
2897
  this.__requestPaged = null;
2894
2898
  this.flagValidator = true;
2895
2899
  if (this.tokenStorage) {
2896
2900
  this.__tokenCredentials = await this.tokenStorage.getToken();
2897
2901
  }
2898
- if (this.allowedSecurityAccess(otherArgs?.security)) {
2899
- if (otherArgs?.feature) {
2900
- const { flag, service } = otherArgs.feature;
2901
- service.onFlags
2902
- .pipe(takeWhile(() => {
2903
- return this.flagValidator;
2904
- }))
2905
- .subscribe((val) => {
2906
- if (val) {
2907
- const hasFlag = service.getFlag(flag);
2908
- if (MonkeyEcxUtils.persistNullEmptyUndefined(hasFlag)) {
2909
- if (!hasFlag) {
2910
- this.navigateToErrorPage(404, otherArgs?.router);
2911
- return;
2912
- }
2913
- }
2914
- otherArgs?.callbackMain();
2915
- }
2916
- });
2917
- }
2918
- else {
2919
- otherArgs?.callbackMain();
2920
- }
2921
- }
2922
- else {
2923
- this.navigateToErrorPage(403, otherArgs?.router);
2924
- }
2925
- }
2926
- resolve(route, state, otherArgs) {
2927
- if (JSON.stringify(route?.queryParams) === '{}') {
2928
- this.__data = null;
2929
- this.__page = null;
2930
- }
2931
2902
  const pend = this.allowedSecurityAccessByPendency(otherArgs?.pendency);
2932
2903
  const allowedByProgram = this.allowedSecurityAccessByFeature(otherArgs?.featureByProgram);
2933
- if (this.allowedSecurityAccessByCountry(otherArgs?.countrySecurity) &&
2904
+ if (this.allowedSecurityAccess(otherArgs?.security) &&
2905
+ this.allowedSecurityAccessByCountry(otherArgs?.countrySecurity) &&
2934
2906
  !pend.hasPendencies &&
2935
2907
  allowedByProgram) {
2936
2908
  if (this.__schedule) {
@@ -2957,7 +2929,28 @@ class MonkeyEcxCommonsService {
2957
2929
  this.__paginationOptions = otherArgs?.paginationOptions;
2958
2930
  this.handlePaginationOptions();
2959
2931
  }
2960
- this.continueResolve(otherArgs);
2932
+ if (otherArgs?.feature) {
2933
+ const { flag, service } = otherArgs.feature;
2934
+ service.onFlags
2935
+ .pipe(takeWhile(() => {
2936
+ return this.flagValidator;
2937
+ }))
2938
+ .subscribe((val) => {
2939
+ if (val) {
2940
+ const hasFlag = service.getFlag(flag);
2941
+ if (MonkeyEcxUtils.persistNullEmptyUndefined(hasFlag)) {
2942
+ if (!hasFlag) {
2943
+ this.navigateToErrorPage(404, otherArgs?.router);
2944
+ return;
2945
+ }
2946
+ }
2947
+ otherArgs?.callbackMain();
2948
+ }
2949
+ });
2950
+ }
2951
+ else {
2952
+ otherArgs?.callbackMain();
2953
+ }
2961
2954
  }
2962
2955
  else if (!allowedByProgram) {
2963
2956
  this.navigateToErrorPage(404, otherArgs?.router);
@@ -2965,6 +2958,9 @@ class MonkeyEcxCommonsService {
2965
2958
  else if (pend.hasPendencies) {
2966
2959
  this.navigateToPendencyPage(pend, otherArgs?.router);
2967
2960
  }
2961
+ else {
2962
+ this.navigateToErrorPage(403, otherArgs?.router);
2963
+ }
2968
2964
  }
2969
2965
  getHTTPHeaderApplicationPDF() {
2970
2966
  return {
@@ -4942,8 +4938,8 @@ class MonkeyEcxDiscoveryParamsService {
4942
4938
  const found = MonkeyEcxUtils.persistNullEmptyUndefined(route) ? route.data[field] : null;
4943
4939
  return found;
4944
4940
  }
4945
- getDataFromCurrentNavigation(field) {
4946
- const navigation = this.router.getCurrentNavigation();
4941
+ getDataFromCurrentNavigation(field, router) {
4942
+ const navigation = this.router.getCurrentNavigation() || router?.getCurrentNavigation();
4947
4943
  let state = null;
4948
4944
  if (MonkeyEcxUtils.persistNullEmptyUndefined(navigation)) {
4949
4945
  state = navigation?.extras.state;