From 914aacf4754e90d2dbf97e38cb6909a2f45f9ec4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 16 Sep 2025 18:30:38 +0200 Subject: [PATCH] Gestione cloning articoli OK --- Lux.API/Lux.API.csproj | 2 +- Lux.UI/Components/Compo/ItemMan.razor | 1 + Lux.UI/Components/Compo/ItemMan.razor.cs | 28 ++++++++++++++++++++++++ Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 7 files changed, 34 insertions(+), 5 deletions(-) diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 1abc831..eeb52b5 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2509.1617 + 0.9.2509.1618 diff --git a/Lux.UI/Components/Compo/ItemMan.razor b/Lux.UI/Components/Compo/ItemMan.razor index 2f730ed..b357573 100644 --- a/Lux.UI/Components/Compo/ItemMan.razor +++ b/Lux.UI/Components/Compo/ItemMan.razor @@ -40,6 +40,7 @@ else + @item.ItemID diff --git a/Lux.UI/Components/Compo/ItemMan.razor.cs b/Lux.UI/Components/Compo/ItemMan.razor.cs index e67abda..8b6ad54 100644 --- a/Lux.UI/Components/Compo/ItemMan.razor.cs +++ b/Lux.UI/Components/Compo/ItemMan.razor.cs @@ -3,6 +3,7 @@ using EgwCoreLib.Lux.Data.DbModel; using EgwCoreLib.Lux.Data.Services; using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; +using NLog.LayoutRenderers; namespace Lux.UI.Components.Compo { @@ -108,6 +109,33 @@ namespace Lux.UI.Components.Compo editRecord = curRec; } + private string doCloneCss(ItemModel item) + { + return item.ItemType == Enums.ItemClassType.Bom ? "btn-warning" : "btn-success"; + } + + + protected void DoClone(ItemModel curRec) + { + editRecord = new ItemModel() + { + ItemIDParent = curRec.ItemType == Enums.ItemClassType.Bom ? curRec.ItemID : curRec.ItemIDParent, + CodGroup = curRec.CodGroup, + ItemType = curRec.ItemType == Enums.ItemClassType.Bom ? Enums.ItemClassType.BomAlt : curRec.ItemType, + IsService = curRec.IsService, + ItemCode = curRec.ItemCode, + ExtItemCode = $"{curRec.ExtItemCode} - COPY", + SupplCode = curRec.ItemType == Enums.ItemClassType.Bom ? $"{curRec.SupplCode} ALT": curRec.SupplCode, + Description = $"{curRec.Description} - COPY", + Cost = curRec.Cost, + Margin = curRec.Margin, + QtyMin = curRec.QtyMin, + QtyMax = curRec.QtyMax, + UM = curRec.UM + }; + } + + protected void DoReset() { editRecord = null; diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index eaddd3e..7075389 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 - 0.9.2509.1617 + 0.9.2509.1618 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 7b29793..6e36b28 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2509.1617

+

Versione: 0.9.2509.1618


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index c552ca9..b5f6530 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -0.9.2509.1617 +0.9.2509.1618 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index b8eb8dd..b2a6613 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 0.9.2509.1617 + 0.9.2509.1618 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false