This commit is contained in:
2023-05-16 17:09:36 +02:00
parent 18a2907bf7
commit e94766898d
7 changed files with 68 additions and 5 deletions

View File

@@ -27,7 +27,16 @@ export class ShowService {
() => this.showDataService.list$,
(user: User | null, shows: Show[]) => ({user, shows})
),
map(s => s.shows.filter(_ => !_.archived).filter(show => show.published || (show.owner === s.user?.id && !publishedOnly)))
map(s =>
s.shows
.sort((a, b) => a.date.toMillis() - b.date.toMillis())
.map(_ => {
console.log(_);
return _;
})
.filter(_ => !_.archived)
.filter(show => show.published || (show.owner === s.user?.id && !publishedOnly))
)
);
}