export docx

This commit is contained in:
2020-04-21 12:14:23 +02:00
committed by smuddy
parent 0b8e2212e9
commit 5695640fe4
6 changed files with 181 additions and 10 deletions

View File

@@ -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>

View File

@@ -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);
}
}