Files
pyrofetes-frontend/src/app/components/deliverery-note-table/deliverery-note-table.html

63 lines
3.0 KiB
HTML

<nz-table [nzData]="deliveryNotes()"
class="mr-7"
[nzFrontPagination]="false"
[nzLoading]="deliveryNotesLoading()">
<thead>
<tr class="text-center">
<th>Numéro de livraison</th>
<th>Transporteur</th>
<th>Date d'expédition</th>
<th>Date de livraison estimée</th>
<th>Date de livraison réelle</th>
<th>Produits</th>
<th>Action</th>
</tr>
</thead >
<tbody class="text-center">
@for (deliveryNote of deliveryNotes(); track deliveryNote.id) {
<tr>
<td>{{deliveryNote.trackingNumber}}</td>
<td>{{deliveryNote.delivererTransporter}}</td>
<td>{{deliveryNote.expeditionDate | date: 'dd/MM/yyyy'}}</td>
<td>{{deliveryNote.estimateDeliveryDate | date: 'dd/MM/yyyy'}}</td>
<td>{{deliveryNote.realDeliveryDate | date: 'dd/MM/yyyy'}}</td>
<td>
<app-modal-button type="link" name="Voir les produits" size="40%">
<div style="max-height: 400px; overflow-y: auto;">
<nz-table [nzData]="deliveryNotes()"
[nzFrontPagination]="false">
<thead>
<tr class="text-center">
<th>Réference</th>
<th>Nom</th>
<th>Quantité</th>
</tr>
</thead>
<tbody class="text-center">
@for (product of deliveryNote.products; track product.productId) {
<tr>
<td>{{product.productReference}}</td>
<td>{{product.productName}}</td>
<td>{{product.quantity}}</td>
</tr>
}
</tbody>
</nz-table>
</div>
</app-modal-button>
</td>
<td>
<div style="justify-content: center; display: flex">
<nz-icon nzType="check" nzTheme="outline" (click)="validate(deliveryNote.id)" class="cursor-pointer text-green-700"/>
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="delete" nzTheme="outline" (click)="delete(deliveryNote.id)" class="cursor-pointer text-red-700"/>
<nz-divider nzType="vertical"></nz-divider>
<nz-icon nzType="export" nzTheme="outline" (click)="export(deliveryNote.id)" class="cursor-pointer text-green-700"/>
</div>
</td>
</tr>
}
</tbody>
</nz-table>