Fix: Menu category would only show active ones.
This commit is contained in:
parent
978f0fcdff
commit
4448869652
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user