diff --git a/MP-TAB3/Components/CurrOdlDetail.razor b/MP-TAB3/Components/CurrOdlDetail.razor
index f8b8c6a4..366988e0 100644
--- a/MP-TAB3/Components/CurrOdlDetail.razor
+++ b/MP-TAB3/Components/CurrOdlDetail.razor
@@ -50,7 +50,14 @@
Rif:
- @CurrPodl.KeyRichiesta
+ @if (CurrOdl != null && !showPOdlData)
+ {
+ @CurrOdl.KeyRichiesta
+ }
+ else
+ {
+ @CurrPodl.KeyRichiesta
+ }
diff --git a/MP-TAB3/Components/MachineBlock.razor.cs b/MP-TAB3/Components/MachineBlock.razor.cs
index a0f42deb..d32fdfa3 100644
--- a/MP-TAB3/Components/MachineBlock.razor.cs
+++ b/MP-TAB3/Components/MachineBlock.razor.cs
@@ -52,6 +52,9 @@ namespace MP_TAB3.Components
[Parameter]
public bool doBlink { get; set; } = false;
+ ///
+ /// True quando in status map, false altrimenti
+ ///
[Parameter]
public bool FullMode { get; set; } = true;
@@ -344,6 +347,8 @@ namespace MP_TAB3.Components
await Task.Delay(1);
}
+ private bool detailLoaded = false;
+
protected override async Task OnInitializedAsync()
{
isLoading = true;
@@ -362,7 +367,7 @@ namespace MP_TAB3.Components
{
imgBasePath = $"{Environment.CurrentDirectory}/images/";
}
- await Task.Delay(1);
+ await loadDetails();
}
protected override async Task OnParametersSetAsync()
@@ -372,7 +377,6 @@ namespace MP_TAB3.Components
if (paramsChanged())
{
saveParams();
- DateTime adesso = DateTime.Now;
isLoading = RecMSE == null;
// controllo SE ho variazioni cosė rileggo
if (!string.IsNullOrEmpty(IdxMacchSub) && RecMSE != null)
@@ -385,32 +389,42 @@ namespace MP_TAB3.Components
{
RecMSESub = RecMSE;
}
- if (CRecMSE != null)
+ // verificare
+ if (!FullMode || true)
{
- if (SDService.MachNumPzGet(IdxMaccCur) != CRecMSE.PezziProd || SDService.MachProdStGet(IdxMaccCur).IdxOdl != CRecMSE.IdxOdl || (datiProdAct != null && datiProdAct.PzTotODL != CRecMSE.PezziProd))
- {
- datiProdAct = await TabDServ.StatoProdMacchina(IdxMaccCur, adesso);
- SDService.MachProdStSet(IdxMaccCur, datiProdAct);
- SDService.MachNumPzSet(IdxMaccCur, CRecMSE.PezziProd);
- }
- else
- {
- datiProdAct = SDService.MachProdStGet(IdxMaccCur);
- }
- if (!string.IsNullOrEmpty(IdxMacchSub))
- {
- isMulti = SMServ.DictMacchMulti[IdxMaccMain] == 1;
- }
- else
- {
- isMulti = false;
- }
- await ReloadXDL(true);
+ await loadDetails();
}
setGaugeVals();
}
}
+ private async Task loadDetails()
+ {
+ if (CRecMSE != null)
+ {
+ DateTime adesso = DateTime.Now;
+ if (SDService.MachNumPzGet(IdxMaccCur) != CRecMSE.PezziProd || SDService.MachProdStGet(IdxMaccCur).IdxOdl != CRecMSE.IdxOdl || (datiProdAct != null && datiProdAct.PzTotODL != CRecMSE.PezziProd))
+ {
+ datiProdAct = await TabDServ.StatoProdMacchina(IdxMaccCur, adesso);
+ SDService.MachProdStSet(IdxMaccCur, datiProdAct);
+ SDService.MachNumPzSet(IdxMaccCur, CRecMSE.PezziProd);
+ }
+ else
+ {
+ datiProdAct = SDService.MachProdStGet(IdxMaccCur);
+ }
+ if (!string.IsNullOrEmpty(IdxMacchSub))
+ {
+ isMulti = SMServ.DictMacchMulti[IdxMaccMain] == 1;
+ }
+ else
+ {
+ isMulti = false;
+ }
+ await ReloadXDL(true);
+ }
+ }
+
protected void setGaugeVals()
{
if (CRecMSE != null)
@@ -467,7 +481,7 @@ namespace MP_TAB3.Components
return true;
if (LastIdxMacchSub != IdxMacchSub)
return true;
- if (LastRecMSE != RecMSE)
+ if (!LastRecMSE.MostlyEquals(RecMSE))
return true;
return false;