added suppr and edit modal for supplier price
This commit is contained in:
@@ -25,22 +25,32 @@
|
||||
<td>{{ supplier.city }}</td>
|
||||
<td>{{ supplier.deliveryDelay }} jours</td>
|
||||
<td>
|
||||
<app-modal-button type="link" [name]="'Voir les produits'" size="40%">
|
||||
<nz-table [nzData]="suppliers()"
|
||||
[nzFrontPagination]="false">
|
||||
<app-modal-button type="link" [name]="'Voir les produits'" size="45%">
|
||||
<nz-table [nzData]="suppliers()" [nzFrontPagination]="false">
|
||||
<thead>
|
||||
<tr style="text-align: center">
|
||||
<tr class="text-center">
|
||||
<th>Produit</th>
|
||||
<th>Référence</th>
|
||||
<th>Prix</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody style="text-align: center">
|
||||
<tbody class="text-center">
|
||||
@for (product of supplier.prices; track product.id) {
|
||||
<tr>
|
||||
<td>{{ product.productName }}</td>
|
||||
<td>{{ product.productReferences }}</td>
|
||||
<td>{{ product.sellingPrice }}€</td>
|
||||
<td>
|
||||
<div class="flex items-center justify-center space-x-2">
|
||||
<nz-icon nzType="edit" nzTheme="outline"
|
||||
class="cursor-pointer text-gray-600 hover:text-gray-900"
|
||||
(click)="openEditProductModal(product)"></nz-icon>
|
||||
<nz-divider nzType="vertical"></nz-divider>
|
||||
<nz-icon nzType="delete" nzTheme="outline" class="cursor-pointer text-red-600 hover:text-red-800"
|
||||
(click)="deleteProduct(product.productId, product.supplierId)"></nz-icon>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
@@ -49,9 +59,11 @@
|
||||
</td>
|
||||
<td>
|
||||
<div style="display: flex; align-items: center;">
|
||||
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer" (click)="openEditModal(supplier)"></nz-icon>
|
||||
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer"
|
||||
(click)="openEditModal(supplier)"></nz-icon>
|
||||
<nz-divider nzType="vertical"></nz-divider>
|
||||
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(supplier.id)" class="text-red-600 cursor-pointer"></nz-icon>
|
||||
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(supplier.id)"
|
||||
class="text-red-600 cursor-pointer"></nz-icon>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -60,7 +72,17 @@
|
||||
</nz-table>
|
||||
|
||||
<div class="hidden">
|
||||
<app-modal-nav #modalNav nameIcon="edit" [name]="'Modifier'" (ok)="onModalOk(selectedSupplier.id, supplierForm, modalNav)" (cancel)="onModalCancel(modalNav)">
|
||||
<app-modal-nav #supplierModal nameIcon="edit" [name]="'Modifier'"
|
||||
(ok)="onModalOk(selectedSupplier?.id, supplierForm, supplierModal)"
|
||||
(cancel)="onModalCancel(supplierModal)">
|
||||
<app-supplier-form #supplierForm [supplier]="selectedSupplier"></app-supplier-form>
|
||||
</app-modal-nav>
|
||||
</div>
|
||||
|
||||
<div class="hidden">
|
||||
<app-modal-nav #productModal nameIcon="edit" [name]="'Modifier les prix des fournisseurs'"
|
||||
(ok)="onModalProductOk(selectedProduct?.id, selectedSupplier?.id, priceForm, productModal)"
|
||||
(cancel)="onModalCancel(productModal)">
|
||||
<app-price-form #priceForm [price]="selectedProduct"></app-price-form>
|
||||
</app-modal-nav>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user