780c2f42eb
Template: fix display righe cancellabili/non cancellabili
95 lines
3.9 KiB
Plaintext
95 lines
3.9 KiB
Plaintext
@if (EditRecord != null)
|
|
{
|
|
<TemplateMan CurrRecord="EditRecord" EC_Close="DoClose" EC_Updated="DoSave"></TemplateMan>
|
|
}
|
|
else
|
|
{
|
|
if (isLoading)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-info">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-0 fs-4">
|
|
Nessun Gruppo Template trovato
|
|
</div>
|
|
<div class="px-0">
|
|
<button class="btn btn-success" @onclick="DoAdd">Nuovo <i class="fa-solid fa-book-medical"></i></button>
|
|
</div>
|
|
</div>
|
|
</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>Envir</th>
|
|
<th>Nome</th>
|
|
@if (SelRecord == null)
|
|
{
|
|
<th>Descrizione</th>
|
|
<th>Qty</th>
|
|
}
|
|
<th class="text-end">
|
|
<button class="btn btn-sm btn-success" @onclick="DoAdd"><i class="fa-solid fa-plus"></i></button>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr class="@CheckSelect(item)">
|
|
<td>
|
|
<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 btn-warning" @onclick="() => DoClone(item)" title="Duplica Offerta"><i class="fa-solid fa-wand-magic"></i></button>
|
|
</td>
|
|
<td>@item.TemplateID</td>
|
|
<td>
|
|
<b class="fs-6">@item.Envir</b>
|
|
@* <div class="small text-secondary">@item.SourceType</div> *@
|
|
</td>
|
|
<td>
|
|
@item.Name
|
|
</td>
|
|
|
|
@if (SelRecord == null)
|
|
{
|
|
<td>@item.Description</td>
|
|
<td>@item.NumItems</td>
|
|
}
|
|
<td class="text-end">
|
|
@if (item.TemplateRowNav.Any())
|
|
{
|
|
<button class="btn btn-sm btn-secondary" title="Eliminazione non permessa: child rec presenti"><i class="fa-solid fa-trash"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-danger" title="Elimina" @onclick="() => DoDelete(item)"><i class="fa-solid fa-trash"></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> |