diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs index ffa074f..497bdc1 100644 --- a/Test.UI/Components/Pages/EditJWD.razor.cs +++ b/Test.UI/Components/Pages/EditJWD.razor.cs @@ -1,15 +1,10 @@ using Egw.Window.Data; using EgwCoreLib.Lux.Core; using EgwCoreLib.Lux.Core.RestPayload; -using EgwCoreLib.Lux.Data.DbModel.Catalog; using EgwCoreLib.Lux.Data.DbModel.Config; -using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.DbModel.Utils; -using EgwCoreLib.Lux.Data.Domains; using EgwCoreLib.Lux.Data.Services; using EgwCoreLib.Lux.Data.Services.Config; -using EgwCoreLib.Lux.Data.Services.Items; -using EgwCoreLib.Lux.Data.Services.Sales; using EgwCoreLib.Lux.Data.Services.Utils; using Microsoft.AspNetCore.Components; using Newtonsoft.Json; @@ -116,7 +111,7 @@ namespace Test.UI.Components.Pages DictShape = currGroupShape, DictOptionsXml = currHwOption }; - DescriptionProfileList = profList.Select(x=>x.ProfileName).ToList(); + DescriptionProfileList = profList.Select(x => x.ProfileName).ToList(); DLService.PipeSvg.EA_NewMessage += PipeSvg_EA_NewMessage; DLService.PipeShape.EA_NewMessage += PipeShape_EA_NewMessage; DLService.PipeHwOpt.EA_NewMessage += PipeHwOption_EA_NewMessage; @@ -260,7 +255,9 @@ namespace Test.UI.Components.Pages } else { - return File.ReadAllText("Data\\AntaDoppia.jwd"); + string fullPath = Path.Combine("Data", "PortafineestraTreAnte.jwd"); + return File.ReadAllText(fullPath); + //return File.ReadAllText("Data\\AntaDoppia.jwd"); } } } @@ -278,7 +275,7 @@ namespace Test.UI.Components.Pages // lettura config setup varie da DB/Cache Redis AllConfGlass = await CGService.GetAllAsync(); AvailProfileList = await CPService.GetAllAsync(); - + // FixMe Todo: eliminare da REDIS e usare elenco DB solamente... var rawProfiles = CDService.ProfileList(cEnvir, "Default"); // se fosse vuoto chiamo update... @@ -501,7 +498,7 @@ namespace Test.UI.Components.Pages { Dictionary DictParam = new Dictionary(); if (!string.IsNullOrEmpty(newFamilyHardware)) - DictParam.Add( "FamilyHardware", newFamilyHardware! ); + DictParam.Add("FamilyHardware", newFamilyHardware!); if (!string.IsNullOrEmpty(newColorMaterial)) DictParam.Add("Color", newColorMaterial!); if (!string.IsNullOrEmpty(newWood)) diff --git a/Test.UI/Data/PortafineestraTreAnte.jwd b/Test.UI/Data/PortafineestraTreAnte.jwd new file mode 100644 index 0000000..7ac903b --- /dev/null +++ b/Test.UI/Data/PortafineestraTreAnte.jwd @@ -0,0 +1,368 @@ +{ + "ProfilePath": "Profilo78", + "Material": "Pino", + "ColorMaterial": "Wood", + "Glass": "Vetro BE 2S 4T/16/4T", + "AreaList": [ + { + "Shape": "THREECENTERARC", + "DimensionList": [ + { + "Index": 1, + "Name": "Width", + "Value": 2000.0 + }, + { + "Index": 2, + "Name": "Height", + "Value": 2080.0 + }, + { + "Index": 3, + "Name": "Full Height", + "Value": 2400.0 + }, + { + "Index": 4, + "Name": "Radius", + "Value": 200.0 + } + ], + "ElementDimensionList": [ + { + "Index": 1, + "Value": 0.0 + }, + { + "Index": 2, + "Value": 78.0 + }, + { + "Index": 3, + "Value": 78.0 + }, + { + "Index": 4, + "Value": 78.0 + }, + { + "Index": 5, + "Value": 78.0 + }, + { + "Index": 6, + "Value": 78.0 + } + ], + "JointList": [ + { + "Index": 1, + "JointType": "FULL_H" + }, + { + "Index": 2, + "JointType": "FULL_H" + }, + { + "Index": 3, + "JointType": "ANGLED" + }, + { + "Index": 4, + "JointType": "ANGLED" + } + ], + "Threshold": "Threshold", + "BottomRail": false, + "BottomRailQty": 0, + "BottomRailElemDimList": [], + "GroupId": 1, + "AreaList": [ + { + "IsSashVertical": true, + "IsDimensionLight": false, + "SashList": [ + { + "SashId": 1, + "OpeningType": "TURNONLY_LEFT", + "MeasureType": "PROPORTIONAL", + "Dimension": 1.0, + "HasHandle": false, + "ElementDimensionList": [ + { + "Index": 1, + "Value": 78.0 + }, + { + "Index": 2, + "Value": 78.0 + }, + { + "Index": 3, + "Value": 78.0 + }, + { + "Index": 4, + "Value": 78.0 + }, + { + "Index": 5, + "Value": 78.0 + } + ], + "JointList": [ + { + "Index": 1, + "JointType": "FULL_V" + }, + { + "Index": 2, + "JointType": "FULL_V" + }, + { + "Index": 3, + "JointType": "FULL_V" + }, + { + "Index": 4, + "JointType": "FULL_V" + } + ] + }, + { + "SashId": 2, + "OpeningType": "TURNONLY_RIGHT", + "MeasureType": "PROPORTIONAL", + "Dimension": 1.0, + "HasHandle": true, + "ElementDimensionList": [ + { + "Index": 1, + "Value": 78.0 + }, + { + "Index": 2, + "Value": 78.0 + }, + { + "Index": 3, + "Value": 78.0 + }, + { + "Index": 4, + "Value": 78.0 + } + ], + "JointList": [ + { + "Index": 1, + "JointType": "FULL_V" + }, + { + "Index": 2, + "JointType": "FULL_V" + }, + { + "Index": 3, + "JointType": "FULL_V" + }, + { + "Index": 4, + "JointType": "FULL_V" + } + ] + }, + { + "SashId": 3, + "OpeningType": "TURNONLY_RIGHT", + "MeasureType": "PROPORTIONAL", + "Dimension": 1.0, + "HasHandle": false, + "ElementDimensionList": [ + { + "Index": 1, + "Value": 78.0 + }, + { + "Index": 2, + "Value": 78.0 + }, + { + "Index": 3, + "Value": 78.0 + }, + { + "Index": 4, + "Value": 78.0 + }, + { + "Index": 5, + "Value": 78.0 + } + ], + "JointList": [ + { + "Index": 1, + "JointType": "FULL_V" + }, + { + "Index": 2, + "JointType": "FULL_V" + }, + { + "Index": 3, + "JointType": "FULL_V" + }, + { + "Index": 4, + "JointType": "FULL_V" + } + ] + } + ], + "SashType": "NULL", + "BottomRail": false, + "BottomRailQty": 0, + "BottomRailElemDimList": [], + "Hardware": "000000", + "HwOptionList": [], + "GroupId": 3, + "AreaList": [ + { + "GroupId": 9, + "AreaList": [ + { + "SplitShape": "HORIZONTAL", + "SplitStartVert": false, + "SplitVertList": [], + "SplitHorizList": [ + { + "IsRelative": true, + "Dimension": 30.0, + "MeasureType": "PERCENTAGE" + }, + { + "IsRelative": true, + "Dimension": 70.0, + "MeasureType": "PERCENTAGE" + } + ], + "ElementDimVertList": [], + "ElementDimHorizList": [ + { + "Index": 1, + "Value": 60.0, + "Area": 0 + } + ], + "GroupId": 13, + "AreaList": [ + { + "GroupId": 14, + "AreaList": [ + { + "FillType": "GLASS", + "GroupId": 2, + "AreaList": [], + "AreaType": "FILL" + } + ], + "AreaType": "SPLITTED" + }, + { + "GroupId": 15, + "AreaList": [ + { + "FillType": "GLASS", + "GroupId": 16, + "AreaList": [], + "AreaType": "FILL" + } + ], + "AreaType": "SPLITTED" + } + ], + "AreaType": "SPLIT" + } + ], + "AreaType": "SPLITTED" + }, + { + "GroupId": 10, + "AreaList": [ + { + "FillType": "GLASS", + "GroupId": 6, + "AreaList": [], + "AreaType": "FILL" + } + ], + "AreaType": "SPLITTED" + }, + { + "GroupId": 11, + "AreaList": [ + { + "SplitShape": "HORIZONTAL", + "SplitStartVert": false, + "SplitVertList": [], + "SplitHorizList": [ + { + "IsRelative": true, + "Dimension": 30.0, + "MeasureType": "PERCENTAGE" + }, + { + "IsRelative": true, + "Dimension": 70.0, + "MeasureType": "PERCENTAGE" + } + ], + "ElementDimVertList": [], + "ElementDimHorizList": [ + { + "Index": 1, + "Value": 60.0, + "Area": 0 + } + ], + "GroupId": 17, + "AreaList": [ + { + "GroupId": 18, + "AreaList": [ + { + "FillType": "GLASS", + "GroupId": 19, + "AreaList": [], + "AreaType": "FILL" + } + ], + "AreaType": "SPLITTED" + }, + { + "GroupId": 20, + "AreaList": [ + { + "FillType": "GLASS", + "GroupId": 21, + "AreaList": [], + "AreaType": "FILL" + } + ], + "AreaType": "SPLITTED" + } + ], + "AreaType": "SPLIT" + } + ], + "AreaType": "SPLITTED" + } + ], + "AreaType": "SASH" + } + ], + "AreaType": "FRAME" + } + ] +} \ No newline at end of file diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 7c64571..8287116 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -94,7 +94,7 @@ namespace WebWindowComplex /// Richiesta azione per le richieste pendenti /// [Parameter] - public EventCallback> EC_UpdateReqPend { get; set; } + public EventCallback> EC_UpdateReqPend { get; set; } /// /// Elenco anagrafiche di base @@ -118,7 +118,7 @@ namespace WebWindowComplex /// Preselezione valori /// [Parameter] - public Dictionary? PendReq { get; set; } = null; + public Dictionary? PendReq { get; set; } = null; #endregion Public Properties @@ -143,8 +143,8 @@ namespace WebWindowComplex firstDisplay = false; forceSvgUpdate = false; // preview SVG senza HW - if(prevReq != (int)DataReq.ReqSvgWithHw) - await DoPreviewSvg(true, true); + if (prevReq != (int)DataReq.ReqSvgWithHw) + await DoPreviewSvg(true, true); if (LiveData.ProfElementList.Count == 0) await UpdateElement(FrameWindow); } @@ -245,7 +245,7 @@ namespace WebWindowComplex if (LiveData.DictShape.Count == 0 && listErrLink.Count == 0 && !waitShape) { waitShape = true; - if (firstDisplay && isRendered && prevReq!=(int)DataReq.ReqSvgNoHw) + if (firstDisplay && isRendered && prevReq != (int)DataReq.ReqSvgNoHw) { firstDisplay = false; // preview SVG senza HW @@ -269,7 +269,7 @@ namespace WebWindowComplex } else { - if(prevReq != (int)DataReq.ReqSvgWithHw && SashGroupList.Count > 0) + if (prevReq != (int)DataReq.ReqSvgWithHw && SashGroupList.Count > 0) await DoPreviewSvg(); } } @@ -288,7 +288,7 @@ namespace WebWindowComplex } isLoading = false; // Controllo se ci sono domande pendenti - if(PendReq != null && PendReq.Count > 0) + if (PendReq != null && PendReq.Count > 0) { if (!string.IsNullOrEmpty(PendReq.GetValueOrDefault("Profile")) && m_CurrWindow != null) { @@ -650,33 +650,29 @@ namespace WebWindowComplex /// private void checkWarnings() { - // verifico 1:1 le liste e i valori siano coerenti... - //if (ListPayload.ColorMaterial != null && ListPayload.ColorMaterial.Count > 0) - //{ - if (m_CurrWindow != null) + if (m_CurrWindow != null) + { + if (ListPayload.ColorMaterial == null || !ListPayload.ColorMaterial.Contains(m_CurrWindow.sColorMaterial)) { - if (ListPayload.ColorMaterial == null || !ListPayload.ColorMaterial.Contains(m_CurrWindow.sColorMaterial)) - { - listWarnings.Add("ColorMaterial", $"Missing Color: {m_CurrWindow.sColorMaterial}"); - } - if (ListPayload.Glass == null || !ListPayload.Glass.Contains(m_CurrWindow.sGlass)) - { - listWarnings.Add("Glass", $"Missing Glass: {m_CurrWindow.sGlass}"); - } - if (ListPayload.Wood == null || !ListPayload.Wood.Contains(m_CurrWindow.sWood)) - { - listWarnings.Add("Wood", $"Missing Material: {m_CurrWindow.sWood}"); - } - if (ListPayload.ProfileList == null || !ListPayload.ProfileList.Any(x => x.ProfileName.Contains(m_CurrWindow.sProfilePath))) - { - listWarnings.Add("Profile", $"Missing Profile: {m_CurrWindow.sProfilePath}"); - } - if (!groupIdOK) - { - listWarnings.Add("GroupId", "JWD not correct!"); - } + listWarnings.TryAdd("ColorMaterial", $"Missing Color: {m_CurrWindow.sColorMaterial}"); } - //} + if (ListPayload.Glass == null || !ListPayload.Glass.Contains(m_CurrWindow.sGlass)) + { + listWarnings.TryAdd("Glass", $"Missing Glass: {m_CurrWindow.sGlass}"); + } + if (ListPayload.Wood == null || !ListPayload.Wood.Contains(m_CurrWindow.sWood)) + { + listWarnings.TryAdd("Wood", $"Missing Material: {m_CurrWindow.sWood}"); + } + if (ListPayload.ProfileList == null || !ListPayload.ProfileList.Any(x => x.ProfileName.Contains(m_CurrWindow.sProfilePath))) + { + listWarnings.TryAdd("Profile", $"Missing Profile: {m_CurrWindow.sProfilePath}"); + } + if (!groupIdOK) + { + listWarnings.TryAdd("GroupId", "JWD not correct!"); + } + } } /// diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index b047d89..f4e1d3c 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.3.3013 + 3.1.3.3015 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -106,6 +106,10 @@ + + + + diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index b6ffb52..65a92fe 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 3.1.3.3013 + 3.1.3.3015 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -143,6 +143,10 @@ + + + +