Update x cancellazione richieste enroll da LiMan UI
This commit is contained in:
@@ -128,6 +128,7 @@ else if (SelRecord != null)
|
||||
<button class="btn btn-sm m-2 btn-primary" @onclick="ToggleEditLic" title="Modifica Licenza Esistente">Edit Inst <i class="fa-solid fa-edit"></i></button>
|
||||
<button class="btn btn-sm my-2 btn-dark" @onclick="ResetSel" title="Torna ad elenco">Chiudi <i class="fa-solid fa-xmark"></i></button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -167,6 +168,11 @@ else if (SelRecord != null)
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<button class="btn btn-sm my-2 btn-danger w-50" @onclick="DoDelete" title="Elimina Licenza">Elimina <i class="fa-solid fa-trash"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunge all licenza selezionata altri 10 slot...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task AddActivations()
|
||||
{
|
||||
// chiedo conferma...
|
||||
if (!await JSRuntime.InvokeAsync<bool>("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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunge la licenza selezionata x 10 slot...
|
||||
/// </summary>
|
||||
@@ -91,24 +112,22 @@ namespace LiMan.UI.Components
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiunge all licenza selezionata altri 10 slot...
|
||||
/// Recupera info licenza dato Idx x indicare licenza di assegnazione dell'enroll
|
||||
/// </summary>
|
||||
/// <param name="idxLic"></param>
|
||||
/// <returns></returns>
|
||||
protected async Task AddActivations()
|
||||
protected string DescrLic(int idxLic)
|
||||
{
|
||||
// chiedo conferma...
|
||||
if (!await JSRuntime.InvokeAsync<bool>("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<bool>("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();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera info licenza dato Idx x indicare licenza di assegnazione dell'enroll
|
||||
/// </summary>
|
||||
/// <param name="idxLic"></param>
|
||||
/// <returns></returns>
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>2.1.2502.0318</Version>
|
||||
<Version>2.1.2502.0612</Version>
|
||||
<RootNamespace>LiMan.UI</RootNamespace>
|
||||
<AssemblyName>LiMan.UI</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 2.1.2502.0318</h4>
|
||||
<h4>Versione: 2.1.2502.0612</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.1.2502.0318
|
||||
2.1.2502.0612
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>2.1.2502.0318</version>
|
||||
<version>2.1.2502.0612</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user