diff --git a/MP-TAB-SERV/Components/CmpTop.razor.cs b/MP-TAB-SERV/Components/CmpTop.razor.cs
index 96d822ed..f7bf2220 100644
--- a/MP-TAB-SERV/Components/CmpTop.razor.cs
+++ b/MP-TAB-SERV/Components/CmpTop.razor.cs
@@ -28,6 +28,7 @@ namespace MP_TAB_SERV.Components
protected string CurrOprTknLS { get; set; } = null!;
protected string LastOpenedPage { get; set; } = null!;
+ protected string CurrMacc { get; set; } = null!;
protected string CurrOprTknRedis { get; set; } = null!;
@@ -82,7 +83,14 @@ namespace MP_TAB_SERV.Components
await MsgServ.SetLastMatrOprAsync(rigaOpr.MatrOpr);
await MsgServ.SetCurrOperDtoAsync(hash);
await TDService.OperatoreSetRedis(rigaOpr.MatrOpr, hash);
- //NavMan.NavigateTo("status-map");
+ if (LastOpenedPage != "" && CurrMacc != "")
+ {
+ NavMan.NavigateTo(LastOpenedPage);
+ }
+ else
+ {
+ NavMan.NavigateTo("status-map");
+ }
}
}
}
@@ -124,7 +132,7 @@ namespace MP_TAB_SERV.Components
{
await MsgServ.IdxMaccSet("");
- NavMan.NavigateTo("status-map", true);
+ NavMan.NavigateTo("status-map");
}
}
@@ -136,6 +144,7 @@ namespace MP_TAB_SERV.Components
CurrOprTknLS = await MsgServ.GetCurrOperDtoAsync();
LastOpenedPage = await MsgServ.LastOpenedPageGet();
+ CurrMacc = await MsgServ.IdxMaccGet();
var decodedUrl = Uri.UnescapeDataString(CurrOprTknLS);
// verifico se non avessi dati operatore
@@ -159,10 +168,10 @@ namespace MP_TAB_SERV.Components
//if (!NavMan.Uri.Contains("status-map"))
//{
//}
- //if (LastOpenedPage != "")
- //{
- // NavMan.NavigateTo(LastOpenedPage, true);
- //}
+ //if (LastOpenedPage != "")
+ //{
+ // NavMan.NavigateTo(LastOpenedPage, true);
+ //}
}
}
diff --git a/MP-TAB-SERV/Components/MachineBlock.razor.cs b/MP-TAB-SERV/Components/MachineBlock.razor.cs
index f71fe744..493cf73a 100644
--- a/MP-TAB-SERV/Components/MachineBlock.razor.cs
+++ b/MP-TAB-SERV/Components/MachineBlock.razor.cs
@@ -212,6 +212,7 @@ namespace MP_TAB_SERV.Components
{
// salvo idxMacch
await MServ.IdxMaccSet(RecMSE!.IdxMacchina);
+ await MServ.LastOpenedPageSet("machine-detail");
// navigo!
NavMan.NavigateTo($"machine-detail");
}
diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj
index 65740f34..ef494d46 100644
--- a/MP-TAB-SERV/MP-TAB-SERV.csproj
+++ b/MP-TAB-SERV/MP-TAB-SERV.csproj
@@ -3,7 +3,7 @@