diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index aa0becf3..4c50e9ce 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2605.1809 + 1.1.2605.1909 diff --git a/Lux.UI/Components/Layout/GroupElem.razor b/Lux.UI/Components/Layout/GroupElem.razor new file mode 100644 index 00000000..77beda3f --- /dev/null +++ b/Lux.UI/Components/Layout/GroupElem.razor @@ -0,0 +1,30 @@ + + + + + + + @if (ShowText) + { + @NameList.FirstOrDefault() + } + + + +@if (isMenuOpen) +{ + foreach(var elem in subElement) + { + + + @elem + + + } + @* + + @GetElementName(2) + + *@ +} + diff --git a/Lux.UI/Components/Layout/GroupElem.razor.cs b/Lux.UI/Components/Layout/GroupElem.razor.cs new file mode 100644 index 00000000..59161f82 --- /dev/null +++ b/Lux.UI/Components/Layout/GroupElem.razor.cs @@ -0,0 +1,58 @@ + +using Microsoft.EntityFrameworkCore.Migrations.Operations; + +namespace Lux.UI.Components.Layout +{ + public partial class GroupElem + { + [Parameter] + public List NameList { get; set; } = new List(); + + [Parameter] + public List PageList { get; set; } = new List(); + + [Parameter] + public List IconList { get; set; } = new List(); + + [Parameter] + public bool ShowText { get; set; } = true; + + protected string hideText { get => ShowText ? "" : "invisible"; } + protected string subArtCss { get => ShowText ? "ps-5 pe-3" : "ps-5 pe-2"; } + + private bool isMenuOpen = false; + + public List subElement { get; set; } = new List(); + public List subIcon { get; set; } = new List(); + + private void Toggle() + { + isMenuOpen = !isMenuOpen; + UpdateData(); + } + + private void UpdateData() + { + subElement = new List(); + subIcon = new List(); + for(int i = 1; i - - - - - - @if (showText) - { - Articoli - } - - - - @if (isArticoliOpen) - { - - - Buy - - - - - Sell - - - } - - - - - - @if (showText) - { - Ciclo Prod - } - - - - @if (isCicloProdOpen) - { - - - Risorse - - - - - Cicli - - - } - @* - - Risorse - - - - - Cicli - - *@ - - - - - - @if (showText) - { - Contatti - } - - - - @if (isContattiOpen) - { - - - Clienti - - - - - Fornitori - - - } - @* - - Customer - - *@ - @* - - Dealer - - *@ + + + Cataloghi diff --git a/Lux.UI/Components/Layout/NavMenu.razor.cs b/Lux.UI/Components/Layout/NavMenu.razor.cs index 97e8e465..5f610cb6 100644 --- a/Lux.UI/Components/Layout/NavMenu.razor.cs +++ b/Lux.UI/Components/Layout/NavMenu.razor.cs @@ -38,6 +38,7 @@ namespace Lux.UI.Components.Layout { currentUrl = NavigationManager.ToBaseRelativePath(NavigationManager.Uri); NavigationManager.LocationChanged += OnLocationChanged; + UpdateDict(); } protected void ToggleCompress() @@ -55,12 +56,13 @@ namespace Lux.UI.Components.Layout #region Private Fields private bool collapseNavMenu = true; - private bool isArticoliOpen = false; - private bool isCicloProdOpen = false; - private bool isContattiOpen = false; private string? currentUrl; private bool onlyIcon = false; + private Dictionary> NameDict = new Dictionary>(); + private Dictionary> IconDict = new Dictionary>(); + private Dictionary> PageDict = new Dictionary>(); + #endregion Private Fields #region Private Properties @@ -76,17 +78,26 @@ namespace Lux.UI.Components.Layout currentUrl = NavigationManager.ToBaseRelativePath(e.Location); StateHasChanged(); } - private void ToggleArticoli() + + /// + /// Aggiornamento dizionari per pagine raggruppate in sottomenu + /// + private void UpdateDict() { - isArticoliOpen = !isArticoliOpen; - } - private void ToggleCicloProd() - { - isCicloProdOpen = !isCicloProdOpen; - } - private void ToggleContatti() - { - isContattiOpen = !isContattiOpen; + // Inserimento nomi segnaposto nav-item + NameDict.Add("Articoli", new List() { "Articoli", "Buy", "Sell" }); + NameDict.Add("Ciclo prod", new List() { "Ciclo prod", "Risorse", "Cicli" }); + NameDict.Add("Contatti", new List() { "Contatti", "Clienti", "Fornitori" }); + + // Inserimento icone + IconDict.Add("Articoli", new List() { "fa-book-open", "fa-book", "fa-book-bookmark" }); + IconDict.Add("Ciclo prod", new List() { "fa-industry", "fa-location-dot", "fa-route" }); + IconDict.Add("Contatti", new List() { "fa-address-book", "fa-users", "fa-stamp" }); + + // Inserimento reindirizzamento elementi sotto menu + PageDict.Add("Articoli", new List() { "Items", "SellItems" }); + PageDict.Add("Ciclo prod", new List() { "Resources", "JobRoute" }); + PageDict.Add("Contatti", new List() { "Customer", "Dealer" }); } #endregion Private Methods diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 1430117b..78c84a56 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 1.1.2605.1809 + 1.1.2605.1909 diff --git a/Lux.UI/compilerconfig.json b/Lux.UI/compilerconfig.json index 063ee29f..2d12f6ca 100644 --- a/Lux.UI/compilerconfig.json +++ b/Lux.UI/compilerconfig.json @@ -18,5 +18,9 @@ { "outputFile": "wwwroot/css/textures.css", "inputFile": "wwwroot/css/textures.less" + }, + { + "outputFile": "Components/Layout/Item.razor.css", + "inputFile": "Components/Layout/Item.razor.less" } ] \ No newline at end of file diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 65fb6988..19ed2f4e 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES - Versione: 1.1.2605.1809 + Versione: 1.1.2605.1909 Note di rilascio: diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 2a9a1b91..18bcb624 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2605.1809 +1.1.2605.1909 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index de7e4ffd..aa7e5602 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2605.1809 + 1.1.2605.1909 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false