From 07de159dd1de7871de2f2416bd0c72fff785fbf8 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 1 Dec 2023 12:06:10 +0100 Subject: [PATCH] fix reload --- MP-TAB-SERV/Components/CmpTop.razor.cs | 3 +++ MP-TAB-SERV/Components/MachineBlock.razor.cs | 5 ++++- MP-TAB-SERV/MP-TAB-SERV.csproj | 2 +- MP-TAB-SERV/Pages/StatusMap.razor.cs | 12 +++++++++++- MP-TAB-SERV/Resources/ChangeLog.html | 2 +- MP-TAB-SERV/Resources/VersNum.txt | 2 +- MP-TAB-SERV/Resources/manifest.xml | 2 +- MP.Data/Services/MessageService.cs | 4 ++-- 8 files changed, 24 insertions(+), 8 deletions(-) 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:
  • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index 259fa006..d4a86301 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2312.110 +6.16.2312.112 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index 73b7d034..08935e81 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2312.110 + 6.16.2312.112 https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html false diff --git a/MP.Data/Services/MessageService.cs b/MP.Data/Services/MessageService.cs index 9dc82e94..c7e7838b 100644 --- a/MP.Data/Services/MessageService.cs +++ b/MP.Data/Services/MessageService.cs @@ -332,7 +332,7 @@ namespace MP.Data.Services ///
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); } ///