Fix display carico ordini con card + check invio req balance (manca gestione errore in return)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>1.1.2605.2915</Version>
|
||||
<Version>1.1.2605.2916</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@using EgwCoreLib.Lux.Data.DbModel.Sales
|
||||
@using WebWindowComplex.Compo
|
||||
|
||||
<ul class="list-group mb-2 shadow">
|
||||
@* <ul class="list-group mb-2 shadow">
|
||||
<li class="list-group-item @currCss d-flex justify-content-between align-items-center">
|
||||
<div class="px-0 fw-bold">@CurrPOR.OrderRowUID <button class="btn btn-info btn-sm" @onclick="ToggleDetail"><i class="fa-solid @CssDetail"></i></button></div>
|
||||
<div class="px-0">
|
||||
@@ -21,7 +22,35 @@
|
||||
<div class="px-0" title="Tempo massimo stimato">Time <i class="fa-solid fa-clock"></i> @FormatEstTime(CurrPOR.ProdEstimTime)</div>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</ul> *@
|
||||
|
||||
<div class="card mb-1 shadow">
|
||||
<div class="card-header py-1">
|
||||
<div class="@currCss d-flex justify-content-between align-items-center">
|
||||
<div class="px-0 fw-bold">@CurrPOR.OrderRowUID <button class="btn btn-info btn-sm" @onclick="ToggleDetail"><i class="fa-solid @CssDetail"></i></button></div>
|
||||
<div class="px-0">
|
||||
@if (balEnabled)
|
||||
{
|
||||
<button class="btn btn-sm btn-dark" @onclick="() => DoBalance(CurrPOR.OrderRowID)" title="Invia a Stima"><i class="fa-solid fa-angles-right"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-secondary disabled" title="Invia a Stima"><i class="fa-solid fa-angles-right"></i></button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (ShowDetail)
|
||||
{
|
||||
<div class="card-body py-1">
|
||||
<div class="list-group-item d-flex justify-content-between align-items-center small">
|
||||
<div class="px-0" title="# pezzi totale"><i class="fa-solid fa-folder-tree"></i> @CurrPOR.ProdItemQtyTot Parts</div>
|
||||
<div class="px-0" title="Tempo massimo stimato">Time <i class="fa-solid fa-clock"></i> @FormatEstTime(CurrPOR.ProdEstimTime)</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
|
||||
@@ -9,6 +9,8 @@ namespace Lux.UI.Components.Compo.Planner
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> EC_DoBalance { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_DoBalanceAll { get; set; }
|
||||
|
||||
private bool showDetail = false;
|
||||
|
||||
@@ -23,32 +25,9 @@ namespace Lux.UI.Components.Compo.Planner
|
||||
private BootstrapModal.ModalMode mMode = BootstrapModal.ModalMode.ND;
|
||||
private Dictionary<bool, string> modalOpt = new Dictionary<bool, string>();
|
||||
|
||||
private async Task SendAllAsync()
|
||||
private Task SendAllAsync()
|
||||
{
|
||||
if (AllRecords != null && AllRecords.Count > 0)
|
||||
{
|
||||
mTitle = "Attenzione";
|
||||
mMessage = $"Sicuro di voler processare tutti e {AllRecords.Count} gli ordini?\n ";
|
||||
//if (string.IsNullOrEmpty(selRec.CompanyName))
|
||||
//{
|
||||
// mMessage = mMessage + $"Dettagli: {selRec.FirstName} | {selRec.LastName} | {selRec.VAT}";
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// mMessage = mMessage + $"Dettagli: {selRec.CompanyName} | {selRec.VAT}";
|
||||
//}
|
||||
mMode = BootstrapModal.ModalMode.Confirm;
|
||||
modalOpt = new();
|
||||
modalOpt.Add(true, "Si");
|
||||
modalOpt.Add(false, "No");
|
||||
if (!await Modal!.ShowAsync<bool>())
|
||||
return;
|
||||
|
||||
foreach (var item in AllRecords)
|
||||
{
|
||||
await EC_DoBalance.InvokeAsync(item.OrderID);
|
||||
}
|
||||
}
|
||||
return EC_DoBalanceAll.InvokeAsync(false);
|
||||
}
|
||||
|
||||
private Task DoBalance(int OrderRowID)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-6 col-lg-4">
|
||||
<WLB_Estimated AllRecords="@ListEstimRecords" EC_DoBalance="DoBalance"></WLB_Estimated>
|
||||
<WLB_Estimated AllRecords="@ListEstimRecords" EC_DoBalance="DoBalance" EC_DoBalanceAll="DoBalanceAll"></WLB_Estimated>
|
||||
</div>
|
||||
<div class="col">
|
||||
@if (ListBalancedRecords == null || ListBalancedRecords.Count == 0)
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Lux.UI.Components.Pages
|
||||
{
|
||||
var listEnum = Enum.GetNames(typeof(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS))
|
||||
.ToList();
|
||||
if(listEnum.Count > 0)
|
||||
if (listEnum.Count > 0)
|
||||
{
|
||||
listEnum[0] = "TUTTI";
|
||||
}
|
||||
@@ -147,6 +147,33 @@ namespace Lux.UI.Components.Pages
|
||||
if (!await Modal!.ShowAsync<bool>())
|
||||
return;
|
||||
|
||||
await SendOrderBalanceReq(OrderRowID);
|
||||
}
|
||||
|
||||
private async Task DoBalanceAll(bool doForce)
|
||||
{
|
||||
if (ListEstimRecords != null && ListEstimRecords.Count > 0)
|
||||
{
|
||||
if (!doForce)
|
||||
{
|
||||
mTitle = "Attenzione";
|
||||
mMessage = $"Sicuro di voler processare tutti e {ListEstimRecords.Count} gli ordini?\n ";
|
||||
mMode = BootstrapModal.ModalMode.Confirm;
|
||||
modalOpt = new();
|
||||
modalOpt.Add(true, "Si");
|
||||
modalOpt.Add(false, "No");
|
||||
if (!await Modal!.ShowAsync<bool>())
|
||||
return;
|
||||
}
|
||||
foreach (var item in ListEstimRecords)
|
||||
{
|
||||
await SendOrderBalanceReq(item.OrderRowID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SendOrderBalanceReq(int OrderRowID)
|
||||
{
|
||||
// verifico se mancassero le righe di ProdGroup e rigenero...
|
||||
List<ProductionGroupModel> listProgGroup = ListBalancedRecords?.Where(x => x.OrderRowID == OrderRowID).ToList() ?? new();
|
||||
// se nullo...
|
||||
@@ -630,7 +657,7 @@ namespace Lux.UI.Components.Pages
|
||||
throw new global::System.NotImplementedException();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
|
||||
<Version>1.1.2605.2915</Version>
|
||||
<Version>1.1.2605.2916</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>LUX - Web Windows MES</i>
|
||||
<h4>Versione: 1.1.2605.2915</h4>
|
||||
<h4>Versione: 1.1.2605.2916</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2605.2915
|
||||
1.1.2605.2916
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2605.2915</version>
|
||||
<version>1.1.2605.2916</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