new role for members
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
<div>
|
||||
<app-list-header></app-list-header>
|
||||
<app-list-header *appRole="['leader']"></app-list-header>
|
||||
|
||||
<ng-container *ngIf="shows$ | async as shows">
|
||||
<app-card
|
||||
*ngIf="getPrivateSongs(shows).length > 0"
|
||||
[@fade]
|
||||
[padding]="false"
|
||||
heading="meine Veranstaltungen"
|
||||
>
|
||||
<app-list-item
|
||||
*ngFor="let show of getPrivateSongs(shows)"
|
||||
[routerLink]="show.id"
|
||||
[show]="show"
|
||||
></app-list-item>
|
||||
</app-card>
|
||||
<ng-container *appRole="['leader']">
|
||||
<ng-container *ngIf="shows$ | async as shows">
|
||||
<app-card
|
||||
*ngIf="getPrivateSongs(shows).length > 0"
|
||||
[@fade]
|
||||
[padding]="false"
|
||||
heading="meine Veranstaltungen"
|
||||
>
|
||||
<app-list-item
|
||||
*ngFor="let show of getPrivateSongs(shows) | sortBy: 'desc':'date'"
|
||||
[routerLink]="show.id"
|
||||
[show]="show"
|
||||
></app-list-item>
|
||||
</app-card>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="shows$ | async as shows">
|
||||
@@ -24,7 +26,7 @@
|
||||
heading="veröffentlichte Veranstaltungen"
|
||||
>
|
||||
<app-list-item
|
||||
*ngFor="let show of getPublicShows(shows)"
|
||||
*ngFor="let show of getPublicShows(shows) | sortBy: 'desc':'date'"
|
||||
[routerLink]="show.id"
|
||||
[show]="show"
|
||||
></app-list-item>
|
||||
|
||||
@@ -18,7 +18,7 @@ export class ListComponent {
|
||||
}
|
||||
|
||||
public getPublicShows(songs: Show[]): Show[] {
|
||||
return songs.filter(_ => _.published).sort((a, b) => (b.date < a.date ? -1 : b.date > a.date ? 1 : 0));
|
||||
return songs.filter(_ => _.published);
|
||||
}
|
||||
|
||||
public getPrivateSongs(songs: Show[]): Show[] {
|
||||
|
||||
@@ -32,42 +32,45 @@
|
||||
></app-add-song>
|
||||
|
||||
<app-button-row>
|
||||
<ng-container *appOwner="show.owner">
|
||||
<app-button
|
||||
(click)="onArchive(true)"
|
||||
*ngIf="!show.archived"
|
||||
[icon]="faBox"
|
||||
>
|
||||
Archivieren
|
||||
</app-button>
|
||||
<app-button
|
||||
(click)="onArchive(false)"
|
||||
*ngIf="show.archived"
|
||||
[icon]="faBoxOpen"
|
||||
>
|
||||
Wiederherstellen
|
||||
</app-button>
|
||||
<app-button
|
||||
(click)="onPublish(true)"
|
||||
*ngIf="!show.published"
|
||||
[icon]="faPublish"
|
||||
>
|
||||
Veröffentlichen
|
||||
</app-button>
|
||||
<app-button
|
||||
(click)="onPublish(false)"
|
||||
*ngIf="show.published"
|
||||
[icon]="faUnpublish"
|
||||
>
|
||||
Veröffentlichung zurückziehen
|
||||
</app-button>
|
||||
<ng-container *appRole="['leader']">
|
||||
<ng-container *appOwner="show.owner">
|
||||
<app-button
|
||||
(click)="onArchive(true)"
|
||||
*ngIf="!show.archived"
|
||||
[icon]="faBox"
|
||||
>
|
||||
Archivieren
|
||||
</app-button>
|
||||
<app-button
|
||||
(click)="onArchive(false)"
|
||||
*ngIf="show.archived"
|
||||
[icon]="faBoxOpen"
|
||||
>
|
||||
Wiederherstellen
|
||||
</app-button>
|
||||
<app-button
|
||||
(click)="onPublish(true)"
|
||||
*ngIf="!show.published"
|
||||
[icon]="faPublish"
|
||||
>
|
||||
Veröffentlichen
|
||||
</app-button>
|
||||
<app-button
|
||||
(click)="onPublish(false)"
|
||||
*ngIf="show.published"
|
||||
[icon]="faUnpublish"
|
||||
>
|
||||
Veröffentlichung zurückziehen
|
||||
</app-button>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
||||
<app-button [icon]="faDownload" [matMenuTriggerFor]="menu"
|
||||
>Herunterladen
|
||||
</app-button>
|
||||
<mat-menu #menu="matMenu">
|
||||
<app-button (click)="onDownload()" [icon]="faUser"
|
||||
>Ablauf für Lobpreisleiter
|
||||
>Ablauf für Lobpreisgruppe
|
||||
</app-button>
|
||||
<app-button (click)="onDownloadHandout()" [icon]="faUsers"
|
||||
>Handout mit Copyright Infos
|
||||
|
||||
@@ -29,6 +29,8 @@ import {OwnerModule} from '../../services/user/owner.module';
|
||||
import {UserNameModule} from '../../services/user/user-name/user-name.module';
|
||||
import {MatMenuModule} from '@angular/material/menu';
|
||||
import {DragDropModule} from '@angular/cdk/drag-drop';
|
||||
import {RoleModule} from '../../services/user/role.module';
|
||||
import {SortByModule} from '../../widget-modules/pipes/sort-by/sort-by.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [NewComponent, ListComponent, ListItemComponent, ShowComponent, SongComponent],
|
||||
@@ -58,6 +60,8 @@ import {DragDropModule} from '@angular/cdk/drag-drop';
|
||||
UserNameModule,
|
||||
MatMenuModule,
|
||||
DragDropModule,
|
||||
RoleModule,
|
||||
SortByModule,
|
||||
],
|
||||
})
|
||||
export class ShowsModule {}
|
||||
|
||||
Reference in New Issue
Block a user