Remove UI widgetBundles filter if Edge if disabled
This commit is contained in:
parent
50127b8cc7
commit
633131574a
@ -121,14 +121,7 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon
|
||||
this.config.entitySelectionEnabled = (widgetsBundle) => this.isWidgetsBundleEditable(widgetsBundle, authUser.authority);
|
||||
this.config.detailsReadonly = (widgetsBundle) => !this.isWidgetsBundleEditable(widgetsBundle, authUser.authority);
|
||||
const authState = getCurrentAuthState(this.store);
|
||||
this.config.entitiesFetchFunction = pageLink => this.widgetsService.getWidgetBundles(pageLink).pipe(
|
||||
map((widgetBundles) => {
|
||||
if (!authState.edgesSupportEnabled) {
|
||||
widgetBundles.data = widgetBundles.data.filter(widgetBundle => widgetBundle.alias !== 'edge_widgets');
|
||||
}
|
||||
return widgetBundles;
|
||||
})
|
||||
);
|
||||
this.config.entitiesFetchFunction = pageLink => this.widgetsService.getWidgetBundles(pageLink);
|
||||
return this.config;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user