uptading Supplier Page

This commit is contained in:
Enzo
2025-11-27 18:52:30 +01:00
parent 8aef9f628b
commit b55bdedc20
8 changed files with 148 additions and 203 deletions
@@ -1,61 +1,63 @@
<nz-table #basicTable [nzData]="listOfSupplier">
<nz-table [nzData]="suppliers()"
[nzLoading]="suppliersLoading()"
[nzFrontPagination]="false">
<thead>
<tr class="text-center">
<tr style="text-align: center">
<th>Nom</th>
<th>email</th>
<th>Téléphone</th>
<th>Adresse</th>
<th>Ville</th>
<th>Délai Moyen</th>
<th>Produits</th>
<th>Action</th>
<th>Prénom</th>
<th>Email</th>
<th>Anniversaire</th>
<th>Emprunt</th>
<th style="display: flex; align-items: center;">Action</th>
</tr>
</thead>
<tbody class="text-center">
@for (data of basicTable.data; track data) {
<tbody style="text-align: center">
@for (supplier of suppliers(); track supplier.id) {
<tr>
<td>{{data.name}}</td>
<td>{{data.email}}</td>
<td>{{data.phone}}</td>
<td>{{data.address}}, {{data.zipCode}}</td>
<td>{{data.city}}</td>
<td>{{data.deliveryDelay}}</td>
<td>{{ supplier.name }}</td>
<td>{{ supplier.phone }}</td>
<td>{{ supplier.email }}</td>
<td>{{ supplier.address}}</td>
<td>{{ supplier.zipCode}}</td>
<td>{{ supplier.city}}</td>
<td>{{ supplier.deliveryDelay}}</td>
<td>
<app-modal-button type="link" name="Voir les produits">
<div style="max-height: 400px; overflow-y: auto;">
<nz-table [nzData]="data.products">
<thead>
<tr class="text-center">
<th>Nom</th>
<th>Référence</th>
<th>Prix</th>
</tr>
</thead>
<tbody class="text-center">
@for (product of data.products; track product) {
<tr>
<td>{{product.name}}</td>
<td>{{product.reference}}</td>
<td>xx.x€</td>
</tr>
}
</tbody>
</nz-table>
</div>
<app-modal-button type="link" [name]="'Voir les produits'">
<nz-table [nzData]="supplier.products" [nzFrontPagination]="false">
<thead>
<tr style="text-align: center">
<th>Produits</th>
<th>Nom</th>
<th>Référence</th>
<th>Prix</th>
</tr>
</thead>
<tbody style="text-align: center">
@for (product of supplier.products; track product.id) {
<tr>
<td>{{ product.name }}</td>
<td>{{ product.references }}</td>
<td>Price ???</td>
</tr>
}
</tbody>
</nz-table>
</app-modal-button>
</td>
<td>
<div style="justify-content: center; display: flex">
<app-modal-nav nameIcon="edit" name="Modification du fournisseur" class="cursor-pointer">
<app-supplier-form></app-supplier-form>
</app-modal-nav>
<div style="display: flex; align-items: center;">
<nz-icon nzType="edit" nzTheme="outline" class="cursor-pointer" (click)="openEditModal(supplier)"></nz-icon>
<nz-divider nzType="vertical"></nz-divider>
<div>
<nz-icon nzType="delete" nzTheme="outline" class="cursor-pointer text-red-700"/>
</div>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(supplier.id)" class="text-red-600 cursor-pointer"></nz-icon>
</div>
</td>
</tr>
}
</tbody>
</nz-table>
<div class="hidden">
<app-modal-nav #modalNav nameIcon="edit" [name]="'Modifier'" (ok)="onModalOk(selectedSupplier.id, supplierForm, modalNav)" (cancel)="onModalCancel(modalNav)">
<app-supplier-form #supplierForm [supplier]="selectedSupplier"></app-supplier-form>
</app-modal-nav>
</div>