5d72d21fb1
Update gestione paginazione (visibile solo dove serve) + fix calcolo di alcuni intems male filtrati
89 lines
3.7 KiB
Plaintext
89 lines
3.7 KiB
Plaintext
@using LiMan.UI.Components
|
|
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<div class="row">
|
|
<div class="col-9">
|
|
<h3>Installazioni</h3>
|
|
</div>
|
|
<div class="col-3 text-end">
|
|
<button class="btn btn-sm btn-success" @onclick="() => AddNew()"><i class="fas fa-plus"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
@if (currRecord != null)
|
|
{
|
|
<EditInstallazioni currItem="@currRecord" DataReset="ResetData" DataUpdated="UpdateData"></EditInstallazioni>
|
|
}
|
|
@if (ListRecords == null)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<table class="table table-sm table-striped table-responsive-lg">
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Codice</th>
|
|
<th>Cliente</th>
|
|
<th class="text-end">Descrizione</th>
|
|
<th class="text-end">Contatto</th>
|
|
<th class="text-end">Email</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var record in ListRecords)
|
|
{
|
|
<tr class="@checkSelect(record.CodInst)">
|
|
<td class="text-nowrap">
|
|
@if (currRecord == null)
|
|
{
|
|
<button class="btn btn-sm btn-info" @onclick="() => Edit(record)" title="Edit record">
|
|
<i class="oi oi-pencil"></i>
|
|
</button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-sm btn-secondary disabled">
|
|
<i class="oi oi-pencil"></i>
|
|
</button>
|
|
}
|
|
</td>
|
|
<td>
|
|
<b>@record.CodInst</b>
|
|
</td>
|
|
<td>
|
|
<b>@record.Cliente</b>
|
|
</td>
|
|
<td class="text-end">
|
|
<div>@record.Descrizione</div>
|
|
</td>
|
|
<td class="text-end">
|
|
<div>@record.Contatto</div>
|
|
</td>
|
|
<td class="text-end">
|
|
<div>@record.Email</div>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="card-footer">
|
|
@if (totalCount > numRecord)
|
|
{
|
|
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="SetNumRec" numPageChanged="SetPageNum" totalCount="totalCount" showLoading="isLoading" />
|
|
}
|
|
</div>
|
|
</div> |