export docx
This commit is contained in:
@@ -31,6 +31,9 @@
|
||||
<button (click)="onArchive(false)" *ngIf="show.archived" mat-button>Wiederherstellen</button>
|
||||
<button (click)="onPublish(true)" *ngIf="!show.published" mat-button>Veröffentlichen</button>
|
||||
<button (click)="onPublish(false)" *ngIf="show.published" mat-button>Veröffentlichung zurückziehen</button>
|
||||
|
||||
<button (click)="onDownload()" mat-button>Herunterladen</button>
|
||||
|
||||
</app-button-row>
|
||||
</app-card>
|
||||
</div>
|
||||
|
||||
@@ -9,6 +9,7 @@ import {Song} from '../../songs/services/song';
|
||||
import {MatSelectChange} from '@angular/material/select';
|
||||
import {ShowSongService} from '../services/show-song.service';
|
||||
import {ShowSong} from '../services/showSong';
|
||||
import {DocxService} from '../services/docx.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-show',
|
||||
@@ -27,6 +28,7 @@ export class ShowComponent implements OnInit {
|
||||
private showService: ShowService,
|
||||
private songService: SongService,
|
||||
private showSongService: ShowSongService,
|
||||
private docxService: DocxService,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -83,4 +85,8 @@ export class ShowComponent implements OnInit {
|
||||
if (show.reported) return 'gemeldet';
|
||||
return 'entwurf';
|
||||
}
|
||||
|
||||
public async onDownload(): Promise<void> {
|
||||
await this.docxService.create(this.showId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user