diff --git a/dashboard/sharedComponents/sidebar/sideBar.component.ts b/dashboard/sharedComponents/sidebar/sideBar.component.ts index a08314c3..0e5bffcc 100644 --- a/dashboard/sharedComponents/sidebar/sideBar.component.ts +++ b/dashboard/sharedComponents/sidebar/sideBar.component.ts @@ -1,4 +1,4 @@ -import { Component, Input, OnInit} from '@angular/core'; +import {Component, Input, OnInit} from '@angular/core'; import {MenuItem} from "../../../sharedComponents/menu"; import {Router} from "@angular/router"; import {DomSanitizer} from "@angular/platform-browser"; @@ -18,42 +18,47 @@ export class SideBarComponent implements OnInit { @Input() showHeader: boolean = true; @Input() activeItem: string = ''; @Input() activeSubItem: string = ''; - @Input() specialMenuItem:MenuItem = null; + @Input() specialMenuItem: MenuItem = null; @Input() searchParams = {}; @Input() queryParamsHandling = ""; properties; + constructor(private router: Router, private sanitizer: DomSanitizer, private layoutService: LayoutService) { this.properties = properties; } - - ngOnInit(): void {} - - + + ngOnInit(): void { + } + + isTheActiveMenuItem(item: MenuItem, subItem: MenuItem = null): boolean { - if(this.activeItem || this.activeSubItem){ - return (!subItem && this.activeItem === item.id) || + if (this.activeItem || this.activeSubItem) { + return (!subItem && this.activeItem === item.id) || (subItem && this.activeItem === item.id && this.activeSubItem === subItem.id); - }else { - if(subItem){ - return MenuItem.isTheActiveMenu(subItem,this.router.url.split('?')[0]) + } else { + if (subItem) { + return MenuItem.isTheActiveMenu(subItem, this.router.url.split('?')[0]) } - return MenuItem.isTheActiveMenu(item,this.router.url.split('?')[0]) + return MenuItem.isTheActiveMenu(item, this.router.url.split('?')[0]) } } - + isTheActiveUrl(menuItemURL): boolean { return (menuItemURL == this.router.url.split('?')[0]) } - satinizeHTML(html){ + + satinizeHTML(html) { return this.sanitizer.bypassSecurityTrustHtml(html); } + public get isSmallScreen() { return this.layoutService.isSmallScreen; } + public get open() { return this.layoutService.open; } - + public toggleOpen(event: MouseEvent) { event.preventDefault(); this.layoutService.setOpen(!this.open); diff --git a/dashboard/users/managers/managers.component.html b/dashboard/users/managers/managers.component.html index 1fdcc151..1091fb73 100644 --- a/dashboard/users/managers/managers.component.html +++ b/dashboard/users/managers/managers.component.html @@ -17,26 +17,40 @@