created stock page and stock-table component

This commit is contained in:
2025-11-13 18:36:34 +01:00
parent 3ec512f396
commit 8d220d60f8
6 changed files with 168 additions and 63 deletions

View File

@@ -1,25 +1 @@
<nz-table #basicTable [nzData]="listOfData">
<thead>
<tr>
<th>Nom</th>
<th>Duration</th>
<th>Caliber</th>
<th>quantity</th>
<th>Weight</th>
<th>Nec</th>
<th>MinimalQuantity</th>
</tr>
</thead>
<tbody>
@for (data of basicTable.data; track data) {
<tr>
<td>{{data.name}}</td>
<td>{{data.duration}}</td>
<td>{{data.caliber}}</td>
<td>{{data.quantity}}</td>
<td>{{data.weight}}</td>
<td>{{data.nec}}</td>
<td>{{data.minimalQuantity}}</td>
</tr>
</tbody>
</nz-table>
<app-stock-table></app-stock-table>

View File

@@ -1,51 +1,17 @@
import { Component } from '@angular/core';
import {NzTableComponent} from "ng-zorro-antd/table";
import {StockTable} from "../../compontents/stock-table/stock-table";
@Component({
selector: 'app-stock',
imports: [
NzTableComponent
NzTableComponent,
StockTable
],
templateUrl: './stock.html',
styleUrl: './stock.css',
})
class StockInfo {
id: number;
name: string;
Duration: string;
Caliber: string;
Quantity: number;
Weight: number;
Nec: string;
MinimalQuantity: number;
}
export class Stock {
listOfData: StockInfo[] = [
{
id: 1,
name: 'Stock 1',
Duration: '10 days',
Caliber: '100g',
Quantity: 100,
Weight: 1000,
Nec: '5kg',
MinimalQuantity: 5
},
{
id: 2,
name: 'Stock 2',
Duration: '20 days',
Caliber: '200g',
Quantity: 200,
Weight: 2000,
Nec: '10kg',
MinimalQuantity: 10
}
];
delete(){
return
}
}