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..be8ac223 100644 --- a/Lux.UI/Components/Compo/Common/CmpHeader.razor.cs +++ b/Lux.UI/Components/Compo/Common/CmpHeader.razor.cs @@ -5,11 +5,45 @@ 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"), + "vocabulary" => "Vocabulary", + _ => "Pagina non definita" + }; + return currentPageName; + } + } + private Task SaveLang() { return EC_LangSelected.InvokeAsync(CurrLang); diff --git a/Lux.UI/Components/Compo/Common/EditBom.razor b/Lux.UI/Components/Compo/Common/EditBom.razor index 6917856d..d6da64da 100644 --- a/Lux.UI/Components/Compo/Common/EditBom.razor +++ b/Lux.UI/Components/Compo/Common/EditBom.razor @@ -1,4 +1,6 @@ -@if (isLoading) +@inherits BaseComp + +@if (isLoading) { } @@ -10,11 +12,11 @@ else
@if (massEdit) { - + } else { - + }
@@ -24,41 +26,41 @@ else
- +
- +
- +
- +
- +
@if (showMassEditSave) { - + } else { - + }
@@ -71,22 +73,22 @@ else @if (massEdit) {
- +
} - Class - Descrizione + @Traduci("bom_classe") + @Traduci("descrizione") @* Cod *@ @if (ShowVolume) { - Vol + @Traduci("bom_vol") } - # Item + # @Traduci("bom_art") Mat. Qty - UnitPrice - Importo + @Traduci("bom_prezzoUnitario") + @Traduci("importo") @@ -98,14 +100,14 @@ else @(item.numRow)
- + - +
@if (ShowVolume) @@ -126,14 +128,14 @@ else @item.numRow @if (massEdit) { - + }
@if (item.Price == 0) { - + } @item.ClassCode diff --git a/Lux.UI/Components/Compo/Common/PrintModal.razor b/Lux.UI/Components/Compo/Common/PrintModal.razor index c83f98c1..a616bcfd 100644 --- a/Lux.UI/Components/Compo/Common/PrintModal.razor +++ b/Lux.UI/Components/Compo/Common/PrintModal.razor @@ -22,7 +22,7 @@
@@ -37,7 +37,7 @@ - + @* ID *@ @Traduci("cod") diff --git a/Lux.UI/Components/Compo/Config/HardwareMan.razor b/Lux.UI/Components/Compo/Config/HardwareMan.razor index ebec968b..ef009b48 100644 --- a/Lux.UI/Components/Compo/Config/HardwareMan.razor +++ b/Lux.UI/Components/Compo/Config/HardwareMan.razor @@ -8,13 +8,13 @@
@Traduci("config_tipiHardware")
- +
-
+
diff --git a/Lux.UI/Components/Compo/Config/ProfileMan.razor b/Lux.UI/Components/Compo/Config/ProfileMan.razor index bade02b6..517218dd 100644 --- a/Lux.UI/Components/Compo/Config/ProfileMan.razor +++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor @@ -8,16 +8,16 @@
@Traduci("config_tipiProfilo")
- +
- +
-
+
@@ -45,7 +45,7 @@ - + @Traduci("cod") @Traduci("descrizione") @@ -62,11 +62,11 @@ @if (EditRecord != null && EditRecord.Code == item.Code) { - + } else { - + } @item.Code @@ -80,18 +80,18 @@ @item.Description } - - + + @if (EditRecord != null && EditRecord.Code == item.Code) { - + } else { if(item.ThresholdList.Count==0 && item.ProfileDataDict.Count==0) { - + } @* else { diff --git a/Lux.UI/Components/Compo/Config/WoodMan.razor b/Lux.UI/Components/Compo/Config/WoodMan.razor index d6fa8608..c8037fdd 100644 --- a/Lux.UI/Components/Compo/Config/WoodMan.razor +++ b/Lux.UI/Components/Compo/Config/WoodMan.razor @@ -9,7 +9,7 @@
-
+
diff --git a/Lux.UI/Components/Compo/Contatti/CustomerMan.razor b/Lux.UI/Components/Compo/Contatti/CustomerMan.razor index e41accf1..9a83716f 100644 --- a/Lux.UI/Components/Compo/Contatti/CustomerMan.razor +++ b/Lux.UI/Components/Compo/Contatti/CustomerMan.razor @@ -10,11 +10,11 @@ else if (totalCount == 0) } else { - +
@@ -67,7 +67,7 @@ else { - diff --git a/Lux.UI/Components/Compo/Contatti/DealerMan.razor b/Lux.UI/Components/Compo/Contatti/DealerMan.razor index 5aaaa4e6..77d2a265 100644 --- a/Lux.UI/Components/Compo/Contatti/DealerMan.razor +++ b/Lux.UI/Components/Compo/Contatti/DealerMan.razor @@ -14,7 +14,7 @@ else diff --git a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor index 8ced510b..2830f134 100644 --- a/Lux.UI/Components/Compo/FileMan/BtlPreview.razor +++ b/Lux.UI/Components/Compo/FileMan/BtlPreview.razor @@ -1,4 +1,6 @@ -
+@inherits BaseComp + +
@@ -10,7 +12,7 @@
- +
@@ -25,7 +27,7 @@
  • somma volume
  • tempo totale
  • - @* *@ + @* *@
    diff --git a/Lux.UI/Components/Compo/Generic/GenClassMan.razor b/Lux.UI/Components/Compo/Generic/GenClassMan.razor index 0d5872d4..ecfd8d15 100644 --- a/Lux.UI/Components/Compo/Generic/GenClassMan.razor +++ b/Lux.UI/Components/Compo/Generic/GenClassMan.razor @@ -1,4 +1,6 @@ -@if (AddVisible) +@inherits BaseComp + +@if (AddVisible) {
    - - + + } else { @@ -88,11 +90,11 @@ } diff --git a/Lux.UI/Components/Compo/Generic/GenValMan.razor b/Lux.UI/Components/Compo/Generic/GenValMan.razor index a70b3df2..8b8b76ec 100644 --- a/Lux.UI/Components/Compo/Generic/GenValMan.razor +++ b/Lux.UI/Components/Compo/Generic/GenValMan.razor @@ -1,11 +1,13 @@ -@if (isLoading || ListRecords == null) +@inherits BaseComp + +@if (isLoading || ListRecords == null) { } else if (totalCount == 0) {
    -
    Nessun record trovato
    +
    @Traduci("noRecord")
    } @@ -15,11 +17,11 @@ else @* *@ - + @@ -34,8 +36,8 @@ else @if (EditRecord != null && item.GenValID == EditRecord.GenValID) { @* *@ @@ -46,14 +48,14 @@ else } else { @* *@ @@ -64,7 +66,7 @@ else } diff --git a/Lux.UI/Components/Compo/Item/DataFilter.razor b/Lux.UI/Components/Compo/Item/DataFilter.razor index 3f8bc8e1..ae8cb00a 100644 --- a/Lux.UI/Components/Compo/Item/DataFilter.razor +++ b/Lux.UI/Components/Compo/Item/DataFilter.razor @@ -13,7 +13,7 @@ { @Traduci("gruppo") diff --git a/Lux.UI/Components/Compo/Item/ItemMan.razor b/Lux.UI/Components/Compo/Item/ItemMan.razor index f1264265..78501843 100644 --- a/Lux.UI/Components/Compo/Item/ItemMan.razor +++ b/Lux.UI/Components/Compo/Item/ItemMan.razor @@ -14,7 +14,7 @@ else @@ -60,7 +60,7 @@ else @@ -68,7 +68,7 @@ else diff --git a/Lux.UI/Components/Compo/Item/SellingItemMan.razor b/Lux.UI/Components/Compo/Item/SellingItemMan.razor index 8c1546d6..edacf9b4 100644 --- a/Lux.UI/Components/Compo/Item/SellingItemMan.razor +++ b/Lux.UI/Components/Compo/Item/SellingItemMan.razor @@ -18,7 +18,7 @@ else @@ -40,7 +40,7 @@ else { @@ -49,8 +49,8 @@ else
    (@item.SellingItemID)
    - - - - - - + + + + + + @@ -139,7 +141,7 @@ } else diff --git a/Lux.UI/Components/Compo/JobTask/JobTaskListMan.razor b/Lux.UI/Components/Compo/JobTask/JobTaskListMan.razor index cac0d97e..5f987aa0 100644 --- a/Lux.UI/Components/Compo/JobTask/JobTaskListMan.razor +++ b/Lux.UI/Components/Compo/JobTask/JobTaskListMan.razor @@ -1,10 +1,12 @@ -@if (addVisible) +@inherits BaseComp + +@if (addVisible) { @if (selRecord == null) { - - - - - + + + + + } else { - + } @@ -105,7 +107,7 @@ - - - + + + diff --git a/Lux.UI/Components/Compo/Offer/AddFromTemplate.razor b/Lux.UI/Components/Compo/Offer/AddFromTemplate.razor index f76aaf7c..2d635a0b 100644 --- a/Lux.UI/Components/Compo/Offer/AddFromTemplate.razor +++ b/Lux.UI/Components/Compo/Offer/AddFromTemplate.razor @@ -3,14 +3,14 @@ } else diff --git a/Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs index 989683dd..60f1d0e6 100644 --- a/Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs @@ -742,7 +742,7 @@ namespace Lux.UI.Components.Compo.Offer if (dbRec != null) { // se ho parametri validi di preselezione li applico... - if (!string.IsNullOrEmpty(CurrRecord.DictPresel) && CurrRecord.DictParameter.Count > 0) + if (!string.IsNullOrEmpty(CurrRecord.DictPresel) && CurrRecord.DictParameter.Count > 0 && needRecalc) { // in primis provo conversione diretta var updAnsw = SerialMan.MassUpdate((string)dbRec.SerStruct, CurrRecord.DictParameter); diff --git a/Lux.UI/Components/Compo/Order/OrderRowMan.razor b/Lux.UI/Components/Compo/Order/OrderRowMan.razor index 7ab8035f..04d98f4c 100644 --- a/Lux.UI/Components/Compo/Order/OrderRowMan.razor +++ b/Lux.UI/Components/Compo/Order/OrderRowMan.razor @@ -70,7 +70,7 @@ else -
    +
    @if (isLoading || ListRecords == null) { @@ -457,7 +457,7 @@ else
    - +
    diff --git a/Lux.UI/Components/Compo/Planner/BalanceProgGroup.razor b/Lux.UI/Components/Compo/Planner/BalanceProgGroup.razor index c3bf3f08..88498d7c 100644 --- a/Lux.UI/Components/Compo/Planner/BalanceProgGroup.razor +++ b/Lux.UI/Components/Compo/Planner/BalanceProgGroup.razor @@ -1,5 +1,4 @@ -@using EgwCoreLib.Lux.Data.DbModel.Production - +
    - + @Traduci("nome") @Traduci("contatti_cognome")
    +
    - + @Traduci("nome") @Traduci("contatti_cognome")
    - + CodDescrizione@Traduci("cod")@Traduci("descrizione") # Val @@ -65,21 +67,21 @@ @if (EditRecord != null && item.ClassCod == EditRecord.ClassCod) { - - + + @item.ClassCod @item.NumChild - + - - + + @* *@ @item.ClassCod @if (item.NumChild > 0) { - + } else { - + }
    - + IDOrd.Valore@Traduci("valore") - - + + @* *@ @item.GenValID - + - - + + @* *@ @item.GenValID @item.ValString - +
    - + @Traduci("id") @Traduci("gruppo") @if (!item.IsOkCost) { - + } @item.Cost.ToString("C3") @if (!item.IsOkQty) { - + } @item.QtyMin.ToString("F1") ↔ @item.QtyMax.ToString("F1")
    - + @Traduci("ambiente") @Traduci("anteprima")
    - + @* *@ @* *@ - @* *@ - + @* *@ + @item.SourceType diff --git a/Lux.UI/Components/Compo/JobTask/JobStepMan.razor b/Lux.UI/Components/Compo/JobTask/JobStepMan.razor index 9410fe36..69835e51 100644 --- a/Lux.UI/Components/Compo/JobTask/JobStepMan.razor +++ b/Lux.UI/Components/Compo/JobTask/JobStepMan.razor @@ -1,10 +1,12 @@ -@if (addVisible) +@inherits BaseComp + +@if (addVisible) { @@ -54,15 +56,15 @@
    @if (newRecord != null && newRecord.PhaseID > 0 && newRecord.ResourceID > 0) { - + } else { - + }
    - +
    @@ -78,8 +80,8 @@ @if (totalCount == 0) {
    -
    Nessun record trovato
    - +
    @Traduci("noRecord")
    +
    } else @@ -88,15 +90,15 @@
    - + Ord.FaseRisorsaDescrizioneTagsResa@Traduci("ord")@Traduci("cicli_fase")@Traduci("cicli_risorsa")@Traduci("descrizione")@Traduci("cicli_tags")@Traduci("cicli_resa") - +
    - + Ord.DescrizioneFasiTagsDrivers@Traduci("ord")@Traduci("descrizione")@Traduci("cicli_fasi")@Traduci("cicli_tags")@Traduci("cicli_drivers") Descrizione@Traduci("descrizione")
    @if (item.Lock || item.NumChild > 0) { - + } else { diff --git a/Lux.UI/Components/Compo/JobTask/ResourceDetail.razor b/Lux.UI/Components/Compo/JobTask/ResourceDetail.razor index f5356110..ee291e28 100644 --- a/Lux.UI/Components/Compo/JobTask/ResourceDetail.razor +++ b/Lux.UI/Components/Compo/JobTask/ResourceDetail.razor @@ -1,34 +1,36 @@ -
    +@inherits BaseComp + +
    - Simulazione Costing + @Traduci("risorsa_simulazCosti")
    @if (isEditing) { - + } else { - + }
    - Driver + @Traduci("risorsa_driver") @CurrRecord.DriverNav.Name (@CurrRecord.DriverNav.Unit)
    @CurrRecord.DriverNav.Descript
    -
    +
    @($"{PriceCalc:C2}")
    -
    (@($"{CostCalc:C2}"))
    +
    (@($"{CostCalc:C2}"))
    @@ -36,7 +38,7 @@
    • -
      Cod
      +
      @Traduci("cod")
      Codifica per ordine/gruppo @@ -59,7 +61,7 @@
    • -
      Nome
      +
      @Traduci("nome")
      Denominazione Risorsa @@ -82,7 +84,7 @@
    • -
      Driver Impiegato
      +
      @Traduci("risorsa_driver")
      Driver di Costing @@ -133,7 +135,7 @@
    • -
      Costi Fissi
      +
      @Traduci("risorsa_costiFissi")
      Costi Fissi nell'unità di riferimento (affitti, ammortamenti) @@ -156,7 +158,7 @@
    • -
      Costi Variabili
      +
      @Traduci("risorsa_costiVariabili")
      Costi Variabili nell'unità di riferimento (energia, consumabili, no materie prime) @@ -179,7 +181,7 @@
    • -
      Costo Lavoro
      +
      @Traduci("risorsa_costoLavoro")
      Costi HR nell'unità di riferimento (diretti) @@ -202,7 +204,7 @@
    • -
      OverHead
      +
      @Traduci("risorsa_overhead")
      Costi OH nell'unità di riferimento (indiretti) @@ -225,7 +227,7 @@
    • -
      OverHead +%
      +
      @Traduci("risorsa_overhead") +%
      Maggiorazione Costi OH nell'unità di riferimento (indiretti) @@ -271,7 +273,7 @@
    • -
      Margine +%
      +
      @Traduci("margine") +%
      Margine Prezzo (scontabile) nell'unità di riferimento (indiretti) @@ -295,7 +297,7 @@ @if (isEditing) {
    • - +
    • }
    diff --git a/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor b/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor index 49e60216..acc64816 100644 --- a/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor +++ b/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor @@ -1,6 +1,8 @@ -
    +@inherits BaseComp + +
    - Configurazioni attive + @Traduci("risorsa_configAttive")
    @if (isLoading || ListRecords == null) @@ -9,7 +11,7 @@ } else if (totalCount == 0) { -
    Nessun record trovato
    +
    @Traduci("noRecord")
    } else { @@ -21,11 +23,11 @@
    Cod.NomeDriver@Traduci("cod")@Traduci("nome")@Traduci("risorsa_driver") - +
    - +
    diff --git a/Lux.UI/Components/Compo/Planner/WLB_Estimated.razor b/Lux.UI/Components/Compo/Planner/WLB_Estimated.razor index 88ea23b5..a4874b91 100644 --- a/Lux.UI/Components/Compo/Planner/WLB_Estimated.razor +++ b/Lux.UI/Components/Compo/Planner/WLB_Estimated.razor @@ -1,4 +1,6 @@ -@if (AllRecords == null) +@inherits BaseComp + +@if (AllRecords == null) { } @@ -6,16 +8,16 @@ else { if (AllRecords.Count == 0) { -
    Nessun Ordine da Bilanciare
    +
    @Traduci("noRecord")
    } else {
    - +
    - +
    diff --git a/Lux.UI/Components/Compo/Templates/TemplateList.razor b/Lux.UI/Components/Compo/Templates/TemplateList.razor index ff2d884f..229a6fa1 100644 --- a/Lux.UI/Components/Compo/Templates/TemplateList.razor +++ b/Lux.UI/Components/Compo/Templates/TemplateList.razor @@ -29,7 +29,7 @@ else
    @@ -49,9 +49,9 @@ else { diff --git a/Lux.UI/Components/Compo/Templates/TemplateRowList.razor b/Lux.UI/Components/Compo/Templates/TemplateRowList.razor index f30b3176..4e2dee2d 100644 --- a/Lux.UI/Components/Compo/Templates/TemplateRowList.razor +++ b/Lux.UI/Components/Compo/Templates/TemplateRowList.razor @@ -45,7 +45,7 @@ else @Traduci("noRecord")
    -
    +
    @Traduci("ambiente")
    @@ -89,34 +89,30 @@ else { @@ -146,7 +142,7 @@ else } diff --git a/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor b/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor index c0b90c9f..6ad3a91f 100644 --- a/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor +++ b/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor @@ -20,10 +20,10 @@ else
    @CurrRec.Inserted
    - + -
    diff --git a/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor b/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor index 362a8e7a..9300869f 100644 --- a/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor +++ b/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor @@ -9,12 +9,12 @@
    -
    +
    diff --git a/Lux.UI/Components/Compo/Warehouse/MatReqList.razor b/Lux.UI/Components/Compo/Warehouse/MatReqList.razor index 36c37c6b..c8a74d9e 100644 --- a/Lux.UI/Components/Compo/Warehouse/MatReqList.razor +++ b/Lux.UI/Components/Compo/Warehouse/MatReqList.razor @@ -12,7 +12,7 @@
    Ord diff --git a/Lux.UI/Components/Compo/WorkLoad/ItemSel.razor b/Lux.UI/Components/Compo/WorkLoad/ItemSel.razor index a32840e6..d039e910 100644 --- a/Lux.UI/Components/Compo/WorkLoad/ItemSel.razor +++ b/Lux.UI/Components/Compo/WorkLoad/ItemSel.razor @@ -44,7 +44,7 @@ else
    diff --git a/Lux.UI/Components/Compo/WorkLoad/JobQueue.razor b/Lux.UI/Components/Compo/WorkLoad/JobQueue.razor index a40d0660..ebee16bb 100644 --- a/Lux.UI/Components/Compo/WorkLoad/JobQueue.razor +++ b/Lux.UI/Components/Compo/WorkLoad/JobQueue.razor @@ -1,4 +1,6 @@ -
    +@inherits BaseComp + +
    1. @@ -6,7 +8,7 @@ @if (QueueAll.Count > 0) {
      -
      +
      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/ConfListNew.razor b/Lux.UI/Components/Pages/ConfListNew.razor index 8ed9d2c7..21b3a78c 100644 --- a/Lux.UI/Components/Pages/ConfListNew.razor +++ b/Lux.UI/Components/Pages/ConfListNew.razor @@ -1,11 +1,11 @@ @page "/ConfListNew" -
      +@*
      Configurazioni
      -
      +
      *@
      @if (isLoading) diff --git a/Lux.UI/Components/Pages/Customer.razor b/Lux.UI/Components/Pages/Customer.razor index 453f1fca..d01dd16d 100644 --- a/Lux.UI/Components/Pages/Customer.razor +++ b/Lux.UI/Components/Pages/Customer.razor @@ -1,7 +1,34 @@ @page "/Customer" @inherits BaseComp -
      +
      + +
      + + + +
      +
      + +
      + @if (isLoading) + { + + } + else + { + if (editRecord != null) + { + + } + + } +
      + + +@*
      @@ -9,7 +36,7 @@
      -
      +
      @@ -32,3 +59,4 @@ }
      + *@ \ No newline at end of file diff --git a/Lux.UI/Components/Pages/Dealer.razor b/Lux.UI/Components/Pages/Dealer.razor index 859f0cff..a7f0b96b 100644 --- a/Lux.UI/Components/Pages/Dealer.razor +++ b/Lux.UI/Components/Pages/Dealer.razor @@ -9,7 +9,7 @@
      -
      +
      diff --git a/Lux.UI/Components/Pages/GenList.razor b/Lux.UI/Components/Pages/GenList.razor index 0a7f65ca..1b5473a8 100644 --- a/Lux.UI/Components/Pages/GenList.razor +++ b/Lux.UI/Components/Pages/GenList.razor @@ -1,5 +1,5 @@ @page "/GenList" - +@inherits BaseComp
      @@ -9,7 +9,7 @@
      -
      +
      diff --git a/Lux.UI/Components/Pages/JobRoute.razor b/Lux.UI/Components/Pages/JobRoute.razor index b8d549a2..d4ee938a 100644 --- a/Lux.UI/Components/Pages/JobRoute.razor +++ b/Lux.UI/Components/Pages/JobRoute.razor @@ -1,14 +1,15 @@ @page "/JobRoute" +@inherits BaseComp
      - Cicli di Lavoro + @Traduci("cicli_cicliLavoro")
      -
      +
      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/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor index fe7a0f3f..208a1be5 100644 --- a/Lux.UI/Components/Pages/Offers.razor +++ b/Lux.UI/Components/Pages/Offers.razor @@ -15,22 +15,22 @@
      - +
      - +
      - +
      - +
      @*
      @@ -90,7 +90,7 @@ else @foreach (var itemState in Enum.GetValues(typeof(Enums.OfferStates)).Cast()) {
      - +
      }
      @@ -116,10 +116,10 @@ else
      @@ -201,7 +201,7 @@ else {
    } diff --git a/Lux.UI/Components/Pages/Offers.razor.cs b/Lux.UI/Components/Pages/Offers.razor.cs index 4a4ec7ab..e1761c61 100644 --- a/Lux.UI/Components/Pages/Offers.razor.cs +++ b/Lux.UI/Components/Pages/Offers.razor.cs @@ -216,9 +216,11 @@ namespace Lux.UI.Components.Pages private void DoAdd() { + int refNum = AllRecords.Where(x=>x.RefYear == DateTime.Today.Year).Max(x=>x.RefNum) + 1; EditRecord = new OfferModel() { RefYear = DateTime.Today.Year, + RefNum = refNum, Inserted = DateTime.Today, Description = $"Nuova Offerta {DateTime.Today:ddd yyyy.MM.dd}", ValidUntil = DateTime.Today.AddMonths(1) diff --git a/Lux.UI/Components/Pages/Orders.razor b/Lux.UI/Components/Pages/Orders.razor index e7638fea..e1fb1039 100644 --- a/Lux.UI/Components/Pages/Orders.razor +++ b/Lux.UI/Components/Pages/Orders.razor @@ -175,10 +175,10 @@ else
    @@ -253,7 +253,7 @@ else
    - + @Traduci("id") @Traduci("ambiente")
    - - - + + + @item.TemplateID @@ -70,11 +70,11 @@ else @if (item.TemplateRowNav.Any()) { - + } else { - + }
    - + @Traduci("anteprima") @Traduci("cataloghi_prod")
    - - + + @if (item.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW) { if (item.SellingItemNav?.SourceType == ItemSourceType.Jwd) { - @* *@ - + } else { - @* *@ - + } } else { if (item.SellingItemNav?.SourceType == ItemSourceType.FileBTL) { - @* *@ - + } else { - @* *@ - + } } - +
    @if (!item.IsOkQty) { - + } @item.QtyMin.ToString("F1") ↔ @item.QtyMax.ToString("F1") diff --git a/Lux.UI/Components/Pages/Resources.razor b/Lux.UI/Components/Pages/Resources.razor index a364d8cc..c891cfee 100644 --- a/Lux.UI/Components/Pages/Resources.razor +++ b/Lux.UI/Components/Pages/Resources.razor @@ -1,14 +1,15 @@ @page "/Resources" +@inherits BaseComp
    - Risorse + @Traduci("navMan_risorse")
    -
    +
    diff --git a/Lux.UI/Components/Pages/Template.razor b/Lux.UI/Components/Pages/Template.razor index 9cffaa1a..0e928631 100644 --- a/Lux.UI/Components/Pages/Template.razor +++ b/Lux.UI/Components/Pages/Template.razor @@ -9,19 +9,8 @@ @Traduci("navMan_cataloghi")
    - @*
    -
    - Envir - -
    -
    *@
    -
    +
    diff --git a/Lux.UI/Components/Pages/Vocabulary.razor b/Lux.UI/Components/Pages/Vocabulary.razor index 0bdfe3f6..6ea290a0 100644 --- a/Lux.UI/Components/Pages/Vocabulary.razor +++ b/Lux.UI/Components/Pages/Vocabulary.razor @@ -1,6 +1,5 @@ @page "/vocabulary" @inherits BaseComp -@using Lux.UI.Components.Compo.Admin
    @@ -11,7 +10,7 @@
    @if (currRec == null) { -
    +
    diff --git a/Lux.UI/Components/Pages/WorkLoadBalance.razor b/Lux.UI/Components/Pages/WorkLoadBalance.razor index 5450b26a..2c7f4198 100644 --- a/Lux.UI/Components/Pages/WorkLoadBalance.razor +++ b/Lux.UI/Components/Pages/WorkLoadBalance.razor @@ -9,10 +9,13 @@
    -
    +
    @Traduci("ambiente") - + + @foreach (var item in Enum.GetValues(typeof(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS)) + .Cast() + .Where(e => Convert.ToInt32(e) != 0)) { } diff --git a/Lux.UI/Components/Pages/WorkLoadBalance.razor.cs b/Lux.UI/Components/Pages/WorkLoadBalance.razor.cs index a79993cc..ca801209 100644 --- a/Lux.UI/Components/Pages/WorkLoadBalance.razor.cs +++ b/Lux.UI/Components/Pages/WorkLoadBalance.razor.cs @@ -1,6 +1,7 @@ using EgwCoreLib.Lux.Core.Generic; using EgwCoreLib.Razor; using Newtonsoft.Json; +using System.Linq; using static EgwCoreLib.Lux.Core.Enums; using static Lux.UI.Components.Compo.Planner.BalanceProgGroup; @@ -73,28 +74,16 @@ namespace Lux.UI.Components.Pages #region Private Properties - private List EnvirList + private EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS? searchValByEnvir { get; set; } = null; + private EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS? FiltEnvir { - get - { - var listEnum = Enum.GetNames(typeof(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS)) - .ToList(); - if (listEnum.Count > 0) - { - listEnum[0] = "TUTTI"; - } - return listEnum; - } - } - private string searchValByState { get; set; } = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW.ToString(); - private string SearchVal - { - get => searchValByState; + get => searchValByEnvir; set { - if (searchValByState != value) + if (searchValByEnvir != value) { - searchValByState = value; + searchValByEnvir = value; + DoFilter(); UpdateTable(); } } @@ -484,6 +473,7 @@ namespace Lux.UI.Components.Pages ListEstimRecordsAll = await OrdRService.GetByStateMinAsync(OrderStates.Estimated, PeriodoSel.Inizio, PeriodoSel.Fine); ListBalancedRecordsAll = await PGService.GetByOrderStateAsync(OrderStates.Assigned); ListOdlAll = await POService.GetUnassignOdlDtoAsync(); + DoFilter(); } /// @@ -615,39 +605,42 @@ namespace Lux.UI.Components.Pages UpdateTable(); } + private void DoFilter() + { + ListEstimRecords = ListEstimRecordsAll.Where(x => FiltEnvir == null || x.Envir == FiltEnvir).ToList(); + ListBalancedRecords = ListBalancedRecordsAll.Where(x => FiltEnvir == null || x.OrderRowNav.Envir == FiltEnvir).ToList(); + ListOdl = ListOdlAll.Where(x => FiltEnvir == null || x.Envir == FiltEnvir).ToList(); + + // if (ListEstimRecordsAll != null && ListEstimRecordsAll.Count > 0) + // { + // ListEstimRecords = ListEstimRecordsAll.Where(x => x.Envir.ToString() == searchValByEnvir).ToList(); + // } + // if (ListBalancedRecordsAll != null && ListBalancedRecordsAll.Count > 0) + // { + // ListBalancedRecords = ListBalancedRecordsAll.Where(x => x.OrderRowNav.Envir.ToString() == searchValByEnvir).ToList(); + // } + // if (ListOdlAll != null && ListOdlAll.Count > 0) + // { + // ListOdl = ListOdlAll.Where(x => x.Envir.ToString() == searchValByEnvir).ToList(); + // } + } + /// /// Filtro e paginazione /// private void UpdateTable() { - if (searchValByState.Equals("TUTTI")) - { - ListEstimRecords = ListEstimRecordsAll; - ListBalancedRecords = ListBalancedRecordsAll; - ListOdl = ListOdlAll; - } - else - { - if (ListEstimRecordsAll != null && ListEstimRecordsAll.Count > 0) - { - ListEstimRecords = ListEstimRecordsAll.Where(x => x.Envir.ToString() == searchValByState).ToList(); - } - if (ListBalancedRecordsAll != null && ListBalancedRecordsAll.Count > 0) - { - ListBalancedRecords = ListBalancedRecordsAll.Where(x => x.OrderRowNav.Envir.ToString() == searchValByState).ToList(); - } - if (ListOdlAll != null && ListOdlAll.Count > 0) - { - ListOdl = ListOdlAll.Where(x => x.Envir.ToString() == searchValByState).ToList(); - } +#if false + // fix paginazione + ListRecords = ListFilt + .Skip(numRecord * (currPage - 1)) + .Take(numRecord) + .ToList(); +#endif } #if false - // fix paginazione - ListRecords = ListFilt - .Skip(numRecord * (currPage - 1)) - .Take(numRecord) - .ToList(); + private global::System.Threading.Tasks.Task DoBalance(global::System.Int32 args) { throw new global::System.NotImplementedException(); @@ -657,8 +650,8 @@ namespace Lux.UI.Components.Pages throw new global::System.NotImplementedException(); } #endif - } + - #endregion Private Methods +#endregion Private Methods } } \ No newline at end of file diff --git a/Lux.UI/Components/_Imports.razor b/Lux.UI/Components/_Imports.razor index b38e8ebb..de37000e 100644 --- a/Lux.UI/Components/_Imports.razor +++ b/Lux.UI/Components/_Imports.razor @@ -10,6 +10,7 @@ @using Lux.UI.Client @using Lux.UI.Components @using Lux.UI.Components.Compo +@using Lux.UI.Components.Compo.Admin @using Lux.UI.Components.Compo.Charts @using Lux.UI.Components.Compo.Common @using Lux.UI.Components.Compo.Config