fix catena update hwopt
This commit is contained in:
@@ -19,7 +19,7 @@ namespace Test.UI.Components.Compo
|
||||
public string LoadPar { get; set; } = "";
|
||||
|
||||
[CascadingParameter(Name = "CurrLoading")]
|
||||
public List<string> CurrLoading { get; set; }
|
||||
public List<string> CurrLoading { get; set; } = new List<string>();
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
|
||||
@@ -239,6 +239,10 @@ namespace Test.UI.Components.Pages
|
||||
CurrData.DictShape = new Dictionary<int, string>();
|
||||
break;
|
||||
|
||||
case TableComp.DataAction.ResetHwOpt:
|
||||
CurrData.DictOptionsXml = new Dictionary<int, string>();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace WebWindowComplex.Compo
|
||||
public EventCallback<int> EC_FirstHwOptionList { get; set; }
|
||||
|
||||
[CascadingParameter(Name = "IsLoading")]
|
||||
public List<string> IsLoading { get; set; }
|
||||
public List<string> IsLoading { get; set; } = new List<string>();
|
||||
|
||||
private bool hwOptCollapsed { get; set; } = false;
|
||||
|
||||
|
||||
@@ -25,7 +25,11 @@ namespace WebWindowComplex
|
||||
/// <summary>
|
||||
/// Reset dizionario shape
|
||||
/// </summary>
|
||||
ResetDictShape
|
||||
ResetDictShape,
|
||||
/// <summary>
|
||||
/// Reset dizionario HwOptions
|
||||
/// </summary>
|
||||
ResetHwOpt
|
||||
}
|
||||
|
||||
public enum DataReq
|
||||
@@ -34,14 +38,17 @@ namespace WebWindowComplex
|
||||
/// Nessuna richiesta
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta hardware opzioni
|
||||
/// </summary>
|
||||
ReqHwOpt,
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta svg
|
||||
/// </summary>
|
||||
ReqSvg,
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta shape sash group
|
||||
/// </summary>
|
||||
@@ -121,6 +128,8 @@ namespace WebWindowComplex
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected List<string> currLoading = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Dati live precedenti x comparazione
|
||||
/// </summary>
|
||||
@@ -164,7 +173,6 @@ namespace WebWindowComplex
|
||||
get => m_SashList;
|
||||
}
|
||||
|
||||
protected List<string> currLoading = new List<string>();
|
||||
protected string SelColorMaterial { get; set; } = "";
|
||||
protected string SelFamilyHardware { get; set; } = "";
|
||||
protected string SelGlass { get; set; } = "";
|
||||
@@ -503,7 +511,7 @@ namespace WebWindowComplex
|
||||
{
|
||||
if (m_CurrWindow != null)
|
||||
{
|
||||
currLoading.Add("LoadHwOpt");
|
||||
loadListAdd("LoadHwOpt");
|
||||
#if DEBUG
|
||||
var CurrJwd = JsonConvert.SerializeObject(m_CurrWindow.Serialize(), Formatting.Indented);
|
||||
#else
|
||||
@@ -719,7 +727,7 @@ namespace WebWindowComplex
|
||||
if (SashList.Count > 0)
|
||||
currAnta = 0;
|
||||
#if false
|
||||
_ = InvokeAsync(StateHasChanged);
|
||||
_ = InvokeAsync(StateHasChanged);
|
||||
#endif
|
||||
// Aggiorno window con dati shape e hw option
|
||||
UpdateDict();
|
||||
@@ -744,7 +752,7 @@ namespace WebWindowComplex
|
||||
// se ho le opzioni hw le aggiungo
|
||||
if (LiveData.DictOptionsXml.Count > 0)
|
||||
{
|
||||
currLoading.Remove("LoadHwOpt");
|
||||
loadListRem("LoadHwOpt");
|
||||
foreach (var item in SashList)
|
||||
{
|
||||
if (LiveData.DictOptionsXml.ContainsKey(item.GroupId))
|
||||
@@ -793,11 +801,17 @@ namespace WebWindowComplex
|
||||
#region Private Fields
|
||||
|
||||
private int currAnta = 0;
|
||||
|
||||
private int currFill = -1;
|
||||
|
||||
private int currSash = -1;
|
||||
|
||||
private int currSplit = -1;
|
||||
|
||||
private CompileStep currStep;
|
||||
|
||||
private bool editLock = false;
|
||||
|
||||
private bool firstDisplay = true;
|
||||
|
||||
/// <summary>
|
||||
@@ -1085,9 +1099,36 @@ namespace WebWindowComplex
|
||||
await DoPreviewSvg();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper aggiunta elemento a lista caricamento
|
||||
/// </summary>
|
||||
/// <param name="loadCode"></param>
|
||||
private void loadListAdd(string loadCode)
|
||||
{
|
||||
if (!currLoading.Contains(loadCode))
|
||||
{
|
||||
currLoading.Add(loadCode);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper rimozione elemento a lista caricamento
|
||||
/// </summary>
|
||||
/// <param name="loadCode"></param>
|
||||
private void loadListRem(string loadCode)
|
||||
{
|
||||
if (currLoading.Contains(loadCode))
|
||||
{
|
||||
currLoading.Remove(loadCode);
|
||||
}
|
||||
}
|
||||
|
||||
private void M_CurrWindow_OnHwOption(object? sender, OnReqHwOptEventArgs e)
|
||||
{
|
||||
currLoading.Add("LoadHwOpt");
|
||||
// chiamo reset dizionario
|
||||
ReqResetHwOpt(true);
|
||||
// setto che sto chiedendo update opzioni
|
||||
loadListAdd("LoadHwOpt");
|
||||
_ = InvokeAsync(StateHasChanged);
|
||||
Dictionary<string, string> Args = new Dictionary<string, string>();
|
||||
Args.Add("Mode", $"{(int)Enums.QuestionModes.HARDWARE}");
|
||||
@@ -1182,12 +1223,20 @@ namespace WebWindowComplex
|
||||
/// Richiesta reset dizionario Shape con action
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
private void ReqResetDict(bool args)
|
||||
{
|
||||
_ = EC_ActionReq.InvokeAsync(DataAction.ResetDictShape);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta reset dizionario options con action
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
private void ReqResetHwOpt(bool args)
|
||||
{
|
||||
_ = EC_ActionReq.InvokeAsync(DataAction.ResetHwOpt);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ritorno step Tree
|
||||
/// </summary>
|
||||
@@ -1339,11 +1388,14 @@ namespace WebWindowComplex
|
||||
/// <returns></returns>
|
||||
private async Task UpdateHwOptions(Sash newSash)
|
||||
{
|
||||
// resetto hw lst
|
||||
await EC_ActionReq.InvokeAsync(DataAction.ResetHwOpt);
|
||||
// richiesta calcolo opzioni hardware per la singola sash group
|
||||
//string req = newSash.SelHardware.Id;
|
||||
List<int> reqList = new List<int>() { newSash.GroupId };
|
||||
// chiamo con gruppo della nuova sash
|
||||
await DoReqOptHardware(reqList);
|
||||
//ReqResetHwOpt();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -50,6 +50,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -76,6 +76,12 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user