diff --git a/MP-TAB-SERV/Components/CmpTop.razor.cs b/MP-TAB-SERV/Components/CmpTop.razor.cs index e44336cb..281e7f8a 100644 --- a/MP-TAB-SERV/Components/CmpTop.razor.cs +++ b/MP-TAB-SERV/Components/CmpTop.razor.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components; using MP.Data.DatabaseModels; using MP.Data.DTO; using MP.Data.Services; +using MP_TAB_SERV.Pages; using Newtonsoft.Json; using NLog; using System.Diagnostics; @@ -120,6 +121,8 @@ namespace MP_TAB_SERV.Components await Task.Delay(1); if (!NavMan.Uri.Contains("reg-new-device")) { + + await MsgServ.IdxMaccSet(""); NavMan.NavigateTo("status-map", true); } } diff --git a/MP-TAB-SERV/Components/MachineBlock.razor.cs b/MP-TAB-SERV/Components/MachineBlock.razor.cs index a8026fac..f71fe744 100644 --- a/MP-TAB-SERV/Components/MachineBlock.razor.cs +++ b/MP-TAB-SERV/Components/MachineBlock.razor.cs @@ -146,7 +146,7 @@ namespace MP_TAB_SERV.Components //return base.OnAfterRenderAsync(firstRender); } - protected override void OnInitialized() + protected override async Task OnInitializedAsync() { isLoading = true; // se configurata uso cartella virtuale... altrimenti cartella processo @@ -159,6 +159,9 @@ namespace MP_TAB_SERV.Components { imgBasePath = $"{Environment.CurrentDirectory}/images/"; } + + + } /// diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index bfde8a91..f1008c3a 100644 --- a/MP-TAB-SERV/MP-TAB-SERV.csproj +++ b/MP-TAB-SERV/MP-TAB-SERV.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2312.110 + 6.16.2312.112 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Pages/StatusMap.razor.cs b/MP-TAB-SERV/Pages/StatusMap.razor.cs index 13543c8b..73667e1c 100644 --- a/MP-TAB-SERV/Pages/StatusMap.razor.cs +++ b/MP-TAB-SERV/Pages/StatusMap.razor.cs @@ -3,6 +3,7 @@ using Microsoft.JSInterop; using MP.Data.Conf; using MP.Data.DatabaseModels; using MP.Data.Services; +using MP_TAB_SERV.Shared; using NLog; using System.Runtime.ExceptionServices; @@ -51,6 +52,8 @@ namespace MP_TAB_SERV.Pages [Inject] protected MessageService MsgServ { get; set; } = null!; + [Inject] + protected NavigationManager NavMan { get; set; } = null!; protected bool ShowCard { @@ -94,11 +97,18 @@ namespace MP_TAB_SERV.Pages } } - protected override void OnInitialized() + protected override async Task OnInitializedAsync() { setDefaults(); ListMSE = null; SetupConf(); + var currMacc = await MsgServ.IdxMaccGet(); + if (currMacc != "" && currMacc != null) + { + await MsgServ.IdxMaccSet(currMacc); + + NavMan.NavigateTo($"machine-detail"); + } } protected void SaveData(List newList) diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index e5541a35..ac37bc1c 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2312.110

+

Versione: 6.16.2312.112


Note di rilascio:
public async Task IdxMaccGet() { - return await sessionStore.GetItemAsync("CurrMach"); + return await localStorage.GetItemAsync("CurrMach"); } /// @@ -340,7 +340,7 @@ namespace MP.Data.Services /// public async Task IdxMaccSet(string machSel) { - await sessionStore.SetItemAsync("CurrMach", machSel); + await localStorage.SetItemAsync("CurrMach", machSel); } ///