138 lines
5.8 KiB
Plaintext
138 lines
5.8 KiB
Plaintext
@if (isLoading)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else
|
|
{ @if (isSendingData)
|
|
{
|
|
<ProgressDisplay Title="Salvataggio ed invio richiesta" CurrVal="@sendDataVal" NextVal="@sendDataNextVal" MaxVal="@sendDataMaxVal" ExpTimeMSec="1000"></ProgressDisplay>
|
|
}
|
|
@if (ListRecords == null)
|
|
{
|
|
<LoadingData DisplaySize="LoadingData.CtrlSize.Small"></LoadingData>
|
|
}
|
|
else
|
|
{
|
|
@if (showAdd)
|
|
{
|
|
<ul class="list-group">
|
|
<li class="list-group-item">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-0">
|
|
<b>Inizio Malattia</b>
|
|
</div>
|
|
<div class="px-2">
|
|
@($"{currRecord.DtInizio:yyyy-MM-dd dddd}")
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-0">
|
|
<b>Giorni Malattia</b>
|
|
</div>
|
|
<div class="px-2">
|
|
@currRecord.NumGG
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-0">
|
|
<b>Codice Certificato (INPS)</b>
|
|
</div>
|
|
<div class="px-2">
|
|
@currRecord.CodCert
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-0">
|
|
<b>Stato</b>
|
|
<span class="small">(confermato)</span>
|
|
</div>
|
|
<div class="px-0">
|
|
<div class="form-check form-switch">
|
|
<input class="form-check-input" type="checkbox" role="switch" @bind="@currRecord.Conf">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="row">
|
|
<div class="col">
|
|
<button class="btn btn-warning w-100" @onclick="() => ToggleEdit()"><i class="fas fa-window-close"></i> Cancel</button>
|
|
</div>
|
|
<div class="col">
|
|
@if (currRecord.CodCert != "")
|
|
{
|
|
<button class="btn btn-success w-100" @onclick="() => DoSave()"><i class="far fa-save"></i> Update</button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-secondary w-100" disabled><i class="far fa-save"></i> Update</button>
|
|
}
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
}
|
|
@if (ListRecords.Count == 0)
|
|
{
|
|
<div class="alert alert-warning">
|
|
<h4>Nessu record registrato!</h4>
|
|
<button class="btn btn-success btn-sm" @onclick="() => ToggleEdit()"><i class="fas fa-plus"></i> Inserisci Malattia</button>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-sm table-striped table-responsive-md border border-dark">
|
|
<thead>
|
|
<tr class="bg-dark text-light">
|
|
<th>
|
|
<button class="btn btn-success btn-sm" @onclick="() => ToggleEdit()"><i class="fas fa-plus"></i></button>
|
|
</th>
|
|
<th>Data</th>
|
|
<th class="text-center">Giorni</th>
|
|
<th class="text-end">Codice</th>
|
|
<th class="text-end"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr>
|
|
<td class="text-nowrap">
|
|
@item.DipNav.Abbrev
|
|
</td>
|
|
<td>
|
|
@item.DtInizio.ToString("dd MMM yyyy"), <b>@item.DtInizio.ToString("dddd")</b>
|
|
</td>
|
|
<td class="text-center">
|
|
@item.NumGG
|
|
</td>
|
|
<td class="text-end">
|
|
@item.CodCert
|
|
</td>
|
|
<td class="text-end">
|
|
@if (!item.Conf)
|
|
{
|
|
<button class="btn btn-success btn-sm" @onclick="() => DoApprove(item)"><i class="fa-solid fa-thumbs-up"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-primary btn-sm" @onclick="() => DoEdit(item)"><i class="fas fa-pen"></i></button>
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
|
|
<div>
|
|
<EgwCoreLib.Razor.DataPager PageSize="@numRecord" currPage="@currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" totalCount="@totalCount" showLoading="@isLoading" NumPages="10" PageSizeList="@PageSizeListSpec"></EgwCoreLib.Razor.DataPager>
|
|
</div>
|
|
}
|
|
}
|
|
} |