monkey-front-core 0.0.330 → 0.0.331

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,20 +2889,48 @@ class MonkeyEcxCommonsService {
2889
2889
  this.__handledError = null;
2890
2890
  this.flagValidator = false;
2891
2891
  }
2892
- async resolve(route, state, otherArgs) {
2893
- if (JSON.stringify(route?.queryParams) === '{}') {
2894
- this.__data = null;
2895
- this.__page = null;
2896
- }
2892
+ async continueResolve(otherArgs) {
2897
2893
  this.__requestPaged = null;
2898
2894
  this.flagValidator = true;
2899
2895
  if (this.tokenStorage) {
2900
2896
  this.__tokenCredentials = await this.tokenStorage.getToken();
2901
2897
  }
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
+ }
2902
2931
  const pend = this.allowedSecurityAccessByPendency(otherArgs?.pendency);
2903
2932
  const allowedByProgram = this.allowedSecurityAccessByFeature(otherArgs?.featureByProgram);
2904
- if (this.allowedSecurityAccess(otherArgs?.security) &&
2905
- this.allowedSecurityAccessByCountry(otherArgs?.countrySecurity) &&
2933
+ if (this.allowedSecurityAccessByCountry(otherArgs?.countrySecurity) &&
2906
2934
  !pend.hasPendencies &&
2907
2935
  allowedByProgram) {
2908
2936
  if (this.__schedule) {
@@ -2929,28 +2957,7 @@ class MonkeyEcxCommonsService {
2929
2957
  this.__paginationOptions = otherArgs?.paginationOptions;
2930
2958
  this.handlePaginationOptions();
2931
2959
  }
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
- }
2960
+ this.continueResolve(otherArgs);
2954
2961
  }
2955
2962
  else if (!allowedByProgram) {
2956
2963
  this.navigateToErrorPage(404, otherArgs?.router);
@@ -2958,9 +2965,6 @@ class MonkeyEcxCommonsService {
2958
2965
  else if (pend.hasPendencies) {
2959
2966
  this.navigateToPendencyPage(pend, otherArgs?.router);
2960
2967
  }
2961
- else {
2962
- this.navigateToErrorPage(403, otherArgs?.router);
2963
- }
2964
2968
  }
2965
2969
  getHTTPHeaderApplicationPDF() {
2966
2970
  return {