diff --git a/dashboard/sharedComponents/sidebar/layout.service.ts b/dashboard/sharedComponents/sidebar/layout.service.ts index 993d76bd..0ae4f9e9 100644 --- a/dashboard/sharedComponents/sidebar/layout.service.ts +++ b/dashboard/sharedComponents/sidebar/layout.service.ts @@ -28,6 +28,10 @@ export class LayoutService { * Add hasAdminMenu: true on data of route config, if global sidebar should be used. */ private hasAdminMenuSubject: BehaviorSubject = new BehaviorSubject(false); + /** + * Add hasInternalSidebar: true on data of route config, if internal sidebar should be used. + */ + private hasInternalSidebarSubject: BehaviorSubject = new BehaviorSubject(false); /** * Add isFrontPage: true on data of route config, if current route is for front page. */ @@ -93,6 +97,12 @@ export class LayoutService { } else { this.setHasAdminMenu(false); } + if (data['hasInternalSidebar'] !== undefined && + data['hasInternalSidebar'] === true) { + this.setHasInternalSidebar(true); + } else { + this.setHasInternalSidebar(false); + } if (data['isFrontPage'] !== undefined && data['isFrontPage'] === true) { this.setFrontPage(true); @@ -145,7 +155,6 @@ export class LayoutService { this.hasHeaderSubject.next(value); } - get hasAdminMenu(): Observable { return this.hasAdminMenuSubject.asObservable(); } @@ -154,6 +163,14 @@ export class LayoutService { this.hasAdminMenuSubject.next(value); } + get hasInternalSidebar(): Observable { + return this.hasInternalSidebarSubject.asObservable(); + } + + setHasInternalSidebar(value: boolean) { + this.hasInternalSidebarSubject.next(value); + } + get isFrontPage(): Observable { return this.isFrontPageSubject.asObservable(); } diff --git a/dashboard/sharedComponents/sidebar/sideBar.component.html b/dashboard/sharedComponents/sidebar/sideBar.component.html index 1cf5e2d4..177abeb4 100644 --- a/dashboard/sharedComponents/sidebar/sideBar.component.html +++ b/dashboard/sharedComponents/sidebar/sideBar.component.html @@ -1,15 +1,15 @@