diff --git a/LiMan.UI/Components/EnrollList.razor b/LiMan.UI/Components/EnrollList.razor index eb90dc2..37c5ec5 100644 --- a/LiMan.UI/Components/EnrollList.razor +++ b/LiMan.UI/Components/EnrollList.razor @@ -128,6 +128,7 @@ else if (SelRecord != null) +
@@ -167,6 +168,11 @@ else if (SelRecord != null) }
+
+
+ +
+
} diff --git a/LiMan.UI/Components/EnrollList.razor.cs b/LiMan.UI/Components/EnrollList.razor.cs index 503b884..d3e9116 100644 --- a/LiMan.UI/Components/EnrollList.razor.cs +++ b/LiMan.UI/Components/EnrollList.razor.cs @@ -25,15 +25,15 @@ namespace LiMan.UI.Components [Parameter] public DateTime DtStart { get; set; } = DateTime.Today.AddMonths(-1); + [Parameter] + public int IdxLicSel { get; set; } = 0; + [Parameter] public bool OnlyActive { get; set; } = true; [Parameter] public string SearchVal { get; set; } = ""; - [Parameter] - public int IdxLicSel { get; set; } = 0; - #endregion Public Properties #region Public Methods @@ -60,6 +60,27 @@ namespace LiMan.UI.Components #region Protected Methods + /// + /// Aggiunge all licenza selezionata altri 10 slot... + /// + /// + protected async Task AddActivations() + { + // chiedo conferma... + if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler aggiungere 10 ulteriori slot alla licenza {SelCodInst}? L'operazione non è reversibile")) + return; + + var currLic = LMDService.LicenzaNextGetByIdx(SelIdxLic); + currLic.NumLicenze += 10; + // aggiorno chiave calcolata + currLic.Chiave = currLic.ChiaveCalc; + await LMDService.LicenzeNextUpdate(currLic); + LMDService.EnrollMessPipe.sendMessage("LicUpdated"); + ShowAddLic = false; + ShowEditLic = false; + await ReloadLicData(); + } + /// /// Aggiunge la licenza selezionata x 10 slot... /// @@ -91,24 +112,22 @@ namespace LiMan.UI.Components } /// - /// Aggiunge all licenza selezionata altri 10 slot... + /// Recupera info licenza dato Idx x indicare licenza di assegnazione dell'enroll /// + /// /// - protected async Task AddActivations() + protected string DescrLic(int idxLic) { - // chiedo conferma... - if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler aggiungere 10 ulteriori slot alla licenza {SelCodInst}? L'operazione non è reversibile")) - return; - - var currLic = LMDService.LicenzaNextGetByIdx(SelIdxLic); - currLic.NumLicenze += 10; - // aggiorno chiave calcolata - currLic.Chiave = currLic.ChiaveCalc; - await LMDService.LicenzeNextUpdate(currLic); - LMDService.EnrollMessPipe.sendMessage("LicUpdated"); - ShowAddLic = false; - ShowEditLic = false; - await ReloadLicData(); + string answ = "NA"; + if (idxLic > 0 && ListLicenze != null && ListLicenze.Count > 0) + { + var sRec = ListLicenze.FirstOrDefault(x => x.IdxLic == idxLic); + if (sRec != null) + { + answ = $"{sRec.CodInst}"; + } + } + return answ; } protected async Task DoApprove() @@ -133,6 +152,18 @@ namespace LiMan.UI.Components } } + protected async Task DoDelete() + { + // chiedo conferma... + if (!await JSRuntime.InvokeAsync("confirm", "Sicuro di voler eliminare il record?")) + return; + + await LMDService.EnrollReqDelete(SelRecord.IdReq); + await Task.Delay(50); + SelRecord = null; + await ReloadData(); + } + protected async Task DoSelect(EnrollRequestModel curRec) { SelRecord = curRec; @@ -179,6 +210,7 @@ namespace LiMan.UI.Components { ShowAddLic = !ShowAddLic; } + protected void ToggleEditLic() { ShowEditLic = !ShowEditLic; @@ -286,25 +318,6 @@ namespace LiMan.UI.Components ListInstall = await LMDService.InstallazioniNextGetAll(); } - /// - /// Recupera info licenza dato Idx x indicare licenza di assegnazione dell'enroll - /// - /// - /// - protected string DescrLic(int idxLic) - { - string answ = "NA"; - if (idxLic > 0 && ListLicenze != null && ListLicenze.Count > 0) - { - var sRec = ListLicenze.FirstOrDefault(x => x.IdxLic == idxLic); - if (sRec != null) - { - answ = $"{sRec.CodInst}"; - } - } - return answ; - } - #endregion Private Methods } } \ No newline at end of file diff --git a/LiMan.UI/LiMan.UI.csproj b/LiMan.UI/LiMan.UI.csproj index ad06296..e9681dc 100644 --- a/LiMan.UI/LiMan.UI.csproj +++ b/LiMan.UI/LiMan.UI.csproj @@ -2,7 +2,7 @@ net6.0 - 2.1.2502.0318 + 2.1.2502.0612 LiMan.UI LiMan.UI diff --git a/LiMan.UI/Resources/ChangeLog.html b/LiMan.UI/Resources/ChangeLog.html index 907dc70..3ea196a 100644 --- a/LiMan.UI/Resources/ChangeLog.html +++ b/LiMan.UI/Resources/ChangeLog.html @@ -1,6 +1,6 @@ License Manager -

Versione: 2.1.2502.0318

+

Versione: 2.1.2502.0612


Note di rilascio:
  • diff --git a/LiMan.UI/Resources/VersNum.txt b/LiMan.UI/Resources/VersNum.txt index df43c49..4db6f0d 100644 --- a/LiMan.UI/Resources/VersNum.txt +++ b/LiMan.UI/Resources/VersNum.txt @@ -1 +1 @@ -2.1.2502.0318 +2.1.2502.0612 diff --git a/LiMan.UI/Resources/manifest.xml b/LiMan.UI/Resources/manifest.xml index b8a5642..ba05b3f 100644 --- a/LiMan.UI/Resources/manifest.xml +++ b/LiMan.UI/Resources/manifest.xml @@ -1,6 +1,6 @@ - 2.1.2502.0318 + 2.1.2502.0612 https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html false