update trigger eventi close/save

This commit is contained in:
2025-10-07 15:18:46 +02:00
parent 5086155657
commit b9e277e36e
5 changed files with 70 additions and 8 deletions
+16 -3
View File
@@ -7,10 +7,23 @@
<WebWindowComplex.TableComp ListPayload="SetupList"
LiveData="CurrData"
EC_OnUpdate="SaveJWD"
>
EC_OnClose="CloseObj">
</WebWindowComplex.TableComp>
@*
@if (!string.IsNullOrEmpty(outClose))
{
<div class="alert alert-danger fs-4">
@outClose
</div>
}
else if (!string.IsNullOrEmpty(outSave))
{
<div class="alert alert-success fs-4">
@outSave
</div>
}
@*
IN_ColorMaterialList="@AvailColorMaterialList"
IN_FamilyHardwareList="@AvailFamilyHardwareList"
IN_GlassList="@AvailGlassList"
+14
View File
@@ -217,6 +217,8 @@ namespace Test.UI.Components.Pages
private async Task SaveJWD(Dictionary<string, string> CurrArgs)
{
outClose = "";
outSave = "";
m_CurrArgs = CurrArgs;
// verifico se contiene JWD, lo aggiorno
if (CurrArgs.ContainsKey("Jwd"))
@@ -251,5 +253,17 @@ namespace Test.UI.Components.Pages
#endregion Private Methods
/// <summary>
/// Effettua chiusura oggetto con eventuale save
/// </summary>
/// <param name="reqSave"></param>
private void CloseObj(bool reqSave)
{
outClose = !reqSave ? "Richiesto chiusura!" : "";
outSave = reqSave ? "Richiesto salvataggio!" : "";
}
private string outClose = "";
private string outSave = "";
}
}
+24 -3
View File
@@ -17,6 +17,9 @@ namespace WebWindowComplex
{
#region Public Properties
/// <summary>
/// Classe override css x SVG (x rescale)
/// </summary>
[Parameter]
public string CssSvg { get; set; } = "responsive-svg";
@@ -26,12 +29,23 @@ namespace WebWindowComplex
[Parameter]
public SelectPayload? CurrSelection { get; set; } = null;
/// <summary>
/// Richiesta chiusura JWD (+ refresh)
/// se torna true --> richiesta salvataggio
/// se torna false --> richiesta revert
/// </summary>
[Parameter]
public EventCallback<bool> EC_OnClose { get; set; }
/// <summary>
/// Evento selezione template
/// </summary>
[Parameter]
public EventCallback<TemplateSelectDTO> EC_OnSelectedTemplate { get; set; }
/// <summary>
/// Richiesta refresh SVG da JWD
/// </summary>
[Parameter]
public EventCallback<Dictionary<string, string>> EC_OnUpdate { get; set; }
@@ -573,10 +587,14 @@ namespace WebWindowComplex
return "";
}
// Ancora da fare...
/// <summary>
/// Richiesta chiusura SENZA salvataggio (= restore prev)
/// </summary>
/// <returns></returns>
protected async Task DoClose()
{
await EC_OnClose.InvokeAsync(true);
editLock = false;
await EC_OnClose.InvokeAsync(false);
}
/// <summary>
@@ -635,7 +653,10 @@ namespace WebWindowComplex
await DoPreviewSvg();
}
// Ancora da fare..
/// <summary>
/// Richiesta chiusura con salvataggio
/// </summary>
/// <returns></returns>
protected async Task DoSave()
{
editLock = false;
+8 -1
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.7.10.713</Version>
<Version>2.7.10.715</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -84,6 +84,13 @@
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.7.10.713</Version>
<Version>2.7.10.715</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione JWD per LUX</Description>
@@ -99,6 +99,13 @@