diff --git a/src/app/modules/shared/components/employee-info/employee-info.component.html b/src/app/modules/shared/components/employee-info/employee-info.component.html deleted file mode 100644 index fb386ba..0000000 --- a/src/app/modules/shared/components/employee-info/employee-info.component.html +++ /dev/null @@ -1,7 +0,0 @@ -
this.updateEnabledLinks(authentication.authenticated, authentication.authenticatedUser)
+ authentication => this.updateEnabledLinks(authentication.authenticatedUser)
)
}
@@ -72,20 +70,13 @@ export class HeaderComponent extends SubscribingComponent {
return this._activeLink
}
- private updateEnabledLinks(authenticated: boolean, employee: Employee) {
- this.link('/account/login').enabled = !authenticated
- this.link('/account/logout').enabled = authenticated
-
+ private updateEnabledLinks(employee: Employee) {
this.links.forEach(l => {
if (l.requiredPermission) {
l.enabled = employee && employee.permissions.indexOf(l.requiredPermission) >= 0
}
})
}
-
- private link(route: string) {
- return this.links.filter(l => l.route === route)[0]
- }
}
class HeaderLink {
diff --git a/src/app/modules/shared/components/nav/nav.component.sass b/src/app/modules/shared/components/nav/nav.component.sass
index c8a7b04..05f5622 100644
--- a/src/app/modules/shared/components/nav/nav.component.sass
+++ b/src/app/modules/shared/components/nav/nav.component.sass
@@ -2,7 +2,7 @@
nav
position: relative
- z-index: 99
+ z-index: 90
padding-bottom: 1px
a
diff --git a/src/app/modules/shared/shared.module.ts b/src/app/modules/shared/shared.module.ts
index c2325f0..bc09ead 100644
--- a/src/app/modules/shared/shared.module.ts
+++ b/src/app/modules/shared/shared.module.ts
@@ -7,7 +7,7 @@ import {MatFormFieldModule} from '@angular/material/form-field'
import {MatInputModule} from '@angular/material/input'
import {MatIconModule} from '@angular/material/icon'
import {FormsModule, ReactiveFormsModule} from '@angular/forms'
-import {EmployeeInfoComponent} from './components/employee-info/employee-info.component'
+import {EmployeeMenuComponent} from './components/employee-info/employee-menu.component'
import {LabeledIconComponent} from './components/labeled-icon/labeled-icon.component'
import {MatTableModule} from '@angular/material/table'
import {CommonModule} from '@angular/common'
@@ -35,7 +35,7 @@ import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'
@NgModule({
- declarations: [HeaderComponent, EmployeeInfoComponent, LabeledIconComponent, ConfirmBoxComponent, PermissionsListComponent, PermissionsFieldComponent, NavComponent, EntityListComponent, EntityAddComponent, EntityEditComponent, FileButtonComponent, GlobalAlertHandlerComponent, SliderFieldComponent, LoadingWheelComponent],
+ declarations: [HeaderComponent, EmployeeMenuComponent, LabeledIconComponent, ConfirmBoxComponent, PermissionsListComponent, PermissionsFieldComponent, NavComponent, EntityListComponent, EntityAddComponent, EntityEditComponent, FileButtonComponent, GlobalAlertHandlerComponent, SliderFieldComponent, LoadingWheelComponent],
exports: [
CommonModule,
HttpClientModule,
@@ -78,6 +78,7 @@ import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'
MatInputModule,
MatSelectModule,
MatOptionModule,
+ MatListModule,
MatSliderModule,
MatProgressSpinnerModule,
ReactiveFormsModule,