From 7e65c8a406de71f737a970d1df1afb3fa5337833 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 10 Jun 2026 16:57:13 +0200 Subject: [PATCH] Varie code cleanup --- Lux.API/Controllers/FileController.cs | 5 +- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/Config/GlassMan.razor | 2 +- .../Components/Compo/Config/ProfileMan.razor | 2 +- Lux.UI/Components/Compo/Config/WoodMan.razor | 2 +- .../Compo/Contatti/CustomerEdit.razor | 63 +++--- .../Compo/Contatti/CustomerEdit.razor.cs | 2 +- .../Compo/Contatti/CustomerMan.razor | 2 +- .../Compo/Contatti/DealerEdit.razor | 63 +++--- .../Compo/Contatti/DealerEdit.razor.cs | 2 +- .../Components/Compo/Contatti/DealerMan.razor | 2 +- .../Compo/Generic/GenClassMan.razor | 142 ++++++------- .../Components/Compo/Generic/GenValMan.razor | 2 +- Lux.UI/Components/Compo/Item/ItemEdit.razor | 187 +++++++++--------- .../Components/Compo/Item/ItemEdit.razor.cs | 2 +- Lux.UI/Components/Compo/Item/ItemMan.razor | 2 +- .../Compo/Item/SellingItemEdit.razor | 2 +- .../Compo/Item/SellingItemMan.razor | 2 +- .../Components/Compo/JobTask/JobStepMan.razor | 2 +- .../Compo/JobTask/JobStepMan.razor.cs | 9 +- .../Compo/JobTask/JobTaskListMan.razor | 2 +- .../Compo/JobTask/ResourcesMan.razor | 2 +- .../Compo/JobTask/ResourcesMan.razor.cs | 8 +- .../Components/Compo/Offer/OfferRowMan.razor | 2 +- .../Compo/Offer/OfferRowMan.razor.cs | 8 +- .../Components/Compo/Order/OrderRowMan.razor | 2 +- .../Compo/Order/OrderRowMan.razor.cs | 4 +- .../Compo/Planner/BalanceProgGroup.razor | 2 +- .../Compo/Planner/CalendarPlanner.razor.cs | 85 ++++---- Lux.UI/Components/Compo/Planner/OdlMan.razor | 57 +++--- .../Compo/Planner/WLB_Estimated.razor | 2 +- .../Components/Compo/Stats/OfferStats.razor | 171 ++++++++-------- .../Compo/Stats/OfferStats.razor.cs | 12 +- .../Compo/Stats/RealTimeStats.razor.cs | 4 +- .../Compo/Templates/TemplateList.razor | 2 +- .../Compo/Templates/TemplateRowList.razor | 2 +- .../Compo/Warehouse/BuyOrderDetail.razor.cs | 4 +- .../Compo/Warehouse/BuyOrderList.razor | 57 +++--- .../Compo/Warehouse/MatReqList.razor.cs | 5 +- .../Components/Compo/WorkLoad/JobQueue.razor | 2 +- .../Components/Compo/WorkLoad/TimeEstim.razor | 2 +- Lux.UI/Components/Pages/GenList.razor.cs | 6 +- Lux.UI/Components/Pages/OffStats.razor | 62 +++--- Lux.UI/Components/Pages/Offers.razor | 2 +- Lux.UI/Components/Pages/Offers.razor.cs | 6 +- Lux.UI/Components/Pages/Orders.razor | 5 +- Lux.UI/Components/Pages/Orders.razor.cs | 6 +- Lux.UI/Components/Pages/Vocabulary.razor | 2 +- Lux.UI/Components/Pages/Vocabulary.razor.cs | 12 +- Lux.UI/Components/Pages/WorkLoadBalance.razor | 2 +- .../Components/Pages/WorkLoadBalance.razor.cs | 151 +++++++------- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 55 files changed, 628 insertions(+), 566 deletions(-) diff --git a/Lux.API/Controllers/FileController.cs b/Lux.API/Controllers/FileController.cs index ddf606ff..d53703b9 100644 --- a/Lux.API/Controllers/FileController.cs +++ b/Lux.API/Controllers/FileController.cs @@ -14,12 +14,13 @@ namespace Lux.API.Controllers /// /// /// + /// /// - /// - public FileController(IDataLayerServices DLService, IOfferRowService iORService, IImageCacheService imgServ) + public FileController(IDataLayerServices DLService, IOfferRowService iORService, IOrderRowService iOrdRService, IImageCacheService imgServ) { _DSService = DLService; _OffRService = iORService; + _OrdRService = iOrdRService; _imgService = imgServ; } diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 1ba30d59..1e063003 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2606.1015 + 1.1.2606.1016 diff --git a/Lux.UI/Components/Compo/Config/GlassMan.razor b/Lux.UI/Components/Compo/Config/GlassMan.razor index 106fc1ab..31ab47e3 100644 --- a/Lux.UI/Components/Compo/Config/GlassMan.razor +++ b/Lux.UI/Components/Compo/Config/GlassMan.razor @@ -85,4 +85,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Config/ProfileMan.razor b/Lux.UI/Components/Compo/Config/ProfileMan.razor index 517218dd..1b7a3303 100644 --- a/Lux.UI/Components/Compo/Config/ProfileMan.razor +++ b/Lux.UI/Components/Compo/Config/ProfileMan.razor @@ -128,4 +128,4 @@ } } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Config/WoodMan.razor b/Lux.UI/Components/Compo/Config/WoodMan.razor index c8037fdd..c3fa4377 100644 --- a/Lux.UI/Components/Compo/Config/WoodMan.razor +++ b/Lux.UI/Components/Compo/Config/WoodMan.razor @@ -85,4 +85,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Contatti/CustomerEdit.razor b/Lux.UI/Components/Compo/Contatti/CustomerEdit.razor index a6baddad..f72c5c1b 100644 --- a/Lux.UI/Components/Compo/Contatti/CustomerEdit.razor +++ b/Lux.UI/Components/Compo/Contatti/CustomerEdit.razor @@ -1,44 +1,41 @@ @inherits BaseComp
- @if (CurrRecord != null) - { -
# @(CurrRecord?.CustomerID)
-
-
-
- - -
+
# @(CurrRecord.CustomerID)
+
+
+
+ +
-
-
- - -
+
+
+
+ +
-
-
- - -
+
+
+
+ +
-
-
- - -
+
+
+
+ +
-
-
-
- -
-
- -
+
+
+
+
+ +
+
+
- } +
diff --git a/Lux.UI/Components/Compo/Contatti/CustomerEdit.razor.cs b/Lux.UI/Components/Compo/Contatti/CustomerEdit.razor.cs index d74e5561..201e2e61 100644 --- a/Lux.UI/Components/Compo/Contatti/CustomerEdit.razor.cs +++ b/Lux.UI/Components/Compo/Contatti/CustomerEdit.razor.cs @@ -5,7 +5,7 @@ namespace Lux.UI.Components.Compo.Contatti #region Public Properties [Parameter] - public CustomerModel? CurrRecord { get; set; } = null; + public CustomerModel CurrRecord { get; set; } = null!; [Parameter] public EventCallback EC_Close { get; set; } diff --git a/Lux.UI/Components/Compo/Contatti/CustomerMan.razor b/Lux.UI/Components/Compo/Contatti/CustomerMan.razor index 9a83716f..7dc9bcfb 100644 --- a/Lux.UI/Components/Compo/Contatti/CustomerMan.razor +++ b/Lux.UI/Components/Compo/Contatti/CustomerMan.razor @@ -76,4 +76,4 @@ else } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Contatti/DealerEdit.razor b/Lux.UI/Components/Compo/Contatti/DealerEdit.razor index 23d2a81c..d8ef36c0 100644 --- a/Lux.UI/Components/Compo/Contatti/DealerEdit.razor +++ b/Lux.UI/Components/Compo/Contatti/DealerEdit.razor @@ -1,44 +1,41 @@ @inherits BaseComp
- @if (CurrRecord != null) - { -
# @(CurrRecord?.DealerID)
-
-
-
- - -
+
# @(CurrRecord.DealerID)
+
+
+
+ +
-
-
- - -
+
+
+
+ +
-
-
- - -
+
+
+
+ +
-
-
- - -
+
+
+
+ +
-
-
-
- -
-
- -
+
+
+
+
+ +
+
+
- } +
diff --git a/Lux.UI/Components/Compo/Contatti/DealerEdit.razor.cs b/Lux.UI/Components/Compo/Contatti/DealerEdit.razor.cs index bf3eec60..a62c42f6 100644 --- a/Lux.UI/Components/Compo/Contatti/DealerEdit.razor.cs +++ b/Lux.UI/Components/Compo/Contatti/DealerEdit.razor.cs @@ -5,7 +5,7 @@ namespace Lux.UI.Components.Compo.Contatti #region Public Properties [Parameter] - public DealerModel? CurrRecord { get; set; } = null; + public DealerModel CurrRecord { get; set; } = null!; [Parameter] public EventCallback EC_Close { get; set; } diff --git a/Lux.UI/Components/Compo/Contatti/DealerMan.razor b/Lux.UI/Components/Compo/Contatti/DealerMan.razor index 77d2a265..e41b1c27 100644 --- a/Lux.UI/Components/Compo/Contatti/DealerMan.razor +++ b/Lux.UI/Components/Compo/Contatti/DealerMan.razor @@ -76,4 +76,4 @@ else } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Generic/GenClassMan.razor b/Lux.UI/Components/Compo/Generic/GenClassMan.razor index ecfd8d15..82654a67 100644 --- a/Lux.UI/Components/Compo/Generic/GenClassMan.razor +++ b/Lux.UI/Components/Compo/Generic/GenClassMan.razor @@ -46,71 +46,79 @@
} - - - - - - - - - - - - @foreach (var item in ListRecords) - { - - @if (EditRecord != null && item.ClassCod == EditRecord.ClassCod) - { - - - - - - } - else - { - - - - - - } - - } - - @if (totalCount >= numRecord) - { - - - - - - } -
- - @Traduci("cod")@Traduci("descrizione")# Val - -
- - - @item.ClassCod@item.NumChild - - - - - @* *@ - @item.ClassCod@item.Description@item.NumChild - @if (item.NumChild > 0) - { - - } - else - { - - } -
- -
- \ No newline at end of file +@if (isLoading) +{ + +} +else +{ + + + + + + + + + + + + @foreach (var item in ListRecords) + { + + @if (EditRecord != null && item.ClassCod == EditRecord.ClassCod) + { + + + + + + } + else + { + + + + + + } + + } + + @if (totalCount >= numRecord) + { + + + + + + } +
+ + @Traduci("cod")@Traduci("descrizione")# Val + +
+ + + @item.ClassCod@item.NumChild + + + + + @* *@ + @item.ClassCod@item.Description@item.NumChild + @if (item.NumChild > 0) + { + + } + else + { + + } +
+ +
+} + + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Generic/GenValMan.razor b/Lux.UI/Components/Compo/Generic/GenValMan.razor index 8b8b76ec..9a009a22 100644 --- a/Lux.UI/Components/Compo/Generic/GenValMan.razor +++ b/Lux.UI/Components/Compo/Generic/GenValMan.razor @@ -85,4 +85,4 @@ else } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Item/ItemEdit.razor b/Lux.UI/Components/Compo/Item/ItemEdit.razor index 7ed81d18..82b37521 100644 --- a/Lux.UI/Components/Compo/Item/ItemEdit.razor +++ b/Lux.UI/Components/Compo/Item/ItemEdit.razor @@ -1,101 +1,98 @@ @inherits BaseComp
- @if (CurrRecord != null) - { -
# @(CurrRecord?.ItemID) | Codice @CurrRecord.ItemCode
-
-
-
- - -
-
-
-
- - -
-
-
-
-
- -
-
- -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - @* *@ - -
-
-
-
- - @* *@ - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
-
-
- -
-
- -
-
+
# @(CurrRecord.ItemID) | Codice @CurrRecord.ItemCode
+
+
+
+ +
- } +
+
+ + +
+
+
+
+
+ +
+
+ +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + @* *@ + +
+
+
+
+ + @* *@ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+ +
+
+ +
+
+
+
diff --git a/Lux.UI/Components/Compo/Item/ItemEdit.razor.cs b/Lux.UI/Components/Compo/Item/ItemEdit.razor.cs index d21983fc..0c04a102 100644 --- a/Lux.UI/Components/Compo/Item/ItemEdit.razor.cs +++ b/Lux.UI/Components/Compo/Item/ItemEdit.razor.cs @@ -5,7 +5,7 @@ namespace Lux.UI.Components.Compo.Item #region Public Properties [Parameter] - public ItemModel? CurrRecord { get; set; } = null; + public ItemModel CurrRecord { get; set; } = null!; [Parameter] public EventCallback EC_Close { get; set; } diff --git a/Lux.UI/Components/Compo/Item/ItemMan.razor b/Lux.UI/Components/Compo/Item/ItemMan.razor index 78501843..22f7168d 100644 --- a/Lux.UI/Components/Compo/Item/ItemMan.razor +++ b/Lux.UI/Components/Compo/Item/ItemMan.razor @@ -101,4 +101,4 @@ else } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Item/SellingItemEdit.razor b/Lux.UI/Components/Compo/Item/SellingItemEdit.razor index fedb093a..3842c5d8 100644 --- a/Lux.UI/Components/Compo/Item/SellingItemEdit.razor +++ b/Lux.UI/Components/Compo/Item/SellingItemEdit.razor @@ -4,7 +4,7 @@ @if (CurrRecord != null) {
- # @(CurrRecord?.SellingItemID) | Codice @CurrRecord?.ItemCode + # @(CurrRecord.SellingItemID) | Codice @CurrRecord.ItemCode
diff --git a/Lux.UI/Components/Compo/Item/SellingItemMan.razor b/Lux.UI/Components/Compo/Item/SellingItemMan.razor index edacf9b4..0571b497 100644 --- a/Lux.UI/Components/Compo/Item/SellingItemMan.razor +++ b/Lux.UI/Components/Compo/Item/SellingItemMan.razor @@ -97,4 +97,4 @@ else } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/JobTask/JobStepMan.razor b/Lux.UI/Components/Compo/JobTask/JobStepMan.razor index 69835e51..54ce4524 100644 --- a/Lux.UI/Components/Compo/JobTask/JobStepMan.razor +++ b/Lux.UI/Components/Compo/JobTask/JobStepMan.razor @@ -176,4 +176,4 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/JobTask/JobStepMan.razor.cs b/Lux.UI/Components/Compo/JobTask/JobStepMan.razor.cs index f99f7984..e5e64a6d 100644 --- a/Lux.UI/Components/Compo/JobTask/JobStepMan.razor.cs +++ b/Lux.UI/Components/Compo/JobTask/JobStepMan.razor.cs @@ -7,7 +7,7 @@ namespace Lux.UI.Components.Compo.JobTask #region Public Properties [Parameter] - public JobTaskModel CurrJob { get; set; } + public JobTaskModel CurrJob { get; set; } = null!; [Parameter] public List CurrRecords { get; set; } = null!; @@ -25,10 +25,10 @@ namespace Lux.UI.Components.Compo.JobTask public List ListAllTags { get; set; } = new List(); [Parameter] - public List ListPhases { get; set; } + public List ListPhases { get; set; } = null!; [Parameter] - public List ListResources { get; set; } + public List ListResources { get; set; } = null!; #endregion Public Properties @@ -197,7 +197,8 @@ namespace Lux.UI.Components.Compo.JobTask /// /// private async Task DoDelete(JobStepModel rec2del) - {; + { + ; mTitle = "Attenzione"; mMessage = $"Sicuro di voler eliminare il record? {rec2del.Description} ({rec2del.JobStepID})"; mMode = BootstrapModal.ModalMode.Confirm; diff --git a/Lux.UI/Components/Compo/JobTask/JobTaskListMan.razor b/Lux.UI/Components/Compo/JobTask/JobTaskListMan.razor index 0f244424..d765deb9 100644 --- a/Lux.UI/Components/Compo/JobTask/JobTaskListMan.razor +++ b/Lux.UI/Components/Compo/JobTask/JobTaskListMan.razor @@ -121,4 +121,4 @@ else } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor b/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor index c5b53943..ea3b7978 100644 --- a/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor +++ b/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor @@ -66,4 +66,4 @@ else
} - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor.cs b/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor.cs index ed901354..82ce2e5c 100644 --- a/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor.cs +++ b/Lux.UI/Components/Compo/JobTask/ResourcesMan.razor.cs @@ -39,7 +39,9 @@ namespace Lux.UI.Components.Compo.JobTask private int currPage = 1; - private ResourceModel? editRecord = null; +#if false + private ResourceModel? editRecord = null; +#endif private bool isLoading = false; @@ -143,7 +145,9 @@ namespace Lux.UI.Components.Compo.JobTask /// private async Task DoReset() { - editRecord = null; +#if false + editRecord = null; +#endif selRecord = null; await ReloadBaseData(); ReloadData(); diff --git a/Lux.UI/Components/Compo/Offer/OfferRowMan.razor b/Lux.UI/Components/Compo/Offer/OfferRowMan.razor index d52d635e..82548732 100644 --- a/Lux.UI/Components/Compo/Offer/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/Offer/OfferRowMan.razor @@ -466,4 +466,4 @@ else } } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs index 60f1d0e6..6195fde2 100644 --- a/Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs @@ -205,10 +205,12 @@ namespace Lux.UI.Components.Compo.Offer /// private OfferRowModel? EditRecord = null; +#if false /// /// Abilita edit massivo record ITEM /// - private bool enableMassEdit = false; + private bool enableMassEdit = false; +#endif private string genericBasePath = ""; @@ -233,12 +235,14 @@ namespace Lux.UI.Components.Compo.Offer private int numRecord = 10; +#if false /// /// Versione originale (pre edit) /// private string origJwd = ""; - private List PreparedFile = new(); + private List PreparedFile = new(); +#endif /// /// Versione precedente JWD x test e confronto diff --git a/Lux.UI/Components/Compo/Order/OrderRowMan.razor b/Lux.UI/Components/Compo/Order/OrderRowMan.razor index 19d7cccc..ed473da0 100644 --- a/Lux.UI/Components/Compo/Order/OrderRowMan.razor +++ b/Lux.UI/Components/Compo/Order/OrderRowMan.razor @@ -567,4 +567,4 @@ else if (WorkLoadRecord != null) } *@ } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Order/OrderRowMan.razor.cs b/Lux.UI/Components/Compo/Order/OrderRowMan.razor.cs index 18d67105..6e4ae73f 100644 --- a/Lux.UI/Components/Compo/Order/OrderRowMan.razor.cs +++ b/Lux.UI/Components/Compo/Order/OrderRowMan.razor.cs @@ -271,10 +271,12 @@ namespace Lux.UI.Components.Compo.Order private string noteCss => EditRecord == null ? "btn-success" : "btn-primary bg-gradient"; +#if false /// /// Versione originale (pre edit) /// - private string origJwd = ""; + private string origJwd = ""; +#endif /// /// Versione precedente JWD x test e confronto diff --git a/Lux.UI/Components/Compo/Planner/BalanceProgGroup.razor b/Lux.UI/Components/Compo/Planner/BalanceProgGroup.razor index 88498d7c..04931a72 100644 --- a/Lux.UI/Components/Compo/Planner/BalanceProgGroup.razor +++ b/Lux.UI/Components/Compo/Planner/BalanceProgGroup.razor @@ -155,4 +155,4 @@
} - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Planner/CalendarPlanner.razor.cs b/Lux.UI/Components/Compo/Planner/CalendarPlanner.razor.cs index 17d583f2..ac8fe7ee 100644 --- a/Lux.UI/Components/Compo/Planner/CalendarPlanner.razor.cs +++ b/Lux.UI/Components/Compo/Planner/CalendarPlanner.razor.cs @@ -148,11 +148,14 @@ namespace Lux.UI.Components.Compo.Planner /// /// Sistemazione colore sfonto di ogni evento mostrato /// - /// - private void OnAppointmentRender(SchedulerAppointmentRenderEventArgs args) + /// + private void OnAppointmentRender(SchedulerAppointmentRenderEventArgs selEv) { - // Never call StateHasChanged in AppointmentRender - would lead to infinite loop - args.Attributes["style"] = $"background: {args.Data.Color}; color: {args.Data.ForeColor};"; + if (selEv.Data != null) + { + // Never call StateHasChanged in AppointmentRender - would lead to infinite loop + selEv.Attributes["style"] = $"background: {selEv.Data.Color}; color: {selEv.Data.ForeColor};"; + } } /// @@ -162,9 +165,11 @@ namespace Lux.UI.Components.Compo.Planner /// private async Task OnAppointmentSelect(SchedulerAppointmentSelectEventArgs selEv) { - var copy = selEv.Data.Clone(); - await Task.Delay(1); - var data = await DialogService.OpenAsync("", new Dictionary { { "ThisTask", copy } }); + if (selEv.Data != null) + { + var copy = selEv.Data.Clone(); + var data = await DialogService.OpenAsync("", new Dictionary { { "ThisTask", copy } }); + } } /// @@ -175,7 +180,10 @@ namespace Lux.UI.Components.Compo.Planner private async Task OnLoadData(SchedulerLoadDataEventArgs args) { await Task.Delay(1); - currView = scheduler.SelectedView.Text.ToLowerInvariant(); + if (scheduler.SelectedView != null) + { + currView = scheduler.SelectedView.Text.ToLowerInvariant(); + } DateTime dtMid = args.Start.AddDays(args.End.Subtract(args.Start).TotalDays / 2); // controllo se sia cambiata data anno precedente... if (dtMid.Year != SelDate.Year) @@ -197,48 +205,53 @@ namespace Lux.UI.Components.Compo.Planner private void OnSlotRender(SchedulerSlotRenderEventArgs args) { - // Highlight today in month view - if (args.View.Text == "Month" && args.Start.Date == DateTime.Today) + if (args.View != null) { - args.Attributes["style"] = "background: var(--rz-scheduler-highlight-background-color, rgba(255,220,40,.2));"; - } + // Highlight today in month view + if (args.View.Text == "Month" && args.Start.Date == DateTime.Today) + { + args.Attributes["style"] = "background: var(--rz-scheduler-highlight-background-color, rgba(255,220,40,.2));"; + } - // Highlight working hours (9-18) - if ((args.View.Text == "Week" || args.View.Text == "Day") && args.Start.Hour > 8 && args.Start.Hour < 19) - { - args.Attributes["style"] = "background: var(--rz-scheduler-highlight-background-color, rgba(255,220,40,.2));"; + // Highlight working hours (9-18) + if ((args.View.Text == "Week" || args.View.Text == "Day") && args.Start.Hour > 8 && args.Start.Hour < 19) + { + args.Attributes["style"] = "background: var(--rz-scheduler-highlight-background-color, rgba(255,220,40,.2));"; + } } } private async Task OnSlotSelect(SchedulerSlotSelectEventArgs args) { int prevIdx = selectedIndex; - await Task.Delay(1); - // verifico indice corretto della vista... - switch (args.View.Text) + if (args.View != null) { - case "Day": - selectedIndex = 0; - break; + // verifico indice corretto della vista... + switch (args.View.Text) + { + case "Day": + selectedIndex = 0; + break; - case "Week": - selectedIndex = 1; - break; + case "Week": + selectedIndex = 1; + break; - case "Month": - selectedIndex = 2; - break; + case "Month": + selectedIndex = 2; + break; - case "Planner": - selectedIndex = 3; - break; + case "Planner": + selectedIndex = 3; + break; - case "Year": - selectedIndex = 4; - break; + case "Year": + selectedIndex = 4; + break; - default: - break; + default: + break; + } } if (prevIdx != selectedIndex) { diff --git a/Lux.UI/Components/Compo/Planner/OdlMan.razor b/Lux.UI/Components/Compo/Planner/OdlMan.razor index 5acba9ae..a3761649 100644 --- a/Lux.UI/Components/Compo/Planner/OdlMan.razor +++ b/Lux.UI/Components/Compo/Planner/OdlMan.razor @@ -15,38 +15,41 @@ - @foreach (var item in AllRecords) + @if (AllRecords != null) { - - - - - - @* + foreach (var item in AllRecords) + { + + + + + + @* @(idx++) *@ - - @item.ProdBatchID - - - @item.OdlTag - - - @item.ProdPlantCod - - - @item.Qty - - - @item.Qty - - - @FormatEstTime(item.EstimTime) - - - + + @item.ProdBatchID + + + @item.OdlTag + + + @item.ProdPlantCod + + + @item.Qty + + + @item.Qty + + + @FormatEstTime(item.EstimTime) + + + + } } @* diff --git a/Lux.UI/Components/Compo/Planner/WLB_Estimated.razor b/Lux.UI/Components/Compo/Planner/WLB_Estimated.razor index a2db8e1c..cb4298ac 100644 --- a/Lux.UI/Components/Compo/Planner/WLB_Estimated.razor +++ b/Lux.UI/Components/Compo/Planner/WLB_Estimated.razor @@ -31,4 +31,4 @@ else } } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Stats/OfferStats.razor b/Lux.UI/Components/Compo/Stats/OfferStats.razor index 4b107ab8..209b1195 100644 --- a/Lux.UI/Components/Compo/Stats/OfferStats.razor +++ b/Lux.UI/Components/Compo/Stats/OfferStats.razor @@ -1,111 +1,116 @@ - -
-
-
-
-
-
- Stato offerte +@if (isLoading) +{ + +} +else +{ +
+
+
+
+
+
+ Stato offerte +
+
- -
-
-
-
-
-
- Venditori +
+
+
+
+
+ Venditori +
+
- -
-
-
-
-
-
-
- Offerte confermate +
+
+
+
+
+
+ Offerte confermate +
-
-
-
-
-
-
- - Margine medio: - @MargineMedio() % +
+
+
+
+
+ + Margine medio: + @MargineMedio() % +
+
+
+
+
+
+
+
+ + Margine min: + @MargineMin() % +
+
+
+
+
+
+
+
+ + Margine max: + @MargineMax() % +
-
-
-
-
- - Margine min: - @MargineMin() % +
+
+
+
+
+ + Finestre/Offerta medio: + @NumFinestreMedio() +
-
-
-
-
-
- - Margine max: - @MargineMax() % +
+
+
+
+ + N° Finestre min: + @NumFinestreMin() +
-
-
-
-
-
-
-
- - Finestre/Offerta medio: - @NumFinestreMedio() -
-
-
-
-
-
-
-
- - N° Finestre min: - @NumFinestreMin() -
-
-
-
-
-
-
-
- - N° Finestre max: - @NumFinestreMax() +
+
+
+
+ + N° Finestre max: + @NumFinestreMax() +
-
- +} diff --git a/Lux.UI/Components/Compo/Stats/OfferStats.razor.cs b/Lux.UI/Components/Compo/Stats/OfferStats.razor.cs index 1c298c03..8d7958f4 100644 --- a/Lux.UI/Components/Compo/Stats/OfferStats.razor.cs +++ b/Lux.UI/Components/Compo/Stats/OfferStats.razor.cs @@ -1,4 +1,3 @@ -using System.Linq; using static EgwCoreLib.Lux.Core.Enums; namespace Lux.UI.Components.Compo.Stats @@ -31,7 +30,7 @@ namespace Lux.UI.Components.Compo.Stats { double ans = 0; var filtRecord = AllRecords.Where(x => x.OffertState.Equals(OfferStates.Confirmed)); - if(filtRecord != null && filtRecord.Count() > 0) + if (filtRecord != null && filtRecord.Count() > 0) ans = Math.Round((filtRecord.Sum(x => x.TotalPrice) - filtRecord.Sum(x => x.TotalCost)) / filtRecord.Sum(x => x.TotalPrice) * 100, 2); return ans; } @@ -41,7 +40,7 @@ namespace Lux.UI.Components.Compo.Stats double ans = 0; var filtRecord = AllRecords.Where(x => x.OffertState.Equals(OfferStates.Confirmed)); if (filtRecord != null && filtRecord.Count() > 0) - ans = Math.Round(filtRecord.Min(x=>x.MaxDiscount) * 100, 2); + ans = Math.Round(filtRecord.Min(x => x.MaxDiscount) * 100, 2); return ans; } @@ -65,7 +64,7 @@ namespace Lux.UI.Components.Compo.Stats private double NumFinestreMin() { - double ans = 0; + double ans = 0; var filtRecord = AllRecords.Where(x => x.OffertState.Equals(OfferStates.Confirmed)); if (filtRecord != null && filtRecord.Count() > 0) ans = filtRecord.Min(x => x.NumItems); @@ -105,12 +104,11 @@ namespace Lux.UI.Components.Compo.Stats FillColors[allStates[i]] = "hsla(0, 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) + //.Where(p => p.OffertState != null) .GroupBy(p => p.OffertState.ToString()) .ToDictionary(g => g.Key, g => (double)g.Count()); @@ -133,7 +131,7 @@ namespace Lux.UI.Components.Compo.Stats } DatasetDealerCount = AllRecords - .Where(p => p.OffertState != null) + //.Where(p => p.OffertState != null) .GroupBy(p => p.DealerNav.LastName) .ToDictionary(g => g.Key, g => (double)g.Count()); diff --git a/Lux.UI/Components/Compo/Stats/RealTimeStats.razor.cs b/Lux.UI/Components/Compo/Stats/RealTimeStats.razor.cs index 62c4da64..423ff8b3 100644 --- a/Lux.UI/Components/Compo/Stats/RealTimeStats.razor.cs +++ b/Lux.UI/Components/Compo/Stats/RealTimeStats.razor.cs @@ -62,7 +62,9 @@ namespace Lux.UI.Components.Compo.Stats private Enums.RuidTagMode SelMode = Enums.RuidTagMode.Envir; - private StatsRealtimeDto? stats; +#if false + private StatsRealtimeDto? stats; +#endif #endregion Private Fields diff --git a/Lux.UI/Components/Compo/Templates/TemplateList.razor b/Lux.UI/Components/Compo/Templates/TemplateList.razor index 4fa017c9..e09ec696 100644 --- a/Lux.UI/Components/Compo/Templates/TemplateList.razor +++ b/Lux.UI/Components/Compo/Templates/TemplateList.razor @@ -94,4 +94,4 @@ else } @* } *@ - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Templates/TemplateRowList.razor b/Lux.UI/Components/Compo/Templates/TemplateRowList.razor index 4e2dee2d..476466b2 100644 --- a/Lux.UI/Components/Compo/Templates/TemplateRowList.razor +++ b/Lux.UI/Components/Compo/Templates/TemplateRowList.razor @@ -161,4 +161,4 @@ else } } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor.cs b/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor.cs index 91526f38..896e6332 100644 --- a/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor.cs +++ b/Lux.UI/Components/Compo/Warehouse/BuyOrderDetail.razor.cs @@ -32,7 +32,9 @@ namespace Lux.UI.Components.Compo.Warehouse #region Private Fields - private bool allSelected = false; +#if false + private bool allSelected = false; +#endif private string apiUrl = ""; diff --git a/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor b/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor index 5cf13fc2..8efd4fac 100644 --- a/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor +++ b/Lux.UI/Components/Compo/Warehouse/BuyOrderList.razor @@ -1,32 +1,39 @@ @inherits BaseComp -
-
-
- @Traduci("fabbisogno_fornitoreOrd") -
-
-
- @Traduci("stato") - +@if (isLoading) +{ + +} +else +{ +
+
+
+ @Traduci("fabbisogno_fornitoreOrd") +
+
+
+ @Traduci("stato") + +
-
-
- @foreach (var item in ListRecords) +
+ @foreach (var item in ListRecords) + { + + } +
+ @if (totalCount > numRecord) { - + }
- @if (totalCount > numRecord) - { - - } -
+} diff --git a/Lux.UI/Components/Compo/Warehouse/MatReqList.razor.cs b/Lux.UI/Components/Compo/Warehouse/MatReqList.razor.cs index dbe00e71..b3222117 100644 --- a/Lux.UI/Components/Compo/Warehouse/MatReqList.razor.cs +++ b/Lux.UI/Components/Compo/Warehouse/MatReqList.razor.cs @@ -142,7 +142,10 @@ namespace Lux.UI.Components.Compo.Warehouse } else { - query = query.Where(x => x.ItemCode.Contains(searchVal, StringComparison.OrdinalIgnoreCase) || (x.ItemID != null && x.ItemNav.Description.Contains(searchVal, StringComparison.OrdinalIgnoreCase))); + query = query.Where(x => + x.ItemCode.Contains(searchVal, StringComparison.OrdinalIgnoreCase) + || (x.ItemID != null && x.ItemNav != null && x.ItemNav.Description.Contains(searchVal, StringComparison.OrdinalIgnoreCase)) + ); } } // effettuo search diff --git a/Lux.UI/Components/Compo/WorkLoad/JobQueue.razor b/Lux.UI/Components/Compo/WorkLoad/JobQueue.razor index ebee16bb..1ca26a41 100644 --- a/Lux.UI/Components/Compo/WorkLoad/JobQueue.razor +++ b/Lux.UI/Components/Compo/WorkLoad/JobQueue.razor @@ -29,7 +29,7 @@ } } - @if (QueuePaged == null || QueuePaged?.Count() == 0) + @if (QueuePaged == null || QueuePaged.Count() == 0) {
  • Nessun Job trovato!
  • } diff --git a/Lux.UI/Components/Compo/WorkLoad/TimeEstim.razor b/Lux.UI/Components/Compo/WorkLoad/TimeEstim.razor index cd652c4c..3c0b06ab 100644 --- a/Lux.UI/Components/Compo/WorkLoad/TimeEstim.razor +++ b/Lux.UI/Components/Compo/WorkLoad/TimeEstim.razor @@ -235,4 +235,4 @@
    - + diff --git a/Lux.UI/Components/Pages/GenList.razor.cs b/Lux.UI/Components/Pages/GenList.razor.cs index b46016dc..66980d40 100644 --- a/Lux.UI/Components/Pages/GenList.razor.cs +++ b/Lux.UI/Components/Pages/GenList.razor.cs @@ -16,7 +16,9 @@ namespace Lux.UI.Components.Pages #region Private Fields - private ItemModel? editRecord = null; +#if false + private ItemModel? editRecord = null; +#endif private bool isLoading = false; private List ListGenClass = new List(); @@ -83,7 +85,7 @@ namespace Lux.UI.Components.Pages { SelCodGroup = codGroup; } - + #endregion Private Methods } } \ No newline at end of file diff --git a/Lux.UI/Components/Pages/OffStats.razor b/Lux.UI/Components/Pages/OffStats.razor index 87f4a9aa..c6e890f1 100644 --- a/Lux.UI/Components/Pages/OffStats.razor +++ b/Lux.UI/Components/Pages/OffStats.razor @@ -1,38 +1,46 @@ @page "/OffStats" @inherits BaseComp -
    -
    - - - @Traduci("navMan_offerte") - -
    -
    - Da: - - A: - +@if (isLoading) +{ + +} +else +{ +
    +
    + + + @Traduci("navMan_offerte") + +
    +
    + Da: + - + A: + + + +
    +
    + +
    -
    - -
    -
    +} @*
    diff --git a/Lux.UI/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor index 33bd04fa..3442b94f 100644 --- a/Lux.UI/Components/Pages/Offers.razor +++ b/Lux.UI/Components/Pages/Offers.razor @@ -284,4 +284,4 @@ else { } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Pages/Offers.razor.cs b/Lux.UI/Components/Pages/Offers.razor.cs index 0bc56e33..fa376a8f 100644 --- a/Lux.UI/Components/Pages/Offers.razor.cs +++ b/Lux.UI/Components/Pages/Offers.razor.cs @@ -166,7 +166,7 @@ namespace Lux.UI.Components.Pages private IProdService PService { get; set; } = null!; [Inject] - private NavigationManager NavigationManager { get;set; } = null!; + private NavigationManager NavigationManager { get; set; } = null!; private string txtState { @@ -229,7 +229,7 @@ namespace Lux.UI.Components.Pages private void DoAdd() { - int refNum = AllRecords.Where(x=>x.RefYear == DateTime.Today.Year).Max(x=>x.RefNum) + 1; + int refNum = AllRecords.Where(x => x.RefYear == DateTime.Today.Year).Max(x => x.RefNum) + 1; EditRecord = new OfferModel() { RefYear = DateTime.Today.Year, @@ -498,7 +498,7 @@ namespace Lux.UI.Components.Pages bool needCalc = false; // recupero elenco items collegati alla riga d'ordine var ProdList = await PIService.GetByOrderRowAsync(rigaOrd.OrderRowID); - List TagList = ProdList.Select(x => x.ProdItemTag).ToList(); + List TagList = ProdList.Select(x => x.ProdItemTag ?? "").ToList(); //string serTagList = JsonConvert.SerializeObject(TagList); string serTagList = string.Join(",", TagList); // preparo richiesta serializzata e la accodo (viene inviata richiesta calcolo) diff --git a/Lux.UI/Components/Pages/Orders.razor b/Lux.UI/Components/Pages/Orders.razor index 2f68b13d..8031d7e1 100644 --- a/Lux.UI/Components/Pages/Orders.razor +++ b/Lux.UI/Components/Pages/Orders.razor @@ -163,7 +163,8 @@ else @foreach (var sType in Enum.GetValues(typeof(EgwCoreLib.Lux.Core.Enums.OrderStates))) { - + @* *@ + }
    @@ -364,4 +365,4 @@ else } - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Pages/Orders.razor.cs b/Lux.UI/Components/Pages/Orders.razor.cs index 3bd87d0e..82f9dccd 100644 --- a/Lux.UI/Components/Pages/Orders.razor.cs +++ b/Lux.UI/Components/Pages/Orders.razor.cs @@ -84,7 +84,9 @@ namespace Lux.UI.Components.Pages private int totalCount = 0; - private string txtStyle = "font-size: 1.2em; font-weight:bold; fill: white;"; +#if false + private string txtStyle = "font-size: 1.2em; font-weight:bold; fill: white;"; +#endif private BootstrapModal Modal = new(); private string mTitle = ""; @@ -360,7 +362,7 @@ namespace Lux.UI.Components.Pages var ProdList = await PIService.GetByOrderRowAsync(rigaOrd.OrderRowID); if (ProdList != null && ProdList.Count > 0) { - TagsList = ProdList.Select(x => x.ProdItemTag).ToList(); + TagsList = ProdList.Select(x => x.ProdItemTag ?? "").ToList(); } //string serTagList = JsonConvert.SerializeObject(TagList); string serTagList = string.Join(",", TagsList); diff --git a/Lux.UI/Components/Pages/Vocabulary.razor b/Lux.UI/Components/Pages/Vocabulary.razor index 6ea290a0..871232cf 100644 --- a/Lux.UI/Components/Pages/Vocabulary.razor +++ b/Lux.UI/Components/Pages/Vocabulary.razor @@ -51,5 +51,5 @@
    - + diff --git a/Lux.UI/Components/Pages/Vocabulary.razor.cs b/Lux.UI/Components/Pages/Vocabulary.razor.cs index b56ac330..9169115d 100644 --- a/Lux.UI/Components/Pages/Vocabulary.razor.cs +++ b/Lux.UI/Components/Pages/Vocabulary.razor.cs @@ -16,12 +16,14 @@ namespace Lux.UI.Components.Pages #region Private Fields - private bool addNew = false; private VocabolarioModel? currRec = null; - private List FiltVocab = new(); private List FullVocab = new(); private bool isLoading = false; - private string langDef = "IT"; +#if false + private List FiltVocab = new(); + private bool addNew = false; + private string langDef = "IT"; +#endif private List ListLingue = new(); private string SearchVal = ""; @@ -32,8 +34,10 @@ namespace Lux.UI.Components.Pages private string btnResetCss => string.IsNullOrEmpty(SearchVal) ? "btn-secondary" : "btn-primary"; +#if false [Inject] - private IVocabolarioService VService { get; set; } = null!; + private IVocabolarioService VService { get; set; } = null!; +#endif #endregion Private Properties diff --git a/Lux.UI/Components/Pages/WorkLoadBalance.razor b/Lux.UI/Components/Pages/WorkLoadBalance.razor index 468ec630..13de7ecc 100644 --- a/Lux.UI/Components/Pages/WorkLoadBalance.razor +++ b/Lux.UI/Components/Pages/WorkLoadBalance.razor @@ -51,4 +51,4 @@
    - \ No newline at end of file + \ No newline at end of file diff --git a/Lux.UI/Components/Pages/WorkLoadBalance.razor.cs b/Lux.UI/Components/Pages/WorkLoadBalance.razor.cs index 9365475f..a4d3824a 100644 --- a/Lux.UI/Components/Pages/WorkLoadBalance.razor.cs +++ b/Lux.UI/Components/Pages/WorkLoadBalance.razor.cs @@ -1,7 +1,6 @@ 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; @@ -517,79 +516,81 @@ namespace Lux.UI.Components.Pages var currPOR = ListEstimRecords?.FirstOrDefault(x => x.OrderRowID == prodGroupItem.OrderRowID) ?? new OrderRowModel(); var currRec = await OrdService.GetByIdAsync(currPOR.OrderID, true); - - var dictReq = new Dictionary(); - // verifico se ho 1 sola macchina o molte... - int numMacc = prodGroupItem.WorkGroupList.Count; - if (numMacc == 1) + if (currRec != null) { - // SE vuoto il nome --> manual! - var curRec = prodGroupItem.WorkGroupList.FirstOrDefault(); - string mName = string.IsNullOrEmpty(curRec.Key) ? "Manual" : curRec.Key; - dictReq.Add(mName, 1); - balData.MachineBalance = dictReq; - balData.TagList = curRec.Value.TagList; - } - else - { - List tagList = new(); - foreach (var cMacc in prodGroupItem.WorkGroupList) + var dictReq = new Dictionary(); + // verifico se ho 1 sola macchina o molte... + int numMacc = prodGroupItem.WorkGroupList.Count; + if (numMacc == 1) { - dictReq.Add(cMacc.Key, 1.0 / numMacc); - tagList.AddRange(cMacc.Value.TagList); + // SE vuoto il nome --> manual! + var curRec = prodGroupItem.WorkGroupList.FirstOrDefault(); + string mName = string.IsNullOrEmpty(curRec.Key) ? "Manual" : curRec.Key; + dictReq.Add(mName, 1); + balData.MachineBalance = dictReq; + balData.TagList = curRec.Value.TagList; } - // verifico tags distinct - balData.MachineBalance = dictReq; - balData.TagList = tagList.Distinct().ToList(); + else + { + List tagList = new(); + foreach (var cMacc in prodGroupItem.WorkGroupList) + { + dictReq.Add(cMacc.Key, 1.0 / numMacc); + tagList.AddRange(cMacc.Value.TagList); + } + // verifico tags distinct + balData.MachineBalance = dictReq; + balData.TagList = tagList.Distinct().ToList(); + } + + // preparo oggetto richiesta + Egw.Window.Data.Enums.QuestionModes cMode = Egw.Window.Data.Enums.QuestionModes.ORDER; + Egw.Window.Data.Enums.QuestionOrderSubModes cSubMode = Egw.Window.Data.Enums.QuestionOrderSubModes.BALANCE; + string reqKey = ""; + // preparo la richiesta di bilanciamento + CalcRequestDTO calcReq = new CalcRequestDTO(); + // elenco tags ricevuto... + List TagList = balData.TagList; + string serTagList = string.Join(",", TagList); + + // preparo richiesta serializzata e la accodo (viene inviata richiesta calcolo) + Dictionary dictArgs = new Dictionary(); + // creo registrazione richiesta... + var ruid = await CRService.AddRequestAsync($"{currPOR.Envir}", $"{(int)cMode}-{(int)cSubMode}", currPOR.OrderRowUID); + dictArgs.Add("UID", currPOR.OrderRowUID); + dictArgs.Add("Group", $"{prodGroupItem.GrpIdx}"); + // aggiungo RUID effettivo + dictArgs.Add("RUID", ruid); + dictArgs.Add("OrderUID", currRec.OrderCode); + dictArgs.Add("Mode", $"{(int)cMode}"); + dictArgs.Add("SubMode", $"{(int)cSubMode}"); + dictArgs.Add("TagList", serTagList); + // serializzo la richiesta di bilanciamento... + string reqBalance = JsonConvert.SerializeObject(balData.MachineBalance); + dictArgs.Add("ReqBalance", reqBalance); + dictArgs.Add("BarLenght", $"{balData.BarLenght}"); + calcReq = new CalcRequestDTO() + { + DictExec = dictArgs, + EnvType = currPOR.Envir + }; + // chiave: composta da cMode, submode, UID riga... + reqKey = $"{cMode}:{cSubMode}:{currPOR.OrderRowUID}.{prodGroupItem.GrpIdx}"; + // invio richiesta + await PService.EnqueueRequestAsync("Balance", reqKey, calcReq); + // parto dalla history attuale + var currHist = currRec.LogHistory; + // aggiungo evento... + currHist.Add(new TaskHistDTO() + { + DtEvent = DateTime.Now, + UserName = "Default User", + Message = $"{reqKey}", + IconCss = "fa-solid fa-hourglass-start" + }); + currRec.LogHistory = currHist; + await OrdService.UpsertAsync(currRec); } - - // preparo oggetto richiesta - Egw.Window.Data.Enums.QuestionModes cMode = Egw.Window.Data.Enums.QuestionModes.ORDER; - Egw.Window.Data.Enums.QuestionOrderSubModes cSubMode = Egw.Window.Data.Enums.QuestionOrderSubModes.BALANCE; - string reqKey = ""; - // preparo la richiesta di bilanciamento - CalcRequestDTO calcReq = new CalcRequestDTO(); - // elenco tags ricevuto... - List TagList = balData.TagList; - string serTagList = string.Join(",", TagList); - - // preparo richiesta serializzata e la accodo (viene inviata richiesta calcolo) - Dictionary dictArgs = new Dictionary(); - // creo registrazione richiesta... - var ruid = await CRService.AddRequestAsync($"{currPOR.Envir}", $"{(int)cMode}-{(int)cSubMode}", currPOR.OrderRowUID); - dictArgs.Add("UID", currPOR.OrderRowUID); - dictArgs.Add("Group", $"{prodGroupItem.GrpIdx}"); - // aggiungo RUID effettivo - dictArgs.Add("RUID", ruid); - dictArgs.Add("OrderUID", currRec.OrderCode); - dictArgs.Add("Mode", $"{(int)cMode}"); - dictArgs.Add("SubMode", $"{(int)cSubMode}"); - dictArgs.Add("TagList", serTagList); - // serializzo la richiesta di bilanciamento... - string reqBalance = JsonConvert.SerializeObject(balData.MachineBalance); - dictArgs.Add("ReqBalance", reqBalance); - dictArgs.Add("BarLenght", $"{balData.BarLenght}"); - calcReq = new CalcRequestDTO() - { - DictExec = dictArgs, - EnvType = currPOR.Envir - }; - // chiave: composta da cMode, submode, UID riga... - reqKey = $"{cMode}:{cSubMode}:{currPOR.OrderRowUID}.{prodGroupItem.GrpIdx}"; - // invio richiesta - await PService.EnqueueRequestAsync("Balance", reqKey, calcReq); - // parto dalla history attuale - var currHist = currRec.LogHistory; - // aggiungo evento... - currHist.Add(new TaskHistDTO() - { - DtEvent = DateTime.Now, - UserName = "Default User", - Message = $"{reqKey}", - IconCss = "fa-solid fa-hourglass-start" - }); - currRec.LogHistory = currHist; - await OrdService.UpsertAsync(currRec); } } @@ -619,7 +620,7 @@ namespace Lux.UI.Components.Pages { 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(); @@ -632,7 +633,7 @@ namespace Lux.UI.Components.Pages // { // ListOdl = ListOdlAll.Where(x => x.Envir.ToString() == searchValByEnvir).ToList(); // } - } + } /// /// Filtro e paginazione @@ -646,7 +647,7 @@ namespace Lux.UI.Components.Pages .Take(numRecord) .ToList(); #endif - } + } #if false @@ -659,8 +660,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/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 331d912f..a532e2c6 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.1015 + 1.1.2606.1016 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 8231b4f2..488c12b7 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

    Versione: 1.1.2606.1015

    +

    Versione: 1.1.2606.1016


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index efdbc7cc..ab064b36 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2606.1015 +1.1.2606.1016 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 9af4e942..b68667e2 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2606.1015 + 1.1.2606.1016 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false