<table class="table table-sm table-striped">
    <thead>
        <tr>
            <th>ID</th><th>Produkt</th><th>Kategoria</th><th>Cena</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <tr *ngFor="let p of getProducts()">
            <td>{{p.id}}</td>
            <td>{{p.name}}</td>
            <td>{{p.category}}</td>
            <td>{{p.price | currency:"zł":true:"2.2-2"}}</td>
            <td>
                <button class="btn btn-sm btn-warning"
                        [routerLink]="['/admin/main/products/edit', p.id]">
                    Edytuj
                </button>
                <button class="btn btn-sm btn-danger" (click)="deleteProduct(p.id)">
                    Usuń
                </button>
            </td>
        </tr>
    </tbody>
</table>
<button class="btn btn-primary" routerLink="/admin/main/products/create">
    Dodaj nowy produkt
</button>
