fix song sorting in docx

This commit is contained in:
2021-07-04 20:17:41 +02:00
parent 62cc092b95
commit 1605be82a3
4 changed files with 5 additions and 4 deletions

View File

@@ -199,7 +199,8 @@ export class DocxService {
sections,
};
});
const songs = (await Promise.all(songsAsync)).filter(_ => !!_).map(_ => _ as {showSong: ShowSong; song: Song; 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};
}

View File

@@ -1,4 +1,4 @@
import * as firebase from 'firebase';
import firebase from 'firebase/app';
import Timestamp = firebase.firestore.Timestamp;
export interface Show {

View File

@@ -4,7 +4,7 @@ import {Song} from './song';
import {SongDataService} from './song-data.service';
import {first} from 'rxjs/operators';
import {UserService} from '../../../services/user/user.service';
import * as firebase from 'firebase';
import firebase from 'firebase/app';
import Timestamp = firebase.firestore.Timestamp;
// declare let importCCLI: any;

View File

@@ -1,5 +1,5 @@
import firebase from 'firebase/app';
import Timestamp = firebase.firestore.Timestamp;
import * as firebase from 'firebase';
export interface Song {
id: string;