264 lines
14 KiB
Plaintext
264 lines
14 KiB
Plaintext
@if (!ShowFasi && (RecordEdit != null || RecordSel != null))
|
|
{
|
|
<div class="modal fade show" tabindex="-1" style="display:block; background-color: rgba(10,10,10,.6);" aria-modal="true" role="dialog" data-keyboard="true">
|
|
<div class="modal-dialog @modalSize">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
@if (FullEdit)
|
|
{
|
|
<h4 class="modal-title">Modifica Progetto <b>@RecordEdit.IdxProgetto</b></h4>
|
|
}
|
|
else
|
|
{
|
|
<h4 class="modal-title">Resoconto Progetto <b>@RecordSel.IdxProgetto</b></h4>
|
|
}
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close" @onclick=ForceReload></button>
|
|
</div>
|
|
<div class="modal-body p-1 small">
|
|
@if (FullEdit)
|
|
{
|
|
<ProgettiEdit CurrRecord=@RecordEdit EC_update="ForceReload" ListGruppi=@ListGruppi ListClienti=@ListClienti></ProgettiEdit>
|
|
}
|
|
else
|
|
{
|
|
<ProgettiDetail CurrRecord=@RecordSel EC_update="ForceReload"></ProgettiDetail>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
<div class="card shadow">
|
|
<div class="card-header">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="px-0">
|
|
<div class="d-flex">
|
|
<div class="p-0">
|
|
<h3>@Traduci("ManProg")</h3>
|
|
</div>
|
|
<div class="px-2">
|
|
<button class="btn btn-warning" @onclick=DoRecalc><i class="fa-solid fa-arrows-rotate"></i> Force Recalc</button>
|
|
</div>
|
|
<div class="px-0">
|
|
<button class="btn btn-success" @onclick=CreateNew tooltip="Add New"><i class="fa-solid fa-plus"></i> Add New</button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="px-2 bg-secondary bg-opacity-25 bg-gradient rounded d-flex align-items-center">
|
|
<div class="d-flex align-items-center">
|
|
<div class="px-1">
|
|
<div class="form-check form-switch">
|
|
<input class="form-check-input" type="checkbox" role="switch" @bind=@ShowPrjArc @bind:after=@ForceReload>
|
|
<label class="form-check-label">Mostra Archiviati</label>
|
|
</div>
|
|
</div>
|
|
<div class="px-1">
|
|
<div class="form-check form-switch">
|
|
<input class="form-check-input" type="checkbox" role="switch" @bind=@ShowPrjZH @bind:after=@ForceReload>
|
|
<label class="form-check-label">Mostra Vuoti</label>
|
|
</div>
|
|
</div>
|
|
<div class="px-1">
|
|
<div class="form-check form-switch">
|
|
<input class="form-check-input" type="checkbox" role="switch" @bind=@ShowPrjStr @bind:after=@ForceReload>
|
|
<label class="form-check-label">Mostra SOLO Starred</label>
|
|
</div>
|
|
</div>
|
|
<div class="px-1">
|
|
<div class="d-flex border rounded px-2">
|
|
<div class="form-check py-1">
|
|
<input class="form-check-input" type="checkbox" @bind="@ShowGruppo" @bind:after=@FixFilt>
|
|
<label class="form-check-label text-nowrap">@SelGrpText</label>
|
|
</div>
|
|
@if (ShowGruppo)
|
|
{
|
|
<div class="input-group input-group-sm" title="Gruppo">
|
|
<span class="input-group-text">
|
|
<i class="far fa-object-group"></i>
|
|
</span>
|
|
<select @bind="@Gruppo" class="form-select form-select-sm" title="Gruppo" style="width:10rem;" @bind:after=@ForceReload>
|
|
<option value="">--- Selezionare ---</option>
|
|
@foreach (var item in ListGruppi)
|
|
{
|
|
<option value="@item.Gruppo">@item.DescrGruppo</option>
|
|
}
|
|
</select>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="px-0">
|
|
<div class="d-flex border rounded px-2">
|
|
<div class="form-check py-1">
|
|
<input class="form-check-input" type="checkbox" @bind="@ShowCli" @bind:after=@FixFilt>
|
|
<label class="form-check-label text-nowrap">@SelCliText</label>
|
|
</div>
|
|
@if (ShowCli)
|
|
{
|
|
<div class="input-group input-group-sm" title="Cliente">
|
|
<span class="input-group-text">
|
|
<i class="far fa-object-group"></i>
|
|
</span>
|
|
<select @bind="@IdxCliente" class="form-select form-select-sm" title="Cliente" style="width:10rem;" @bind:after=@ForceReload>
|
|
<option value="0">--- Selezionare ---</option>
|
|
@foreach (var item in ListClienti)
|
|
{
|
|
<option value="@item.IdxCliente">@item.RagSociale</option>
|
|
}
|
|
</select>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
</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
|
|
{
|
|
<table class="table table-striped table-sm text-start small">
|
|
<thead>
|
|
<tr class="">
|
|
<th>
|
|
<button class="btn btn-primary btn-sm" @onclick="ForceReload"><i class="fa-solid fa-rotate"></i></button>
|
|
</th>
|
|
<th>Gruppo <Sorter ParamName="Gruppo" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th>RagSoc <Sorter ParamName="RagSoc" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th>Nome <Sorter ParamName="NomeProj" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th>Real/Bdgt <Sorter ParamName="OreTot" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th>Money <Sorter ParamName="Money" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
|
<th>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@if (ShowFasi && RecordSel != null)
|
|
{
|
|
<tr class="align-middle @CheckSel(RecordSel)">
|
|
<td>
|
|
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-search"></i></button>
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-edit"></i></button>
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-angles-right"></i></button>
|
|
</td>
|
|
<td>
|
|
<div class="fw-bold">
|
|
@RecordSel.Gruppo
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="fw-bold">
|
|
@RecordSel.RagSociale
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<div>@RecordSel.NomeProj</div>
|
|
<div class="small">@RecordSel.DescrProj</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="text-center py-1 @ColorByVal(RecordSel.totOre, RecordSel.budgetTime)">
|
|
<b>@($"{RecordSel.totOre:N2}")</b> / @($"{RecordSel.budgetTime:N0}")
|
|
</div>
|
|
</td>
|
|
<td>
|
|
@if (RecordSel.budgetMoney > 0)
|
|
{
|
|
@($"{RecordSel.budgetMoney:C2}")
|
|
}
|
|
</td>
|
|
<td class="text-end">
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-trash"></i></button>
|
|
</td>
|
|
</tr>
|
|
}
|
|
else
|
|
{
|
|
@foreach (var item in ListRecords)
|
|
{
|
|
<tr class="align-middle @CheckSel(item)">
|
|
<td>
|
|
@if (RecordEdit == null)
|
|
{
|
|
<button class="btn btn-info btn-sm" @onclick="() => DoSelect(item)"><i class="fa-solid fa-search"></i></button>
|
|
<button class="btn btn-primary btn-sm" @onclick="() => DoEdit(item)"><i class="fa-solid fa-edit"></i></button>
|
|
<button class="btn btn-warning btn-sm" @onclick="() => DoShowFasi(item)"><i class="fa-solid fa-angles-right"></i></button>
|
|
@* <a class="btn btn-warning btn-sm" href="fasi" target="_blank"><i class="fa-solid fa-angles-right"></i></a> *@
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-search"></i></button>
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-edit"></i></button>
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-angles-right"></i></button>
|
|
}
|
|
</td>
|
|
<td>
|
|
<div class="fw-bold">
|
|
@item.Gruppo
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="fw-bold">
|
|
@item.RagSociale
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<div>@item.NomeProj</div>
|
|
<div class="small">@item.DescrProj</div>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="text-center py-1 @ColorByVal(item.totOre, item.budgetTime)">
|
|
<b>@($"{item.totOre:N2}")</b> / @($"{item.budgetTime:N0}")
|
|
</div>
|
|
</td>
|
|
<td>
|
|
@if (item.budgetMoney > 0)
|
|
{
|
|
@($"{item.budgetMoney:C2}")
|
|
}
|
|
</td>
|
|
<td class="text-end">
|
|
@if (item.totOre == 0)
|
|
{
|
|
<button class="btn btn-danger btn-sm" @onclick="() => DoDelete(item)"><i class="fa-solid fa-trash"></i></button>
|
|
}
|
|
else
|
|
{
|
|
<button class="btn btn-secondary btn-sm" disabled><i class="fa-solid fa-trash"></i></button>
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
@if(ShowFasi)
|
|
{
|
|
<FasiMan ListRecords=@ListFasiSel EC_update=ReloadFasi ShowSelect="false"></FasiMan>
|
|
}
|
|
</div>
|
|
<div class="card-footer">
|
|
@if (!ShowFasi)
|
|
{
|
|
<EgwCoreLib.Razor.DataPager PageSize="@numRecord" currPage="@currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" totalCount="@totalCount" showLoading="@isLoading"></EgwCoreLib.Razor.DataPager>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
|