@posiwise/common-services 0.2.7 → 0.2.9
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.
|
@@ -1452,6 +1452,9 @@ class PermissionService {
|
|
|
1452
1452
|
if (!permission) {
|
|
1453
1453
|
return false;
|
|
1454
1454
|
}
|
|
1455
|
+
if (typeof permission === 'boolean') {
|
|
1456
|
+
return permission;
|
|
1457
|
+
}
|
|
1455
1458
|
let expr = '';
|
|
1456
1459
|
if (permission === PERMISSION_NAMES.SuperAdmin) {
|
|
1457
1460
|
return this.isSuperAdmin();
|
|
@@ -1708,7 +1711,6 @@ class CustomPreloadingStrategy {
|
|
|
1708
1711
|
preload(route, load) {
|
|
1709
1712
|
// Skip preloading if we're on the landing page (root path)
|
|
1710
1713
|
if (this.router.url === '/' || this.router.url === '') {
|
|
1711
|
-
console.log('🚫 Skipping preload for route:', route.path, '- on landing page');
|
|
1712
1714
|
return of(null);
|
|
1713
1715
|
}
|
|
1714
1716
|
const loadRoute = delay => (delay ? timer(5000).pipe(mergeMap(_ => load())) : load());
|
|
@@ -1765,7 +1767,6 @@ class AbTestService {
|
|
|
1765
1767
|
* dynamically loads the microservice
|
|
1766
1768
|
*/
|
|
1767
1769
|
getServiceInstance(service) {
|
|
1768
|
-
console.log(typeof service);
|
|
1769
1770
|
return service ? this.injector.get(service) : this.injector.get(MainApiHttpService); // fallback to Core Microservice
|
|
1770
1771
|
}
|
|
1771
1772
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: AbTestService, deps: [{ token: i0.Injector }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
@@ -3059,7 +3060,6 @@ class SentryErrorHandler {
|
|
|
3059
3060
|
return; // Skip logging to Sentry
|
|
3060
3061
|
}
|
|
3061
3062
|
if (error.status === 0 && error.statusText === 'Unknown Error') {
|
|
3062
|
-
// Handle network-related errors differently or suppress them
|
|
3063
3063
|
console.warn('Network-related error:', error);
|
|
3064
3064
|
return; // Don't rethrow the error
|
|
3065
3065
|
}
|
|
@@ -3078,12 +3078,11 @@ class SentryErrorHandler {
|
|
|
3078
3078
|
try {
|
|
3079
3079
|
message = JSON.stringify(error);
|
|
3080
3080
|
}
|
|
3081
|
-
catch
|
|
3081
|
+
catch {
|
|
3082
3082
|
message =
|
|
3083
3083
|
typeof error === 'object' && error !== null
|
|
3084
3084
|
? JSON.stringify(error)
|
|
3085
3085
|
: error.toString();
|
|
3086
|
-
console.log(e);
|
|
3087
3086
|
}
|
|
3088
3087
|
}
|
|
3089
3088
|
return message;
|