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:
2026-01-28 03:53:52 +00:00
parent 0a7ffb4a5c
commit 61f5f2f1af
10 changed files with 196 additions and 116 deletions

View File

@ -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);

View File

@ -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[]>;
}