monkey-front-core 0.0.189 → 0.0.192
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.
- package/esm2020/lib/core/services/commons/monkeyecx-commons.service.mjs +26 -7
- package/fesm2015/monkey-front-core.mjs +26 -6
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +25 -6
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/lib/core/services/commons/monkeyecx-commons.service.d.ts +6 -1
- package/monkey-front-core-0.0.192.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.189.tgz +0 -0
|
@@ -2191,8 +2191,7 @@ class MonkeyEcxCommonsService {
|
|
|
2191
2191
|
router.navigate([`${route}/company-pendency`.toLowerCase()], {
|
|
2192
2192
|
state: {
|
|
2193
2193
|
pendencyData: arg
|
|
2194
|
-
}
|
|
2195
|
-
skipLocationChange: true
|
|
2194
|
+
}
|
|
2196
2195
|
});
|
|
2197
2196
|
}
|
|
2198
2197
|
}
|
|
@@ -2214,6 +2213,23 @@ class MonkeyEcxCommonsService {
|
|
|
2214
2213
|
const { service, type } = args;
|
|
2215
2214
|
return service.hasPendencies(type);
|
|
2216
2215
|
}
|
|
2216
|
+
allowedSecurityAccessByFeature(args) {
|
|
2217
|
+
if (!args) {
|
|
2218
|
+
return true;
|
|
2219
|
+
}
|
|
2220
|
+
const { config, feature } = args;
|
|
2221
|
+
try {
|
|
2222
|
+
if (!MonkeyEcxUtils.persistNullEmptyUndefined(feature) ||
|
|
2223
|
+
!MonkeyEcxUtils.persistNullEmptyUndefined(config?.program?.settings[feature])) {
|
|
2224
|
+
return false;
|
|
2225
|
+
}
|
|
2226
|
+
return !config?.program?.settings[feature];
|
|
2227
|
+
}
|
|
2228
|
+
catch (e) {
|
|
2229
|
+
// not to do
|
|
2230
|
+
}
|
|
2231
|
+
return true;
|
|
2232
|
+
}
|
|
2217
2233
|
allowedSecurityAccessByCountry(arg) {
|
|
2218
2234
|
if (!arg)
|
|
2219
2235
|
return true;
|
|
@@ -2254,9 +2270,7 @@ class MonkeyEcxCommonsService {
|
|
|
2254
2270
|
console.error('Router must be declared');
|
|
2255
2271
|
}
|
|
2256
2272
|
else {
|
|
2257
|
-
router?.navigate([`/app/pages/${routes[statusCode]}`.toLowerCase()]
|
|
2258
|
-
skipLocationChange: true
|
|
2259
|
-
});
|
|
2273
|
+
router?.navigate([`/app/pages/${routes[statusCode]}`.toLowerCase()]);
|
|
2260
2274
|
}
|
|
2261
2275
|
}
|
|
2262
2276
|
handlePaginationOptions() {
|
|
@@ -2334,9 +2348,11 @@ class MonkeyEcxCommonsService {
|
|
|
2334
2348
|
this.__tokenCredentials = this.tokenStorage.getToken();
|
|
2335
2349
|
}
|
|
2336
2350
|
const pend = this.allowedSecurityAccessByPendency(otherArgs?.pendency);
|
|
2351
|
+
const allowedByProgram = this.allowedSecurityAccessByFeature(otherArgs?.featureByProgram);
|
|
2337
2352
|
if (this.allowedSecurityAccess(otherArgs?.security) &&
|
|
2338
2353
|
this.allowedSecurityAccessByCountry(otherArgs?.countrySecurity) &&
|
|
2339
|
-
!pend.hasPendencies
|
|
2354
|
+
!pend.hasPendencies &&
|
|
2355
|
+
allowedByProgram) {
|
|
2340
2356
|
if (this.__schedule) {
|
|
2341
2357
|
this.otherArgs?.schedule?.service?.removeSchedule(this.__schedule);
|
|
2342
2358
|
this.__schedule = null;
|
|
@@ -2384,6 +2400,9 @@ class MonkeyEcxCommonsService {
|
|
|
2384
2400
|
otherArgs?.callbackMain();
|
|
2385
2401
|
}
|
|
2386
2402
|
}
|
|
2403
|
+
else if (allowedByProgram) {
|
|
2404
|
+
this.navigateToErrorPage(404, otherArgs?.router);
|
|
2405
|
+
}
|
|
2387
2406
|
else if (pend.hasPendencies) {
|
|
2388
2407
|
this.navigateToPendencyPage(pend, otherArgs?.router);
|
|
2389
2408
|
}
|