simple role management
This commit is contained in:
@@ -6,7 +6,7 @@ import {FilterComponent} from './navigation/filter/filter.component';
|
||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||
import {LinkComponent} from './navigation/link/link.component';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
|
||||
import {RoleModule} from '../../../services/user/role.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
@@ -18,7 +18,8 @@ import {FormsModule} from '@angular/forms';
|
||||
CommonModule,
|
||||
RouterModule,
|
||||
FontAwesomeModule,
|
||||
FormsModule
|
||||
FormsModule,
|
||||
RoleModule
|
||||
],
|
||||
exports: [
|
||||
NavigationComponent
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<nav [class.hidden]="(windowScroll$|async)>60" class="head">
|
||||
<div class="links">
|
||||
<app-link [icon]="faSongs" link="/songs" text="Lieder"></app-link>
|
||||
<app-link [icon]="faShows" link="/shows" text="Veranstaltungen"></app-link>
|
||||
<app-link [icon]="faPresentation" link="/presentation" text="Präsentation"></app-link>
|
||||
<app-link *appRole="['user','presenter', 'leader']" [icon]="faSongs" link="/songs" text="Lieder"></app-link>
|
||||
<app-link *appRole="['leader']" [icon]="faShows" link="/shows" text="Veranstaltungen"></app-link>
|
||||
<app-link *appRole="['presenter']" [icon]="faPresentation" link="/presentation" text="Präsentation"></app-link>
|
||||
<app-link [icon]="faUser" link="/user" text="Benutzer"></app-link>
|
||||
</div>
|
||||
<div class="actions">
|
||||
|
||||
@@ -83,6 +83,11 @@ export class SongTextComponent implements OnInit {
|
||||
scrollTo(0, this.elRef.nativeElement.offsetTop - 20);
|
||||
}
|
||||
|
||||
public checkDisabled(i: number) {
|
||||
return this.index !== -1 && this.index !== i;
|
||||
|
||||
}
|
||||
|
||||
private getNextChordMode(): ChordMode {
|
||||
switch (this._chordMode) {
|
||||
case 'show':
|
||||
@@ -93,9 +98,4 @@ export class SongTextComponent implements OnInit {
|
||||
return 'show';
|
||||
}
|
||||
}
|
||||
|
||||
checkDisabled(i: number) {
|
||||
return this.index !== -1 && this.index !== i;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user