780c2f42eb
Template: fix display righe cancellabili/non cancellabili
102 lines
4.2 KiB
Plaintext
102 lines
4.2 KiB
Plaintext
@if (isLoading || ListRecords == null)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-info text-center display-4">Nessun record trovato</div>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-sm table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
<button class="btn btn-sm btn-primary" title="Reset selezione" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button>
|
|
</th>
|
|
<th>ID</th>
|
|
<th>Gruppo</th>
|
|
<th>Tipo</th>
|
|
<th>Serv</th>
|
|
<th>Codice</th>
|
|
<th>ItemCode</th>
|
|
<th>Suppl.Code</th>
|
|
<th>Descrizione</th>
|
|
<th class="text-end">Costo</th>
|
|
<th class="text-end">Margine</th>
|
|
<th class="text-end">Qty Range</th>
|
|
<th class="text-end">UM</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr>
|
|
<td class="text-start text-nowrap">
|
|
@* <button class="btn btn-sm btn-primary" @onclick="() => DoSelect(item)"><i class="fa-solid fa-magnifying-glass"></i></button> *@
|
|
<button class="btn btn-sm btn-info" @onclick="() => DoEdit(item)"><i class="fa-solid fa-pencil"></i></button>
|
|
<button class="btn btn-sm @cloneBtnCss(item)" @onclick="() => DoClone(item)"><i class="fa-solid fa-clone"></i></button>
|
|
</td>
|
|
<td>@item.ItemID</td>
|
|
<td>
|
|
@if (item.ItemGroupNav != null)
|
|
{
|
|
@item.ItemGroupNav.Description
|
|
}
|
|
else
|
|
{
|
|
@item.CodGroup
|
|
}
|
|
</td>
|
|
<td>@item.ItemType</td>
|
|
<td>@item.IsService</td>
|
|
<td>@item.ItemCode</td>
|
|
<td>@item.ExtItemCode</td>
|
|
<td>@item.SupplCode</td>
|
|
<td>@item.Description</td>
|
|
<td class="text-end text-nowrap">
|
|
@if (!item.IsOkCost)
|
|
{
|
|
<span class="text-danger me-2" title="Manca importo prodotto"><i class="fa-solid fa-triangle-exclamation"></i></span>
|
|
}
|
|
@item.Cost.ToString("C3")
|
|
</td>
|
|
<td class="text-end">@item.Margin.ToString("P1")</td>
|
|
<td class="text-end text-nowrap">
|
|
@if (!item.IsOkQty)
|
|
{
|
|
<span class="text-warning me-2" title="Range Qty non corretto"><i class="fa-solid fa-triangle-exclamation"></i></span>
|
|
}
|
|
<span>@item.QtyMin.ToString("F1") ↔ @item.QtyMax.ToString("F1")</span>
|
|
</td>
|
|
<td class="text-end">@item.UM</td>
|
|
<td>
|
|
@if (item.ItemType != Enums.ItemClassType.Bom)
|
|
{
|
|
<button class="btn btn-sm btn-danger" @onclick="() => DoDelete(item)"><i class="fa-solid fa-trash-can"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-secondary disabled"><i class="fa-solid fa-trash-can"></i></button>
|
|
|
|
}
|
|
</td>
|
|
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
@if (totalCount >= numRecord)
|
|
{
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="15">
|
|
<EgwCoreLib.Razor.DataPager currPage="@currPage" PageSize="@numRecord" totalCount="@totalCount" numPageChanged="SavePage" numRecordChanged="SaveNumRec"></EgwCoreLib.Razor.DataPager>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
}
|
|
</table>
|
|
}
|
|
|
|
<BootstrapModal @ref=Modal Title=@mTitle Message=@mMessage Mode="BootstrapModal.ModalMode.Confirm" UserOptions=@modalOpt></BootstrapModal> |