diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor b/Lux.UI/Components/Compo/OfferRowMan.razor
index 79230ac2..b792c67b 100644
--- a/Lux.UI/Components/Compo/OfferRowMan.razor
+++ b/Lux.UI/Components/Compo/OfferRowMan.razor
@@ -95,7 +95,14 @@ else
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
{
- DoEditJwd(item)" title="Edit Item" />
+ @if (string.IsNullOrEmpty(item.SerStruct) || item.SerStruct.Length <= 2)
+ {
+
+ }
+ else
+ {
+ DoEditJwd(item)" title="Edit Item" />
+ }
|
}
@@ -113,7 +120,7 @@ else
@if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName))
{
}
-@if (showChangeMat && EditBomRecord != null)
+@if (EditRecord != null && CurrEditMode== EditMode.BOM)
{
diff --git a/Lux.UI/Components/Compo/OfferRowMan.razor.cs b/Lux.UI/Components/Compo/OfferRowMan.razor.cs
index 15a57cf9..48e0d71b 100644
--- a/Lux.UI/Components/Compo/OfferRowMan.razor.cs
+++ b/Lux.UI/Components/Compo/OfferRowMan.razor.cs
@@ -107,6 +107,14 @@ namespace Lux.UI.Components.Compo
[Inject]
protected DataLayerServices DLService { get; set; } = null!;
+ ///
+ /// Costo totale calcolato x offerta
+ ///
+ protected double GrandTotCost
+ {
+ get => AllRecords != null && AllRecords.Count > 0 ? AllRecords.Sum(x => x.TotalCost) : 0;
+ }
+
///
/// Margine medio calcolato x offerta
///
@@ -133,7 +141,7 @@ namespace Lux.UI.Components.Compo
///
protected double GrandTotPrice
{
- get => AllRecords != null && AllRecords.Count > 0 ? AllRecords.Sum(x => x.TotalCost) : 0;
+ get => AllRecords != null && AllRecords.Count > 0 ? AllRecords.Sum(x => x.TotalPrice) : 0;
}
///
@@ -167,8 +175,8 @@ namespace Lux.UI.Components.Compo
protected void ClosePopup()
{
- showChangeMat = false;
- EditBomRecord = null;
+ CurrEditMode = EditMode.None;
+ EditRecord = null;
}
///
@@ -301,11 +309,12 @@ namespace Lux.UI.Components.Compo
protected async Task DoSave(OfferRowModel curRec)
{
isLoading = true;
+ // salvo record modificato...
+ await DLService.OffertRowUpsert(curRec);
+ // reset
CurrEditMode = EditMode.None;
EditRecord = null;
- await Task.Delay(20);
await DLService.FlushCacheOffersAsync();
- await Task.Delay(20);
await ReloadData();
UpdateTable();
isLoading = false;
@@ -313,9 +322,9 @@ namespace Lux.UI.Components.Compo
protected void DoSwapMat(OfferRowModel currRow)
{
- showChangeMat = true;
- EditBomRecord = currRow;
- CurrBomList = DLService.OffertGetBomList(EditBomRecord);
+ CurrEditMode = EditMode.BOM;
+ EditRecord = currRow;
+ CurrBomList = DLService.OffertGetBomList(EditRecord);
}
///
@@ -521,10 +530,6 @@ namespace Lux.UI.Components.Compo
private string currSvg = "";
- private OfferRowModel? EditBomRecord = null;
-
- private OfferRowModel? EditFileRecord = null;
-
///
/// Record in Edit corrente
///
@@ -557,8 +562,6 @@ namespace Lux.UI.Components.Compo
///
private Dictionary reqDict = new Dictionary();
- private bool showChangeMat = false;
-
private string subChannel = "";
private int totalCount = 0;
@@ -875,20 +878,21 @@ namespace Lux.UI.Components.Compo
///
private void ToggleFileEdit(OfferRowModel? currRec)
{
- EditFileRecord = currRec;
+ CurrEditMode = currRec == null ? EditMode.None : EditMode.File;
+ EditRecord = currRec;
}
///
- /// salva nel record corrente la BOM aggiornata e poi ricalcola importo...
+ /// Salva nel record corrente la BOM aggiornata e poi ricalcola importo...
///
///
///
private async void UpdateBom(List newBomList)
{
- if (EditBomRecord != null)
+ if (EditRecord != null)
{
// salvo BOM nel record corrente...
- bool fatto = await DLService.OffertRowUpdateBom(EditBomRecord.OfferRowID, newBomList);
+ bool fatto = await DLService.OffertRowUpdateBom(EditRecord.OfferRowID, newBomList);
// ricalcolo offerta completa
await ReloadData();
UpdateTable();
@@ -949,7 +953,7 @@ namespace Lux.UI.Components.Compo
private async Task UploadFile(InputFileChangeEventArgs e)
{
- if (EditFileRecord != null)
+ if (EditRecord != null)
{
// init dizionari arg richiesta update
Dictionary fileArgs = new Dictionary();
@@ -965,11 +969,11 @@ namespace Lux.UI.Components.Compo
// calcolo il nome del file trusted...
string trustedFileName = Path.GetRandomFileName();
- EditFileRecord.FileResource = trustedFileName;
- EditFileRecord.FileName = file.Name;
- EditFileRecord.FileSize = rawContent.LongCount();
+ EditRecord.FileResource = trustedFileName;
+ EditRecord.FileName = file.Name;
+ EditRecord.FileSize = rawContent.LongCount();
// salvo sul DB i dati (nome, nome sicuro, size...)
- await DLService.OffertRowUpdateFileData(EditFileRecord);
+ await DLService.OffertRowUpdateFileData(EditRecord);
// parametri richiesta
fileArgs.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.PREVIEW}");
@@ -978,7 +982,7 @@ namespace Lux.UI.Components.Compo
CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM;
calcRequestDTO.DictExec = fileArgs;
- await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{EditFileRecord.OfferRowUID}", calcRequestDTO);
+ await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{EditRecord.OfferRowUID}", calcRequestDTO);
#if false
// salvo in locale il file: SISTEMARE PERMESSI
diff --git a/Lux.UI/Components/Pages/Offers.razor b/Lux.UI/Components/Pages/Offers.razor
index 7ad30811..42916b0f 100644
--- a/Lux.UI/Components/Pages/Offers.razor
+++ b/Lux.UI/Components/Pages/Offers.razor
@@ -124,6 +124,7 @@ else
{
Descrizione |
}
+ # righe |
# articoli |
Importo |
Marg. |
@@ -161,6 +162,9 @@ else
{
@item.Description |
}
+
+ @item.NumRows
+ |
@item.NumItems
|
diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj
index cd07924c..ea83ad45 100644
--- a/Lux.UI/Lux.UI.csproj
+++ b/Lux.UI/Lux.UI.csproj
@@ -5,7 +5,7 @@
enable
enable
aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50
- 0.9.2510.2009
+ 0.9.2510.2010
diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index b558a0b5..3096b824 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
LUX - Web Windows MES
- Versione: 0.9.2510.2009
+ Versione: 0.9.2510.2010
Note di rilascio:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index b11bca05..74894a1d 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-0.9.2510.2009
+0.9.2510.2010
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index 48e7c664..d239a8da 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 0.9.2510.2009
+ 0.9.2510.2010
http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip
http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html
false
|