From c0715374245c916f80f5da44dd99999d60fed664 Mon Sep 17 00:00:00 2001 From: Annamaria Sassi Date: Tue, 24 Mar 2026 13:26:25 +0100 Subject: [PATCH 01/11] Layout Template --- Lux.UI/Components/Pages/Template.razor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lux.UI/Components/Pages/Template.razor b/Lux.UI/Components/Pages/Template.razor index 674f92bc..3e5c3614 100644 --- a/Lux.UI/Components/Pages/Template.razor +++ b/Lux.UI/Components/Pages/Template.razor @@ -30,7 +30,7 @@
-
+
@if (isLoading) { @@ -39,7 +39,7 @@ { @if (!fullPageDetail) { -
+
Cataloghi @@ -52,7 +52,7 @@ } @if (SelRecord != null) { -
+
@if (fullPageDetail) From c80e6dbf480fe41210abb8015bf2574faedad592 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 24 Mar 2026 16:01:22 +0100 Subject: [PATCH 02/11] Fix gestione note offerta (inseribili dopo riga item) --- .../Repository/Sales/OfferRowRepository.cs | 40 +++++++++++++++---- Lux.UI/Components/Compo/OfferRowMan.razor | 38 +++++++++--------- Lux.UI/Components/Compo/OfferRowMan.razor.cs | 3 +- 3 files changed, 54 insertions(+), 27 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Repository/Sales/OfferRowRepository.cs b/EgwCoreLib.Lux.Data/Repository/Sales/OfferRowRepository.cs index 3a45672a..b53f0dd4 100644 --- a/EgwCoreLib.Lux.Data/Repository/Sales/OfferRowRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Sales/OfferRowRepository.cs @@ -19,9 +19,35 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales public async Task AddAsync(OfferRowModel entity) { - await using var dbCtx = await CreateContextAsync(); - await dbCtx.DbSetOfferRow.AddAsync(entity); - return await dbCtx.SaveChangesAsync() > 0; + await using var dbCtx = await CreateContextAsync(); await using var tx = await dbCtx.Database.BeginTransactionAsync(); + try + { + // SE ci fossero righe di indice pari o superiore le deve spostare... + // 2. Recupero i record successivi da shiftare + var list2Move = await dbCtx.DbSetOfferRow + .Where(x => x.OfferID == entity.OfferID && x.RowNum >= entity.RowNum) + .ToListAsync(); + + // aggiungo record + await dbCtx.DbSetOfferRow.AddAsync(entity); + foreach (var item in list2Move) + { + item.RowNum++; + dbCtx.Entry(item).State = EntityState.Modified; + } + + bool done = await dbCtx.SaveChangesAsync() > 0; + + if (done) + await tx.CommitAsync(); + + return done; + } + catch + { + await tx.RollbackAsync(); + throw; + } } public async Task DeleteAsync(OfferRowModel entity) @@ -57,13 +83,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -125,13 +151,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index f8a53a01..1674b3ab 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -47,7 +47,7 @@ else
- +
} @@ -120,7 +120,7 @@ else { bool isBuy = (item.SellingItemID > 2 && item.SellingItemID < 5); - + @if (DisplayMode == DisplayMode.Preview) { @if (isBuy) @@ -141,27 +141,27 @@ else } else { - - - - @if (DisplayMode == DisplayMode.Edit) - { - if (CurrEditMode == EditMode.None) + + + + @if (DisplayMode == DisplayMode.Edit) { - - + if (CurrEditMode == EditMode.None) + { + + + } + else + { + if (EditRecord != null && EditRecord.OfferRowID == item.OfferRowID) + { + + } + } } else { - if (EditRecord != null && EditRecord.OfferRowID == item.OfferRowID) - { - - } - } - } - else - { - @item.RowNum + @item.RowNum } } diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs index a352906d..1efb16e6 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs @@ -6,7 +6,6 @@ using EgwCoreLib.Lux.Data.DbModel.Config; using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Domains; -using EgwCoreLib.Lux.Data.Services; using EgwCoreLib.Lux.Data.Services.Config; using EgwCoreLib.Lux.Data.Services.General; using EgwCoreLib.Lux.Data.Services.Items; @@ -418,6 +417,8 @@ namespace Lux.UI.Components.Compo #region Private Methods + private string noteCss => EditRecord == null ? "btn-success" : "btn-primary bg-gradient"; + /// /// Effettua vera richiesta della BOM /// From 4b5c8b22524dc989809eb5425a2bc6ada6773494 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 24 Mar 2026 16:01:34 +0100 Subject: [PATCH 03/11] Update gesitone async contesto di transazione su DB --- .../Repository/Catalog/TemplateRepository.cs | 10 +++++----- .../Repository/Catalog/TemplateRowRepository.cs | 10 +++++----- .../Repository/Items/ItemRepository.cs | 6 ++++-- .../Repository/Job/JobStepRepository.cs | 8 ++++---- .../Repository/Job/JobTaskRepository.cs | 12 ++++++------ .../Production/ProductionGroupRepository.cs | 3 ++- .../Production/ProductionItemRepository.cs | 6 +++--- .../Repository/Sales/OfferRepository.cs | 8 ++++---- .../Repository/Sales/OrderRepository.cs | 4 ++-- .../Repository/Sales/OrderRowRepository.cs | 16 ++++++++-------- .../Repository/Stats/StatsAggrRepository.cs | 4 ++-- .../Repository/Stats/StatsDetailRepository.cs | 4 ++-- .../Repository/Utils/GenValRepository.cs | 8 ++++---- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 18 files changed, 56 insertions(+), 53 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Repository/Catalog/TemplateRepository.cs b/EgwCoreLib.Lux.Data/Repository/Catalog/TemplateRepository.cs index 98639826..bcef13f3 100644 --- a/EgwCoreLib.Lux.Data/Repository/Catalog/TemplateRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Catalog/TemplateRepository.cs @@ -46,7 +46,7 @@ namespace EgwCoreLib.Lux.Data.Repository.Utils if (currRec == null) { - tx.Rollback(); + await tx.RollbackAsync(); return false; } @@ -99,12 +99,12 @@ namespace EgwCoreLib.Lux.Data.Repository.Utils // 5. Salvo tutto in transazione bool done = await dbCtx.SaveChangesAsync() > 0; - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -170,12 +170,12 @@ namespace EgwCoreLib.Lux.Data.Repository.Utils dbCtx.Entry(row).State = EntityState.Modified; bool done = await dbCtx.SaveChangesAsync() > 0; - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Catalog/TemplateRowRepository.cs b/EgwCoreLib.Lux.Data/Repository/Catalog/TemplateRowRepository.cs index dcff5ff7..b58c1617 100644 --- a/EgwCoreLib.Lux.Data/Repository/Catalog/TemplateRowRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Catalog/TemplateRowRepository.cs @@ -40,7 +40,7 @@ namespace EgwCoreLib.Lux.Data.Repository.Utils if (currRec == null) { - tx.Rollback(); + await tx.RollbackAsync(); return false; } @@ -89,12 +89,12 @@ namespace EgwCoreLib.Lux.Data.Repository.Utils dbCtx.DbSetTemplateRow.Add(newRec); bool done = await dbCtx.SaveChangesAsync() > 0; - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -143,12 +143,12 @@ namespace EgwCoreLib.Lux.Data.Repository.Utils dbCtx.Entry(row).State = EntityState.Modified; bool done = await dbCtx.SaveChangesAsync() > 0; - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Items/ItemRepository.cs b/EgwCoreLib.Lux.Data/Repository/Items/ItemRepository.cs index 50e498e6..4197575a 100644 --- a/EgwCoreLib.Lux.Data/Repository/Items/ItemRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Items/ItemRepository.cs @@ -266,11 +266,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Items } } } - return await dbCtx.SaveChangesAsync() > 0; + bool done = await dbCtx.SaveChangesAsync() > 0; + await tx.CommitAsync(); + return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Job/JobStepRepository.cs b/EgwCoreLib.Lux.Data/Repository/Job/JobStepRepository.cs index 4594e370..618e3603 100644 --- a/EgwCoreLib.Lux.Data/Repository/Job/JobStepRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Job/JobStepRepository.cs @@ -54,13 +54,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Job bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -126,13 +126,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Job bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Job/JobTaskRepository.cs b/EgwCoreLib.Lux.Data/Repository/Job/JobTaskRepository.cs index 989cc405..aec819c2 100644 --- a/EgwCoreLib.Lux.Data/Repository/Job/JobTaskRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Job/JobTaskRepository.cs @@ -54,13 +54,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Job bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -125,13 +125,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Job bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -177,13 +177,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Job bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Production/ProductionGroupRepository.cs b/EgwCoreLib.Lux.Data/Repository/Production/ProductionGroupRepository.cs index 6bcf42bf..175cd57b 100644 --- a/EgwCoreLib.Lux.Data/Repository/Production/ProductionGroupRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Production/ProductionGroupRepository.cs @@ -117,13 +117,14 @@ namespace EgwCoreLib.Lux.Data.Repository.Production // salvo TUTTI i cambiamenti... answ = await dbCtx.SaveChangesAsync() > 0; + await tx.CommitAsync(); } } return answ; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Production/ProductionItemRepository.cs b/EgwCoreLib.Lux.Data/Repository/Production/ProductionItemRepository.cs index 46ec6de3..5e90c571 100644 --- a/EgwCoreLib.Lux.Data/Repository/Production/ProductionItemRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Production/ProductionItemRepository.cs @@ -39,7 +39,7 @@ namespace EgwCoreLib.Lux.Data.Repository.Production } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } return totUpd; @@ -74,7 +74,7 @@ namespace EgwCoreLib.Lux.Data.Repository.Production } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } return totUpd; @@ -106,7 +106,7 @@ namespace EgwCoreLib.Lux.Data.Repository.Production } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } return numItem; diff --git a/EgwCoreLib.Lux.Data/Repository/Sales/OfferRepository.cs b/EgwCoreLib.Lux.Data/Repository/Sales/OfferRepository.cs index 99c51145..ace18426 100644 --- a/EgwCoreLib.Lux.Data/Repository/Sales/OfferRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Sales/OfferRepository.cs @@ -145,12 +145,12 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales // 5. Salvo tutto in transazione await dbCtx.SaveChangesAsync(); - tx.Commit(); + await tx.CommitAsync(); return true; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -230,13 +230,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Sales/OrderRepository.cs b/EgwCoreLib.Lux.Data/Repository/Sales/OrderRepository.cs index a2c76d7b..b96aa5e0 100644 --- a/EgwCoreLib.Lux.Data/Repository/Sales/OrderRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Sales/OrderRepository.cs @@ -251,13 +251,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Sales/OrderRowRepository.cs b/EgwCoreLib.Lux.Data/Repository/Sales/OrderRowRepository.cs index 7e130ca3..16f4e832 100644 --- a/EgwCoreLib.Lux.Data/Repository/Sales/OrderRowRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Sales/OrderRowRepository.cs @@ -61,13 +61,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -146,13 +146,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -335,13 +335,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -379,13 +379,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Sales bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return numDone; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Stats/StatsAggrRepository.cs b/EgwCoreLib.Lux.Data/Repository/Stats/StatsAggrRepository.cs index fb72381a..a744771f 100644 --- a/EgwCoreLib.Lux.Data/Repository/Stats/StatsAggrRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Stats/StatsAggrRepository.cs @@ -90,7 +90,7 @@ namespace EgwCoreLib.Lux.Data.Repository.Stats answ = await dbCtx.SaveChangesAsync(); // commit transazione - tx.Commit(); + await tx.CommitAsync(); // libero memoria del changeTracker dbCtx.ChangeTracker.Clear(); @@ -98,7 +98,7 @@ namespace EgwCoreLib.Lux.Data.Repository.Stats } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Stats/StatsDetailRepository.cs b/EgwCoreLib.Lux.Data/Repository/Stats/StatsDetailRepository.cs index cf5e3e5a..66177392 100644 --- a/EgwCoreLib.Lux.Data/Repository/Stats/StatsDetailRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Stats/StatsDetailRepository.cs @@ -114,7 +114,7 @@ namespace EgwCoreLib.Lux.Data.Repository.Stats // salvo! answ = await dbCtx.SaveChangesAsync(); // commit transazione - tx.Commit(); + await tx.CommitAsync(); // libero memoria del changeTracker dbCtx.ChangeTracker.Clear(); @@ -122,7 +122,7 @@ namespace EgwCoreLib.Lux.Data.Repository.Stats } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/EgwCoreLib.Lux.Data/Repository/Utils/GenValRepository.cs b/EgwCoreLib.Lux.Data/Repository/Utils/GenValRepository.cs index 86ea0dbe..5c469981 100644 --- a/EgwCoreLib.Lux.Data/Repository/Utils/GenValRepository.cs +++ b/EgwCoreLib.Lux.Data/Repository/Utils/GenValRepository.cs @@ -58,13 +58,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Utils bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } @@ -131,13 +131,13 @@ namespace EgwCoreLib.Lux.Data.Repository.Utils bool done = await dbCtx.SaveChangesAsync() > 0; if (done) - tx.Commit(); + await tx.CommitAsync(); return done; } catch { - tx.Rollback(); + await tx.RollbackAsync(); throw; } } diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 7ba61125..41ed9054 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2603.2413 + 1.1.2603.2415 diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 28b4048b..f6fec38b 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.2603.2413 + 1.1.2603.2415 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index aa9aebf3..06f0e3ec 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 1.1.2603.2413

+

Versione: 1.1.2603.2415


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 8bfe751d..39bd7c4e 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2603.2413 +1.1.2603.2415 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 62fd45ad..62fc8c64 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2603.2413 + 1.1.2603.2415 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 742243a5359ce0882eb0854a4c1bb31f85b81abd Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 24 Mar 2026 16:20:39 +0100 Subject: [PATCH 04/11] Fix gestione immagini offerta --- .../DbModel/Sales/OfferRowModel.cs | 11 +----- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/OfferRowMan.razor | 35 +++++++++++-------- Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 7 files changed, 27 insertions(+), 29 deletions(-) diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs index cb5c09dc..bc196957 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/OfferRowModel.cs @@ -57,6 +57,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales /// [NotMapped] public bool IsNote => SellingItemID == null; + /// /// Riferimento (opzionale) al template da cui è derivato /// @@ -69,16 +70,6 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales public bool CalcEnabled { get => ImgType == ImageType.Calculated; -#if false - { - bool answ = false; - if (SellingItemNav != null) - { - answ = SellingItemNav.SourceType == ItemSourceType.Jwd || SellingItemNav.SourceType == ItemSourceType.FileBTL; - } - return answ; - } -#endif } /// diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 41ed9054..e9706570 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2603.2415 + 1.1.2603.2416 diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor index 1674b3ab..99f3e5cd 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor +++ b/Lux.UI/Components/Compo/OfferRowMan.razor @@ -118,18 +118,13 @@ else @foreach (var item in ListRecords) { - bool isBuy = (item.SellingItemID > 2 && item.SellingItemID < 5); @if (DisplayMode == DisplayMode.Preview) { - @if (isBuy) + if (item.CalcEnabled) { - - } - else - { - @if (item.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW) + if (item.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW) { } @@ -138,6 +133,15 @@ else } } + else + { + if (!item.IsNote) + { + + + } + } + } else { @@ -185,13 +189,9 @@ else @if (DisplayMode == DisplayMode.Edit) { - @if (isBuy) + @if (item.CalcEnabled) { - - } - else - { - @if (item.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW) + if (item.Envir == EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW) { } @@ -200,6 +200,13 @@ else } } + else + { + if (!item.IsNote) + { + + } + } } @@ -230,7 +237,7 @@ else } }
  • - @if (!isBuy) + @if (item.CalcEnabled) { @if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName)) { diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index f6fec38b..01131db8 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.2603.2415 + 1.1.2603.2416 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 06f0e3ec..76795990 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

    Versione: 1.1.2603.2415

    +

    Versione: 1.1.2603.2416


    Note di rilascio:
    • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 39bd7c4e..dcdc8499 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2603.2415 +1.1.2603.2416 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 62fc8c64..b4ad1a90 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2603.2415 + 1.1.2603.2416 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false From 29765b910c63bec387548724294e9b0161a31fc9 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 24 Mar 2026 16:25:00 +0100 Subject: [PATCH 05/11] Update gestione offerte + spostamento in components --- Lux.UI/Components/Compo/{ => Offer}/OfferMan.razor | 0 Lux.UI/Components/Compo/{ => Offer}/OfferMan.razor.cs | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename Lux.UI/Components/Compo/{ => Offer}/OfferMan.razor (100%) rename Lux.UI/Components/Compo/{ => Offer}/OfferMan.razor.cs (100%) diff --git a/Lux.UI/Components/Compo/OfferMan.razor b/Lux.UI/Components/Compo/Offer/OfferMan.razor similarity index 100% rename from Lux.UI/Components/Compo/OfferMan.razor rename to Lux.UI/Components/Compo/Offer/OfferMan.razor diff --git a/Lux.UI/Components/Compo/OfferMan.razor.cs b/Lux.UI/Components/Compo/Offer/OfferMan.razor.cs similarity index 100% rename from Lux.UI/Components/Compo/OfferMan.razor.cs rename to Lux.UI/Components/Compo/Offer/OfferMan.razor.cs From c1db6ca7afacfcdbb56e19846f696e0c8b0f4e6a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 24 Mar 2026 16:25:53 +0100 Subject: [PATCH 06/11] Update spostamento componenti offerta --- Lux.UI/Components/Compo/Offer/OfferMan.razor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lux.UI/Components/Compo/Offer/OfferMan.razor.cs b/Lux.UI/Components/Compo/Offer/OfferMan.razor.cs index c54300f2..fb3e2c1a 100644 --- a/Lux.UI/Components/Compo/Offer/OfferMan.razor.cs +++ b/Lux.UI/Components/Compo/Offer/OfferMan.razor.cs @@ -4,7 +4,7 @@ using EgwCoreLib.Lux.Data.DbModel.Sales; using EgwCoreLib.Lux.Data.Services.Sales; using Microsoft.AspNetCore.Components; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Offer { /// /// Componente per la gestione delle offerte. From 1e6efc742fff8a9c9865c6766f102016faf65640 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 24 Mar 2026 16:29:23 +0100 Subject: [PATCH 07/11] Continuo spostamenti offer --- Lux.UI/Components/Compo/{ => Offer}/OfferCheck.razor | 0 Lux.UI/Components/Compo/{ => Offer}/OfferCommonPar.razor | 0 Lux.UI/Components/Compo/{ => Offer}/OfferCommonPar.razor.cs | 3 +-- Lux.UI/Components/Compo/{ => Offer}/OfferDelivery.razor | 0 Lux.UI/Components/Compo/{ => Offer}/OfferDelivery.razor.cs | 2 +- Lux.UI/Components/Compo/{ => Offer}/OfferRowMan.razor | 0 Lux.UI/Components/Compo/{ => Offer}/OfferRowMan.razor.cs | 2 +- 7 files changed, 3 insertions(+), 4 deletions(-) rename Lux.UI/Components/Compo/{ => Offer}/OfferCheck.razor (100%) rename Lux.UI/Components/Compo/{ => Offer}/OfferCommonPar.razor (100%) rename Lux.UI/Components/Compo/{ => Offer}/OfferCommonPar.razor.cs (99%) rename Lux.UI/Components/Compo/{ => Offer}/OfferDelivery.razor (100%) rename Lux.UI/Components/Compo/{ => Offer}/OfferDelivery.razor.cs (98%) rename Lux.UI/Components/Compo/{ => Offer}/OfferRowMan.razor (100%) rename Lux.UI/Components/Compo/{ => Offer}/OfferRowMan.razor.cs (99%) diff --git a/Lux.UI/Components/Compo/OfferCheck.razor b/Lux.UI/Components/Compo/Offer/OfferCheck.razor similarity index 100% rename from Lux.UI/Components/Compo/OfferCheck.razor rename to Lux.UI/Components/Compo/Offer/OfferCheck.razor diff --git a/Lux.UI/Components/Compo/OfferCommonPar.razor b/Lux.UI/Components/Compo/Offer/OfferCommonPar.razor similarity index 100% rename from Lux.UI/Components/Compo/OfferCommonPar.razor rename to Lux.UI/Components/Compo/Offer/OfferCommonPar.razor diff --git a/Lux.UI/Components/Compo/OfferCommonPar.razor.cs b/Lux.UI/Components/Compo/Offer/OfferCommonPar.razor.cs similarity index 99% rename from Lux.UI/Components/Compo/OfferCommonPar.razor.cs rename to Lux.UI/Components/Compo/Offer/OfferCommonPar.razor.cs index 3c88583e..1046d3c3 100644 --- a/Lux.UI/Components/Compo/OfferCommonPar.razor.cs +++ b/Lux.UI/Components/Compo/Offer/OfferCommonPar.razor.cs @@ -1,13 +1,12 @@ using EgwCoreLib.Lux.Core; using EgwCoreLib.Lux.Core.RestPayload; using EgwCoreLib.Lux.Data.DbModel.Sales; -using EgwCoreLib.Lux.Data.Services; using EgwCoreLib.Lux.Data.Services.Config; using EgwCoreLib.Lux.Data.Services.General; using EgwCoreLib.Lux.Data.Services.Utils; using Microsoft.AspNetCore.Components; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Offer { public partial class OfferCommonPar { diff --git a/Lux.UI/Components/Compo/OfferDelivery.razor b/Lux.UI/Components/Compo/Offer/OfferDelivery.razor similarity index 100% rename from Lux.UI/Components/Compo/OfferDelivery.razor rename to Lux.UI/Components/Compo/Offer/OfferDelivery.razor diff --git a/Lux.UI/Components/Compo/OfferDelivery.razor.cs b/Lux.UI/Components/Compo/Offer/OfferDelivery.razor.cs similarity index 98% rename from Lux.UI/Components/Compo/OfferDelivery.razor.cs rename to Lux.UI/Components/Compo/Offer/OfferDelivery.razor.cs index 339a101e..ce31f479 100644 --- a/Lux.UI/Components/Compo/OfferDelivery.razor.cs +++ b/Lux.UI/Components/Compo/Offer/OfferDelivery.razor.cs @@ -2,7 +2,7 @@ using EgwCoreLib.Lux.Core; using EgwCoreLib.Lux.Data.DbModel.Sales; using Microsoft.AspNetCore.Components; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Offer { public partial class OfferDelivery { diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/Offer/OfferRowMan.razor similarity index 100% rename from Lux.UI/Components/Compo/OfferRowMan.razor rename to Lux.UI/Components/Compo/Offer/OfferRowMan.razor diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs similarity index 99% rename from Lux.UI/Components/Compo/OfferRowMan.razor.cs rename to Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs index 1efb16e6..35df0fcd 100644 --- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs +++ b/Lux.UI/Components/Compo/Offer/OfferRowMan.razor.cs @@ -21,7 +21,7 @@ using WebWindowComplex.DTO; using static EgwCoreLib.Lux.Core.Enums; using static WebWindowComplex.LayoutConst; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Offer { public partial class OfferRowMan : IDisposable { From 2e40246d1fbb637f807dc720755a7dc6dc520876 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 24 Mar 2026 16:34:48 +0100 Subject: [PATCH 08/11] Move common e order compo --- .../Compo/{ => Common}/EditBom.razor | 0 .../Compo/{ => Common}/EditBom.razor.cs | 70 +++++++++---------- .../Compo/{ => Common}/EditJob.razor | 0 .../Compo/{ => Order}/OrderRowMan.razor | 0 .../Compo/{ => Order}/OrderRowMan.razor.cs | 2 +- Lux.UI/Components/_Imports.razor | 2 + 6 files changed, 36 insertions(+), 38 deletions(-) rename Lux.UI/Components/Compo/{ => Common}/EditBom.razor (100%) rename Lux.UI/Components/Compo/{ => Common}/EditBom.razor.cs (96%) rename Lux.UI/Components/Compo/{ => Common}/EditJob.razor (100%) rename Lux.UI/Components/Compo/{ => Order}/OrderRowMan.razor (100%) rename Lux.UI/Components/Compo/{ => Order}/OrderRowMan.razor.cs (99%) diff --git a/Lux.UI/Components/Compo/EditBom.razor b/Lux.UI/Components/Compo/Common/EditBom.razor similarity index 100% rename from Lux.UI/Components/Compo/EditBom.razor rename to Lux.UI/Components/Compo/Common/EditBom.razor diff --git a/Lux.UI/Components/Compo/EditBom.razor.cs b/Lux.UI/Components/Compo/Common/EditBom.razor.cs similarity index 96% rename from Lux.UI/Components/Compo/EditBom.razor.cs rename to Lux.UI/Components/Compo/Common/EditBom.razor.cs index 06ab8229..ee34e6a4 100644 --- a/Lux.UI/Components/Compo/EditBom.razor.cs +++ b/Lux.UI/Components/Compo/Common/EditBom.razor.cs @@ -6,7 +6,7 @@ using EgwCoreLib.Lux.Data.Services.Items; using EgwMultiEngineManager.Data; using Microsoft.AspNetCore.Components; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Common { public partial class EditBom { @@ -26,29 +26,8 @@ namespace Lux.UI.Components.Compo #endregion Public Properties - #region Protected Properties - - protected bool showMassEditSave - { - get => bomDict != null && bomDict.Any(x => x.isSelected); - } - - #endregion Protected Properties - #region Protected Methods - protected async Task ForceItemPrice() - { - isLoading = true; - // chiamo metodo update x i soli valori selezionati... - var list2upd = bomDict.Where(x => x.isSelected).Cast().ToList(); - await IService.MassUpdateAsync(list2upd, totCost, (double)defMargin, defQtyMax, defUM, defRound); - // ...e passo al controller parent LINQ projection to base type - List baseList = bomDict.Cast().ToList(); - await EC_Updated.InvokeAsync(baseList); - SelAll = false; - } - /// /// Conversione oggetti x editing /// @@ -86,6 +65,20 @@ namespace Lux.UI.Components.Compo #endregion Protected Methods + #region Protected Classes + + protected class BomDtoSel : BomItemDTO + { + #region Public Properties + + public bool isSelected { get; set; } = false; + public int numRow { get; set; } = 1; + + #endregion Public Properties + } + + #endregion Protected Classes + #region Private Fields /// @@ -121,20 +114,6 @@ namespace Lux.UI.Components.Compo #endregion Private Fields - #region Protected Classes - - protected class BomDtoSel : BomItemDTO - { - #region Public Properties - - public bool isSelected { get; set; } = false; - public int numRow { get; set; } = 1; - - #endregion Public Properties - } - - #endregion Protected Classes - #region Private Properties [Inject] @@ -185,6 +164,11 @@ namespace Lux.UI.Components.Compo } } + private bool showMassEditSave + { + get => bomDict != null && bomDict.Any(x => x.isSelected); + } + private bool ShowVolume { get => CurrRowRec.Envir == Constants.EXECENVIRONMENTS.BEAM || CurrRowRec.Envir == Constants.EXECENVIRONMENTS.WALL; @@ -248,7 +232,7 @@ namespace Lux.UI.Components.Compo /// /// Salvataggio con conversion a list + ritorno a parent /// - private async Task DoSave() + private Task DoSave() { isLoading = true; // aggiorno l'oggetto nel mio dizionario @@ -261,7 +245,19 @@ namespace Lux.UI.Components.Compo DoCancel(); // ...e passo al controller parent LINQ projection to base type List baseList = bomDict.Cast().ToList(); + return EC_Updated.InvokeAsync(baseList); + } + + private async Task ForceItemPrice() + { + isLoading = true; + // chiamo metodo update x i soli valori selezionati... + var list2upd = bomDict.Where(x => x.isSelected).Cast().ToList(); + await IService.MassUpdateAsync(list2upd, totCost, (double)defMargin, defQtyMax, defUM, defRound); + // ...e passo al controller parent LINQ projection to base type + List baseList = bomDict.Cast().ToList(); await EC_Updated.InvokeAsync(baseList); + SelAll = false; } private void SaveNumRec(int newNum) diff --git a/Lux.UI/Components/Compo/EditJob.razor b/Lux.UI/Components/Compo/Common/EditJob.razor similarity index 100% rename from Lux.UI/Components/Compo/EditJob.razor rename to Lux.UI/Components/Compo/Common/EditJob.razor diff --git a/Lux.UI/Components/Compo/OrderRowMan.razor b/Lux.UI/Components/Compo/Order/OrderRowMan.razor similarity index 100% rename from Lux.UI/Components/Compo/OrderRowMan.razor rename to Lux.UI/Components/Compo/Order/OrderRowMan.razor diff --git a/Lux.UI/Components/Compo/OrderRowMan.razor.cs b/Lux.UI/Components/Compo/Order/OrderRowMan.razor.cs similarity index 99% rename from Lux.UI/Components/Compo/OrderRowMan.razor.cs rename to Lux.UI/Components/Compo/Order/OrderRowMan.razor.cs index 50004d6f..5a3b6d98 100644 --- a/Lux.UI/Components/Compo/OrderRowMan.razor.cs +++ b/Lux.UI/Components/Compo/Order/OrderRowMan.razor.cs @@ -22,7 +22,7 @@ using WebWindowComplex; using WebWindowComplex.DTO; using static EgwCoreLib.Lux.Core.Enums; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Order { public partial class OrderRowMan : IDisposable { diff --git a/Lux.UI/Components/_Imports.razor b/Lux.UI/Components/_Imports.razor index bf78c609..d7da4442 100644 --- a/Lux.UI/Components/_Imports.razor +++ b/Lux.UI/Components/_Imports.razor @@ -21,11 +21,13 @@ @using Lux.UI.Components.Compo @* @using Lux.UI.Components.Compo.Base *@ @using Lux.UI.Components.Compo.Charts +@using Lux.UI.Components.Compo.Common @using Lux.UI.Components.Compo.Config @using Lux.UI.Components.Compo.FileMan @using Lux.UI.Components.Compo.Item @using Lux.UI.Components.Compo.JobTask @using Lux.UI.Components.Compo.Offer +@using Lux.UI.Components.Compo.Order @using Lux.UI.Components.Compo.Planner @using Lux.UI.Components.Compo.WorkLoad @using Radzen From d8abf28daa105984ac3467bbf586a0e18f415b9e Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 24 Mar 2026 16:38:41 +0100 Subject: [PATCH 09/11] Spostamento compo generic --- .../Compo/{ => Common}/CmpFooter.razor | 0 .../Compo/{ => Common}/CmpFooter.razor.cs | 49 ++++++++++--------- .../Compo/{ => Generic}/GenClassMan.razor | 0 .../Compo/{ => Generic}/GenClassMan.razor.cs | 2 +- .../Compo/{ => Generic}/GenValMan.razor | 0 .../Compo/{ => Generic}/GenValMan.razor.cs | 2 +- Lux.UI/Components/_Imports.razor | 1 + Lux.UI/Lux.UI.csproj | 1 + 8 files changed, 29 insertions(+), 26 deletions(-) rename Lux.UI/Components/Compo/{ => Common}/CmpFooter.razor (100%) rename Lux.UI/Components/Compo/{ => Common}/CmpFooter.razor.cs (84%) rename Lux.UI/Components/Compo/{ => Generic}/GenClassMan.razor (100%) rename Lux.UI/Components/Compo/{ => Generic}/GenClassMan.razor.cs (99%) rename Lux.UI/Components/Compo/{ => Generic}/GenValMan.razor (100%) rename Lux.UI/Components/Compo/{ => Generic}/GenValMan.razor.cs (99%) diff --git a/Lux.UI/Components/Compo/CmpFooter.razor b/Lux.UI/Components/Compo/Common/CmpFooter.razor similarity index 100% rename from Lux.UI/Components/Compo/CmpFooter.razor rename to Lux.UI/Components/Compo/Common/CmpFooter.razor diff --git a/Lux.UI/Components/Compo/CmpFooter.razor.cs b/Lux.UI/Components/Compo/Common/CmpFooter.razor.cs similarity index 84% rename from Lux.UI/Components/Compo/CmpFooter.razor.cs rename to Lux.UI/Components/Compo/Common/CmpFooter.razor.cs index cbbf5dff..f7481f05 100644 --- a/Lux.UI/Components/Compo/CmpFooter.razor.cs +++ b/Lux.UI/Components/Compo/Common/CmpFooter.razor.cs @@ -1,4 +1,4 @@ -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Common { public partial class CmpFooter : IDisposable { @@ -16,15 +16,30 @@ namespace Lux.UI.Components.Compo #endregion Public Methods - #region Protected Fields - - protected DateTime adesso = DateTime.Now; - - #endregion Protected Fields - #region Protected Methods - protected void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e) + protected override void OnInitialized() + { + var rawVers = typeof(Program).Assembly.GetName().Version; + version = rawVers != null ? rawVers : new Version("0.0.0.0"); + StartTimer(); + } + + #endregion Protected Methods + + #region Private Fields + + private DateTime adesso = DateTime.Now; + + private System.Timers.Timer aTimer = null!; + + private Version? version = null!; + + #endregion Private Fields + + #region Private Methods + + private void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e) { var pUpd = Task.Run(async () => { @@ -34,14 +49,7 @@ namespace Lux.UI.Components.Compo pUpd.Wait(); } - protected override void OnInitialized() - { - var rawVers = typeof(Program).Assembly.GetName().Version; - version = rawVers != null ? rawVers : new Version("0.0.0.0"); - StartTimer(); - } - - protected void StartTimer() + private void StartTimer() { if (aTimer != null) { @@ -59,13 +67,6 @@ namespace Lux.UI.Components.Compo aTimer.Start(); } - #endregion Protected Methods - - #region Private Fields - - private System.Timers.Timer aTimer = null!; - private Version? version = null!; - - #endregion Private Fields + #endregion Private Methods } } \ No newline at end of file diff --git a/Lux.UI/Components/Compo/GenClassMan.razor b/Lux.UI/Components/Compo/Generic/GenClassMan.razor similarity index 100% rename from Lux.UI/Components/Compo/GenClassMan.razor rename to Lux.UI/Components/Compo/Generic/GenClassMan.razor diff --git a/Lux.UI/Components/Compo/GenClassMan.razor.cs b/Lux.UI/Components/Compo/Generic/GenClassMan.razor.cs similarity index 99% rename from Lux.UI/Components/Compo/GenClassMan.razor.cs rename to Lux.UI/Components/Compo/Generic/GenClassMan.razor.cs index 6cab0396..0f6e72e8 100644 --- a/Lux.UI/Components/Compo/GenClassMan.razor.cs +++ b/Lux.UI/Components/Compo/Generic/GenClassMan.razor.cs @@ -3,7 +3,7 @@ using EgwCoreLib.Lux.Data.Services.Utils; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Generic { public partial class GenClassMan { diff --git a/Lux.UI/Components/Compo/GenValMan.razor b/Lux.UI/Components/Compo/Generic/GenValMan.razor similarity index 100% rename from Lux.UI/Components/Compo/GenValMan.razor rename to Lux.UI/Components/Compo/Generic/GenValMan.razor diff --git a/Lux.UI/Components/Compo/GenValMan.razor.cs b/Lux.UI/Components/Compo/Generic/GenValMan.razor.cs similarity index 99% rename from Lux.UI/Components/Compo/GenValMan.razor.cs rename to Lux.UI/Components/Compo/Generic/GenValMan.razor.cs index a7921f17..de09a1cc 100644 --- a/Lux.UI/Components/Compo/GenValMan.razor.cs +++ b/Lux.UI/Components/Compo/Generic/GenValMan.razor.cs @@ -3,7 +3,7 @@ using EgwCoreLib.Lux.Data.Services.Utils; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; -namespace Lux.UI.Components.Compo +namespace Lux.UI.Components.Compo.Generic { public partial class GenValMan { diff --git a/Lux.UI/Components/_Imports.razor b/Lux.UI/Components/_Imports.razor index d7da4442..44ffb3c3 100644 --- a/Lux.UI/Components/_Imports.razor +++ b/Lux.UI/Components/_Imports.razor @@ -24,6 +24,7 @@ @using Lux.UI.Components.Compo.Common @using Lux.UI.Components.Compo.Config @using Lux.UI.Components.Compo.FileMan +@using Lux.UI.Components.Compo.Generic @using Lux.UI.Components.Compo.Item @using Lux.UI.Components.Compo.JobTask @using Lux.UI.Components.Compo.Offer diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 01131db8..bb59795a 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -55,6 +55,7 @@ + From b0e1dcee8a2c2748b205e0065eb699d81f4d4b0f Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 24 Mar 2026 16:41:19 +0100 Subject: [PATCH 10/11] Fix GenValMan/GenList --- .../Compo/Generic/GenValMan.razor.cs | 181 +++++++++--------- Lux.UI/Components/Pages/GenList.razor.cs | 59 +++--- 2 files changed, 116 insertions(+), 124 deletions(-) diff --git a/Lux.UI/Components/Compo/Generic/GenValMan.razor.cs b/Lux.UI/Components/Compo/Generic/GenValMan.razor.cs index de09a1cc..ecfb8eec 100644 --- a/Lux.UI/Components/Compo/Generic/GenValMan.razor.cs +++ b/Lux.UI/Components/Compo/Generic/GenValMan.razor.cs @@ -59,30 +59,77 @@ namespace Lux.UI.Components.Compo.Generic #endregion Public Classes - #region Protected Fields - - protected List AllRecords = new List(); - protected List ListRecords = new List(); - - #endregion Protected Fields - - #region Protected Properties - - [Inject] - protected IGenValService GVService { get; set; } = null!; - - [Inject] - protected IJSRuntime JSRuntime { get; set; } = null!; - - #endregion Protected Properties - #region Protected Methods + protected override async Task OnParametersSetAsync() + { + if (!SelFilt.Equals(actFilt) || true) + { + actFilt = SelFilt; + await ReloadDataAsync(); + UpdateTable(); + } + } + + #endregion Protected Methods + + #region Private Fields + + private FiltSelect actFilt = new FiltSelect(); + + private List AllRecords = new List(); + + private int currPage = 1; + + private GenValueModel? EditRecord = null; + + private bool isLoading = false; + + private List ListRecords = new List(); + + private int numRecord = 10; + + private GenValueModel? SelRecord = null; + + private int totalCount = 0; + + #endregion Private Fields + + #region Private Properties + + [Inject] + private IGenValService GVService { get; set; } = null!; + + [Inject] + private IJSRuntime JSRuntime { get; set; } = null!; + + #endregion Private Properties + + #region Private Methods + + private Task DoAdd() + { + // aggiungo un nuovo record in coda... + EditRecord = new GenValueModel() + { + ClassCod = actFilt.SelCodGroup, + ValString = $"Nuovo-{DateTime.Now:yy.MM.ss HH.mm.ss}", + Index = totalCount + 1 + }; + return DoSave(EditRecord); + } + + private async Task DoCancel() + { + await ResetEdit(); + UpdateTable(); + } + /// /// Clona record /// /// - protected void DoClone(GenValueModel curRec) + private void DoClone(GenValueModel curRec) { #if false editRecord = new ItemModel() @@ -108,7 +155,7 @@ namespace Lux.UI.Components.Compo.Generic /// impossta record x eliminazione /// /// - protected async Task DoDelete(GenValueModel selRec) + private async Task DoDelete(GenValueModel selRec) { if (!await JSRuntime.InvokeAsync("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.ClassCod} | {selRec.ValString}")) return; @@ -126,7 +173,7 @@ namespace Lux.UI.Components.Compo.Generic /// Edit articolo selezionato /// /// - protected void DoEdit(GenValueModel curRec) + private void DoEdit(GenValueModel curRec) { EditRecord = curRec; } @@ -134,82 +181,11 @@ namespace Lux.UI.Components.Compo.Generic /// /// Reset selezione /// - protected void DoReset() + private void DoReset() { EditRecord = null; } - /// - /// Selezione articolo x display info - /// - /// - protected void DoSelect(GenValueModel curRec) - { - SelRecord = curRec; - } - - protected override async Task OnParametersSetAsync() - { - if (!SelFilt.Equals(actFilt) || true) - { - actFilt = SelFilt; - await ReloadDataAsync(); - UpdateTable(); - } - } - - protected void SaveNumRec(int newNum) - { - numRecord = newNum; - UpdateTable(); - } - - protected void SavePage(int newNum) - { - currPage = newNum; - UpdateTable(); - } - - #endregion Protected Methods - - #region Private Fields - - private FiltSelect actFilt = new FiltSelect(); - - private int currPage = 1; - - private GenValueModel? EditRecord = null; - - private bool isLoading = false; - - private int numRecord = 10; - - private GenValueModel? SelRecord = null; - - private int totalCount = 0; - - #endregion Private Fields - - #region Private Methods - - private Task DoAdd() - { - // aggiungo un nuovo record in coda... - EditRecord = new GenValueModel() - { - ClassCod = actFilt.SelCodGroup, - ValString = $"Nuovo-{DateTime.Now:yy.MM.ss HH.mm.ss}", - Index = totalCount + 1 - }; - return DoSave(EditRecord); - } - - private async Task DoCancel() - { - await ResetEdit(); - UpdateTable(); - } - private async Task DoSave(GenValueModel currRec) { // salvo @@ -220,6 +196,15 @@ namespace Lux.UI.Components.Compo.Generic SelRecord = null; } + /// + /// Selezione articolo x display info + /// + /// + private void DoSelect(GenValueModel curRec) + { + SelRecord = curRec; + } + /// /// Esegue spostamento /// @@ -262,6 +247,18 @@ namespace Lux.UI.Components.Compo.Generic return ReloadDataAsync(); } + private void SaveNumRec(int newNum) + { + numRecord = newNum; + UpdateTable(); + } + + private void SavePage(int newNum) + { + currPage = newNum; + UpdateTable(); + } + /// /// Filtro e paginazione /// diff --git a/Lux.UI/Components/Pages/GenList.razor.cs b/Lux.UI/Components/Pages/GenList.razor.cs index 0165d74c..916d61a6 100644 --- a/Lux.UI/Components/Pages/GenList.razor.cs +++ b/Lux.UI/Components/Pages/GenList.razor.cs @@ -1,27 +1,39 @@ using EgwCoreLib.Lux.Data.DbModel.Items; using EgwCoreLib.Lux.Data.DbModel.Utils; using EgwCoreLib.Lux.Data.Services.Utils; -using Lux.UI.Components.Compo; +using Lux.UI.Components.Compo.Generic; using Microsoft.AspNetCore.Components; namespace Lux.UI.Components.Pages { public partial class GenList { - #region Protected Fields + #region Protected Methods - protected List ListGenClass = new List(); + protected override Task OnInitializedAsync() + { + isLoading = true; + return ReloadBaseData(); + } - #endregion Protected Fields + #endregion Protected Methods - #region Protected Properties + #region Private Fields - protected GenValMan.FiltSelect CurrFilt { get; set; } = new GenValMan.FiltSelect(); + private ItemModel? editRecord = null; + private bool isLoading = false; + private List ListGenClass = new List(); + + #endregion Private Fields + + #region Private Properties + + private GenValMan.FiltSelect CurrFilt { get; set; } = new GenValMan.FiltSelect(); [Inject] - protected IGenClassService DLService { get; set; } = null!; + private IGenClassService DLService { get; set; } = null!; - protected string SearchVal + private string SearchVal { get => CurrFilt.SearchVal; set @@ -32,7 +44,7 @@ namespace Lux.UI.Components.Pages } } - protected string SelCodGroup + private string SelCodGroup { get => CurrFilt.SelCodGroup; set @@ -46,29 +58,7 @@ namespace Lux.UI.Components.Pages } } - #endregion Protected Properties - - #region Protected Methods - - protected override Task OnInitializedAsync() - { - isLoading = true; - return ReloadBaseData(); - } - - protected void ResetSearch() - { - SearchVal = ""; - } - - #endregion Protected Methods - - #region Private Fields - - private ItemModel? editRecord = null; - private bool isLoading = false; - - #endregion Private Fields + #endregion Private Properties #region Private Methods @@ -84,6 +74,11 @@ namespace Lux.UI.Components.Pages isLoading = false; } + private void ResetSearch() + { + SearchVal = ""; + } + private void SaveSel(string codGroup) { SelCodGroup = codGroup; From 2fda59f6f0df68d54d6187e616a17b923ce12637 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 24 Mar 2026 16:42:49 +0100 Subject: [PATCH 11/11] Rimozione compo inutilizzato --- Lux.UI/Components/Compo/Component.razor | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Lux.UI/Components/Compo/Component.razor diff --git a/Lux.UI/Components/Compo/Component.razor b/Lux.UI/Components/Compo/Component.razor deleted file mode 100644 index e69de29b..00000000