Cambiato nome Material in Wood

This commit is contained in:
Annamaria Sassi
2026-03-30 12:24:58 +02:00
parent c7a8fa9e99
commit 57160cd18c
23 changed files with 82 additions and 73 deletions
+4 -4
View File
@@ -29,9 +29,9 @@
</div>
<div class="col-6">
<div class="input-group mb-2 justify-content-center">
<span class="input-group-text">Material</span>
<select class="form-select" @bind="materialMassUpdate">
@foreach (var item in AvailMaterialList)
<span class="input-group-text">Wood</span>
<select class="form-select" @bind="woodMassUpdate">
@foreach (var item in AvailWoodList)
{
<option value="@item">@item</option>
}
@@ -63,7 +63,7 @@
</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>
<button class="btn btn-outline-secondary btn-sm" @onclick="() => UpdateInfoJwdAsync(CurrData.CurrJwd, familyHWMassUpdate, colorMassUpdate, woodMassUpdate, glassMassUpdate, profileMassUpdate)">Save</button>
</div>
</div>
+8 -8
View File
@@ -106,7 +106,7 @@ namespace Test.UI.Components.Pages
FamilyHardware = AvailFamilyHardwareList,
Glass = AvailGlassList,
Hardware = AvailHardwareList,
Material = AvailMaterialList,
Wood = AvailWoodList,
ProfileList = profList
};
CurrData = new LivePayload()
@@ -157,7 +157,7 @@ namespace Test.UI.Components.Pages
private string SelGlass { get; set; } = "";
private string SelMaterial { get; set; } = "";
private string SelWood { get; set; } = "";
#endregion Private Properties
@@ -171,7 +171,7 @@ namespace Test.UI.Components.Pages
private List<string> AvailFamilyHardwareList = new List<string>();
private List<string> AvailGlassList = new List<string>();
private List<Hardware> AvailHardwareList = new();
private List<string> AvailMaterialList = new List<string>();
private List<string> AvailWoodList = new List<string>();
private List<ProfileModel> AvailProfileList = new();
private List<string> DescriptionProfileList = new();
@@ -235,7 +235,7 @@ namespace Test.UI.Components.Pages
private string familyHWMassUpdate;
private string glassMassUpdate;
private Hardware hardwareMassUpdate;
private string materialMassUpdate;
private string woodMassUpdate;
private string profileMassUpdate;
private string outClose = "";
@@ -305,7 +305,7 @@ namespace Test.UI.Components.Pages
AvailHardwareList = AllConfHardware
.Select(x => new Egw.Window.Data.Hardware(x.Id, x.FamilyName, x.Description, x.OpeningType, x.Shape, x.SashQty, x.SashPosition))
.ToList();
AvailMaterialList = AllConfWood
AvailWoodList = AllConfWood
.Select(x => x.Description)
.ToList();
AvailColorMaterialList = AllColors
@@ -497,15 +497,15 @@ namespace Test.UI.Components.Pages
return InvokeAsync(StateHasChanged);
}
private async Task UpdateInfoJwdAsync(string currSer, string? newFamilyHardware, string? newColorMaterial, string? newMaterial, string? newGlass, string? newProfile)
private async Task UpdateInfoJwdAsync(string currSer, string? newFamilyHardware, string? newColorMaterial, string? newWood, string? newGlass, string? newProfile)
{
Dictionary<string, string> DictParam = new Dictionary<string, string>();
if (!string.IsNullOrEmpty(newFamilyHardware))
DictParam.Add( "FamilyHardware", newFamilyHardware! );
if (!string.IsNullOrEmpty(newColorMaterial))
DictParam.Add("Color", newColorMaterial!);
if (!string.IsNullOrEmpty(newMaterial))
DictParam.Add("Material", newMaterial!);
if (!string.IsNullOrEmpty(newWood))
DictParam.Add("Wood", newWood!);
if (!string.IsNullOrEmpty(newGlass))
DictParam.Add("Glass", newGlass!);
if (!string.IsNullOrEmpty(newProfile))
+1 -1
View File
@@ -344,7 +344,7 @@ namespace Test.UI.Components.Pages
FamilyHardware = AvailFamilyHardwareList,
Glass = AvailGlassList,
Hardware = AvailHardwareList,
Material = AvailMaterialList
Wood = AvailMaterialList
};
}
+1 -1
View File
@@ -361,7 +361,7 @@ namespace Test.UI.Components.Pages
FamilyHardware = AvailFamilyHardwareList,
Glass = AvailGlassList,
Hardware = AvailHardwareList,
Material = AvailMaterialList,
Wood = AvailMaterialList,
ProfileList = AvailProfileList
};
CurrData = new LivePayload()
+1 -1
View File
@@ -1,6 +1,6 @@
{
"ProfilePath": "Profilo78",
"Material": "Pino",
"Wood": "Pino",
"ColorMaterial": "Black",
"Glass": "Vetro BE 2S 4T/16/4T",
"AreaList": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"ProfilePath": "Profilo78",
"Material": "Pino",
"Wood": "Pino",
"ColorMaterial": "Black",
"Glass": "Vetro BE 2S 4T/16/4T",
"AreaList": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"ProfilePath": "Profilo78",
"Material": "Pino",
"Wood": "Pino",
"ColorMaterial": "Black",
"Glass": "Vetro BE 2S 4T/16/4T",
"AreaList": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"ProfilePath": "Profilo78",
"Material": "Pino",
"Wood": "Pino",
"ColorMaterial": "Black",
"Glass": "Vetro BE 2S 4T/16/4T",
"AreaList": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"ProfilePath": "Profilo78",
"Material": "Pino",
"Wood": "Pino",
"ColorMaterial": "Black",
"Glass": "Vetro BE 2S 4T/16/4T",
"AreaList": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"ProfilePath": "Profilo78",
"Material": "Pino",
"Wood": "Pino",
"ColorMaterial": "Black",
"Glass": "Vetro BE 2S 4T/16/4T",
"AreaList": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"ProfilePath": "Profilo78",
"Material": "Pino",
"Wood": "Pino",
"ColorMaterial": "Black",
"Glass": "Vetro BE 2S 4T/16/4T",
"AreaList": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"ProfilePath": "Profilo78",
"Material": "Pino",
"Wood": "Pino",
"ColorMaterial": "Black",
"Glass": "Vetro BE 2S 4T/16/4T",
"AreaList": [
+1 -1
View File
@@ -1,6 +1,6 @@
{
"ProfilePath": "Profilo78",
"Material": "Pino",
"Wood": "Pino",
"ColorMaterial": "Black",
"Glass": "Vetro BE 2S 4T/16/4T",
"AreaList": [
+5 -5
View File
@@ -16,14 +16,14 @@
<div class="input-group mb-2 justify-content-center">
@if (User)
{
<span class="input-group-text">Material</span>
<input type="text" readonly class="form-control" value="@(CurrMaterial)">
<span class="input-group-text">Wood</span>
<input type="text" readonly class="form-control" value="@(CurrWood)">
}
else
{
<label class="input-group-text">Material</label>
<select class="form-select @(cssValid("Material"))" @bind="CurrMaterial">
@foreach (var item in ListPayload.Material)
<label class="input-group-text">Wood</label>
<select class="form-select @(cssValid("Wood"))" @bind="CurrWood">
@foreach (var item in ListPayload.Wood)
{
<option value="@item">@item</option>
}
+7 -7
View File
@@ -83,15 +83,15 @@ namespace WebWindowComplex.Compo
/// <summary>
/// Materiale corrente
/// </summary>
protected string CurrMaterial
protected string CurrWood
{
get => currMaterial;
get => currWood;
set
{
currMaterial = value;
currWood = value;
var args = new DataUpdateGeneral
{
Material = value,
Wood = value,
};
_ = EC_UpdateGeneral.InvokeAsync(args);
}
@@ -137,7 +137,7 @@ namespace WebWindowComplex.Compo
{
currColor = CurrWindow.sColorMaterial;
currGlass = CurrWindow.sGlass;
currMaterial = CurrWindow.sMaterial;
currWood = CurrWindow.sWood;
currProfile = CurrWindow.sProfilePath;
}
@@ -147,7 +147,7 @@ namespace WebWindowComplex.Compo
private string currColor = "";
private string currGlass = "";
private string currMaterial = "";
private string currWood = "";
private string currProfile = "";
#endregion Private Fields
@@ -166,7 +166,7 @@ namespace WebWindowComplex.Compo
{
public string Color { get; set; } = "";
public string Glass { get; set; } = "";
public string Material { get; set; } = "";
public string Wood { get; set; } = "";
public string Profile { get; set; } = "";
}
}
+5 -5
View File
@@ -32,7 +32,7 @@ namespace WebWindowComplex.DTO
/// <summary>
/// Elenco Materiali impiegabili
/// </summary>
public List<string> Material { get; set; } = null!;
public List<string> Wood { get; set; } = null!;
/// <summary>
/// Elenco vetri ammessi
@@ -53,10 +53,10 @@ namespace WebWindowComplex.DTO
bool famHwOK = FamilyHardware != null && FamilyHardware.Count > 0;
bool hwOK = Hardware != null && Hardware.Count > 0;
bool glassOK = Glass != null && Glass.Count > 0;
bool matOK = Material != null && Material.Count > 0;
bool woodOK = Wood != null && Wood.Count > 0;
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
bool profileOK = ProfileList != null && ProfileList.Count > 0;
return famHwOK && glassOK && hwOK && colorOK && matOK && profileOK;
return famHwOK && glassOK && hwOK && colorOK && woodOK && profileOK;
}
/// <summary>
/// Verifica che Payload sia almeno parzialmente popolato
@@ -67,10 +67,10 @@ namespace WebWindowComplex.DTO
bool famHwOK = FamilyHardware != null && FamilyHardware.Count > 0;
bool hwOK = Hardware != null && Hardware.Count > 0;
bool glassOK = Glass != null && Glass.Count > 0;
bool matOK = Material != null && Material.Count > 0;
bool woodOK = Wood != null && Wood.Count > 0;
bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0;
bool profileOK = ProfileList != null && ProfileList.Count > 0;
return famHwOK || glassOK || hwOK || colorOK || matOK || profileOK;
return famHwOK || glassOK || hwOK || colorOK || woodOK || profileOK;
}
}
}
+5 -5
View File
@@ -27,7 +27,7 @@ namespace WebWindowComplex.DTO
/// <summary>
/// Materiale selezionato
/// </summary>
public string Material { get; set; } = string.Empty;
public string Wood { get; set; } = string.Empty;
/// <summary>
/// Tipologia vetro selezionato
@@ -48,9 +48,9 @@ namespace WebWindowComplex.DTO
bool famHwOK = !string.IsNullOrEmpty(FamilyHardware);
bool colorOK = !string.IsNullOrEmpty(ColorMaterial);
bool glassOk = !string.IsNullOrEmpty(Glass);
bool matOK = !string.IsNullOrEmpty(Material);
bool woodOK = !string.IsNullOrEmpty(Wood);
bool profileOK = !string.IsNullOrEmpty(Profile);
return famHwOK && colorOK && matOK && glassOk && profileOK;
return famHwOK && colorOK && woodOK && glassOk && profileOK;
}
/// <summary>
@@ -61,10 +61,10 @@ namespace WebWindowComplex.DTO
{
bool famHwOK = FamilyHardware != null;
bool glassOK = Glass != null;
bool matOK = Material != null;
bool woodOK = Wood != null;
bool colorOK = ColorMaterial != null;
bool profileOK = Profile != null;
return famHwOK || glassOK || colorOK || matOK || profileOK;
return famHwOK || glassOK || colorOK || woodOK || profileOK;
}
}
}
+7 -7
View File
@@ -26,17 +26,17 @@ namespace WebWindowComplex.Json
}
}
private string m_sMaterial;
private string m_sWood;
[JsonProperty]
public string Material
public string Wood
{
get
{
return m_sMaterial;
return m_sWood;
}
set
{
m_sMaterial = value;
m_sWood = value;
}
}
@@ -82,10 +82,10 @@ namespace WebWindowComplex.Json
}
}
public JsonWindow(string ProfilePath, string Material, string ColorMaterial, string Glass)
public JsonWindow(string ProfilePath, string Wood, string ColorMaterial, string Glass)
{
m_sProfilePath = ProfilePath;
m_sMaterial = Material;
m_sWood = Wood;
m_sColorMaterial = ColorMaterial;
m_sGlass = Glass;
}
@@ -95,7 +95,7 @@ namespace WebWindowComplex.Json
Window Window = new Window()
{
sProfilePath = m_sProfilePath,
sMaterial = m_sMaterial,
sWood = m_sWood,
sColorMaterial = m_sColorMaterial,
sGlass = m_sGlass
};
+5 -5
View File
@@ -50,15 +50,15 @@ namespace WebWindowComplex.Models
}
}
public string sMaterial
public string sWood
{
get
{
return m_sMaterial;
return m_sWood;
}
set
{
m_sMaterial = value;
m_sWood = value;
}
}
@@ -115,7 +115,7 @@ namespace WebWindowComplex.Models
/// <returns></returns>
internal JsonWindow Serialize(bool hideHw = false)
{
JsonWindow JsonWindow = new JsonWindow(sProfilePath, sMaterial, sColorMaterial, sGlass);
JsonWindow JsonWindow = new JsonWindow(sProfilePath, sWood, sColorMaterial, sGlass);
foreach (var Area in AreaList)
JsonWindow.AreaList.Add(Area.Serialize(hideHw));
return JsonWindow;
@@ -133,7 +133,7 @@ namespace WebWindowComplex.Models
private List<Frame> m_AreaList = new List<Frame>();
private string? m_sColorMaterial;
private string? m_sGlass;
private string? m_sMaterial;
private string? m_sWood;
private string? m_sProfilePath;
#endregion Private Fields
+3 -3
View File
@@ -40,10 +40,10 @@ namespace WebWindowComplex
currWindow.sColorMaterial = DictParameter.GetValueOrDefault("Color")!;
DictParameter.Remove("Color");
}
if (!string.IsNullOrEmpty(DictParameter.GetValueOrDefault("Material")))
if (!string.IsNullOrEmpty(DictParameter.GetValueOrDefault("Wood")))
{
currWindow.sMaterial = DictParameter.GetValueOrDefault("Material")!;
DictParameter.Remove("Material");
currWindow.sWood = DictParameter.GetValueOrDefault("Wood")!;
DictParameter.Remove("Wood");
}
if (!string.IsNullOrEmpty(DictParameter.GetValueOrDefault("Glass")))
{
+11 -11
View File
@@ -443,7 +443,7 @@ namespace WebWindowComplex
private string SelGlass { get; set; } = "";
private string SelMaterial { get; set; } = ""!;
private string SelWood { get; set; } = ""!;
private string SelProfile { get; set; } = "";
@@ -526,7 +526,7 @@ namespace WebWindowComplex
// Costruisco window e setto i parametri
Window window = new Window();
window.sProfilePath = "Profilo78";
window.sMaterial = "Pino";
window.sWood = "Pino";
window.sGlass = "Vetro BE 2S 4T/16/4T";
window.sColorMaterial = "Wood";
// Costruisco frame e setto i parametri
@@ -612,10 +612,10 @@ namespace WebWindowComplex
listErrPre.Add("Glass", "Missing Glass List!");
Log.Warn(" Missing Glass List");
}
if (ListPayload.Material == null || ListPayload.Material.Count == 0)
if (ListPayload.Wood == null || ListPayload.Wood.Count == 0)
{
listErrPre.Add("Material", "Missing Material List!");
Log.Warn(" Missing Material List");
listErrPre.Add("Wood", "Missing Wood List!");
Log.Warn(" Missing Wood List");
}
if (ListPayload.ColorMaterial == null || ListPayload.ColorMaterial.Count == 0)
{
@@ -663,9 +663,9 @@ namespace WebWindowComplex
{
listWarnings.Add("Glass", $"Missing Glass: {m_CurrWindow.sGlass}");
}
if (ListPayload.Material == null || !ListPayload.Material.Contains(m_CurrWindow.sMaterial))
if (ListPayload.Wood == null || !ListPayload.Wood.Contains(m_CurrWindow.sWood))
{
listWarnings.Add("Material", $"Missing Material: {m_CurrWindow.sMaterial}");
listWarnings.Add("Wood", $"Missing Material: {m_CurrWindow.sWood}");
}
if (ListPayload.ProfileList == null || !ListPayload.ProfileList.Any(x => x.ProfileName.Contains(m_CurrWindow.sProfilePath)))
{
@@ -1882,7 +1882,7 @@ namespace WebWindowComplex
{
string Color = args.Color;
string Glass = args.Glass;
string Material = args.Material;
string Wood = args.Wood;
string Profile = args.Profile;
if (m_CurrWindow != null)
{
@@ -1890,8 +1890,8 @@ namespace WebWindowComplex
m_CurrWindow.sColorMaterial = Color;
else if (!string.IsNullOrEmpty(Glass))
m_CurrWindow.sGlass = Glass;
else if (!string.IsNullOrEmpty(Material))
m_CurrWindow.sMaterial = Material;
else if (!string.IsNullOrEmpty(Wood))
m_CurrWindow.sWood = Wood;
else if (!string.IsNullOrEmpty(Profile))
m_CurrWindow.sProfilePath = Profile;
_ = DoPreviewSvg();
@@ -2087,7 +2087,7 @@ namespace WebWindowComplex
{
SelFamilyHardware = SelectionData.FamilyHardware ?? "";
SelColorMaterial = SelectionData.ColorMaterial ?? "";
SelMaterial = SelectionData.Material ?? "";
SelWood = SelectionData.Wood ?? "";
SelGlass = SelectionData.Glass ?? "";
SelProfile = SelectionData.Profile ?? "";
}
+3 -1
View File
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>3.1.3.3010</Version>
<Version>3.1.3.3012</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
@@ -100,6 +100,8 @@
@@ -6,7 +6,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>3.1.3.3010</Version>
<Version>3.1.3.3012</Version>
<Authors>Annamaria Sassi</Authors>
<Company>Egalware</Company>
<Description>Componente gestione JWD per LUX</Description>
@@ -121,6 +121,13 @@