add comments in show
This commit is contained in:
@@ -30,12 +30,10 @@ export class DocxService {
|
||||
public constructor(
|
||||
private showService: ShowService,
|
||||
private showSongService: ShowSongService,
|
||||
private songService: SongService,
|
||||
private textRenderingService: TextRenderingService,
|
||||
private userService: UserService,
|
||||
private configService: ConfigService,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public async create(showId: string, options: DownloadOptions = {}): Promise<void> {
|
||||
const data = await this.prepareData(showId);
|
||||
@@ -95,10 +93,14 @@ export class DocxService {
|
||||
});
|
||||
}
|
||||
|
||||
private renderSongs(songs: {
|
||||
showSong: ShowSong;
|
||||
sections: Section[]
|
||||
}[], options: DownloadOptions, config: Config): Paragraph[] {
|
||||
private renderSongs(
|
||||
songs: {
|
||||
showSong: ShowSong;
|
||||
sections: Section[];
|
||||
}[],
|
||||
options: DownloadOptions,
|
||||
config: Config
|
||||
): Paragraph[] {
|
||||
return songs.reduce((p: Paragraph[], song) => [...p, ...this.renderSong(song.showSong, song.showSong, song.sections, options, config)], []);
|
||||
}
|
||||
|
||||
@@ -203,10 +205,15 @@ export class DocxService {
|
||||
sections,
|
||||
};
|
||||
});
|
||||
const songsLoaded = (await Promise.all(songsAsync)).filter(_ => !!_).map(_ => _ as {
|
||||
showSong: ShowSong;
|
||||
sections: Section[]
|
||||
});
|
||||
const songsLoaded = (await Promise.all(songsAsync))
|
||||
.filter(_ => !!_)
|
||||
.map(
|
||||
_ =>
|
||||
_ as {
|
||||
showSong: ShowSong;
|
||||
sections: Section[];
|
||||
}
|
||||
);
|
||||
const songs = show.order.map(_ => songsLoaded.filter(f => f.showSong.id === _)[0]);
|
||||
return {songs, show, user, config};
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import {ShowSongService} from '../services/show-song.service';
|
||||
import {ShowSong} from '../services/show-song';
|
||||
import {DocxService} from '../services/docx.service';
|
||||
import {
|
||||
faArrowUpRightFromSquare,
|
||||
faBox,
|
||||
faBoxOpen,
|
||||
faExternalLinkAlt,
|
||||
@@ -19,8 +20,7 @@ import {
|
||||
faLock,
|
||||
faMagnifyingGlassMinus,
|
||||
faMagnifyingGlassPlus,
|
||||
faShare,
|
||||
faSliders,
|
||||
faSliders, faUnlock,
|
||||
faUser,
|
||||
faUsers,
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
@@ -48,9 +48,9 @@ export class ShowComponent implements OnInit, OnDestroy {
|
||||
|
||||
public faBox = faBox;
|
||||
public faBoxOpen = faBoxOpen;
|
||||
public faPublish = faExternalLinkAlt;
|
||||
public faPublish = faUnlock;
|
||||
public faUnpublish = faLock;
|
||||
public faShare = faShare;
|
||||
public faShare = faArrowUpRightFromSquare;
|
||||
public faDownload = faFileDownload;
|
||||
public faSliders = faSliders;
|
||||
public faUser = faUser;
|
||||
|
||||
Reference in New Issue
Block a user