Upraveni rozhrani produktu
This commit is contained in:
@@ -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.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user