@open-rlb/ng-app 3.0.21 → 3.0.22
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.
|
@@ -502,8 +502,19 @@ class AppsService {
|
|
|
502
502
|
appRoutesMatched = appRoutes?.filter(app => app.routes?.some(r => r.includes(fullPath))) ?? [];
|
|
503
503
|
}
|
|
504
504
|
this.logger.info('Route fullPath:', fullPath, 'Matched appRoute:', appRoutesMatched);
|
|
505
|
-
return this.store.select(state => state[appContextFeatureKey].apps).pipe(
|
|
506
|
-
|
|
505
|
+
return this.store.select(state => state[appContextFeatureKey].apps).pipe(
|
|
506
|
+
// waiting for all "finalizeApp" dispatches
|
|
507
|
+
filter(apps => {
|
|
508
|
+
if (!apps || apps.length === 0)
|
|
509
|
+
return true;
|
|
510
|
+
const allFinalized = !apps.some(app => !app.id);
|
|
511
|
+
if (!allFinalized) {
|
|
512
|
+
this.logger.info('Waiting for apps initialization (finalizeApp)...');
|
|
513
|
+
}
|
|
514
|
+
return allFinalized;
|
|
515
|
+
}),
|
|
516
|
+
// Return config in there are matched apps, or it's root route case
|
|
517
|
+
map(apps => {
|
|
507
518
|
if (appRoutesMatched.length > 0 || fullPath === '') {
|
|
508
519
|
return { route, appsConfig: appRoutesMatched, apps };
|
|
509
520
|
}
|
|
@@ -1367,23 +1378,11 @@ class AuthenticationService {
|
|
|
1367
1378
|
}
|
|
1368
1379
|
else {
|
|
1369
1380
|
this.logger.info(`User authenticated, no redirectUrl found. Staying on current route.`);
|
|
1370
|
-
// this.router.navigate([], {
|
|
1371
|
-
// queryParams: {},
|
|
1372
|
-
// replaceUrl: true,
|
|
1373
|
-
// relativeTo: this.router.routerState.root
|
|
1374
|
-
// });
|
|
1375
1381
|
}
|
|
1376
1382
|
}
|
|
1377
1383
|
else {
|
|
1378
1384
|
this.logger.warn(`No authenticatedConfig found for ${url}`);
|
|
1379
1385
|
}
|
|
1380
|
-
// if (data.some(o => o.isAuthenticated)) {
|
|
1381
|
-
// const redirect = this.cookiesService.getCookie('loginRedirectUrl');
|
|
1382
|
-
// if (redirect) {
|
|
1383
|
-
// this.cookiesService.deleteCookie('loginRedirectUrl');
|
|
1384
|
-
// this.router.navigate([redirect]);
|
|
1385
|
-
// }
|
|
1386
|
-
// }
|
|
1387
1386
|
}));
|
|
1388
1387
|
//}
|
|
1389
1388
|
}
|