diff --git a/Test.UI/Components/Layout/NavMenu.razor b/Test.UI/Components/Layout/NavMenu.razor index fbd3f65..66c5425 100644 --- a/Test.UI/Components/Layout/NavMenu.razor +++ b/Test.UI/Components/Layout/NavMenu.razor @@ -29,16 +29,16 @@ } + @* *@ - diff --git a/Test.UI/Components/Pages/BaseEdit.razor b/Test.UI/Components/Pages/BaseEdit.razor new file mode 100644 index 0000000..ab48ae9 --- /dev/null +++ b/Test.UI/Components/Pages/BaseEdit.razor @@ -0,0 +1,32 @@ +@page "/BaseEdit" +@rendermode InteractiveServer + +BaseEdit + + + + + +@if (!string.IsNullOrEmpty(outClose)) +{ +
+ @outClose +
+} +else if (!string.IsNullOrEmpty(outSave)) +{ +
+ @outSave +
+} + +
+
+ @JsonSer +
+
diff --git a/Test.UI/Components/Pages/BaseEdit.razor.cs b/Test.UI/Components/Pages/BaseEdit.razor.cs new file mode 100644 index 0000000..88ffbd4 --- /dev/null +++ b/Test.UI/Components/Pages/BaseEdit.razor.cs @@ -0,0 +1,372 @@ +using Egw.Window.Data; +using EgwCoreLib.Lux.Core; +using EgwCoreLib.Lux.Core.RestPayload; +using EgwCoreLib.Lux.Data.Services; +using Microsoft.AspNetCore.Components; +using Newtonsoft.Json; +using WebWindowComplex; +using WebWindowComplex.DTO; +using static WebWindowComplex.LayoutConst; + +namespace Test.UI.Components.Pages +{ + public partial class BaseEdit + { + #region Public Fields + + public string InitialJwd = ""; + + #endregion Public Fields + + #region Public Methods + + public void Dispose() + { + DLService.PipeSvg.EA_NewMessage -= PipeSvg_EA_NewMessage; + DLService.PipeShape.EA_NewMessage -= PipeShape_EA_NewMessage; + DLService.PipeHwOpt.EA_NewMessage -= PipeHwOption_EA_NewMessage; + } + + #endregion Public Methods + + #region Protected Fields + + /// + /// Predisposizione valori live SVG/JWD + /// + protected LivePayload CurrData = new LivePayload(); + + /// + /// Livello di accesso + /// -- true: utente base (versione semplificata) + /// -- false: utente avanzato (versione completa) + /// + protected bool User = false; + + protected Dictionary currGroupShape = new Dictionary(); + protected Dictionary currHwOption = new Dictionary(); + protected string currJwd = "..."; + protected Dictionary m_CurrArgs = new Dictionary(); + protected string prevJwd = ""; + + /// + /// Configurazione elenchi anagrafiche + /// + protected BaseListPayload SetupList = new BaseListPayload(); + + #endregion Protected Fields + + #region Protected Properties + + protected List AvailColorMaterialList { get; set; } = new List() + { + new string("White"), + new string("Black"), + new string("Blu") + }; + + protected List AvailFamilyHardwareList { get; set; } = new List() + { + new string("ArTech"), + new string("ArTechPlana") + }; + + protected List AvailGlassList { get; set; } = new List() + { + new string("Vetro BE 2S 4/12/4"), + new string("Vetro BE 2S 4/16/4"), + new string("Vetro BE 3S 4/12/4/12/4"), + new string("Vetro BE 3S 4/16/4/16/4"), + new string("Vetro BE 2S 4T/12/4T"), + new string("Vetro BE 2S 4T/16/4T") + }; + + protected List AvailHardwareList { get; set; } = new List(); + + protected List AvailMaterialList { get; set; } = new List() + { + new string("Pino"), + new string("Abete") + }; + + protected List AvailProfileList { get; set; } = new List() + { + new string("Profilo78"), + new string("ProfiloSaomad") + }; + + protected Dictionary> AvailThreshold { get; set; } = new Dictionary>() + { + {"Profilo78", new List() { new Threshold(3, "Bottom"), new Threshold(1, "Threshold")}}, + {"ProfiloSaomad", new List(){ new Threshold(3, "Bottom"), new Threshold(2, "BottomWaterdrip"), new Threshold(1, "Threshold")}} + }; + + [Inject] + protected IConfiguration Config { get; set; } = null!; + + [Inject] + protected DataLayerServices DLService { get; set; } = null!; + + [Inject] + protected ImageCacheService ICService { get; set; } = null!; + + protected MarkupString JsonSer + { + get => (MarkupString)currJwd.Replace(Environment.NewLine, "
").Replace(" ", " "); + } + + protected string SelColorMaterial { get; set; } = ""; + protected string SelFamilyHardware { get; set; } = ""; + protected string SelGlass { get; set; } = ""; + protected string SelMaterial { get; set; } = ""; + + #endregion Protected Properties + + #region Protected Methods + + protected override void OnAfterRender(bool firstRender) + { + if (firstRender) + { + // JS interop or data fetches go here + isInteractive = true; + } + } + + protected override async Task OnInitializedAsync() + { + ConfInit(); + User = true; + Random random = new Random(); + CalcUid = Convert.ToString(random.Next(1000, 10000)); + windowUid = CalcUid; + //InitialJwd = File.ReadAllText("Data\\FinestraSplitGrid.jwd"); + InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd"); + //InitialJwd = File.ReadAllText("Data\\ArcoAntaDoppia.jwd"); + currJwd = InitialJwd; + // rileggo altri dati + await ReloadData(); + // preparo conf oggetti x controllo + SetupList = new BaseListPayload() + { + ColorMaterial = AvailColorMaterialList, + FamilyHardware = AvailFamilyHardwareList, + Glass = AvailGlassList, + Hardware = AvailHardwareList, + Material = AvailMaterialList, + Profile = AvailProfileList, + Threshold = AvailThreshold + }; + CurrData = new LivePayload() + { + CurrJwd = InitialJwd, + SvgPreview = currSvg, + DictShape = currGroupShape, + DictOptionsXml = currHwOption + }; + DLService.PipeSvg.EA_NewMessage += PipeSvg_EA_NewMessage; + DLService.PipeShape.EA_NewMessage += PipeShape_EA_NewMessage; + DLService.PipeHwOpt.EA_NewMessage += PipeHwOption_EA_NewMessage; + } + + #endregion Protected Methods + + #region Private Fields + + private string apiUrl = ""; + private string calcTag = ""; + private string CalcUid = "CurrWindow"; + private string windowUid = "CurrWindow"; + private string cFileHardware = "Hardware/Setup.json"; + private string currSvg = ""; + private string GenericBasePath = ""; + + private string colorMassUpdate; + private string familyHWMassUpdate; + private string glassMassUpdate; + private Hardware hardwareMassUpdate; + private string materialMassUpdate; + private string profileMassUpdate; + + /// + /// Semaforo x definire se sia già in modalità ionterattiva o di prerendering + /// + private bool isInteractive = false; + + private string outClose = ""; + private string outSave = ""; + + private string imgBasePath = ""; + + private string channelHwOpt = ""; + private string channelShape = ""; + private string channelSvg = ""; + + #endregion Private Fields + + #region Private Methods + + /// + /// Effettua chiusura oggetto con eventuale save + /// + /// + private void CloseObj(bool reqSave) + { + outClose = !reqSave ? "Richiesto chiusura!" : ""; + outSave = reqSave ? "Richiesto salvataggio!" : ""; + } + + private void ConfInit() + { + apiUrl = Config.GetValue("ServerConf:Prog.ApiUrl") ?? ""; + imgBasePath = Config.GetValue("ServerConf:ImageBaseUrl") ?? ""; + GenericBasePath = Config.GetValue("ServerConf:GenericBaseUrl") ?? ""; + calcTag = Config.GetValue("ServerConf:CalcTag") ?? ""; + channelSvg = Config.GetValue("ServerConf:ChannelSvg") ?? ""; + channelShape = Config.GetValue("ServerConf:ChannelShape") ?? ""; + channelHwOpt = Config.GetValue("ServerConf:ChannelHwOpt") ?? ""; + } + + /// + /// Esecuzione azione richiesta + /// + /// Azione richiesta + private void DoAction(DataAction actReq) + { + switch (actReq) + { + case DataAction.None: + break; + + case DataAction.ResetDictShape: + CurrData.DictShape = new Dictionary(); + break; + + case DataAction.ResetHwOpt: + CurrData.DictOptionsXml = new Dictionary(); + break; + + default: + break; + } + } + + /// + /// Esecuzione richiesta + /// + /// + /// + private async Task ExecRequest(Dictionary CurrArgs) + { + // Proseguo solo se sono in interattivo (NO prerender pagina) + if (isInteractive) + { + outClose = ""; + outSave = ""; + // verifico se contiene JWD, lo aggiorno + if (CurrArgs.ContainsKey("SerializedData")) + { + currJwd = CurrArgs["SerializedData"]; + CurrData.CurrJwd = currJwd; + } + // se il SSE variato --> invio + if (!currJwd.Equals(prevJwd) || !EgwCoreLib.Utils.DictUtils.DictAreEqual(m_CurrArgs, CurrArgs)) + { + m_CurrArgs = CurrArgs; + prevJwd = currJwd; + CalcRequestDTO calcRequestDTO = new CalcRequestDTO(); + calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; + calcRequestDTO.DictExec = m_CurrArgs; + // chiamo la chiamata POST alla API, che manda la richiesta via REDIS + await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{CalcUid}", calcRequestDTO); + } + } + } + + private async void PipeHwOption_EA_NewMessage(object? sender, EventArgs e) + { + // aggiorno visualizzazione + PubSubEventArgs currArgs = (PubSubEventArgs)e; + // conversione on-the-fly SVG da mostrare + if (!string.IsNullOrEmpty(currArgs.newMessage)) + { + if (currArgs.msgUid.StartsWith($"{channelHwOpt}:{windowUid}") && currArgs.newMessage.Length > 2) + { + // deserializzo il dizionario delle risposte... + Dictionary rawDict = JsonConvert.DeserializeObject>(currArgs.newMessage) ?? new Dictionary(); + if (rawDict.Count > 0) + { + currHwOption = rawDict; + CurrData.DictOptionsXml = currHwOption; + } + } + await InvokeAsync(StateHasChanged); + } + await Task.Delay(1); + } + + private async void PipeShape_EA_NewMessage(object? sender, EventArgs e) + { + // aggiorno visualizzazione + PubSubEventArgs currArgs = (PubSubEventArgs)e; + // conversione on-the-fly SVG da mostrare + if (!string.IsNullOrEmpty(currArgs.newMessage) && currArgs.newMessage.Length > 2) + { + if (currArgs.msgUid.StartsWith($"{channelShape}:{windowUid}")) + { + // deserializzo il dizionario delle risposte... + var rawDict = JsonConvert.DeserializeObject>(currArgs.newMessage); + currGroupShape = rawDict ?? new Dictionary(); + CurrData.DictShape = currGroupShape; + } + await InvokeAsync(StateHasChanged); + } + await Task.Delay(1); + } + + private async void PipeSvg_EA_NewMessage(object? sender, EventArgs e) + { + // aggiorno visualizzazione + PubSubEventArgs currArgs = (PubSubEventArgs)e; + // conversione on-the-fly SVG da mostrare + if (!string.IsNullOrEmpty(currArgs.newMessage)) + { + if (currArgs.msgUid.Equals($"{channelSvg}:{windowUid}")) + { + currSvg = currArgs.newMessage; + CurrData.SvgPreview = currArgs.newMessage; + } + await InvokeAsync(StateHasChanged); + } + await Task.Delay(1); + } + + /// + /// Rilettura dati + /// + /// + private async Task ReloadData() + { + //return base.OnInitializedAsync(); + AvailHardwareList = new List(); + if (File.Exists(cFileHardware)) + { + string rawValHW = File.ReadAllText(cFileHardware); + var rawListHW = JsonConvert.DeserializeObject>(rawValHW) ?? new List(); + foreach (var item in rawListHW) + { + AvailHardwareList.Add(item); + } + } + await Task.Delay(100); + } + + private void updateInfoJwd(string currSer, string? newFamilyHardware, Hardware? newHardware, string? newColorMaterial, string? newMaterial, string? newGlass, string? newProfile) + { + var newJwd = SerialMan.MassUpdate(currSer, newFamilyHardware, newHardware, newColorMaterial, newMaterial, newGlass, newProfile); + CurrData.CurrJwd = newJwd; + } + + #endregion Private Methods + } +} \ No newline at end of file diff --git a/Test.UI/Components/Pages/EditJWD.razor b/Test.UI/Components/Pages/EditJWD.razor index 86eadf7..73d836c 100644 --- a/Test.UI/Components/Pages/EditJWD.razor +++ b/Test.UI/Components/Pages/EditJWD.razor @@ -69,6 +69,7 @@ diff --git a/Test.UI/Components/Pages/EditJWD.razor.cs b/Test.UI/Components/Pages/EditJWD.razor.cs index 3119572..cef0f6e 100644 --- a/Test.UI/Components/Pages/EditJWD.razor.cs +++ b/Test.UI/Components/Pages/EditJWD.razor.cs @@ -39,6 +39,13 @@ namespace Test.UI.Components.Pages /// protected LivePayload CurrData = new LivePayload(); + /// + /// Livello di accesso + /// -- true: utente base (versione semplificata) + /// -- false: utente avanzato (versione completa) + /// + protected bool User = false; + protected Dictionary currGroupShape = new Dictionary(); protected Dictionary currHwOption = new Dictionary(); protected string currJwd = "..."; @@ -132,11 +139,12 @@ namespace Test.UI.Components.Pages protected override async Task OnInitializedAsync() { ConfInit(); + User = false; Random random = new Random(); CalcUid = Convert.ToString(random.Next(1000, 10000)); windowUid = CalcUid; - //InitialJwd = File.ReadAllText("Data\\FinestraSplitGrid.jwd"); - InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd"); + InitialJwd = File.ReadAllText("Data\\FinestraSplitGrid.jwd"); + //InitialJwd = File.ReadAllText("Data\\AntaDoppia.jwd"); //InitialJwd = File.ReadAllText("Data\\ArcoAntaDoppia.jwd"); currJwd = InitialJwd; // rileggo altri dati diff --git a/Test.UI/Components/Pages/SimpleEdit.razor b/Test.UI/Components/Pages/SimpleEditOld.razor similarity index 90% rename from Test.UI/Components/Pages/SimpleEdit.razor rename to Test.UI/Components/Pages/SimpleEditOld.razor index e13eb56..a7a1a96 100644 --- a/Test.UI/Components/Pages/SimpleEdit.razor +++ b/Test.UI/Components/Pages/SimpleEditOld.razor @@ -1,7 +1,7 @@ -@page "/SimpleEdit" +@page "/SimpleEditOld" @rendermode InteractiveServer -SimpleEdit +SimpleEditOld
Sash @(CurrSashGroup.SashList.Count == 1 ? "" : (IndexSash + 1))
- @if(CurrSashGroup.SashList.Count > 1) + @if(!User && CurrSashGroup.SashList.Count > 1) {
- - + @if(User) + { + Tipology + + } + else + { + + + }
Dimension @@ -82,7 +90,7 @@ else {
Sash @(CurrSashGroup.SashList.Count == 1 ? "" : (IndexSash + 1))
- @if (!(CurrAnta.AreaList[0] is Split)) + @if (!User && !(CurrAnta.AreaList[0] is Split)) {
@@ -91,18 +99,26 @@ else
} - +
- - + @if(User) + { + Tipology + + } + else + { + + + }
Dimension @@ -148,21 +164,24 @@ else
Joints
-
-
- + @if(!User) + { +
+
+ +
-
-
-
- +
+
+ +
-
-
-
- +
+
+ +
-
+ }
@foreach (Joint joint in CurrSashDim.JointList) { diff --git a/WebWindowComplex/Compo/AreaSash.razor.cs b/WebWindowComplex/Compo/AreaSash.razor.cs index de761d2..c2e5ddb 100644 --- a/WebWindowComplex/Compo/AreaSash.razor.cs +++ b/WebWindowComplex/Compo/AreaSash.razor.cs @@ -27,6 +27,12 @@ namespace WebWindowComplex.Compo [CascadingParameter(Name = "SashList")] public List SashList { get; set; } = null!; + /// + /// Livello di accesso (utente base) + /// + [CascadingParameter(Name = "User")] + public bool User { get; set; } = false!; + /// /// Modalità di visualizzazione (view /edit) /// @@ -292,7 +298,7 @@ namespace WebWindowComplex.Compo /// /// /// - private string ButtonJointCss(WebWindowComplex.Json.WindowConst.Joints type) + private string ButtonJointCss(Json.WindowConst.Joints type) { foreach (var item in CurrSashDim.JointList) { diff --git a/WebWindowComplex/Compo/CardFill.razor b/WebWindowComplex/Compo/CardFill.razor index 8f357f6..787a198 100644 --- a/WebWindowComplex/Compo/CardFill.razor +++ b/WebWindowComplex/Compo/CardFill.razor @@ -17,39 +17,28 @@
- + @if (User) + { + + } + else + { + + }
- + @if (User) + { + + } + else + { + + }
- @*
-
-
Selected all fill
-
-
-
- -
-
-
-
- -
-
-
*@
-@* @foreach (var currSplitted in SplittedList) -{ - @if (currSplitted.AreaList.First().Equals(CurrFill)) - { - - - } -} *@ diff --git a/WebWindowComplex/Compo/CardFill.razor.cs b/WebWindowComplex/Compo/CardFill.razor.cs index 049f5b9..f1e1c36 100644 --- a/WebWindowComplex/Compo/CardFill.razor.cs +++ b/WebWindowComplex/Compo/CardFill.razor.cs @@ -20,6 +20,12 @@ namespace WebWindowComplex.Compo [Parameter] public Fill CurrFill { get; set; } = null!; + /// + /// Livello di accesso (utente base) + /// + [Parameter] + public bool User { get; set; } = false!; + /// /// Evento per cambiare tutti i fill /// diff --git a/WebWindowComplex/Compo/CardFrame.razor b/WebWindowComplex/Compo/CardFrame.razor index fa94103..dfc737d 100644 --- a/WebWindowComplex/Compo/CardFrame.razor +++ b/WebWindowComplex/Compo/CardFrame.razor @@ -15,13 +15,21 @@
- - + @if (User) + { + Shape + + } + else + { + + + }
@@ -41,17 +49,22 @@
Threshold
- - - @* *@ + @if (User) + { + Tipology + + + } + else + { + + + }
@@ -62,21 +75,24 @@
Joints
-
-
- + @if (!User) + { +
+
+ +
-
-
-
- +
+
+ +
-
-
-
- +
+
+ +
-
+ }
@foreach (Joint joint in CurrFrameWindow.JointList) @@ -94,7 +110,14 @@
Quantity - + @if (User) + { + + } + else + { + + }
} @@ -103,9 +126,12 @@
-@if (!(CurrFrameWindow.AreaList[0] is Split) || (SashList.Count == 0 && SplitList.Count == 0)) +@if (!User) { - - + @if (!(CurrFrameWindow.AreaList[0] is Split) || (SashList.Count == 0 && SplitList.Count == 0)) + { + + + } } diff --git a/WebWindowComplex/Compo/CardFrame.razor.cs b/WebWindowComplex/Compo/CardFrame.razor.cs index fa9656c..a11d31c 100644 --- a/WebWindowComplex/Compo/CardFrame.razor.cs +++ b/WebWindowComplex/Compo/CardFrame.razor.cs @@ -50,6 +50,12 @@ namespace WebWindowComplex.Compo [CascadingParameter(Name = "SplitList")] public List SplitList { get; set; } = null!; + /// + /// Livello di accesso (utente base) + /// + [CascadingParameter(Name = "User")] + public bool User { get; set; } = false!; + #endregion Public Properties #region Protected Properties diff --git a/WebWindowComplex/Compo/CardSashGroup.razor b/WebWindowComplex/Compo/CardSashGroup.razor index 66f411e..f1e33df 100644 --- a/WebWindowComplex/Compo/CardSashGroup.razor +++ b/WebWindowComplex/Compo/CardSashGroup.razor @@ -7,11 +7,14 @@
Sash group @(SashList.Count > 1 ? (SashList.IndexOf(CurrSashGroup) + 1) : "")
-
-
- + @if (!User) + { +
+
+ +
-
+ }
@@ -22,26 +25,48 @@
Qty sash - + @if (User) + { + + } + else + { + + }
- - + @if(User) + { + Tipology + + } + else + { + + + }
Qty bottom rail - + @if (User) + { + + } + else + { + + }
@@ -53,43 +78,58 @@
Hardware
-
- - -
- @if (string.IsNullOrEmpty(CurrSashGroup.SashShape)) + @if (User) {
- - + Family + +
+
+ Type +
} else {
- - + @if (Sash.s_FamilyHardwareList == null || Sash.s_FamilyHardwareList.Count == 0) { - + + } + else + { + @foreach (var familyHw in Sash.s_FamilyHardwareList) + { + + } }
+ @if (string.IsNullOrEmpty(CurrSashGroup.SashShape)) + { +
+ + +
+ } + else + { +
+ + +
+ } + }
diff --git a/WebWindowComplex/Compo/CardSashGroup.razor.cs b/WebWindowComplex/Compo/CardSashGroup.razor.cs index 4b0646a..c1bed29 100644 --- a/WebWindowComplex/Compo/CardSashGroup.razor.cs +++ b/WebWindowComplex/Compo/CardSashGroup.razor.cs @@ -15,6 +15,12 @@ namespace WebWindowComplex.Compo [CascadingParameter(Name = "CurrSashGroup")] public Sash CurrSashGroup { get; set; } = null!; + /// + /// Livello di accesso (utente base) + /// + [CascadingParameter(Name = "User")] + public bool User { get; set; } = false!; + /// /// Evento per cambiare tutti i fill /// diff --git a/WebWindowComplex/Compo/CardSplit.razor b/WebWindowComplex/Compo/CardSplit.razor index 35b83e7..6559247 100644 --- a/WebWindowComplex/Compo/CardSplit.razor +++ b/WebWindowComplex/Compo/CardSplit.razor @@ -14,15 +14,18 @@
Split
- @if ((CurrSplit.nSplitQtyVert == 1 && CurrSplit.nSplitQtyHoriz == 0) || (CurrSplit.nSplitQtyVert == 0 && CurrSplit.nSplitQtyHoriz == 1)) + @if (!User) { + @if ((CurrSplit.nSplitQtyVert == 1 && CurrSplit.nSplitQtyHoriz == 0) || (CurrSplit.nSplitQtyVert == 0 && CurrSplit.nSplitQtyHoriz == 1)) + { +
+ +
+ }
- +
} -
- -
@@ -129,35 +125,6 @@ Index="i" EC_Update="UpdateDimension"> - @*
- Height - - -
*@ }
} @@ -170,37 +137,6 @@ Index="i" EC_Update="UpdateDimension"> - @*
-
- Height - - -
-
*@ } } else if (CurrSplit.SplitVertList.Count > 0) @@ -212,37 +148,6 @@ Index="i" EC_Update="UpdateDimension"> - @*
-
- Width - - -
-
*@ } }
@@ -252,7 +157,14 @@
- + @if (User) + { + + } + else + { + + }
diff --git a/WebWindowComplex/Compo/CardSplit.razor.cs b/WebWindowComplex/Compo/CardSplit.razor.cs index 60d7ae2..513ed3b 100644 --- a/WebWindowComplex/Compo/CardSplit.razor.cs +++ b/WebWindowComplex/Compo/CardSplit.razor.cs @@ -33,6 +33,12 @@ namespace WebWindowComplex.Compo [Parameter] public Frame FrameWindow { get; set; } = null!; + /// + /// Livello di accesso (utente base) + /// + [CascadingParameter(Name = "User")] + public bool User { get; set; } = false!; + /// /// Evento per richiedere reset dizionario /// diff --git a/WebWindowComplex/Compo/EditJoint.razor b/WebWindowComplex/Compo/EditJoint.razor index 18b71de..eee5480 100644 --- a/WebWindowComplex/Compo/EditJoint.razor +++ b/WebWindowComplex/Compo/EditJoint.razor @@ -1,23 +1,31 @@ @using static WebWindowComplex.LayoutConst
- - @if (CurrRec.ParentArea is Frame && - (CurrRec.ParentArea.ParentWindow.AreaList.First().SelShapeIndex == (int)Json.WindowConst.Shapes.DOUBLEARC || - CurrRec.ParentArea.ParentWindow.AreaList.First().SelShapeIndex == (int)Json.WindowConst.Shapes.ARC_FULL || - CurrRec.ParentArea.ParentWindow.AreaList.First().SelShapeIndex == (int)Json.WindowConst.Shapes.THREECENTERARC) && - (CurrRec.nIndex == 3 || CurrRec.nIndex == 4)) + @if (User) { - + @((PositionJoints)(CurrRec.nIndex - 1)) + } else { - + + @if (CurrRec.ParentArea is Frame && + (CurrRec.ParentArea.ParentWindow.AreaList.First().SelShapeIndex == (int)Json.WindowConst.Shapes.DOUBLEARC || + CurrRec.ParentArea.ParentWindow.AreaList.First().SelShapeIndex == (int)Json.WindowConst.Shapes.ARC_FULL || + CurrRec.ParentArea.ParentWindow.AreaList.First().SelShapeIndex == (int)Json.WindowConst.Shapes.THREECENTERARC) && + (CurrRec.nIndex == 3 || CurrRec.nIndex == 4)) + { + + } + else + { + + } }
\ No newline at end of file diff --git a/WebWindowComplex/Compo/EditJoint.razor.cs b/WebWindowComplex/Compo/EditJoint.razor.cs index f3f02ba..9598932 100644 --- a/WebWindowComplex/Compo/EditJoint.razor.cs +++ b/WebWindowComplex/Compo/EditJoint.razor.cs @@ -17,6 +17,12 @@ namespace WebWindowComplex.Compo [Parameter] public EventCallback EC_Update { get; set; } + /// + /// Livello di accesso (utente base) + /// + [CascadingParameter(Name = "User")] + public bool User { get; set; } = false!; + #endregion Public Properties #region Private Properties diff --git a/WebWindowComplex/Compo/EditOptionCombo.razor b/WebWindowComplex/Compo/EditOptionCombo.razor index e02c3a3..3436936 100644 --- a/WebWindowComplex/Compo/EditOptionCombo.razor +++ b/WebWindowComplex/Compo/EditOptionCombo.razor @@ -1,9 +1,24 @@ 
- - } - + else + { + + } + } + else + { + + + }
\ No newline at end of file diff --git a/WebWindowComplex/Compo/EditOptionCombo.razor.cs b/WebWindowComplex/Compo/EditOptionCombo.razor.cs index 17e625e..5809b31 100644 --- a/WebWindowComplex/Compo/EditOptionCombo.razor.cs +++ b/WebWindowComplex/Compo/EditOptionCombo.razor.cs @@ -13,6 +13,12 @@ namespace WebWindowComplex.Compo [Parameter] public AGBOptionCombo CurrOpt { get; set; } = null!; + /// + /// Livello di accesso (utente base) + /// + [CascadingParameter(Name = "User")] + public bool User { get; set; } = false!; + [Parameter] public EventCallback EC_Update { get; set; } diff --git a/WebWindowComplex/Compo/EditOptionText.razor b/WebWindowComplex/Compo/EditOptionText.razor index a655b5f..3dbfb2e 100644 --- a/WebWindowComplex/Compo/EditOptionText.razor +++ b/WebWindowComplex/Compo/EditOptionText.razor @@ -1,22 +1,56 @@ 
- - @if (CurrOpt.sName.Equals("HMan")) + @if (User) { - - } - else if (CurrOpt.ValueList.Count > 0) - { - + } + else if (CurrOpt.ValueList.Count > 0) + { + if (CurrValue is String) { - + } - + else + { + + } + } + else + { + if (CurrValue is String) + { + + } + else + { + + } + } } else { - + + @if (CurrOpt.sName.Equals("HMan")) + { + + } + else if (CurrOpt.ValueList.Count > 0) + { + + } + else + { + + } + }
\ No newline at end of file diff --git a/WebWindowComplex/Compo/EditOptionText.razor.cs b/WebWindowComplex/Compo/EditOptionText.razor.cs index dd42442..52cfd38 100644 --- a/WebWindowComplex/Compo/EditOptionText.razor.cs +++ b/WebWindowComplex/Compo/EditOptionText.razor.cs @@ -13,6 +13,12 @@ namespace WebWindowComplex.Compo [Parameter] public AGBOptionText CurrOpt { get; set; } = null!; + /// + /// Livello di accesso (utente base) + /// + [CascadingParameter(Name = "User")] + public bool User { get; set; } = false!; + [Parameter] public EventCallback EC_Update { get; set; } diff --git a/WebWindowComplex/Compo/General.razor b/WebWindowComplex/Compo/General.razor index 77bcf26..7f9b856 100644 --- a/WebWindowComplex/Compo/General.razor +++ b/WebWindowComplex/Compo/General.razor @@ -14,22 +14,38 @@
- - + @if (User) + { + Material + + } + else + { + + + }
- - + @if (User) + { + Profile + + } + else + { + + + }
@@ -41,13 +57,21 @@
- - + @if (User) + { + Glass + + } + else + { + + + }
@@ -65,13 +89,21 @@
- - + @if (User) + { + Window + + } + else + { + + + }
diff --git a/WebWindowComplex/Compo/General.razor.cs b/WebWindowComplex/Compo/General.razor.cs index 24c8d51..32f7944 100644 --- a/WebWindowComplex/Compo/General.razor.cs +++ b/WebWindowComplex/Compo/General.razor.cs @@ -14,6 +14,9 @@ namespace WebWindowComplex.Compo [Parameter] public Window CurrWindow { get; set; } = null!; + [Parameter] + public bool User { get; set; } = false!; + [Parameter] public EventCallback EC_UpdateGeneral { get; set; } diff --git a/WebWindowComplex/TableComp.razor b/WebWindowComplex/TableComp.razor index 47fa8ae..dcd0cb3 100644 --- a/WebWindowComplex/TableComp.razor +++ b/WebWindowComplex/TableComp.razor @@ -77,8 +77,8 @@ @if (currStep == CompileStep.Tree) { + maxCol="m_maxCol" + EC_NextStep="NextStepArgs"> } else if (currStep == CompileStep.Frame) @@ -87,14 +87,16 @@ { m_PreviousWindow = m_CurrWindow; } - - - - - + + + + + + + @@ -107,15 +109,17 @@ } else { - - + + + + } } else if (currStep == CompileStep.Sash) @@ -126,17 +130,19 @@ } else { - - - - - + + + + + + + @@ -151,9 +157,10 @@ else { + CurrFill="FillList[currFillIndex]" + User="baseUser" + EC_UpdateFill="UpdatePreviewFill" + EC_ReqClose="ReturnTree">
@@ -162,15 +169,29 @@
All fill
- + @if (baseUser) + { + + } + else + { + + }
- + @if (baseUser) + { + + } + else + { + + }
- @if(SplittedList != null && SplittedList.Count > 0) + @if(!baseUser && SplittedList != null && SplittedList.Count > 0) { Splitted currSplitted = SplittedList.Where(x => x.AreaList.First().Equals(FillList[currFillIndex])).FirstOrDefault()?? new Splitted(null, null); @if (currSplitted.ParentArea != null && currSplitted.ParentWindow != null){ @@ -181,13 +202,6 @@ } } - @* @foreach (var currSplitted in m_SplittedList) - { - @if (currSplitted.AreaList.First().Equals(FillList[currFillIndex])) - { - - } - } *@ } } else if (currStep == CompileStep.General) @@ -195,6 +209,7 @@ diff --git a/WebWindowComplex/TableComp.razor.cs b/WebWindowComplex/TableComp.razor.cs index 2af4fe8..3122280 100644 --- a/WebWindowComplex/TableComp.razor.cs +++ b/WebWindowComplex/TableComp.razor.cs @@ -92,6 +92,12 @@ namespace WebWindowComplex [Parameter] public LivePayload LiveData { get; set; } = null!; + /// + /// Livello di accesso (utente base) + /// + [Parameter] + public bool baseUser { get; set; } = false!; + #endregion Public Properties #region Public Methods @@ -1294,6 +1300,20 @@ namespace WebWindowComplex } } + /// + /// Calcola bottone per tutti i Fill + /// + /// + private string buttonFillCss(FillTypes reqFillTypes) + { + foreach (var fill in FillList) + { + if (!fill.FillType.Equals(reqFillTypes)) + return "btn btn-outline-secondary btn-sm"; + } + return "btn btn-secondary btn-sm"; + } + #endregion Private Methods } } \ No newline at end of file diff --git a/WebWindowComplex/WebWindowComplex.csproj b/WebWindowComplex/WebWindowComplex.csproj index e20b419..8925ad2 100644 --- a/WebWindowComplex/WebWindowComplex.csproj +++ b/WebWindowComplex/WebWindowComplex.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.1.1615 + 2.7.1.1910 Annamaria Sassi Egalware Componente gestione Configurazioni avanzate Window per LUX @@ -30,441 +30,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WebWindowConfigurator/WebWindowConfigurator.csproj b/WebWindowConfigurator/WebWindowConfigurator.csproj index 3666e7e..07cb0e1 100644 --- a/WebWindowConfigurator/WebWindowConfigurator.csproj +++ b/WebWindowConfigurator/WebWindowConfigurator.csproj @@ -6,7 +6,7 @@ net8.0 enable enable - 2.7.1.1615 + 2.7.1.1910 Annamaria Sassi Egalware Componente gestione JWD per LUX @@ -37,630 +37,3 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -