diff --git a/src/app/modules/shows/show/show.component.html b/src/app/modules/shows/show/show.component.html index 87029b6..779d28a 100644 --- a/src/app/modules/shows/show/show.component.html +++ b/src/app/modules/shows/show/show.component.html @@ -82,26 +82,26 @@ @if (!show.archived) { - Archivieren + Archivieren } @if (show.archived) { - Wiederherstellen + Wiederherstellen } @if (!show.published) { - Veröffentlichen + Veröffentlichen } @if (show.published) { Veröffentlichung zurückziehen } @if (show.published) { - Teilen + Teilen } @if (show.published && show.reportedType === 'pending') { - Melden + CCLI } @if (!show.published) { - Ändern + Ändern } - Herunterladen + Herunterladen - Ablauf für Lobpreisgruppe - Handout mit Copyright Infos + Ablauf für Lobpreisgruppe + Handout mit Copyright Infos } diff --git a/src/app/modules/shows/show/show.component.ts b/src/app/modules/shows/show/show.component.ts index 0bcc3f7..4e2785c 100644 --- a/src/app/modules/shows/show/show.component.ts +++ b/src/app/modules/shows/show/show.component.ts @@ -1,9 +1,8 @@ -import {ChangeDetectorRef, Component, CUSTOM_ELEMENTS_SCHEMA, HostListener, OnDestroy, OnInit, inject} from '@angular/core'; -import {filter, map, shareReplay, switchMap, tap} from 'rxjs/operators'; +import {ChangeDetectorRef, Component, CUSTOM_ELEMENTS_SCHEMA, HostListener, inject, OnDestroy, OnInit} from '@angular/core'; +import {filter, map, shareReplay, switchMap, take, tap} from 'rxjs/operators'; import {ActivatedRoute, Router} from '@angular/router'; import {ShowService} from '../services/show.service'; import {Observable, of, Subscription} from 'rxjs'; -import {take} from 'rxjs/operators'; import {Show} from '../services/show'; import {SongService} from '../../songs/services/song.service'; import {Song} from '../../songs/services/song'; @@ -14,8 +13,8 @@ import { faArrowUpRightFromSquare, faBox, faBoxOpen, - faCheck, faChevronRight, + faCompactDisc, faFileDownload, faLock, faMagnifyingGlassMinus, @@ -90,26 +89,15 @@ import {PublishedTypePipe} from '../../../widget-modules/pipes/published-type-tr ], }) export class ShowComponent implements OnInit, OnDestroy { - private activatedRoute = inject(ActivatedRoute); - private showService = inject(ShowService); - private songService = inject(SongService); - private showSongService = inject(ShowSongService); - private docxService = inject(DocxService); - private router = inject(Router); - private cRef = inject(ChangeDetectorRef); - private userService = inject(UserService); public dialog = inject(MatDialog); - private guestShowService = inject(GuestShowService); - public show$: Observable | null = null; public songs$: Observable | null = null; public showSongs: ShowSong[] | null = null; public showId: string | null = null; public showText = false; - public faBox = faBox; public faBoxOpen = faBoxOpen; - public faReport = faCheck; + public faReport = faCompactDisc; public faPublish = faUnlock; public faUnpublish = faLock; public faShare = faArrowUpRightFromSquare; @@ -125,6 +113,15 @@ export class ShowComponent implements OnInit, OnDestroy { public faMaximize = faMaximize; public faNextSong = faChevronRight; public currentTime!: Date; + private activatedRoute = inject(ActivatedRoute); + private showService = inject(ShowService); + private songService = inject(SongService); + private showSongService = inject(ShowSongService); + private docxService = inject(DocxService); + private router = inject(Router); + private cRef = inject(ChangeDetectorRef); + private userService = inject(UserService); + private guestShowService = inject(GuestShowService); private subs: Subscription[] = []; private clockIntervalId: ReturnType | null = null; @@ -270,24 +267,6 @@ export class ShowComponent implements OnInit, OnDestroy { return show.published ? 'ok' : 'none'; } - private getReportableSongs(show: Show): ReportDialogSong[] { - const uniqueSongs = new Map(); - - this.orderedShowSongs(show) - .filter(song => song.legalOwner === 'CCLI' && !!song.legalOwnerId) - .forEach(song => { - const key = song.songId || `${song.title}:${song.legalOwnerId}`; - if (!uniqueSongs.has(key)) { - uniqueSongs.set(key, { - title: song.title, - ccliNumber: song.legalOwnerId, - }); - } - }); - - return Array.from(uniqueSongs.values()); - } - public async onDownload(): Promise { if (this.showId != null) await this.docxService.create(this.showId); } @@ -361,6 +340,24 @@ export class ShowComponent implements OnInit, OnDestroy { return `${widthInCh}ch`; } + private getReportableSongs(show: Show): ReportDialogSong[] { + const uniqueSongs = new Map(); + + this.orderedShowSongs(show) + .filter(song => song.legalOwner === 'CCLI' && !!song.legalOwnerId) + .forEach(song => { + const key = song.songId || `${song.title}:${song.legalOwnerId}`; + if (!uniqueSongs.has(key)) { + uniqueSongs.set(key, { + title: song.title, + ccliNumber: song.legalOwnerId, + }); + } + }); + + return Array.from(uniqueSongs.values()); + } + private async setArchiveState(archived: boolean): Promise { if (!this.showId) { return;