updated stock table

This commit is contained in:
2025-11-25 09:17:44 +01:00
parent 46d121b016
commit 6b067e058c
9 changed files with 154 additions and 69 deletions

View File

@@ -1,37 +1,58 @@
<nz-table #basicTable [nzData]="listOfData" class="mr-7">
<nz-table
#rowSelectionTable
[nzData]="listOfData"
(nzCurrentPageDataChange)="onCurrentPageDataChange($event)"
>
<thead>
<tr class="text-center">
<th>Nom</th>
<th>Réference</th>
<th>Nec</th>
<th>Calibre</th>
<th>Poid</th>
<th>Durée</th>
<th>Quantité</th>
<th>Limite</th>
<th>Action</th>
</tr>
<tr class="text-center">
<th nzWidth="40px">
<label
nz-checkbox
[(ngModel)]="checked"
[nzIndeterminate]="indeterminate"
(ngModelChange)="onAllChecked($event)"
></label>
</th>
<th>Nom</th>
<th>Référence</th>
<th>Nec</th>
<th>Calibre</th>
<th>Poids</th>
<th>Durée</th>
<th>Quantité</th>
<th>Limite</th>
<th>Action</th>
</tr>
</thead>
<tbody class="text-center">
@for (data of basicTable.data; track data) {
@for (data of rowSelectionTable.data; track data.id) {
<tr>
<td>{{data.product.name}}</td>
<td>{{data.product.reference}}</td>
<td>{{data.product.nec}}</td>
<td>{{data.product.caliber}}</td>
<td>{{data.product.weight}}</td>
<td>{{data.product.duration}}</td>
<td>{{data.quantity}}</td>
<td>{{data.product.minimalQuantity}}</td>
<td nzWidth="40px">
<label
nz-checkbox
[ngModel]="setOfCheckedId.has(data.id)"
(ngModelChange)="onItemChecked(data.id, $event)"
></label>
</td>
<td>{{ data.product.name }}</td>
<td>{{ data.product.reference }}</td>
<td>{{ data.product.nec }}</td>
<td>{{ data.product.caliber }}</td>
<td>{{ data.product.weight }}</td>
<td>{{ data.product.duration }}</td>
<td>{{ data.quantity }}</td>
<td>{{ data.product.minimalQuantity }}</td>
<td>
<div style="justify-content: center; display: flex">
<app-modal-nav nameIcon="edit" name="Modification de la quantité minimale" class="cursor-pointer">
<app-modal-nav nameIcon="edit" name="Modification de la quantité minimale">
<app-stock-form></app-stock-form>
</app-modal-nav>
<nz-divider nzType="vertical"></nz-divider>
<div>
<nz-icon nzType="delete" nzTheme="outline" class="cursor-pointer text-red-700"/>
</div>
<nz-icon nzType="delete" (click)="delete()" nzTheme="outline"
class="cursor-pointer text-red-700"/>
</div>
</td>
</tr>