diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index f5c85546..9dcbe23c 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2606.0417 + 1.1.2606.0515 diff --git a/Lux.UI/Components/Compo/Common/CmpHeader.razor b/Lux.UI/Components/Compo/Common/CmpHeader.razor index 480a1d90..b9b73bdf 100644 --- a/Lux.UI/Components/Compo/Common/CmpHeader.razor +++ b/Lux.UI/Components/Compo/Common/CmpHeader.razor @@ -1,12 +1,16 @@ -
-
- About Egalware +@inherits BaseComp + +
+
+

+ @title +

-
-
-
+ +
+ + 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" -
+
+ + Offerte + +
+
+ Da: + + + A: + + + +
+
+
+
+ +
+ + +@*
@@ -38,85 +71,4 @@
-
- -@*
-
-
-
Offerte
-
-
-
- Da: - - - A: - - - -
-
-
-
-
-
-
-
-
- Stato offerte -
-
-
- -
-
-
-
-
- Venditori -
-
-
- -
-
-
-
-
-
-
- - Margine medio: - @MargineMedio() % -
-
-
-
-
-
-
-
-
-
- - Finestre per offerta: - @NumFinestreMedio() -
-
-
-
-
-
-
-
-
*@ +
*@ \ No newline at end of file diff --git a/Lux.UI/Components/Pages/OffStats.razor.cs b/Lux.UI/Components/Pages/OffStats.razor.cs index 9cda12c5..b5ea7cc3 100644 --- a/Lux.UI/Components/Pages/OffStats.razor.cs +++ b/Lux.UI/Components/Pages/OffStats.razor.cs @@ -22,12 +22,6 @@ namespace Lux.UI.Components.Pages private List AllOfferRecords { get; set; } = new(); private bool isLoading = false; - //private Dictionary FillColors = new(); - //private Dictionary BorderColors = new(); - //private Dictionary DatasetCount = new(); - //private Dictionary FillDealerColors = new(); - //private Dictionary BorderDealerColors = new(); - //private Dictionary DatasetDealerCount = new(); private bool needReload = false; private EgwCoreLib.Utils.DtUtils.Periodo periodoLimit = new EgwCoreLib.Utils.DtUtils.Periodo(EgwCoreLib.Utils.DtUtils.PeriodSet.LastYear); ////private EgwCoreLib.Utils.DtUtils.Periodo periodoSel = new EgwCoreLib.Utils.DtUtils.Periodo(DateTime.Today.AddHours(DateTime.Now.Hour - 24 * 7), DateTime.Today.AddHours(DateTime.Now.Hour + 1)); @@ -75,88 +69,5 @@ namespace Lux.UI.Components.Pages } } } - - //private double MargineMedio() - //{ - // var filtRecord = AllRecords.Where(x => x.OffertState.Equals(OfferStates.Confirmed)); - // return Math.Round((filtRecord.Sum(x=>x.TotalPrice) - filtRecord.Sum(x => x.TotalCost)) / filtRecord.Sum(x => x.TotalPrice) * 100, 2); - //} - - //private double NumFinestreMedio() - //{ - // var filtRecord = AllRecords.Where(x => x.OffertState.Equals(OfferStates.Confirmed)); - // return Math.Ceiling(filtRecord.Sum(x => x.NumItems) / filtRecord.Count()); - //} - - ///// - ///// Caricamento dati - ///// - ///// - //private async Task DoReloadAsync() - //{ - // await ReloadDataAsync(); - // ReloadStats(); - // ReloadDealerStats(); - // needReload = false; - //} - //private void ReloadStats() - //{ - // var allStates = Enum.GetNames(typeof(Enums.OfferStates)).ToList(); - - // FillColors.Clear(); - // BorderColors.Clear(); - - // for (int i = 0; i < allStates.Count; i++) - // { - // switch (allStates[i]) - // { - // case "Open": - // FillColors[allStates[i]] = "hsla(180, 70%, 50%, 0.5)"; - // break; - // case "Confirmed": - // FillColors[allStates[i]] = "hsla(90, 70%, 50%, 0.5)"; - // break; - // case "Expired": - // FillColors[allStates[i]] = "hsla(0, 70%, 50%, 0.5)"; - // break; - // case "Lost": - // FillColors[allStates[i]] = "hsla(270, 70%, 50%, 0.5)"; - // break; - // } - // //FillColors[allStates[i]] = palette[i]; - // BorderColors[allStates[i]] = ColorHelper.ToOpaque(FillColors[allStates[i]]); - // } - - // DatasetCount = AllRecords - // .Where(p => p.OffertState != null) - // .GroupBy(p => p.OffertState.ToString()) - // .ToDictionary(g => g.Key, g => (double)g.Count()); - - // if (DatasetCount == null || DatasetCount.Count == 0) - // DatasetCount = new Dictionary { ["Nessuna Offerta"] = 1 }; - //} - - //private void ReloadDealerStats() - //{ - // var allDealer = AllRecords.Select(x=>x.DealerNav.LastName).Distinct().ToList(); - // var palette = ColorHelper.GeneratePalette(allDealer.Count, 0.5); - - // FillDealerColors.Clear(); - // BorderDealerColors.Clear(); - - // for (int i = 0; i < allDealer.Count; i++) - // { - // FillDealerColors[allDealer[i]] = palette[i]; - // BorderDealerColors[allDealer[i]] = ColorHelper.ToOpaque(palette[i]); - // } - - // DatasetDealerCount = AllRecords - // .Where(p => p.OffertState != null) - // .GroupBy(p => p.DealerNav.LastName) - // .ToDictionary(g => g.Key, g => (double)g.Count()); - - // if (DatasetDealerCount == null || DatasetDealerCount.Count == 0) - // DatasetDealerCount = new Dictionary { ["Nessun venditore"] = 1 }; - //} } } \ No newline at end of file diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index edd50e3e..d9a8c25e 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.2606.0417 + 1.1.2606.0515 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 3ca65525..85d3d7d7 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 1.1.2606.0417

+

Versione: 1.1.2606.0515


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 1e10fb7f..a002a3b2 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2606.0417 +1.1.2606.0515 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 1f81a1b9..95804e48 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2606.0417 + 1.1.2606.0515 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false