Product update sort order working
Beer Sale report should work. But it has all the products in it now. All reports working
This commit is contained in:
@ -98,7 +98,7 @@ export class ProductListComponent implements OnInit {
|
||||
}
|
||||
|
||||
updateSortOrder() {
|
||||
this.ser.updateSortOrder(this.dataSource.filteredData).subscribe({
|
||||
this.ser.updateSortOrder(this.menuCategoryFilter.value, this.dataSource.filteredData).subscribe({
|
||||
next: (result: Product[]) => {
|
||||
this.snackBar.open('', 'Success');
|
||||
this.loadData(result, this.menuCategories);
|
||||
|
||||
@ -57,9 +57,9 @@ export class ProductService {
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'update'))) as Observable<void>;
|
||||
}
|
||||
|
||||
updateSortOrder(list: Product[]): Observable<Product[]> {
|
||||
updateSortOrder(menuCategoryId: string, list: Product[]): Observable<Product[]> {
|
||||
return this.http
|
||||
.post<Product[]>(`${url}/list`, list, httpOptions)
|
||||
.post<Product[]>(`${url}/list/${menuCategoryId}`, list, httpOptions)
|
||||
.pipe(catchError(this.log.handleError(serviceName, 'updateSortOrder'))) as Observable<Product[]>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user