From c0fd981d45533bd6c70697da66a36bcf09a9b892 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 22 Jan 2026 16:12:26 +0100 Subject: [PATCH] minor fix condizioni su profile/profileList + fix togliendo old data --- Test.UI/Components/Pages/BaseEdit.razor.cs | 4 +- Test.UI/Components/Pages/EditJWD.razor.cs | 4 +- Test.UI/Components/Pages/Home.razor.cs | 4 +- Test.UI/appsettings.Development.json | 1 + Test.UI/appsettings.json | 1 + WebWindowComplex/Compo/General.razor | 11 ++-- WebWindowComplex/DTO/BaseListPayload.cs | 10 ++-- WebWindowComplex/TableComp.razor.cs | 51 ++++++++++++------- WebWindowComplex/WebWindowComplex.csproj | 8 ++- .../WebWindowConfigurator.csproj | 8 ++- 10 files changed, 68 insertions(+), 34 deletions(-) diff --git a/Test.UI/Components/Pages/BaseEdit.razor.cs b/Test.UI/Components/Pages/BaseEdit.razor.cs index 88ffbd4..1a9e75e 100644 --- a/Test.UI/Components/Pages/BaseEdit.razor.cs +++ b/Test.UI/Components/Pages/BaseEdit.razor.cs @@ -154,8 +154,8 @@ namespace Test.UI.Components.Pages Glass = AvailGlassList, Hardware = AvailHardwareList, Material = AvailMaterialList, - Profile = AvailProfileList, - Threshold = AvailThreshold + //Profile = AvailProfileList, + //Threshold = AvailThreshold }; CurrData = new LivePayload() { diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs index 64f46f3..852f82c 100644 --- a/Test.UI/Components/Pages/EditJWD.razor.cs +++ b/Test.UI/Components/Pages/EditJWD.razor.cs @@ -230,8 +230,8 @@ namespace Test.UI.Components.Pages Hardware = AvailHardwareList, Material = AvailMaterialList, ProfileList = AvailProfileList, - Profile = AvailProfileListOld, - Threshold = AvailThresholdOld + //Profile = AvailProfileListOld, + //Threshold = AvailThresholdOld }; CurrData = new LivePayload() { diff --git a/Test.UI/Components/Pages/Home.razor.cs b/Test.UI/Components/Pages/Home.razor.cs index 0f975e5..f71df72 100644 --- a/Test.UI/Components/Pages/Home.razor.cs +++ b/Test.UI/Components/Pages/Home.razor.cs @@ -356,8 +356,8 @@ namespace Test.UI.Components.Pages Glass = AvailGlassList, Hardware = AvailHardwareList, Material = AvailMaterialList, - Profile = AvailProfileList, - Threshold = AvailThreshold + //Profile = AvailProfileList, + //Threshold = AvailThreshold }; } diff --git a/Test.UI/appsettings.Development.json b/Test.UI/appsettings.Development.json index 0c208ae..770d3e9 100644 --- a/Test.UI/appsettings.Development.json +++ b/Test.UI/appsettings.Development.json @@ -1,4 +1,5 @@ { + "DetailedErrors": true, "Logging": { "LogLevel": { "Default": "Information", diff --git a/Test.UI/appsettings.json b/Test.UI/appsettings.json index 6e65fdb..92e2391 100644 --- a/Test.UI/appsettings.json +++ b/Test.UI/appsettings.json @@ -1,4 +1,5 @@ { + "DetailedErrors": true, "Logging": { "LogLevel": { "Default": "Information", diff --git a/WebWindowComplex/Compo/General.razor b/WebWindowComplex/Compo/General.razor index 7f9b856..96f0e55 100644 --- a/WebWindowComplex/Compo/General.razor +++ b/WebWindowComplex/Compo/General.razor @@ -40,9 +40,12 @@ { } @@ -87,7 +90,7 @@
Color
-
+
@if (User) { @@ -107,7 +110,7 @@
- diff --git a/WebWindowComplex/DTO/BaseListPayload.cs b/WebWindowComplex/DTO/BaseListPayload.cs index 01be0b6..05de28b 100644 --- a/WebWindowComplex/DTO/BaseListPayload.cs +++ b/WebWindowComplex/DTO/BaseListPayload.cs @@ -68,8 +68,10 @@ namespace WebWindowComplex.DTO bool matOK = Material != null && Material.Count > 0; bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0; bool profileOK = ProfileList != null && ProfileList.Count > 0; +#if false bool profileOKOld = Profile != null && Profile.Count > 0; - bool thresholdOK = Threshold != null && Threshold.Count > 0; + bool thresholdOK = Threshold != null && Threshold.Count > 0; +#endif return famHwOK && glassOK && hwOK && colorOK && matOK && profileOK; } /// @@ -83,9 +85,11 @@ namespace WebWindowComplex.DTO bool glassOK = Glass != null && Glass.Count > 0; bool matOK = Material != null && Material.Count > 0; bool colorOK = ColorMaterial != null && ColorMaterial.Count > 0; - bool profileOK = ProfileList != null && ProfileList.Count > 0; + bool profileOK = ProfileList != null && ProfileList.Count > 0; +#if false bool profileOKOld = Profile != null && Profile.Count > 0; - bool thresholdOK = Threshold != null && Threshold.Count > 0; + bool thresholdOK = Threshold != null && Threshold.Count > 0; +#endif return famHwOK || glassOK || hwOK || colorOK || matOK || profileOK; } } diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 85ac460..dd280f2 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -637,10 +637,10 @@ namespace WebWindowComplex { // chiedo SVG //prevReq = (int)DataReq.ReqSvg; - if(prevReq != (int)DataReq.ReqSvg || !prevLiveData.JwdEqual(LiveData.CurrJwd)) + if (prevReq != (int)DataReq.ReqSvg || !prevLiveData.JwdEqual(LiveData.CurrJwd)) { - if(prevReq != (int)DataReq.ReqHwOpt) - await DoPreviewSvg(true); + if (prevReq != (int)DataReq.ReqHwOpt) + await DoPreviewSvg(true); else if (LiveData.DictOptionsXml.Count > 0) await DoPreviewSvg(true); } @@ -671,7 +671,7 @@ namespace WebWindowComplex { for (int i = 0; i < 2; i++) m_CurrWindow.AreaList.First().DimensionList[i].dDimension = m_PreviousWindow.AreaList.First().DimensionList[i].dDimension; - if(m_CurrWindow.AreaList.First().Shape == Shapes.TRIANGLE) + if (m_CurrWindow.AreaList.First().Shape == Shapes.TRIANGLE) { for (int i = 0; i < 2; i++) m_CurrWindow.AreaList.First().JointList[i].SetSelJointType(m_PreviousWindow.AreaList.First().JointList[i].SelJointType); @@ -708,11 +708,12 @@ namespace WebWindowComplex sashFromGroupId.SashShape = item.Value; sashFromGroupId.UpdateShape(item.Value); } - if(prevReq == (int)DataReq.ReqShape){ - if(reqHwOpt > 0) + if (prevReq == (int)DataReq.ReqShape) + { + if (reqHwOpt > 0) { List reqList = SashList.Select(x => x.GroupId).ToList(); - _=DoReqOptHardware(reqList); + _ = DoReqOptHardware(reqList); } } } @@ -894,10 +895,16 @@ namespace WebWindowComplex { listErrPre.Add("ColorMaterial", "Missing ColorMaterial List!"); } - if (ListPayload.Profile == null || ListPayload.Profile.Count == 0) + if (ListPayload.ProfileList == null || ListPayload.ProfileList.Count == 0) { listErrPre.Add("Profile", "Missing Profile List!"); } +#if false + if (ListPayload.Profile == null || ListPayload.Profile.Count == 0) + { + listErrPre.Add("Profile", "Missing Profile List!"); + } +#endif } /// @@ -923,10 +930,16 @@ namespace WebWindowComplex { listWarnings.Add("Material", $"Missing Material: {m_CurrWindow.sMaterial}"); } - if (!ListPayload.Profile.Contains(m_CurrWindow.sProfilePath)) + if (ListPayload.ProfileList == null || !ListPayload.ProfileList.Any(x => x.ProfileName.Contains(m_CurrWindow.sProfilePath))) { listWarnings.Add("Profile", $"Missing Profile: {m_CurrWindow.sProfilePath}"); } +#if false + if (!ListPayload.Profile.Contains(m_CurrWindow.sProfilePath)) + { + listWarnings.Add("Profile", $"Missing Profile: {m_CurrWindow.sProfilePath}"); + } +#endif } } } @@ -1019,7 +1032,7 @@ namespace WebWindowComplex } private Area SearchArea(Area currentArea, int idSearch, Area itemSearch) - { + { if (currentArea.GroupId == idSearch && currentArea.AreaType.Equals(itemSearch.AreaType)) { return currentArea; @@ -1044,7 +1057,7 @@ namespace WebWindowComplex string Color = args.Color; string Glass = args.Glass; string Material = args.Material; - string Profile = args.Profile; + string Profile = args.Profile; if (m_CurrWindow != null) { if (!string.IsNullOrEmpty(Color)) @@ -1053,7 +1066,7 @@ namespace WebWindowComplex m_CurrWindow.sGlass = Glass; else if (!string.IsNullOrEmpty(Material)) m_CurrWindow.sMaterial = Material; - else if(!string.IsNullOrEmpty(Profile)) + else if (!string.IsNullOrEmpty(Profile)) m_CurrWindow.sProfilePath = Profile; _ = DoPreviewSvg(); } @@ -1152,8 +1165,8 @@ namespace WebWindowComplex var currRec = m_CurrWindow.AreaList.FirstOrDefault(x => x.GroupId == newFrame.GroupId); // lo aggiorno currRec = newFrame; - if(forceSvgNoHw) - await DoPreviewSvg(true,true); + if (forceSvgNoHw) + await DoPreviewSvg(true, true); else await DoPreviewSvg(); } @@ -1203,10 +1216,10 @@ namespace WebWindowComplex //reqHwOpt++; //if(prevReq == (int)DataReq.ReqShape) //{ - // richiesta calcolo opzioni hardware per la singola sash group - List reqList = SashList.Select(x => x.GroupId).ToList(); - // chiamo con gruppo della nuova sash - await DoReqOptHardware(reqList); + // richiesta calcolo opzioni hardware per la singola sash group + List reqList = SashList.Select(x => x.GroupId).ToList(); + // chiamo con gruppo della nuova sash + await DoReqOptHardware(reqList); //} } } @@ -1305,7 +1318,7 @@ namespace WebWindowComplex if (newSash != null && item != null) { item = newSash; - if(!noSvg) + if (!noSvg) await DoPreviewSvg(); } } diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index d624666..154f116 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.8.1.2214 + 2.8.1.2216 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -55,6 +55,12 @@ + + + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index b75e24e..d1a5226 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.8.1.2214 + 2.8.1.2216 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -83,6 +83,12 @@ + + + + + +