Completata revisione x gestione force materiali

This commit is contained in:
Samuele Locatelli
2025-10-17 12:27:02 +02:00
parent 5ca0339675
commit c70b0bcd78
11 changed files with 67 additions and 14 deletions
@@ -21,7 +21,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.1511" />
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.1710" />
<PackageReference Include="Egw.Window.Data" Version="2.7.10.1012" />
<PackageReference Include="EgwMultiEngineManager.Data" Version="2.7.10.1" />
</ItemGroup>
@@ -27,7 +27,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Egw.Lux.WebWindow.Base" Version="2.7.10.1511" />
<PackageReference Include="Egw.Lux.WebWindow.Base" Version="2.7.10.1710" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="8.0.17" />
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.9.2510.1612</Version>
<Version>0.9.2510.1712</Version>
</PropertyGroup>
<ItemGroup>
+1 -1
View File
@@ -9,7 +9,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.1511" />
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.1710" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.17" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.17" />
</ItemGroup>
+3 -3
View File
@@ -1,8 +1,5 @@
@if (EditRecord != null)
{
<h1>EDITING</h1>
<h3>@EditRecord.OfferRowUID</h3>
<WebWindowComplex.TableComp ListPayload="SetupList"
LiveData="CurrData"
EC_OnUpdate="SaveJWD"
@@ -15,6 +12,9 @@ else
<div class="card-header bg-info bg-opacity-50 bg-gradient d-flex justify-content-between">
<div class="px-0">Dettaglio Offerta</div>
<div class="px-0 d-flex justify-content-end">
<div class="px-1">
<button class="btn btn-sm btn-warning" @onclick="() => OfferForceParameters()">Forza Parametri <i class="fa-solid fa-hammer"></i></button>
</div>
<div class="px-1">
<button class="btn btn-sm btn-primary" @onclick="() => OfferUpdatePrices()">Aggiorna Prezzi <i class="fa-solid fa-calculator"></i></button>
</div>
+54 -1
View File
@@ -12,6 +12,8 @@ using Microsoft.AspNetCore.Components.Forms;
using Microsoft.EntityFrameworkCore.Storage.Json;
using Microsoft.JSInterop;
using NLog.LayoutRenderers;
using System.Text;
using WebWindowComplex;
using WebWindowComplex.DTO;
using static EgwCoreLib.Lux.Core.Enums;
@@ -28,7 +30,15 @@ namespace Lux.UI.Components.Compo
public EventCallback<bool> EC_Updated { get; set; }
[Parameter]
public int OfferID { get; set; } = 0;
public OfferModel CurrRecord { get; set; } = null!;
/// <summary>
/// ID Offerta corrente
/// </summary>
protected int OfferID
{
get => CurrRecord.OfferID;
}
#endregion Public Properties
@@ -287,6 +297,49 @@ namespace Lux.UI.Components.Compo
#endif
}
/// <summary>
/// Forza parametri general selezionati nell'offerta
/// </summary>
/// <returns></returns>
protected async Task OfferForceParameters()
{
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Confermi di voler impostare i parametri selezionati per l'offerta?"))
return;
// recupero obj dizionario x i parametri compresi...
ParamDict CurrSel = new ParamDict(CurrRecord.DictPresel);
// metto a waiting tutte le righe con bom...
var listCalc = SorListCalc();
foreach (var item in listCalc)
{
await DLService.OffertUpdateAwaitState(item.OfferRowID, true, true);
// poiché non è gestito evento ritorno update window interno si "scassa" --> try catch/ if FALSE
try
{
string rColor = CurrSel.GetVal("Color");
string rGlass = CurrSel.GetVal("Glass");
string rProfile = CurrSel.GetVal("Profile");
string rWood = CurrSel.GetVal("Wood");
var newSerStruct = SerialMan.MassUpdate((string)item.SerStruct, null, null, rColor, rWood, rGlass, rProfile);
await DLService.OffertRowUpdateSerStruct(item.OfferRowID, newSerStruct);
}
catch
{ }
}
await InvokeAsync(StateHasChanged);
// verifica preliminare UID
await DLService.OffertRowFixUid(OfferID);
// ricalcolo di tutte le BOM e relativi prezzi...
foreach (var item in listCalc)
{
// chiedo BOM e immagine
await reqBomUpdate(item);
}
//await DoRecalcOffer();
}
/// <summary>
/// Verifica e ricalcolo dei prezzi degli items nell'offerta
+1 -1
View File
@@ -63,7 +63,7 @@
}
else if (currStep == CompileStep.Rows)
{
<OfferRowMan OfferID="@EditRecord.OfferID" DisplayMode="EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit"></OfferRowMan>
<OfferRowMan CurrRecord="EditRecord" DisplayMode="EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit"></OfferRowMan>
}
else if (currStep == CompileStep.Delivery)
{
+2 -2
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.2510.1612</Version>
<Version>0.9.2510.1712</Version>
</PropertyGroup>
<ItemGroup>
@@ -17,7 +17,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.1511" />
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.1710" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2510.610" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2510.610" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.17" />
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>LUX - Web Windows MES</i>
<h4>Versione: 0.9.2510.1612</h4>
<h4>Versione: 0.9.2510.1712</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
0.9.2510.1612
0.9.2510.1712
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.9.2510.1612</version>
<version>0.9.2510.1712</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>