Buy Items: fix clone con evento tornato a parent
Template: fix display righe cancellabili/non cancellabili
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>1.1.2605.1109</Version>
|
||||
<Version>1.1.2605.1111</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -36,7 +36,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>
|
||||
<button class="btn btn-sm @cloneBtnCss(item)" @onclick="() => DoClone(item)"><i class="fa-solid fa-clone"></i></button>
|
||||
</td>
|
||||
<td>@item.ItemID</td>
|
||||
<td>
|
||||
|
||||
@@ -41,19 +41,17 @@ namespace Lux.UI.Components.Compo.Item
|
||||
private bool isLoading = false;
|
||||
private List<ItemModel> ListRecords = new List<ItemModel>();
|
||||
|
||||
private string mMessage = "";
|
||||
private BootstrapModal.ModalMode mMode = BootstrapModal.ModalMode.ND;
|
||||
private BootstrapModal Modal = new();
|
||||
private Dictionary<bool, string> modalOpt = new Dictionary<bool, string>();
|
||||
private string mTitle = "";
|
||||
private int numRecord = 10;
|
||||
|
||||
private ItemModel? selRecord = null;
|
||||
|
||||
private int totalCount = 0;
|
||||
|
||||
private BootstrapModal Modal = new();
|
||||
private string mTitle = "";
|
||||
private string mMessage = "";
|
||||
private BootstrapModal.ModalMode mMode = BootstrapModal.ModalMode.ND;
|
||||
|
||||
private Dictionary<bool, string> modalOpt = new Dictionary<bool, string>();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
@@ -71,11 +69,16 @@ namespace Lux.UI.Components.Compo.Item
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private string cloneBtnCss(ItemModel item)
|
||||
{
|
||||
return item.ItemType == Enums.ItemClassType.Bom ? "btn-warning" : "btn-success";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clona articolo
|
||||
/// </summary>
|
||||
/// <param name="curRec"></param>
|
||||
private void DoClone(ItemModel curRec)
|
||||
private Task DoClone(ItemModel curRec)
|
||||
{
|
||||
editRecord = new ItemModel()
|
||||
{
|
||||
@@ -93,11 +96,8 @@ namespace Lux.UI.Components.Compo.Item
|
||||
QtyMax = curRec.QtyMax,
|
||||
UM = curRec.UM
|
||||
};
|
||||
}
|
||||
|
||||
private string doCloneCss(ItemModel item)
|
||||
{
|
||||
return item.ItemType == Enums.ItemClassType.Bom ? "btn-warning" : "btn-success";
|
||||
return EC_EditReq.InvokeAsync(editRecord);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -108,7 +108,7 @@ namespace Lux.UI.Components.Compo.Item
|
||||
{
|
||||
mTitle = "Attenzione";
|
||||
mMessage = "Sicuro di voler eliminare il record?\n" +
|
||||
$"Dettagli: { selRec.ItemID} | { selRec.CodGroup} | { selRec.ItemType} | { selRec.ExtItemCode}";
|
||||
$"Dettagli: {selRec.ItemID} | {selRec.CodGroup} | {selRec.ItemType} | {selRec.ExtItemCode}";
|
||||
mMode = BootstrapModal.ModalMode.Confirm;
|
||||
modalOpt = new();
|
||||
modalOpt.Add(true, "Si");
|
||||
@@ -144,16 +144,6 @@ namespace Lux.UI.Components.Compo.Item
|
||||
return EC_EditReq.InvokeAsync(editRecord);
|
||||
}
|
||||
|
||||
#if false
|
||||
private async Task DoSave(ItemModel currRec)
|
||||
{
|
||||
// salvo
|
||||
await DLService.ItemUpsertAsync(currRec);
|
||||
await ResetEdit();
|
||||
UpdateTable();
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Selezione articolo x display info
|
||||
/// </summary>
|
||||
|
||||
@@ -66,7 +66,14 @@ else
|
||||
<td>@item.NumItems</td>
|
||||
}
|
||||
<td class="text-end">
|
||||
<button class="btn btn-sm btn-danger" title="Elimina" @onclick="() => DoDelete(item)"><i class="fa-solid fa-trash"></i></button>
|
||||
@if (item.TemplateRowNav.Any())
|
||||
{
|
||||
<button class="btn btn-sm btn-secondary" title="Eliminazione non permessa: child rec presenti"><i class="fa-solid fa-trash"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-danger" title="Elimina" @onclick="() => DoDelete(item)"><i class="fa-solid fa-trash"></i></button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace Lux.UI.Components.Compo.Templates
|
||||
{
|
||||
ConfInit();
|
||||
prevJwd = "";
|
||||
|
||||
|
||||
await ReloadBaseList();
|
||||
DLService.PipeUpdate.EA_NewMessage += PipeUpdate_EA_NewMessage;
|
||||
DLService.PipePng.EA_NewMessage += PipePng_EA_NewMessage;
|
||||
@@ -553,7 +553,7 @@ namespace Lux.UI.Components.Compo.Templates
|
||||
private async Task DoDelete(TemplateRowModel curRec)
|
||||
{
|
||||
mTitle = "Attenzione";
|
||||
mMessage = $"Confermi di voler eliminare il template selezionato?\n" +
|
||||
mMessage = $"Confermi di voler eliminare il template selezionato?\n" +
|
||||
$"Env: {curRec.Envir} | {curRec.Name}";
|
||||
mMode = BootstrapModal.ModalMode.Confirm;
|
||||
modalOpt = new();
|
||||
@@ -561,6 +561,7 @@ namespace Lux.UI.Components.Compo.Templates
|
||||
modalOpt.Add(false, "No");
|
||||
if (!await Modal!.ShowAsync<bool>())
|
||||
return;
|
||||
|
||||
await TRService.DeleteAsync(curRec);
|
||||
// elimino cache img
|
||||
await ICService.DeleteSvgAsync(curRec.TemplateRowUID, curRec.Envir);
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
|
||||
<Version>1.1.2605.1109</Version>
|
||||
<Version>1.1.2605.1111</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>LUX - Web Windows MES</i>
|
||||
<h4>Versione: 1.1.2605.1109</h4>
|
||||
<h4>Versione: 1.1.2605.1111</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2605.1109
|
||||
1.1.2605.1111
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2605.1109</version>
|
||||
<version>1.1.2605.1111</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>
|
||||
|
||||
Reference in New Issue
Block a user