292 lines
16 KiB
Plaintext
292 lines
16 KiB
Plaintext
|
|
<div class="card shadow mb-5 border border-secondary">
|
|
<div class="card-header px-0">
|
|
<div class="d-flex justify-content-between px-2">
|
|
<div class="px-0 d-flex justify-content-between">
|
|
<div class="px-2">
|
|
<h3>Attività</h3>
|
|
</div>
|
|
|
|
@* <div class="px-2">
|
|
<button class="btn btn-success" @onclick=Recalc tooltip="Add New"><i class="fa-solid fa-plus"></i> @Traduci("Ricalcola")</button>
|
|
</div> *@
|
|
</div>
|
|
<div class="px-0">
|
|
<div class="px-0">
|
|
<div class="d-flex">
|
|
<div class="px-1 align-content-center">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">
|
|
Dipendente
|
|
</span>
|
|
<select @bind="@IdxDipSel" class="form-select form-select-sm" @bind:after=ForceReload>
|
|
<option value="0">--- Selezionare ---</option>
|
|
@foreach (var item in ListDipendentiFilt)
|
|
{
|
|
<option value="@item.IdxDipendente">@($"{item.Cognome} {item.Nome}")</option>
|
|
}
|
|
</select>
|
|
<span class="input-group-text px-0">
|
|
<span class="form-check form-switch align-content-center ms-2" title="Mostra inattivi">
|
|
<input class="form-check-input" type="checkbox" @bind=@ShowDipInatt>
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="px-0">
|
|
<PeriodoSel CurrPeriodo="@CurrPeriodo" E_PeriodoSel="@SavePeriodo"></PeriodoSel>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="d-flex justify-content-end bg-secondary bg-gradient bg-opacity-75 py-1 px-0">
|
|
<div class="px-1 d-flex">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">
|
|
Cliente
|
|
</span>
|
|
<select @bind="@IdxCliSelFrom" class="form-select form-select-sm" @bind:after=ForceReload>
|
|
<option value="0">--- Tutti ---</option>
|
|
@foreach (var item in ListClientiFiltFrom)
|
|
{
|
|
<option value="@item.IdxCliente">@($"{item.RagSociale}")</option>
|
|
}
|
|
</select>
|
|
<span class="input-group-text px-0">
|
|
<span class="form-check form-switch align-content-center ms-2" title="Mostra inattivi">
|
|
<input class="form-check-input" type="checkbox" @bind=@ShowCliInattFrom>
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="px-1 d-flex">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">
|
|
Progetto
|
|
</span>
|
|
@if (IdxCliSelFrom == 0)
|
|
{
|
|
<select @bind="@IdxProjSelFrom" disabled class="form-select form-select-sm text-trim opacity-75" style="maxFrom-width:20rem;">
|
|
<option value="0">--- Tutti ---</option>
|
|
</select>
|
|
}
|
|
else
|
|
{
|
|
<select @bind="@IdxProjSelFrom" class="form-select form-select-sm text-trim" style="max-width:20rem;" @bind:after=ForceReload>
|
|
<option value="0">--- Tutti ---</option>
|
|
@foreach (var item in ListProgettiFiltFrom)
|
|
{
|
|
<option value="@item.IdxProgetto" title="@($"{item.DescrProj}")">@($"{item.NomeProj}")</option>
|
|
}
|
|
</select>
|
|
<span class="input-group-text px-0">
|
|
<span class="form-check form-switch align-content-center ms-2" title="Mostra inattivi">
|
|
<input class="form-check-input" type="checkbox" @bind=@ShowProjInattFrom>
|
|
</span>
|
|
</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="px-2 d-flex">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">Fase</span>
|
|
@if (IdxProjSelFrom == 0)
|
|
{
|
|
<select @bind="@IdxFaseSelFrom" disabled class="form-select form-select-sm text-trim opacity-75" style="max-width:20rem;">
|
|
<option value="0">--- Tutti ---</option>
|
|
</select>
|
|
}
|
|
else
|
|
{
|
|
<select @bind="@IdxFaseSelFrom" class="form-select form-select-sm text-trim" style="max-width:20rem;" @bind:after=ForceReload>
|
|
<option value="0">--- Tutti ---</option>
|
|
@foreach (var item in ListFasiFiltFrom)
|
|
{
|
|
if (item.BudgetTime > 0)
|
|
{
|
|
<option value="@item.IdxFase" title="@($"{item.DescrizioneFase}")">@($"{item.NomeFase}")</option>
|
|
}
|
|
else
|
|
{
|
|
<option disabled class="bg-secondary bg-opacity-25 fw-bold" value="@item.IdxFase" title="@($"{item.DescrizioneFase}")">@($"{item.NomeFase}")</option>
|
|
}
|
|
}
|
|
</select>
|
|
<span class="input-group-text px-0">
|
|
<span class="form-check form-switch align-content-center ms-2" title="Mostra inattivi">
|
|
<input class="form-check-input" type="checkbox" @bind=@ShowFaseInattFrom>
|
|
</span>
|
|
</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body p-1 small">
|
|
@if (ListRecords == null || isLoading)
|
|
{
|
|
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
|
|
}
|
|
else if (totalCount == 0)
|
|
{
|
|
<div class="alert alert-info">Nessun record trovato</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="row">
|
|
<div class="@mainDivCss">
|
|
<table class="table table-striped table-sm text-start small">
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center" title="Toggle Seleziona Tutti">
|
|
@if (allSel)
|
|
{
|
|
<i class="fa-solid fa-toggle-on text-primary fs-5" @onclick="ToggleSelection"></i>
|
|
}
|
|
else
|
|
{
|
|
<i class="fa-solid fa-toggle-off text-secondary fs-5" @onclick="ToggleSelection"></i>
|
|
}
|
|
</th>
|
|
<th class="text-start">Cognome Nome <Sorter ParamName="CognomeNome" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th class="text-start">Ore <Sorter ParamName="OreTot" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th class="text-start">Periodo <Sorter ParamName="Periodo" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th class="text-start">Gruppo <Sorter ParamName="Gruppo" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th class="text-start">Progetto <Sorter ParamName="Progetto" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th class="text-start">Descrizione <Sorter ParamName="Descrizione" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr class="@CssCheckSel(item)">
|
|
<td class="text-center">
|
|
<input class="form-check-input" type="checkbox" @bind="item.Selected"></input>
|
|
</td>
|
|
<td class="text-start">@item.CognomeNome</td>
|
|
<td class="text-start">@($"{item.OreTot:N2}")</td>
|
|
<td class="text-center">
|
|
<div class="bg-secondary bg-gradient rounded-2 text-light text-nowrap px-3 py-1">
|
|
@($"{item.Inizio:dd/MM/yy HH:mm}") - @($"{item.Fine:HH:mm}")
|
|
</div>
|
|
</td>
|
|
<td class="text-start">@($"{item.Gruppo}") - @($"{item.RagSociale}")</td>
|
|
<td class="text-start">@($"{item.NomeProj}") - @($"{item.NomeFase}")</td>
|
|
<td class="text-start text-truncate" style="max-width: 20rem;" title="@item.Descrizione">@item.Descrizione</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="7">
|
|
<EgwCoreLib.Razor.DataPager PageSize="@numRecord" currPage="@currPage" totalCount="@totalCount" showLoading="@isLoading" numRecordChanged="SetNumRec" numPageChanged="SetPage"></EgwCoreLib.Razor.DataPager>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="card-footer bg-primary bg-gradient bg-opacity-75 px-0 py-0">
|
|
<div class="d-flex justify-content-between py-1">
|
|
<div class="px-1 d-flex">
|
|
<div class="px-1 align-content-center">
|
|
@if (IdxFaseSelTo > 0 && HasRowSelected)
|
|
{
|
|
<button class="btn btn-success shadow" @onclick="SpostaSel">Sposta Ore <i class="fa-solid fa-angles-right"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-secondary disabled">Sposta Ore <i class="fa-solid fa-angles-right"></i></button>
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="px-1 d-flex justify-content-end">
|
|
<div class="px-1 d-flex align-content-center">
|
|
</div>
|
|
<div class="px-1 d-flex">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">
|
|
Cliente
|
|
</span>
|
|
<select @bind="@IdxCliSelTo" class="form-select form-select-sm">
|
|
<option value="0">--- Tutti ---</option>
|
|
@foreach (var item in ListClientiFiltTo)
|
|
{
|
|
<option value="@item.IdxCliente">@($"{item.RagSociale}")</option>
|
|
}
|
|
</select>
|
|
<span class="input-group-text px-0">
|
|
<span class="form-check form-switch align-content-center ms-2" title="Mostra inattivi">
|
|
<input class="form-check-input" type="checkbox" @bind=@ShowCliInattTo>
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div class="px-1 d-flex">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">Progetto</span>
|
|
@if (IdxCliSelTo == 0)
|
|
{
|
|
<select @bind="@IdxProjSelTo" disabled class="form-select form-select-sm text-trim opacity-75" style="max-width:20rem;">
|
|
<option value="0">--- Tutti ---</option>
|
|
</select>
|
|
}
|
|
else
|
|
{
|
|
<select @bind="@IdxProjSelTo" class="form-select form-select-sm text-trim" style="max-width:20rem;">
|
|
<option value="0">--- Tutti ---</option>
|
|
@foreach (var item in ListProgettiFiltTo)
|
|
{
|
|
<option value="@item.IdxProgetto" title="@($"{item.DescrProj}")">@($"{item.NomeProj}")</option>
|
|
}
|
|
</select>
|
|
<span class="input-group-text px-0">
|
|
<span class="form-check form-switch align-content-center ms-2" title="Mostra inattivi">
|
|
<input class="form-check-input" type="checkbox" @bind=@ShowProjInattTo>
|
|
</span>
|
|
</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="px-1 d-flex">
|
|
<div class="input-group input-group-sm">
|
|
<span class="input-group-text">Fase</span>
|
|
@if (IdxProjSelTo == 0)
|
|
{
|
|
<select @bind="@IdxFaseSelTo" disabled class="form-select form-select-sm text-trim opacity-75" style="max-width:20rem;">
|
|
<option value="0">--- Tutti ---</option>
|
|
</select>
|
|
}
|
|
else
|
|
{
|
|
<select @bind="@IdxFaseSelTo" class="form-select form-select-sm text-trim" style="max-width:20rem;">
|
|
<option value="0">--- Tutti ---</option>
|
|
@foreach (var item in ListFasiFiltTo)
|
|
{
|
|
|
|
if (item.BudgetTime > 0)
|
|
{
|
|
<option value="@item.IdxFase" title="@($"{item.DescrizioneFase}")">@($"{item.NomeFase}")</option>
|
|
}
|
|
else
|
|
{
|
|
<option disabled class="bg-secondary bg-opacity-25 fw-bold" value="@item.IdxFase" title="@($"{item.DescrizioneFase}")">@($"{item.NomeFase}")</option>
|
|
}
|
|
}
|
|
</select>
|
|
<span class="input-group-text px-0">
|
|
<span class="form-check form-switch align-content-center ms-2" title="Mostra inattivi">
|
|
<input class="form-check-input" type="checkbox" @bind=@ShowFaseInattTo>
|
|
</span>
|
|
</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|