5d72d21fb1
Update gestione paginazione (visibile solo dove serve) + fix calcolo di alcuni intems male filtrati
160 lines
7.9 KiB
Plaintext
160 lines
7.9 KiB
Plaintext
@using LiMan.UI.Components
|
|
<div class="card">
|
|
<div class="card-header bg-secondary text-light">
|
|
<div class="row">
|
|
<div class="col-3">
|
|
<h3>Licenze</h3>
|
|
</div>
|
|
<div class="col-9">
|
|
<div class="d-flex flex-row-reverse justify-content-between">
|
|
<div class="p-2">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">
|
|
Installazione
|
|
</span>
|
|
<select @bind="@SelInst" class="form-select">
|
|
<option value="">--- Tutti ---</option>
|
|
@if (ListInstall != null)
|
|
{
|
|
foreach (var item in ListInstall)
|
|
{
|
|
<option value="@item.Installazione">@item.Installazione | @item.Descrizione</option>
|
|
}
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="p-2">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">
|
|
Applicazione
|
|
</span>
|
|
<select @bind="@SelApp" class="form-select">
|
|
<option value="">--- Tutti ---</option>
|
|
@if (ListApp != null)
|
|
{
|
|
foreach (var item in ListApp)
|
|
{
|
|
<option value="@item.Applicativo">@item.Applicativo | @item.Descrizione</option>
|
|
}
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="p-2">
|
|
<div class="input-group input-group-sm">
|
|
<div class="form-check form-switch">
|
|
<input type="checkbox" class="form-check-input" id="togAttivi" title="Solo Attivi / Mostra tutti" @bind-value="@OnlyActive" checked="@OnlyActive" />
|
|
<label class="custom-control-label small" for="togAttivi"><sub>solo attivi</sub></label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="p-2">
|
|
<div class="input-group input-group-sm">
|
|
<div class="form-check form-switch">
|
|
<input type="checkbox" class="form-check-input" id="togTransf" title="Non trasferiti / Mostra tutti" @bind-value="@OnlyUnlock" checked="@OnlyUnlock" />
|
|
<label class="custom-control-label small" for="togTransf"><sub>solo non trasferiti</sub></label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body">
|
|
@if (currRecord != null)
|
|
{
|
|
<EditLicenzeGLS currItem="@currRecord" DataReset="ResetData" DataUpdated="UpdateData"></EditLicenzeGLS>
|
|
}
|
|
@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>Applicativo</th>
|
|
<th>Installazione</th>
|
|
<th>Scadenza</th>
|
|
<th class="text-end">Num Licenze</th>
|
|
<th class="text-end">Codice Licenza</th>
|
|
<th class="text-end">Descrizione</th>
|
|
<th class="text-end"><i class="fas fa-user-lock"></i></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var record in ListRecords)
|
|
{
|
|
<tr class="@checkSelect(record.IdxLic)">
|
|
<td class="text-nowrap">
|
|
@if (currRecord == null)
|
|
{
|
|
if (!record.Locked)
|
|
{
|
|
<button class="btn btn-sm btn-info" @onclick="() => Edit(record)" title="Edit record">
|
|
<i class="oi oi-pencil"></i>
|
|
</button>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (!record.Locked)
|
|
{
|
|
<span class="btn btn-sm btn-secondary disabled">
|
|
<i class="oi oi-pencil"></i>
|
|
</span>
|
|
}
|
|
}
|
|
</td>
|
|
<td>
|
|
<b>@record.Applicativo</b>
|
|
</td>
|
|
<td>
|
|
<b class="text-secondary">@record.Installazione</b>
|
|
</td>
|
|
<td>
|
|
<span class="@cssScadenza(record.Scadenza)">@($"{record.Scadenza:yyyy.MM.dd}")</span>
|
|
</td>
|
|
<td class="text-end">
|
|
<span>@record.NumLicenze</span>
|
|
</td>
|
|
<td class="text-end">
|
|
<span>@record.Licenza</span>
|
|
</td>
|
|
<td class="text-end">
|
|
<span>@record.Descrizione</span>
|
|
</td>
|
|
<td class="text-end">
|
|
@if (record.Locked)
|
|
{
|
|
<span aria-hidden="true" title="Licenza Bloccata"><i class="fas fa-lock text-danger"></i></span>
|
|
}
|
|
else
|
|
{
|
|
<span aria-hidden="true" title="Licenza Libera"><i class="fas fa-unlock-alt text-success"></i></span>
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="card-footer bg-secondary text-light">
|
|
@if (totalCount > numRecord)
|
|
{
|
|
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="SetNumRec" numPageChanged="SetNumPage" totalCount="totalCount" showLoading="isLoading" />
|
|
}
|
|
</div>
|
|
</div> |