Upraveni rozhrani produktu

This commit is contained in:
maja
2026-10-28 18:32:43 +01:00
parent b7be9a7689
commit 0d14151dbe
4 changed files with 15 additions and 22 deletions

View File

@@ -5,28 +5,21 @@
@inject ApplicationDbContext DbContext
<h3>Katalog Produktů</h3>
<table class="table">
<thead>
<tr>
<th>Název</th>
<th>Kategorie</th>
<th>Cena</th>
<th>Stock</th>
</tr>
</thead>
<tbody>
<div class="row">
@foreach (var product in products)
{
<tr>
<td>@product.Name</td>
<td>@product.Category.Name</td>
<td>@product.Price.ToString("C")</td>
<td>@product.StockQuantity</td>
</tr>
<div class="col-md-4 mb-4">
<div class="card">
<div class="card-body">
<h5 class="card-title">@product.Name</h5>
<p class="card-text">Kategorie: @product.Category.Name</p>
<p class="card-text">Cena: @product.Price.ToString("C")</p>
<p class="card-text">Stock: @product.StockQuantity</p>
</div>
</div>
</div>
}
</tbody>
</table>
</div>
@code {
private List<Product> products;

Binary file not shown.