diff --git a/MP-TAB-SERV/Components/OdlMan.razor b/MP-TAB-SERV/Components/OdlMan.razor index 68db7337..1b7e773a 100644 --- a/MP-TAB-SERV/Components/OdlMan.razor +++ b/MP-TAB-SERV/Components/OdlMan.razor @@ -13,7 +13,7 @@ @if (isSlave) {
-
+
@(Traduci("lblWarnHeadSlave"))
@(Traduci("lblWarnBodySlave"))
@@ -23,6 +23,25 @@ { @if (needConfProd) { + @if (showSplitOdlOnTavVal || showReopOdlTav) + { +
+
+
+ @if (showSplitOdlOnTavVal) + { + + } +
+
+ @if (showReopOdlTav) + { + + } +
+
+
+ }
@lblWarnHead
@@ -69,7 +88,6 @@ {
-
} diff --git a/MP-TAB-SERV/Components/OdlMan.razor.cs b/MP-TAB-SERV/Components/OdlMan.razor.cs index 229fbfc9..4edb6619 100644 --- a/MP-TAB-SERV/Components/OdlMan.razor.cs +++ b/MP-TAB-SERV/Components/OdlMan.razor.cs @@ -875,7 +875,7 @@ namespace MP_TAB_SERV.Components RecMSE = TabDServ.MseGetSub(IdxMaccParent, selIdxMacc, true); await ReloadData(true); await DoUpdate(); - if (showOdlDetail) + if (showOdlDetail || inAttr) { await ReloadXDL(true); } diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index 5f9739f3..9d924d75 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.2311.1417 + 6.16.2311.1519 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Pages/RegNewDevice.razor b/MP-TAB-SERV/Pages/RegNewDevice.razor index b6be7e2f..02700e89 100644 --- a/MP-TAB-SERV/Pages/RegNewDevice.razor +++ b/MP-TAB-SERV/Pages/RegNewDevice.razor @@ -23,7 +23,6 @@
- @*
*@
diff --git a/MP-TAB-SERV/Pages/StatusMap.razor.cs b/MP-TAB-SERV/Pages/StatusMap.razor.cs index cbc1c392..13543c8b 100644 --- a/MP-TAB-SERV/Pages/StatusMap.razor.cs +++ b/MP-TAB-SERV/Pages/StatusMap.razor.cs @@ -10,6 +10,20 @@ namespace MP_TAB_SERV.Pages { public partial class StatusMap { + #region Public Classes + + public class WindowDimension + { + #region Public Properties + + public int Height { get; set; } + public int Width { get; set; } + + #endregion Public Properties + } + + #endregion Public Classes + #region Protected Fields protected bool _showCard = false; @@ -25,13 +39,18 @@ namespace MP_TAB_SERV.Pages [Inject] protected IConfiguration config { get; set; } = null!; + protected int Height { get; set; } = 0; + + protected bool isCalcSize { get; set; } = false; + + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; + [Inject] protected StatusData MDataService { get; set; } = null!; [Inject] - protected MessageService MServ { get; set; } = null!; - [Inject] - protected IJSRuntime JSRuntime{ get; set; } = null!; + protected MessageService MsgServ { get; set; } = null!; protected bool ShowCard { @@ -46,50 +65,19 @@ namespace MP_TAB_SERV.Pages [Inject] protected TabDataService TabDServ { get; set; } = null!; + protected int Width { get; set; } = 0; + #endregion Protected Properties #region Protected Methods - /// - /// Recupera da conf eventuale setup tag dell'IOB indicato - /// - /// - /// - protected List? getIobTag(string codIob) + protected async Task getWDim() { - List? answ = null; - if (MDataService.currTagConf != null) - { - // cerco x chiave IOB... - if (MDataService.currTagConf.ContainsKey(codIob)) - { - answ = MDataService.currTagConf[codIob]; - } - } - return answ; + var dimension = await JSRuntime.InvokeAsync("getWindowDimensions"); + Height = dimension.Height; + Width = dimension.Width; } - /// - /// Recupera da redis (in una chiamata soltanto) tutti i valori richiesti e compone un - /// dizionario x ottimizzare visualizzazione - /// - /// - /// - protected Dictionary getTagVal(string codIob) - { - Dictionary answ = new Dictionary(); - // recupero conf tags... - var currTags = getIobTag(codIob); - if (currTags != null && currTags.Count > 0) - { - // FIXME TODO !!!! FARE !!!! - da verificare - answ = currTags.ToDictionary(x => x.TagLocation, x => MDataService.getTagConf(x.TagLocation)); - } - return answ; - } - - protected bool isCalcSize { get; set; } = false; - protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) @@ -102,24 +90,20 @@ namespace MP_TAB_SERV.Pages if (ListMSE != null) { // salvo in LocalStorage... - await MServ.SaveMse(ListMSE); + await MsgServ.SaveMse(ListMSE); } } protected override void OnInitialized() { - var df = MServ.UserPrefGet("DefCardMode"); - ShowCard = df == "shrink" ? false : true; - isCalcSize = true; + setDefaults(); ListMSE = null; SetupConf(); } protected void SaveData(List newList) { - //await Task.Delay(1); ListMSE = newList; - //await InvokeAsync(StateHasChanged); } #endregion Protected Methods @@ -140,6 +124,19 @@ namespace MP_TAB_SERV.Pages #region Private Methods + private void setDefaults() + { + string df = MsgServ.UserPrefSetup("DefCardMode", "full"); + baseLang = MsgServ.UserPrefSetup("Lang", "IT"); + tcMode = MsgServ.UserPrefSetup("TcMode", "ms"); + ShowCard = df == "shrink" ? false : true; + isCalcSize = true; + } + + + private string baseLang { get; set; } = ""; + private string tcMode { get; set; } = ""; + private void SetupConf() { // sistemo i parametri opzionali... @@ -149,24 +146,5 @@ namespace MP_TAB_SERV.Pages } #endregion Private Methods - - protected int Width { get; set; } = 0; - protected int Height { get; set; } = 0; - - public class WindowDimension - { - #region Public Properties - - public int Height { get; set; } - public int Width { get; set; } - - #endregion Public Properties - } - protected async Task getWDim() - { - var dimension = await JSRuntime.InvokeAsync("getWindowDimensions"); - Height = dimension.Height; - Width = dimension.Width; - } } } \ No newline at end of file diff --git a/MP-TAB-SERV/Pages/User.razor b/MP-TAB-SERV/Pages/User.razor index 31e65078..d23fee31 100644 --- a/MP-TAB-SERV/Pages/User.razor +++ b/MP-TAB-SERV/Pages/User.razor @@ -196,7 +196,7 @@ } } - protected string _langIns { get; set; } = ""; + protected string _langIns { get; set; } = "EN"; protected string langIns { @@ -246,21 +246,9 @@ } protected async override Task OnInitializedAsync() { - var tcPrefItem = MsgServ.UserPrefGet("TcMode"); - if (tcPrefItem != null) - { - tcModIns = tcPrefItem; - } - var langPrefItem = MsgServ.UserPrefGet("Lang"); - if (langPrefItem != null) - { - langIns = langPrefItem; - } - var defCardPrefItem = MsgServ.UserPrefGet("DefCardMode"); - if (defCardPrefItem != null) - { - defCardModeIns = defCardPrefItem; - } + tcModIns = MsgServ.UserPrefSetup("TcMode", "ms"); + langIns = MsgServ.UserPrefSetup("Lang", "IT"); + defCardModeIns = MsgServ.UserPrefSetup("DefCardMode", "full"); await Task.Delay(1); if (string.IsNullOrEmpty(currIpv4)) { diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index 33605a51..3e4302c9 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2311.1417

+

Versione: 6.16.2311.1519


Note di rilascio:
  • diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt index aa26489c..cc3607ab 100644 --- a/MP-TAB-SERV/Resources/VersNum.txt +++ b/MP-TAB-SERV/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2311.1417 +6.16.2311.1519 diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml index f30904f9..c7dfe782 100644 --- a/MP-TAB-SERV/Resources/manifest.xml +++ b/MP-TAB-SERV/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2311.1417 + 6.16.2311.1519 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 34d750e1..d9ddde30 100644 --- a/MP.Data/Services/MessageService.cs +++ b/MP.Data/Services/MessageService.cs @@ -212,6 +212,32 @@ namespace MP.Data.Services await sessionStore.SetItemAsync(KeyCommText, Valore); } + public string DecryptData(string encData) + { + return SteamCrypto.DecryptString(encData, Constants.passPhrase); + } + + public string EncryptData(string rawData) + { + return SteamCrypto.EncryptString(rawData, Constants.passPhrase); + } + + /// + /// Restituisce il record OperatoreDTO da localstorage + /// + /// + public async Task GetCurrOperDtoAsync() + { + string answ = ""; + var result = await localStorage.GetItemAsync("currTkn"); + if (result != null) + { + //var data = JsonConvert.DeserializeObject(result); + answ = result; + } + return answ; + } + /// /// Restituisce il valore Ipv4 del Device da localstorage /// @@ -242,6 +268,21 @@ namespace MP.Data.Services return answ; } + /// + /// Restituisce ultima matrOpr registrata da localstorage + /// + /// + public async Task GetLastMatrOprAsync() + { + int answ = -1; + var result = await localStorage.GetItemAsync("lastMatrOpr"); + if (!string.IsNullOrEmpty(result)) + { + answ = int.Parse(result); + } + return answ; + } + /// /// Recupero dati MSE x macchina /// @@ -300,6 +341,18 @@ namespace MP.Data.Services return hasKey; } + /// + /// scrive il record OperatoreDTO nel localstorage + /// + /// + public async Task SetCurrOperDtoAsync(string currTkn) + { + bool answ = false; + await localStorage.SetItemAsync("currTkn", currTkn); + answ = true; + return answ; + } + /// /// Scrive il valore di IPV4 del device nel localstoragee /// @@ -340,6 +393,17 @@ namespace MP.Data.Services return answ; } + /// + /// Salva matrOpr nel localstorage + /// + /// + public async Task SetLastMatrOprAsync(int matrOpr) + { + bool answ = false; + await localStorage.SetItemAsync("lastMatrOpr", matrOpr); + answ = true; + return answ; + } /// /// Recupero singola preferenza utente @@ -379,6 +443,30 @@ namespace MP.Data.Services return done; } + /// + /// Recupero singola preferenza utente se presente, oppure imposto quella di default + /// indicata e la rendo + /// + /// + /// + public string UserPrefSetup(string chiave, string defValue) + { + string answ = defValue; + var currDict = UsersPrefDict; + if (currDict.ContainsKey(chiave)) + { + answ = currDict[chiave]; + } + else + { + if (MatrOpr > 0) + { + UserPrefSave(chiave, defValue); + } + } + return answ; + } + #endregion Public Methods #region Protected Fields @@ -410,18 +498,7 @@ namespace MP.Data.Services #region Private Fields - public string DecryptData(string encData) - { - return SteamCrypto.DecryptString(encData, Constants.passPhrase); - } - private AnagOperatoriModel? _rigaOper; - public string EncryptData(string rawData) - { - return SteamCrypto.EncryptString(rawData, Constants.passPhrase); - } - - /// /// Durata cache lunga IN SECONDI @@ -495,66 +572,6 @@ namespace MP.Data.Services return fatto; } - - /// - /// Restituisce il record OperatoreDTO da localstorage - /// - /// - public async Task GetCurrOperDtoAsync() - { - string answ = ""; - var result = await localStorage.GetItemAsync("currTkn"); - if (result != null) - { - //var data = JsonConvert.DeserializeObject(result); - answ = result; - } - return answ; - } - - /// - /// Restituisce ultima matrOpr registrata da localstorage - /// - /// - public async Task GetLastMatrOprAsync() - { - int answ = -1; - var result = await localStorage.GetItemAsync("lastMatrOpr"); - if (!string.IsNullOrEmpty(result)) - { - answ = int.Parse(result); - } - return answ; - } - - - /// - /// Salva matrOpr nel localstorage - /// - /// - public async Task SetLastMatrOprAsync(int matrOpr) - { - bool answ = false; - await localStorage.SetItemAsync("lastMatrOpr", matrOpr); - answ = true; - return answ; - } - - /// - /// scrive il record OperatoreDTO nel localstorage - /// - /// - public async Task SetCurrOperDtoAsync(string currTkn) - { - bool answ = false; - await localStorage.SetItemAsync("currTkn", currTkn); - answ = true; - return answ; - } - - - #endregion Private Methods - } } \ No newline at end of file