diff --git a/src/app/components/purchase-order-table/purchase-order-table.html b/src/app/components/purchase-order-table/purchase-order-table.html index 8a32d6a..55a6d49 100644 --- a/src/app/components/purchase-order-table/purchase-order-table.html +++ b/src/app/components/purchase-order-table/purchase-order-table.html @@ -36,7 +36,7 @@ {{ product.productName }} {{ product.productReference }} - Prix €€€€ + {{ product.productPrice }} {{ product.quantity }}
diff --git a/src/app/components/supplier-table/supplier-table.html b/src/app/components/supplier-table/supplier-table.html index 63a3039..5053fc8 100644 --- a/src/app/components/supplier-table/supplier-table.html +++ b/src/app/components/supplier-table/supplier-table.html @@ -36,10 +36,10 @@ - @for (product of supplier.prices; track product.id) { + @for (product of supplier.prices; track product.productId) { {{ product.productName }} - {{ product.productReferences }} + {{ product.productReference }} {{ product.sellingPrice }}€
@@ -49,7 +49,7 @@ + (click)="deleteProduct(product.productId, supplier.id)">
diff --git a/src/app/components/supplier-table/supplier-table.ts b/src/app/components/supplier-table/supplier-table.ts index 20c44d3..a074980 100644 --- a/src/app/components/supplier-table/supplier-table.ts +++ b/src/app/components/supplier-table/supplier-table.ts @@ -159,7 +159,7 @@ export class SupplierTable implements OnInit { async deleteProduct(idProduct: number, idSupplier: number) { try { - await firstValueFrom(this.suppliersService.deleteProductToSupplierEndpoint(idProduct, idSupplier)); + await firstValueFrom(this.suppliersService.deleteProductToSupplierEndpoint(idSupplier, idProduct)); this.notificationService.success('Succès', 'Produit supprimé'); await this.fetchSuppliers(); } catch (e) {