Merge branch 'develop'

This commit is contained in:
Annamaria Sassi
2026-03-30 10:28:46 +02:00
6 changed files with 189 additions and 58 deletions
+8 -7
View File
@@ -4,8 +4,8 @@
<PageTitle>EditJWD</PageTitle>
<div class="row">
<div class="col-6">
<div class="row mb-2">
@* <div class="col-6">
<div class="input-group mb-2 justify-content-center">
<span class="input-group-text">FamilyHw</span>
<select class="form-select" @bind="familyHWMassUpdate">
@@ -15,8 +15,7 @@
}
</select>
</div>
</div>
</div> *@
<div class="col-6">
<div class="input-group mb-2 justify-content-center">
<span class="input-group-text">Color</span>
@@ -61,8 +60,10 @@
</select>
</div>
</div>
<div class="col-4">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => UpdateInfoJwdAsync(CurrData.CurrJwd, familyHWMassUpdate, colorMassUpdate, materialMassUpdate, glassMassUpdate, profileMassUpdate)">Save</button>
</div>
<div class="row mb-2">
<div class="col-2">
<button class="btn btn-outline-secondary btn-sm" @onclick="() => UpdateInfoJwdAsync(CurrData.CurrJwd, familyHWMassUpdate, colorMassUpdate, materialMassUpdate, glassMassUpdate, profileMassUpdate)">Save</button>
</div>
</div>
@@ -76,7 +77,7 @@
EC_ActionReq="DoAction"
EC_DoUpdate="ExecRequest"
EC_OnClose="CloseObj"
EC_PendantAction="PendAction">
EC_UpdateReqPend="PendAction">
</WebWindowComplex.TableComp>
}
else
+13 -1
View File
@@ -35,6 +35,13 @@ namespace WebWindowComplex.Compo
[Parameter]
public Dictionary<string, string> ListWarnings { get; set; } = new Dictionary<string, string>();
/// <summary>
/// Elenco domande pendenti
/// </summary>
[Parameter]
public Dictionary<string, string> DictPendReq { get; set; } = new Dictionary<string, string>();
#endregion Public Properties
#region Protected Properties
@@ -118,7 +125,12 @@ namespace WebWindowComplex.Compo
/// <returns></returns>
protected string cssValid(string fKey)
{
return ListWarnings.ContainsKey(fKey) ? "border border-danger" : "";
string ans = "";
if (ListWarnings.ContainsKey(fKey) || DictPendReq.ContainsKey(fKey))
ans = "border border-danger";
else
ans = "";
return ans;
}
protected override void OnParametersSet()
+74 -39
View File
@@ -36,46 +36,36 @@
{
if (listErrPre != null && listErrPre.Count > 0)
{
<div class="alert alert-danger">
<div class="fs-3">Errori validazione!</div>
<div class="col-12 col-md-6 col-lg-3">
<div class="d-flex flex-column">
<div class="alert alert-danger">
<div class="fs-3">Errori validazione!</div>
<div class="col-12 col-md-6 col-lg-3">
<ul class="list-group">
@foreach (var item in listErrPre)
{
<li class="list-group-item">@item.Value</li>
}
</ul>
<ul class="list-group">
@foreach (var item in listErrPre)
{
<li class="list-group-item">@item.Value</li>
}
</ul>
</div>
</div>
</div>
}
else if (listErrLink != null && listErrLink.Count > 0)
{
<div class="alert alert-danger">
<div class="fs-3">Errore configurazione:</div>
<div class="col-12">
<ul class="list-group">
@foreach (var item in listErrLink)
{
<li class="list-group-item">@item.Value</li>
}
</ul>
</div>
</div>
}
else if (reqBool)
{
<div class="d-flex flex-column">
<div class="card text-center shadow rounded">
<div class="col-md-12 d-grid gap-4 p-2 d-md-flex justify-content-end flex-wrap">
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">Close</button>
</div>
<div class="alert alert-warning">
<div class="fs-3">Domande pendenti</div>
<div class="alert alert-danger">
<div class="fs-3">Errore configurazione:</div>
<div class="col-12">
<ul class="list-group">
@foreach (var item in listErrLink)
{
<li class="list-group-item">@item.Value</li>
}
</ul>
</div>
</div>
</div>
}
else
{
@@ -268,6 +258,7 @@
<General CurrWindow="m_CurrWindow"
ListPayload="ListPayload"
ListWarnings="listWarnings"
DictPendReq="PendReq"
User="baseUser"
EC_UpdateGeneral="UpdatePreviewGeneral"
EC_ReqClose="ReturnTree">
@@ -296,17 +287,61 @@
</div>
</div>
</div>
if (reqBool)
{
<div class="d-flex flex-column">
<div class="alert alert-warning">
<div class="fs-3">Domande pendenti:</div>
<div class="d-flex flex-column mt-2 justify-content-start">
@if (PendReq != null && PendReq.Count > 0)
{
foreach (var item in PendReq)
{
<div class="d-flex flex-column col-3 gap-2 flex-wrap">
<div class="input-group justify-content-center">
<label class="input-group-text">@item.Key</label>
<input type="text" readonly class="form-control" value="@(item.Value)">
<button class="btn btn-sm btn-warning" title="Non cambiare" @onclick="() => DoChangePend(item.Key,false)"><i class="fa-solid fa-ban"></i></button>
<button class="btn btn-sm btn-success" title="Cambia" @onclick="() => DoChangePend(item.Key,true)"><i class="fa-solid fa-check"></i></button>
</div>
</div>
}
}
@* <ul class="list-group">
@if (PendReq != null && PendReq.Count > 0)
{
foreach (var item in PendReq)
{
<li class="list-group-item">
<div class="d-flex flex-column gap-2 flex-wrap">
<div class="input-group mb-2 justify-content-center">
<label class="input-group-text">@item.Key</label>
<input type="text" readonly class="form-control" value="@(item.Value)">
<button class="btn btn-sm btn-warning" title="Non cambiare" @onclick="() => DoChangePend(item.Key,false)"><i class="fa-solid fa-ban"></i></button>
<button class="btn btn-sm btn-success" title="Cambia" @onclick="() => DoChangePend(item.Key,true)"><i class="fa-solid fa-check"></i></button>
</div>
</div>
</li>
}
}
</ul> *@
</div>
</div>
</div>
}
if (listWarnings != null && listWarnings.Count > 0)
{
<div class="alert alert-warning">
<div class="fs-3">Mancata corrispondenza valori:</div>
<div class="col-12 col-md-6 col-lg-3">
<ul class="list-group">
@foreach (var item in listWarnings)
{
<li class="list-group-item">@item.Value</li>
}
</ul>
<div class="d-flex flex-column">
<div class="alert alert-warning">
<div class="fs-3">Mancata corrispondenza valori:</div>
<div class="col-12 col-md-6 col-lg-3">
<ul class="list-group">
@foreach (var item in listWarnings)
{
<li class="list-group-item">@item.Value</li>
}
</ul>
</div>
</div>
</div>
}
+58 -9
View File
@@ -94,7 +94,7 @@ namespace WebWindowComplex
/// Richiesta azione per le richieste pendenti
/// </summary>
[Parameter]
public EventCallback<Dictionary<string,string>> EC_PendantAction { get; set; }
public EventCallback<Dictionary<string,string>> EC_UpdateReqPend { get; set; }
/// <summary>
/// Elenco anagrafiche di base
@@ -210,7 +210,7 @@ namespace WebWindowComplex
WindowFromJson = BuildWindowDefault();
Log.Info("Ricostruito jwd");
}
UpdateInputList(WindowFromJson);
UpdInputListJson(WindowFromJson);
setCurrWindow(WindowFromJson);
//SOLO SE non sono in edit...
if (!editLock)
@@ -290,17 +290,22 @@ namespace WebWindowComplex
// Controllo se ci sono domande pendenti
if(PendReq != null && PendReq.Count > 0)
{
//Implementazione di test
reqBool = true;
PendReq.Remove("Profile");
await EC_PendantAction.InvokeAsync(PendReq);
if (!string.IsNullOrEmpty(PendReq.GetValueOrDefault("Profile")) && m_CurrWindow != null)
{
reqBool = true;
currStep = CompileStep.General;
}
//PendReq.Remove("Profile");
//await EC_PendantAction.InvokeAsync(PendReq);
}
}
private bool reqBool = false;
#endregion Protected Methods
#region Private Fields
private bool reqBool = false;
private bool waitShape = false;
private static Logger Log = LogManager.GetCurrentClassLogger();
@@ -456,6 +461,32 @@ namespace WebWindowComplex
#region Private Methods
/// <summary>
/// Metodo per salvare o meno la richiesta pendente
/// </summary>
/// <param name="currPendReq"> richiesta pendente </param>
/// <param name="ans"> risposta </param>
/// <returns></returns>
private async Task DoChangePend(string currPendReq, bool ans)
{
if (PendReq != null && PendReq.Count > 0 && !string.IsNullOrEmpty(PendReq.GetValueOrDefault("Profile")) && m_CurrWindow != null)
{
if (ans)
{
m_CurrWindow.sProfilePath = PendReq.GetValueOrDefault("Profile") ?? "";
UpdInputListWindow();
await DoPreviewSvg(true);
}
PendReq.Remove("Profile");
}
if (PendReq != null && PendReq.Count == 0)
{
reqBool = false;
await DoSave();
}
await EC_UpdateReqPend.InvokeAsync(PendReq);
}
/// <summary>
/// Metodo per andare allo step successivo
/// </summary>
@@ -1732,15 +1763,33 @@ namespace WebWindowComplex
/// <summary>
/// Metodo per settare i paramteri di ingresso selezionati
/// </summary>
private void UpdateInputList(JsonWindow WindowFromJson)
private void UpdInputList(string profile)
{
string profile = WindowFromJson.ProfilePath;
Window.m_ParameterList = ListPayload.ProfileList?.FirstOrDefault(x => x.ProfileName.Equals(profile))?.ParameterDict ?? new();
Frame.m_AllThresholdList = ListPayload.ProfileList?.FirstOrDefault(x => x.ProfileName.Equals(profile))?.ThresholdList ?? new();
Sash.m_HardwareCompleteList = ListPayload.Hardware;
Sash.s_FamilyHardwareList = ListPayload.FamilyHardware;
}
/// <summary>
/// Metodo per settare i paramteri di ingresso selezionati
/// </summary>
private void UpdInputListJson(JsonWindow? WindowFromJson)
{
string profile = "";
if (WindowFromJson != null)
profile = WindowFromJson.ProfilePath;
UpdInputList(profile);
}
private void UpdInputListWindow()
{
string profile = "";
if (m_CurrWindow != null)
profile = m_CurrWindow.sProfilePath;
UpdInputList(profile);
}
/// <summary>
/// Metodo che resetta le liste (sash, split, splitted, fill e itemTable) e le crea nuovamente
/// </summary>
+10 -1
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>3.1.3.2718</Version>
<Version>3.1.3.3010</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -83,6 +83,15 @@
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>3.1.3.2718</Version>
<Version>3.1.3.3010</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione JWD per LUX</Description>
@@ -83,6 +83,31 @@