213 lines
9.7 KiB
Plaintext
213 lines
9.7 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>Causale</b>
|
|
</div>
|
|
<div class="px-0">
|
|
<div class="input-group input-group-sm">
|
|
<select @bind="@CodGiust" class="form-select">
|
|
<option value="">--- Selezionare Causale ---</option>
|
|
@if (ListGiust != null)
|
|
{
|
|
@foreach (var giust in ListGiust)
|
|
{
|
|
<option value="@giust.codGiust">@giust.descrizione</option>
|
|
}
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-0">
|
|
<b>Inizio Periodo</b>
|
|
</div>
|
|
<div class="px-2">
|
|
@if (@CodGiust == "PERM" || @CodGiust == "104")
|
|
{
|
|
@($"{dtStart:yyyy-MM-dd HH:mm}")
|
|
}
|
|
else
|
|
{
|
|
@($"{dtStart:yyyy-MM-dd}")
|
|
}
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-0">
|
|
<b>Fine Periodo</b>
|
|
</div>
|
|
<div class="px-2">
|
|
@if (@CodGiust == "PERM" || @CodGiust == "104")
|
|
{
|
|
@($"{dtEnd:yyyy-MM-dd HH:mm}")
|
|
}
|
|
else
|
|
{
|
|
@($"{dtEnd:yyyy-MM-dd}")
|
|
}
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="list-group-item">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-0">
|
|
<b>Note</b>
|
|
</div>
|
|
<div class="px-0">
|
|
<textarea class="form-control" @bind="@currRecord.Note" style="width: 20rem;" />
|
|
</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 (CodGiust != "")
|
|
{
|
|
<button class="btn btn-success w-100" @onclick="() => DoSave()"><i class="far fa-save"></i> Save</button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-secondary w-100" disabled><i class="far fa-save"></i> Causale!</button>
|
|
}
|
|
</div>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
}
|
|
@if (ListRecords.Count == 0)
|
|
{
|
|
<div class="alert alert-warning d-flex justify-content-between">
|
|
<div>
|
|
Nessu record registrato
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<table class="table table-sm table-striped table-responsive-md border border-dark">
|
|
<thead>
|
|
<tr class="bg-dark text-light align-middle">
|
|
<th></th>
|
|
<th>Dipendente <Sorter ParamName="Dipendente" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th>Periodo <Sorter ParamName="Periodo" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th class="text-end"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr>
|
|
<td>
|
|
@if (!item.Conf)
|
|
{
|
|
<button class="btn btn-primary btn-sm" @onclick="() => DoEdit(item)">
|
|
<b>@item.CodGiustTrim</b>
|
|
</button>
|
|
}
|
|
else
|
|
{
|
|
<div class="btn btn-sm btn-secondary disabled">
|
|
<b>@item.CodGiustTrim</b>
|
|
</div>
|
|
}
|
|
</td>
|
|
<td>
|
|
<div class="fs-5">@item.DipNav.Abbrev</div>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
@if (item.CodGiust == "PERM")
|
|
{
|
|
<div class="d-flex justify-content-between pe-2">
|
|
<div>
|
|
@item.DtStart.ToString("dd MMM yyyy"), <b>@item.DtStart.ToString("HH:mm")</b>
|
|
<i class="fas fa-caret-right"></i>
|
|
<b>@item.DtEnd.ToString("HH:mm")</b>
|
|
</div>
|
|
<div>
|
|
<b>@item.Durata</b>
|
|
</div>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="d-flex justify-content-between pe-2">
|
|
<div>
|
|
<b>@item.DtStart.ToString("dd MMM")</b> @item.DtStart.ToString("yyyy")
|
|
<i class="fas fa-caret-right"></i>
|
|
<b>@item.DtEnd.ToString("dd MMM")</b> @item.DtEnd.ToString("yyyy")
|
|
</div>
|
|
<div>
|
|
<b>@item.Durata</b>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="small">
|
|
@item.Note
|
|
</div>
|
|
</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="fa-solid fa-pen-to-square"></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>
|
|
}
|
|
}
|
|
}
|
|
|