Update gestione display btn BOM
This commit is contained in:
@@ -157,7 +157,8 @@ else
|
||||
}
|
||||
<td class="small">
|
||||
<div>@item.OfferRowUID</div>
|
||||
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2)
|
||||
@* @if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2) *@
|
||||
@if(ShowBom(item))
|
||||
{
|
||||
<button class="btn btn-sm btn-primary" @onclick="() => RequestBom(item)" title="Richiesta ricalcolo BOM">
|
||||
BOM <i class="fa-solid fa-arrow-right-arrow-left pe-2"></i>
|
||||
|
||||
@@ -4,6 +4,7 @@ using EgwCoreLib.Lux.Data.DbModel.Config;
|
||||
using EgwCoreLib.Lux.Data.DbModel.Sales;
|
||||
using EgwCoreLib.Lux.Data.DbModel.Utils;
|
||||
using EgwCoreLib.Lux.Data.Services;
|
||||
using Lux.UI.Components.Pages;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
@@ -1086,10 +1087,12 @@ namespace Lux.UI.Components.Compo
|
||||
DictExec.Add("UID", currRec.OfferRowUID);
|
||||
DictExec.Add(serKey, currRec.SerStruct);
|
||||
|
||||
// aggiungo comunque filename...
|
||||
DictExec.Add("FileName", $"{currRec.FileName}");
|
||||
|
||||
CalcRequestDTO req = new CalcRequestDTO()
|
||||
{
|
||||
EnvType = currRec.Envir,
|
||||
//EnvType = currEnv,
|
||||
DictExec = DictExec
|
||||
};
|
||||
|
||||
@@ -1236,6 +1239,35 @@ namespace Lux.UI.Components.Compo
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifia ammissibilità display btn ricalcolo BOM da item
|
||||
/// </summary>
|
||||
/// <param name="reqItem"></param>
|
||||
/// <returns></returns>
|
||||
private bool ShowBom(OfferRowModel reqItem)
|
||||
{
|
||||
bool answ = false;
|
||||
if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
|
||||
{
|
||||
switch (reqItem.Envir)
|
||||
{
|
||||
case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW:
|
||||
answ = string.IsNullOrEmpty(reqItem.SerStruct) && reqItem.SerStruct.Length > 2;
|
||||
break;
|
||||
case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM:
|
||||
case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL:
|
||||
case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET:
|
||||
// da cambiare con ricerca file su disco?!?
|
||||
answ = string.IsNullOrEmpty(reqItem.SerStruct) && reqItem.SerStruct.Length > 2;
|
||||
break;
|
||||
case EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.NULL:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Filtro e paginazione
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user