diff --git a/src/app/modules/shared/components/header/header.component.html b/src/app/modules/shared/components/header/header.component.html index 20bda30..8c37227 100644 --- a/src/app/modules/shared/components/header/header.component.html +++ b/src/app/modules/shared/components/header/header.component.html @@ -3,13 +3,15 @@
diff --git a/src/app/modules/shared/components/header/header.component.ts b/src/app/modules/shared/components/header/header.component.ts index 9e256bb..9f3585f 100644 --- a/src/app/modules/shared/components/header/header.component.ts +++ b/src/app/modules/shared/components/header/header.component.ts @@ -12,6 +12,8 @@ import {ErrorService} from '../../service/error.service' styleUrls: ['./header.component.sass'] }) export class HeaderComponent extends SubscribingComponent { + catalogEnabled = false + links: HeaderLink[] = [ {route: '/color', title: 'Couleurs', requiredPermission: EmployeePermission.VIEW_RECIPE}, {route: '/catalog', title: 'Catalogue', enabled: true}, @@ -81,6 +83,10 @@ export class HeaderComponent extends SubscribingComponent { l.enabled = employee && employee.permissions.indexOf(l.requiredPermission) >= 0 } }) + + this.catalogEnabled = this.accountService.hasPermission(EmployeePermission.VIEW_MATERIAL_TYPE) || + this.accountService.hasPermission(EmployeePermission.VIEW_MATERIAL) || + this.accountService.hasPermission(EmployeePermission.VIEW_COMPANY) } private link(route: string) {