Note modifiche + fix display resp

This commit is contained in:
Samuele Locatelli
2025-06-23 12:43:12 +02:00
parent 4304ffbb52
commit 07fbdb3075
6 changed files with 71 additions and 42 deletions
@@ -3,7 +3,8 @@
<div class="d-flex justify-content-between">
<div class="px-0 d-flex">
<div class="px-2">
<h3>Gestione Dipendenti</h3>
<h3>Gestione Dipendenti</h3> (togliere card esterna)
</div>
</div>
</div>
@@ -12,12 +13,20 @@
<div class="card-body p-1">
<div class="card shadow">
<div class="card-header">
<div class="px-0 d-flex">
<div class="px-2">
<h4>Dipendenti</h4>
<div class="d-flex justify-content-between">
<div class="px-0 d-flex">
<div class="px-2">
<h4>Dipendenti</h4>
</div>
<div class="px-2">
filtro attivi
</div>
<div class="px-2">
<button class="btn btn-success" @onclick=CreateNew tooltip="Add New"><i class="fa-solid fa-plus"></i> Add New</button>
</div>
</div>
<div class="px-2">
<button class="btn btn-success" @onclick=CreateNew tooltip="Add New"><i class="fa-solid fa-plus"></i> Add New</button>
<div class="px-0 d-flex">
elenco switch QRCode
</div>
</div>
</div>
@@ -53,7 +62,7 @@
<th>Dati anagrafici <Sorter ParamName="DatiAnag" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
<th>Gruppo <Sorter ParamName="Gruppo" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
<th>Stato licenza <Sorter ParamName="StatoLic" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
<th>Responsabile <Sorter ParamName="Responsabile" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
<th class="text-end">Responsabile <Sorter ParamName="Responsabile" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
</tr>
</thead>
<tbody>
@@ -86,7 +95,16 @@
<td class="text-start">@($"{item.LuogoNascita}") - @($"{item.ProvNascita}") - @($"{item.NazNascita}") - @($"{item.DataNascita:dd/MM/yyyy}")</td>
<td class="text-start">@item.Gruppo</td>
<td class="text-start">@($"{item.DataAssunzione:dd/MM/yyyy}") - @($"{item.DataCessazione:dd/MM/yyyy}")</td>
<td class="text-start"></td>
<td class="text-end">
<select @bind="@item.idxResp" class="form-select form-select-sm disabled" disabled style="min-width: 12rem;">
<option value="0">--- Selezionare ---</option>
@foreach (var dip in ListDipendenti)
{
<option value="@dip.IdxDipendente">@($"{dip.Cognome} {dip.Nome}")</option>
}
</select>
</td>
</tr>
}
@@ -11,6 +11,9 @@ namespace GPW.CORE.ADM.Components.Compo
{
#region Protected Properties
[Inject]
protected MessageService AppMServ { get; set; } = null!;
[Inject]
protected GpwDataService GDataServ { get; set; } = null!;
@@ -28,6 +31,10 @@ namespace GPW.CORE.ADM.Components.Compo
return answ;
}
protected async Task CreateNew()
{
}
protected void DoEdit(DipendentiModel? selItem)
{
SelItem = selItem;
@@ -45,22 +52,53 @@ namespace GPW.CORE.ADM.Components.Compo
await ReloadData();
}
protected override async Task OnInitializedAsync()
{
await ReloadData();
}
protected async Task SetNumRec(int newNum)
{
numRecord = newNum;
currPage = 1;
await AppMServ.NumRowGridSet(gridKey, newNum);
await InvokeAsync(ReloadData);
}
protected async Task SetPage(int newNum)
{
currPage = newNum;
await InvokeAsync(ReloadData);
}
protected async Task SortRequested(Sorter.SortCallBack e)
{
sortField = e.ParamName;
sortAsc = e.IsAscending;
await ReloadData();
}
#endregion Protected Methods
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private int currPage = 1;
private string gridKey = "DipendentiMan";
private bool isLoading = false;
private int numRecord = 10;
private string searchVal = "";
private DipendentiModel? SelItem = null;
private bool ShowInatt = false;
private bool sortAsc = true;
private string sortField = "";
#endregion Private Fields
#region Private Properties
private List<DipendentiModel>? ListDipendenti { get; set; } = null;
private List<DipendentiModel>? ListRecords { get; set; } = null;
private string mainDivCss
@@ -72,11 +110,6 @@ namespace GPW.CORE.ADM.Components.Compo
private DipendentiModel? SelRecord { get; set; } = null;
private int totalCount { get; set; } = 0;
private bool sortAsc = true;
private string sortField = "";
#endregion Private Properties
#region Private Methods
@@ -85,14 +118,14 @@ namespace GPW.CORE.ADM.Components.Compo
{
isLoading = true;
ListRecords = null;
var rawList = await GDataServ.DipendentiGetAll();
ListDipendenti = await GDataServ.DipendentiGetAll();
if (ShowInatt)
{
SearchRecords = rawList;
SearchRecords = ListDipendenti;
}
else
{
SearchRecords = rawList.Where(x => (x.Attivo ?? false)).ToList();
SearchRecords = ListDipendenti.Where(x => (x.Attivo ?? false)).ToList();
}
// eseguo filtro ricerca
@@ -114,23 +147,6 @@ namespace GPW.CORE.ADM.Components.Compo
isLoading = false;
}
protected async Task CreateNew()
{
}
protected async Task SortRequested(Sorter.SortCallBack e)
{
sortField = e.ParamName;
sortAsc = e.IsAscending;
await ReloadData();
}
private void SortTable()
{
if (SearchRecords != null)
@@ -302,11 +318,6 @@ namespace GPW.CORE.ADM.Components.Compo
}
}
protected override async Task OnInitializedAsync()
{
await ReloadData();
}
#endregion Private Methods
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>4.1.2506.2311</Version>
<Version>4.1.2506.2312</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>GPW - Gestione Presenze Web</i>
<h4>Versione: 4.1.2506.2311</h4>
<h4>Versione: 4.1.2506.2312</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
4.1.2506.2311
4.1.2506.2312
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>4.1.2506.2311</version>
<version>4.1.2506.2312</version>
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory>