Fix: Menu category would only show active ones.

This commit is contained in:
Amritanshu Agrawal 2021-04-09 09:32:08 +05:30
parent 978f0fcdff
commit 4448869652
2 changed files with 3 additions and 3 deletions

View File

@ -13,6 +13,6 @@ export class MenuCategoryListResolver implements Resolve<MenuCategory[]> {
constructor(private ser: MenuCategoryService) {}
resolve(): Observable<MenuCategory[]> {
return this.ser.list();
return this.ser.list(false);
}
}

View File

@ -28,9 +28,9 @@ export class MenuCategoryService {
) as Observable<MenuCategory>;
}
list(shoudHaveActiveProducts: boolean | undefined = false): Observable<MenuCategory[]> {
list(shouldHaveActiveProducts: boolean | undefined): Observable<MenuCategory[]> {
const options = { params: new HttpParams() };
if (shoudHaveActiveProducts !== undefined) {
if (!!shouldHaveActiveProducts) {
options.params = options.params.set('p', 'true');
}
return this.http