[develop | DONE | ADDED] irish-monitor: add new BehaviorSubject for enabling/disabling help-pop-up component on admin and non-admin pages

This commit is contained in:
Alex Martzios 2024-03-08 12:50:55 +02:00
parent c33af181bb
commit b0c69be6ef
1 changed files with 12 additions and 0 deletions

View File

@ -88,6 +88,10 @@ export class LayoutService {
* Handle it manually in the component, it doesn't use data
* */
private rootClassSubject: BehaviorSubject<string> = new BehaviorSubject<string>(null);
/**
* Display help pop-up on non-admin pages. (default true for the rest of the pages)
* */
private hasHelpPopUpSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(true);
private subscriptions: any[] = [];
ngOnDestroy() {
@ -343,4 +347,12 @@ export class LayoutService {
this.rootClassSubject.next(value);
}
}
get hasHelpPopUp(): Observable<boolean> {
return this.hasHelpPopUpSubject.asObservable();
}
setHasHelpPopUp(value: boolean) {
this.hasHelpPopUpSubject.next(value);
}
}