@ -0,0 +1,25 @@
|
||||
@using Blazor.Models
|
||||
<h3>Inventory Item List</h3>
|
||||
|
||||
<DataGrid TItem="Item"
|
||||
Data="@items"
|
||||
TotalItems="@totalItem"
|
||||
PageSize="10"
|
||||
ShowPager
|
||||
Responsive>
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="#" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.Id)" Caption="Image">
|
||||
<DisplayTemplate>
|
||||
@if (!string.IsNullOrWhiteSpace(context.ImageBase64))
|
||||
{
|
||||
<img src="data:image/png;base64, @(context.ImageBase64)" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="width: 60px" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<img src="images/default.png" class="img-thumbnail" title="@context.DisplayName" alt="@context.DisplayName" style="width: 60px"/>
|
||||
}
|
||||
</DisplayTemplate>
|
||||
</DataGridColumn>
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.DisplayName)" Caption="Display name" />
|
||||
<DataGridColumn TItem="Item" Field="@nameof(Item.CreatedDate)" Caption="Created date" DisplayFormat="{0:d}" DisplayFormatProvider="@System.Globalization.CultureInfo.GetCultureInfo("fr-FR")" />
|
||||
</DataGrid>
|
@ -0,0 +1,18 @@
|
||||
@page "/inventory"
|
||||
@using Blazor.Components
|
||||
@using Blazor.Models
|
||||
|
||||
<PageTitle>Counter</PageTitle>
|
||||
|
||||
<h1>Inventory</h1>
|
||||
|
||||
<div id="master">
|
||||
<div class="inventory">
|
||||
<span>Ici c'est l'inventaire</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="inventory-list">
|
||||
<InventoryList/>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in new issue