+
+
+
+
User
diff --git a/Lux.UI/Components/Compo/Common/CmpHeader.razor.cs b/Lux.UI/Components/Compo/Common/CmpHeader.razor.cs
index 4d48e791..8c616051 100644
--- a/Lux.UI/Components/Compo/Common/CmpHeader.razor.cs
+++ b/Lux.UI/Components/Compo/Common/CmpHeader.razor.cs
@@ -5,11 +5,44 @@ namespace Lux.UI.Components.Compo.Common
[Parameter]
public string CurrLang { get; set; } = null!;
-
-
[Parameter]
public EventCallback
EC_LangSelected { get; set; }
+ [Parameter]
+ public string TitlePage { get; set; } = null!;
+
+
+ private string title
+ {
+ get
+ {
+ string currentPageName = TitlePage switch
+ {
+ "Home" => @Traduci("navMan_home"),
+ "" => @Traduci("navMan_home"),
+ "Items" => @Traduci("navMan_artAcquisto"),
+ "SellItems" => @Traduci("navMan_artVendita"),
+ "Resources" => @Traduci("navMan_risorse"),
+ "JobRoute" => @Traduci("navMan_cicli"),
+ "Customer" => @Traduci("navMan_clienti"),
+ "Dealer" => @Traduci("navMan_venditori"),
+ "Template" => @Traduci("navMan_cataloghi"),
+ "Offers" => @Traduci("navMan_offerte"),
+ "Orders" => @Traduci("navMan_ordini"),
+ "BuyOrder" => @Traduci("navMan_ordiniFornitore"),
+ "WorkLoadBalance" => @Traduci("navMan_caricoMacchine"),
+ "ProdPlanner" => @Traduci("navMan_pianificazione"),
+ "GenList" => @Traduci("navMan_anagrafiche"),
+ "ConfList" => @Traduci("navMan_config01"),
+ "ConfListNew" => @Traduci("navMan_config02"),
+ "stats" => @Traduci("navMan_stats"),
+ "OffStats" => @Traduci("navMan_offerStats"),
+ _ => "Pagina non definita"
+ };
+ return currentPageName;
+ }
+ }
+
private Task SaveLang()
{
return EC_LangSelected.InvokeAsync(CurrLang);
diff --git a/Lux.UI/Components/Layout/MainLayout.razor b/Lux.UI/Components/Layout/MainLayout.razor
index de94c35e..6f071190 100644
--- a/Lux.UI/Components/Layout/MainLayout.razor
+++ b/Lux.UI/Components/Layout/MainLayout.razor
@@ -3,12 +3,12 @@
-
+
-
+
diff --git a/Lux.UI/Components/Layout/MainLayout.razor.cs b/Lux.UI/Components/Layout/MainLayout.razor.cs
index 8f6d55cf..19d06361 100644
--- a/Lux.UI/Components/Layout/MainLayout.razor.cs
+++ b/Lux.UI/Components/Layout/MainLayout.razor.cs
@@ -16,6 +16,11 @@ namespace Lux.UI.Components.Layout
sideClass = navLarge ? "sidebar" : "sidebarSmall";
}
+ protected void TitlePage(string title)
+ {
+ titlePage = title;
+ }
+
#endregion Protected Methods
#region Private Fields
@@ -24,6 +29,8 @@ namespace Lux.UI.Components.Layout
private bool navLarge = true;
+ private string titlePage = "";
+
#endregion Private Fields
#region Private Methods
diff --git a/Lux.UI/Components/Layout/NavMenu.razor.cs b/Lux.UI/Components/Layout/NavMenu.razor.cs
index a9930188..da65f111 100644
--- a/Lux.UI/Components/Layout/NavMenu.razor.cs
+++ b/Lux.UI/Components/Layout/NavMenu.razor.cs
@@ -7,6 +7,9 @@ namespace Lux.UI.Components.Layout
[Parameter]
public EventCallback EC_compressUpdated { get; set; }
+ [Parameter]
+ public EventCallback EC_titleUpdated { get; set; }
+
#endregion Public Properties
#region Public Methods
@@ -38,6 +41,7 @@ namespace Lux.UI.Components.Layout
currentUrl = NavigationManager.ToBaseRelativePath(NavigationManager.Uri);
NavigationManager.LocationChanged += OnLocationChanged;
UpdateDict();
+ AggiornaNomePagina();
}
protected void ToggleCompress()
@@ -62,6 +66,8 @@ namespace Lux.UI.Components.Layout
private bool onlyIcon = false;
private Dictionary> PageDict = new Dictionary>();
+ private string currentPageName = string.Empty;
+
#endregion Private Fields
#region Private Properties
@@ -75,8 +81,17 @@ namespace Lux.UI.Components.Layout
private void OnLocationChanged(object? sender, LocationChangedEventArgs e)
{
currentUrl = NavigationManager.ToBaseRelativePath(e.Location);
+ AggiornaNomePagina();
StateHasChanged();
}
+ private Task AggiornaNomePagina()
+ {
+ // Estrae solo il percorso (es. "Home", "Template") senza query/hash
+ var path = NavigationManager.ToBaseRelativePath(NavigationManager.Uri);
+ currentPageName = path.Split('?')[0].Split('#')[0].TrimStart('/');
+
+ return EC_titleUpdated.InvokeAsync(currentPageName);
+ }
///
/// Aggiornamento dizionari per pagine raggruppate in sottomenu
diff --git a/Lux.UI/Components/Pages/OffStats.razor b/Lux.UI/Components/Pages/OffStats.razor
index 8e391921..81ccc5a9 100644
--- a/Lux.UI/Components/Pages/OffStats.razor
+++ b/Lux.UI/Components/Pages/OffStats.razor
@@ -1,6 +1,39 @@
@page "/OffStats"
-