diff --git a/src/app/modules/shows/list/list.component.ts b/src/app/modules/shows/list/list.component.ts index fd5c55e..1fb5f5e 100644 --- a/src/app/modules/shows/list/list.component.ts +++ b/src/app/modules/shows/list/list.component.ts @@ -37,9 +37,15 @@ export class ListComponent { return filterValues?.owner; }) ); + public showType$ = this.activatedRoute.queryParams.pipe( + map(params => { + const filterValues = params as FilterValues; + return filterValues?.showType; + }) + ); - public publicShows$ = combineLatest([this.shows$, this.lastMonths$, this.owner$]).pipe( - map(([shows, lastMonths, owner]) => + public publicShows$ = combineLatest([this.shows$, this.lastMonths$, this.owner$, this.showType$]).pipe( + map(([shows, lastMonths, owner, showType]) => shows .filter(f => { const d = new Date(); @@ -47,6 +53,7 @@ export class ListComponent { return f.published && f.date.toDate() >= d; }) .filter(show => !owner || show.owner === owner) + .filter(show => !showType || show.showType === showType) ) );