Skip to content

Commit 28d39fa

Browse files
committed
fix: context filter not loaded in front-office
1 parent 43bc881 commit 28d39fa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

apps/front-office/src/app/application/pages/dashboard/dashboard.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
SafeWidgetGridComponent,
2424
SafeConfirmService,
2525
ButtonActionT,
26+
ContextService,
2627
} from '@oort-front/safe';
2728
import { TranslateService } from '@ngx-translate/core';
2829
import { filter, map, startWith, takeUntil } from 'rxjs/operators';
@@ -87,6 +88,7 @@ export class DashboardComponent
8788
* @param renderer Angular renderer
8889
* @param elementRef Angular element ref
8990
* @param document Document
91+
* @param contextService Dashboard context service
9092
*/
9193
constructor(
9294
private apollo: Apollo,
@@ -99,7 +101,8 @@ export class DashboardComponent
99101
private confirmService: SafeConfirmService,
100102
private renderer: Renderer2,
101103
private elementRef: ElementRef,
102-
@Inject(DOCUMENT) private document: Document
104+
@Inject(DOCUMENT) private document: Document,
105+
private contextService: ContextService
103106
) {
104107
super();
105108
}
@@ -231,7 +234,8 @@ export class DashboardComponent
231234
? data.dashboard.structure
232235
: [];
233236
this.buttonActions = this.dashboard.buttons || [];
234-
this.showFilter = this.dashboard.showFilter;
237+
this.showFilter = this.dashboard.showFilter ?? false;
238+
this.contextService.isFilterEnabled.next(this.showFilter);
235239
} else {
236240
this.snackBar.openSnackBar(
237241
this.translate.instant('common.notifications.accessNotProvided', {

0 commit comments

Comments
 (0)