Gestione cloning articoli OK

This commit is contained in:
2025-09-16 18:30:38 +02:00
parent 6180629985
commit 914aacf475
7 changed files with 34 additions and 5 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.9.2509.1617</Version>
<Version>0.9.2509.1618</Version>
</PropertyGroup>
<ItemGroup>
+1
View File
@@ -40,6 +40,7 @@ else
<td class="text-start text-nowrap">
<button class="btn btn-sm btn-primary" @onclick="() => DoSelect(item)"><i class="fa-solid fa-magnifying-glass"></i></button>
<button class="btn btn-sm btn-info" @onclick="() => DoEdit(item)"><i class="fa-solid fa-pencil"></i></button>
<button class="btn btn-sm @doCloneCss(item)" @onclick="() => DoClone(item)"><i class="fa-solid fa-clone"></i></button>
</td>
<td>@item.ItemID</td>
<td>
+28
View File
@@ -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;
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
<Version>0.9.2509.1617</Version>
<Version>0.9.2509.1618</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>LUX - Web Windows MES</i>
<h4>Versione: 0.9.2509.1617</h4>
<h4>Versione: 0.9.2509.1618</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
0.9.2509.1617
0.9.2509.1618
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.9.2509.1617</version>
<version>0.9.2509.1618</version>
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory>