feat: add quantity field to product CRUD; implement image upload and condition handling in product dialog

This commit is contained in:
Vincent Guillet
2025-11-18 15:38:24 +01:00
parent bcc71b965b
commit d4ffcf0562
5 changed files with 691 additions and 298 deletions

View File

@@ -50,7 +50,7 @@ export class PsProductCrudComponent implements OnInit {
private supMap = new Map<number, string>();
// table
displayed: string[] = ['id', 'name', 'category', 'manufacturer', 'supplier', 'priceTtc', 'actions'];
displayed: string[] = ['id', 'name', 'category', 'manufacturer', 'supplier', 'priceTtc', 'quantity', 'actions'];
dataSource = new MatTableDataSource<any>([]);
@ViewChild(MatPaginator) paginator!: MatPaginator;
@ViewChild(MatSort) sort!: MatSort;
@@ -85,7 +85,8 @@ export class PsProductCrudComponent implements OnInit {
String(row.id).includes(f) ||
(row.categoryName?.toLowerCase().includes(f)) ||
(row.manufacturerName?.toLowerCase().includes(f)) ||
(row.supplierName?.toLowerCase().includes(f));
(row.supplierName?.toLowerCase().includes(f)) ||
String(row.quantity ?? '').includes(f);
}
private toTtc(ht: number, vat: number) {