diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index 383ca60c..3970d89e 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -195,7 +195,7 @@ namespace EgwCoreLib.Lux.Data.Services // cerco in redis... string currKey = $"{redisBaseKey}:ConfProfile"; RedisValue rawData = await redisDb.StringGetAsync(currKey); - if (rawData.HasValue) + if (rawData.HasValue && rawData.Length() > 2) { result = JsonConvert.DeserializeObject>($"{rawData}"); source = "REDIS"; diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 14dc0436..76826e0c 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2601.2118 + 1.1.2601.2119 diff --git a/Lux.UI/Components/Compo/Config/ProfileMan.razor b/Lux.UI/Components/Compo/Config/ProfileMan.razor index 65c2c40d..54562b8e 100644 --- a/Lux.UI/Components/Compo/Config/ProfileMan.razor +++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor @@ -36,35 +36,12 @@ } else { - @* - - - - - - - - @foreach (var item in ListRecords) - { - - - - } - - @if (totalCount >= numRecord) - { - - - - - - } -
Cod.
@item
- -
*@ + @@ -76,12 +53,47 @@ @foreach (var item in ListRecords) { - + + - + - + } diff --git a/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs b/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs index 4a9956f1..1829ef66 100644 --- a/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs +++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor.cs @@ -1,5 +1,6 @@ using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data.DbModel.Config; +using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Cors.Infrastructure; @@ -50,7 +51,7 @@ namespace Lux.UI.Components.Compo.Config if (searchVal != value) { searchVal = value; - FullUpdate(); + _ = FullUpdate(); } } } @@ -59,6 +60,51 @@ namespace Lux.UI.Components.Compo.Config #region Protected Methods + protected void DoCloseDetail(bool args) + { + DetReq = ""; + currDispl = null; + } + + /// + /// Eliminazione record + /// + /// + protected async Task DoDelete(ProfileModel selRec) + { + if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.Code} | {selRec.Description}")) + return; + + isLoading = true; + await InvokeAsync(StateHasChanged); + // esegue eliminazione del record... + await DLService.ConfProfileDeleteAsync(selRec); + + // segnalo update x reload + await ReloadData(); + UpdateTable(); + } + + /// + /// Edit record selezionato + /// + /// + protected void DoEdit(ProfileModel curRec) + { + EditRecord = curRec; + } + /// + /// Salvataggio record + /// + /// + protected async Task DoSave(ProfileModel curRec) + { + await DLService.ConfProfileUpsertAsync(curRec); + EditRecord = null; + await ReloadData(); + UpdateTable(); + } + /// /// Richiesta update elenco HW preferiti/configurati /// @@ -79,6 +125,14 @@ namespace Lux.UI.Components.Compo.Config await callRefreshProfThresh(); } + /// + /// Reset selezione + /// + protected void DoReset() + { + EditRecord = null; + } + protected override void OnInitialized() { apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? ""; @@ -147,6 +201,8 @@ namespace Lux.UI.Components.Compo.Config private string DetReq = ""; + private ProfileModel? EditRecord = null; + private string genericBasePath = "generic"; private bool isLoading = false; @@ -246,10 +302,14 @@ namespace Lux.UI.Components.Compo.Config } } - private void DoCloseDetail(bool args) + private string checkSel(ProfileModel curRec) { - DetReq = ""; - currDispl = null; + string answ = ""; + if (EditRecord != null) + { + answ = curRec.Code == EditRecord.Code ? "table-info" : ""; + } + return answ; } private async Task FullUpdate() @@ -311,6 +371,7 @@ namespace Lux.UI.Components.Compo.Config .ToList(); } totalCount = AllRecords.Count; + isLoading = false; } /// @@ -323,12 +384,6 @@ namespace Lux.UI.Components.Compo.Config .Skip(numRecord * (currPage - 1)) .Take(numRecord) .ToList(); -#if false - ListRecords = AllRecordsRedis - .Skip(numRecord * (currPage - 1)) - .Take(numRecord) - .ToList(); -#endif isLoading = false; } diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index f8fec823..09ebedd7 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 1.1.2601.2118 + 1.1.2601.2119 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 271c6eb0..c38c8aee 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 1.1.2601.2118

+

Versione: 1.1.2601.2119


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index df0c9ebd..1fe26808 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2601.2118 +1.1.2601.2119 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 4e5991a6..4bc0c7ba 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2601.2118 + 1.1.2601.2119 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false
+ + Cod. Descr. Threshold
+ @if (EditRecord != null && EditRecord.Code == item.Code) + { + + } + else + { + + } + @item.Code@item.Description + @if (EditRecord != null && EditRecord.Code == item.Code) + { + + } + else + { + @item.Description + } + del + @if (EditRecord != null && EditRecord.Code == item.Code) + { + + } + else + { + if(item.ThresholdList.Count==0 && item.ProfileDataDict.Count==0) + { + + } + else + { + + } + } +