@open-rlb/ng-app 3.1.22 → 3.1.24
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.
|
@@ -1674,6 +1674,7 @@ class CompanyInterceptor {
|
|
|
1674
1674
|
}
|
|
1675
1675
|
const currentApp = this.store.selectSignal(state => state[appContextFeatureKey].currentApp)();
|
|
1676
1676
|
const data = currentApp?.data;
|
|
1677
|
+
console.log('CompanyInterceptor - currentApp data:', data);
|
|
1677
1678
|
const mapping = this.config.acl?.interceptorMapping || {};
|
|
1678
1679
|
let params = req.params;
|
|
1679
1680
|
for (const key of Object.keys(mapping)) {
|
|
@@ -3093,16 +3094,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImpor
|
|
|
3093
3094
|
|
|
3094
3095
|
const appFeature = createFeature({
|
|
3095
3096
|
name: appContextFeatureKey,
|
|
3096
|
-
reducer: createReducer(initialAppContextState, on(AppContextActionsInternal.setCurrentApp, (state, { app, mode, url }) => ({ ...state, currentApp: app ? { ...app, viewMode: mode, navigationUrl: url } : null })), on(AppContextActions.removeApp, (state, { appType }) => ({ ...state, apps: state.apps.filter(a => a.type !== appType) })), on(AppContextActions.finalizeApp, (state, { appType, data, appId
|
|
3097
|
+
reducer: createReducer(initialAppContextState, on(AppContextActionsInternal.setCurrentApp, (state, { app, mode, url }) => ({ ...state, currentApp: app ? { ...app, viewMode: mode, navigationUrl: url } : null })), on(AppContextActions.removeApp, (state, { appType }) => ({ ...state, apps: state.apps.filter(a => a.type !== appType) })), on(AppContextActions.finalizeApp, (state, { appType, data, appId }) => {
|
|
3097
3098
|
const appsOfType = state.apps.filter(a => a.type === appType);
|
|
3098
3099
|
if (appsOfType.length === 0)
|
|
3099
3100
|
throw new Error(`App type: ${appType} not found. Cannot finalize app.`);
|
|
3100
3101
|
let updatedAppsOfType;
|
|
3101
3102
|
if (appsOfType.length === 1 && !appsOfType[0].id) {
|
|
3102
|
-
updatedAppsOfType = [{ ...appsOfType[0], data, id: appId
|
|
3103
|
+
updatedAppsOfType = [{ ...appsOfType[0], data, id: appId }];
|
|
3103
3104
|
}
|
|
3104
3105
|
else {
|
|
3105
|
-
updatedAppsOfType = [...appsOfType, { ...appsOfType[0], data, id: appId
|
|
3106
|
+
updatedAppsOfType = [...appsOfType, { ...appsOfType[0], data, id: appId }];
|
|
3106
3107
|
}
|
|
3107
3108
|
const remainingApps = state.apps.filter(a => a.type !== appType);
|
|
3108
3109
|
return { ...state, apps: [...remainingApps, ...updatedAppsOfType], };
|