From 6c109f3a45fe7575c436b6e6e15ea16d6ae6eced Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Sat, 1 Mar 2025 10:04:36 +0100 Subject: [PATCH 1/7] Ancora fix minori x display update in reset pagina TAB3 --- MP-TAB3/MP-TAB3.csproj | 2 +- MP-TAB3/Pages/ForceReset.razor | 57 ++++++++++++++++++++++++-------- MP-TAB3/Resources/ChangeLog.html | 2 +- MP-TAB3/Resources/VersNum.txt | 2 +- MP-TAB3/Resources/manifest.xml | 2 +- 5 files changed, 48 insertions(+), 17 deletions(-) diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index cfa0a166..d17b2802 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2502.2815 + 6.16.2503.109 enable MP_TAB3 diff --git a/MP-TAB3/Pages/ForceReset.razor b/MP-TAB3/Pages/ForceReset.razor index b2688f6d..75993290 100644 --- a/MP-TAB3/Pages/ForceReset.razor +++ b/MP-TAB3/Pages/ForceReset.razor @@ -1,20 +1,20 @@ @page "/force-reset" -
-
- -
-
- +
+
+ +
+
+ +
+
+ + +
+
-@*
    -
  • Reset and reload data
  • -
  • Redis Cache reset
  • -
  • Browser Local Data reset
  • -
  • Browser Session Data reset
  • -
*@ @code { @@ -23,19 +23,50 @@ [Inject] protected MessageService MsgServ { get; set; } = null!; + private int currVal = 0; + private int nextVal = 0; + private int expTimeMsec = 10; + private int bDelay = 350; + private string title = "..."; /// /// Esecuzione task di reset... /// /// protected override async Task OnInitializedAsync() { + title = "Reset and Reload Data"; + currVal = 0; + nextVal = 10; + await InvokeAsync(StateHasChanged); // svuoto cache MsgServ.LastIdxMacchina = ""; + await Task.Delay(bDelay); + title = "Clearing Local Browser Data"; + currVal = 10; + nextVal = 30; + await InvokeAsync(StateHasChanged); await MsgServ.ClearLocalStor(); + await Task.Delay(bDelay); + title = "Clearing Session Browser Data"; + currVal = 30; + nextVal = 50; + await InvokeAsync(StateHasChanged); await MsgServ.ClearSessionStor(); + await Task.Delay(bDelay); + title = "Final Cache cleanup..."; + currVal = 50; + nextVal = 80; + MsgServ.RigaOper = null; + MsgServ.LastIdxMacchina = ""; + await InvokeAsync(StateHasChanged); + await Task.Delay(2 * bDelay); // attendo - await Task.Delay(1000); + title = "Reload!"; + currVal = 80; + nextVal = 100; + await InvokeAsync(StateHasChanged); // rimando alla home... + await Task.Delay(bDelay); navManager.NavigateTo("", true); } } diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index 4fc06f35..72886eac 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2502.2815

+

Versione: 6.16.2503.109


Note di rilascio:
  • diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt index b26d2fc7..3e173973 100644 --- a/MP-TAB3/Resources/VersNum.txt +++ b/MP-TAB3/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2502.2815 +6.16.2503.109 diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml index f13cf498..55ca810d 100644 --- a/MP-TAB3/Resources/manifest.xml +++ b/MP-TAB3/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2502.2815 + 6.16.2503.109 https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html false From c018d096ecb999a4310b8fb12c83ae080829a6a8 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 7 Mar 2025 10:05:41 +0100 Subject: [PATCH 2/7] Inizio verifica TAB3 x DP --- MP-TAB3/MP-TAB3.csproj | 18 +++++++---- MP-TAB3/Resources/ChangeLog.html | 2 +- MP-TAB3/Resources/VersNum.txt | 2 +- MP-TAB3/Resources/manifest.xml | 2 +- MP.Data/Services/TabDataFeeder.cs | 51 ++++++++++++++++++------------- 5 files changed, 44 insertions(+), 31 deletions(-) diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index d17b2802..0021cee7 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,11 +3,22 @@ net6.0 enable - 6.16.2503.109 + 6.16.2503.709 enable MP_TAB3 + + + + + + + + + + + @@ -34,11 +45,6 @@ - - - - - diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index 72886eac..1f22f900 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

    Versione: 6.16.2503.109

    +

    Versione: 6.16.2503.709


    Note di rilascio:
    • diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt index 3e173973..c7f8b226 100644 --- a/MP-TAB3/Resources/VersNum.txt +++ b/MP-TAB3/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2503.109 +6.16.2503.709 diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml index 55ca810d..034531e3 100644 --- a/MP-TAB3/Resources/manifest.xml +++ b/MP-TAB3/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2503.109 + 6.16.2503.709 https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html false diff --git a/MP.Data/Services/TabDataFeeder.cs b/MP.Data/Services/TabDataFeeder.cs index 417b2d59..42c08282 100644 --- a/MP.Data/Services/TabDataFeeder.cs +++ b/MP.Data/Services/TabDataFeeder.cs @@ -84,30 +84,37 @@ namespace MP.Data.Services private void ElapsedFastTimer(object? source, System.Timers.ElapsedEventArgs e) { - var pUpd = Task.Run(async () => + try { - // secondi pari --> blink, secondi dispari --> ricarica - DateTime adesso = DateTime.Now; - int resto = 0; - Math.DivRem(adesso.Second, 2, out resto); - if (resto == 0) + var pUpd = Task.Run(async () => { - // invio in channel blink il segnale - blinkPipe.sendMessage("true"); - Log.Debug("Elapsed Fast Timer Blink"); - } - else - { - // invio in channel blink segnale false - blinkPipe.sendMessage("false"); - // rileggo dati... - var newData = await MseGetAll(); - // invio tramite la pipe... - dataPipe.sendMessage(JsonConvert.SerializeObject(newData)); - Log.Debug("Elapsed Fast Timer reload"); - } - }); - pUpd.Wait(); + // secondi pari --> blink, secondi dispari --> ricarica + DateTime adesso = DateTime.Now; + int resto = 0; + Math.DivRem(adesso.Second, 2, out resto); + if (resto == 0) + { + // invio in channel blink il segnale + blinkPipe.sendMessage("true"); + Log.Debug("Elapsed Fast Timer Blink"); + } + else + { + // invio in channel blink segnale false + blinkPipe.sendMessage("false"); + // rileggo dati... + var newData = await MseGetAll(); + // invio tramite la pipe... + dataPipe.sendMessage(JsonConvert.SerializeObject(newData)); + Log.Debug("Elapsed Fast Timer reload"); + } + }); + pUpd.Wait(); + } + catch (Exception exc) + { + Log.Error($"Errore in ElapsedFastTimer{Environment.NewLine}{exc}"); + } } #endregion Private Methods From 9bb4e1e9a92f8c8b55ae0892f31fd107437eb893 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 7 Mar 2025 10:05:49 +0100 Subject: [PATCH 3/7] Fix alyout fino a 800px --- MP-TAB3/Components/ProdConfirm.razor | 187 ++++++++++++++------------- MP-TAB3/Shared/NavMenu.razor.css | 2 +- MP-TAB3/Shared/NavMenu.razor.less | 2 +- MP-TAB3/Shared/NavMenu.razor.min.css | 2 +- MP-TAB3/wwwroot/css/site.css | 4 +- MP-TAB3/wwwroot/css/site.less | 4 +- MP-TAB3/wwwroot/css/site.min.css | 2 +- 7 files changed, 104 insertions(+), 99 deletions(-) diff --git a/MP-TAB3/Components/ProdConfirm.razor b/MP-TAB3/Components/ProdConfirm.razor index f7518c93..86615958 100644 --- a/MP-TAB3/Components/ProdConfirm.razor +++ b/MP-TAB3/Components/ProdConfirm.razor @@ -118,118 +118,123 @@
} -
-
- Dati Globali ODL -
-
-
-
- Cicli Prod (ABCD) -
-
- @if (isProcessing) - { - - } - else - { - @numPzProdotti - } +
+
+
+ Dati Globali ODL +
+
+
+
+ Cicli Prod (ABCD) +
+
+ @if (isProcessing) + { + + } + else + { + @numPzProdotti + } +
-
-
-
-
- [A] Da Conf. -
-
- @if (isProcessing) - { - - } - else - { - @numPzProdotti2Rec - } +
+
+
+ [A] Da Conf. +
+
+ @if (isProcessing) + { + + } + else + { + @numPzProdotti2Rec + } +
-
-
-
-
- [B] Scarti Vers. -
-
- @if (isProcessing) - { - - } - else - { - @numPzScaConf - } +
+
+
+ [B] Scarti Vers. +
+
+ @if (isProcessing) + { + + } + else + { + @numPzScaConf + } +
-
-
-
-
- [C] Rilav Vers. -
-
- @if (isProcessing) - { - - } - else - { - @numPzRilavConf - } +
+
+
+ [C] Rilav Vers. +
+
+ @if (isProcessing) + { + + } + else + { + @numPzRilavConf + } +
-
-
-
-
- [D] Buoni Vers. -
-
- @if (isProcessing) - { - - } - else - { - @numPzBuoniConf - } +
+
+
+ [D] Buoni Vers. +
+
+ @if (isProcessing) + { + + } + else + { + @numPzBuoniConf + } +
@if (!confProdActive) { -
-
- SCARTI -
-
- CONTROLLI +
+
+
+ SCARTI +
+
+ CONTROLLI +
} else { -
-
- SCARTI -
-
- CONTROLLI +
+
+
+ SCARTI +
+
- } @if (!string.IsNullOrEmpty(lblOut)) { diff --git a/MP-TAB3/Shared/NavMenu.razor.css b/MP-TAB3/Shared/NavMenu.razor.css index acf479c2..4cc1aa6e 100644 --- a/MP-TAB3/Shared/NavMenu.razor.css +++ b/MP-TAB3/Shared/NavMenu.razor.css @@ -29,7 +29,7 @@ top: -1px; background-size: cover; } -@media (max-width: 1024.98px) { +@media (max-width: 1023.98px) { .slideMen:not(.auth) { display: none; } diff --git a/MP-TAB3/Shared/NavMenu.razor.less b/MP-TAB3/Shared/NavMenu.razor.less index d25ea619..107d8678 100644 --- a/MP-TAB3/Shared/NavMenu.razor.less +++ b/MP-TAB3/Shared/NavMenu.razor.less @@ -35,7 +35,7 @@ } -@media (max-width: 1024.98px) { +@media (max-width: 1023.98px) { .slideMen:not(.auth) { display: none; } diff --git a/MP-TAB3/Shared/NavMenu.razor.min.css b/MP-TAB3/Shared/NavMenu.razor.min.css index 62946ad8..14ff2d07 100644 --- a/MP-TAB3/Shared/NavMenu.razor.min.css +++ b/MP-TAB3/Shared/NavMenu.razor.min.css @@ -1 +1 @@ -.navbar-toggler{appearance:none;cursor:pointer;width:3.5rem;height:2.5rem;color:#fff;position:absolute;top:.5rem;right:1rem;border:1px solid rgba(255,255,255,.1);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255,255,255,.1);}.navbar-toggler:checked{background-color:rgba(255,255,255,.5);}.top-row{height:3.5rem;background-color:rgba(0,0,0,.4);}.navbar-brand{font-size:1.1rem;}.bi{display:inline-block;position:relative;width:1.25rem;height:1.25rem;margin-right:.75rem;top:-1px;background-size:cover;}@media(max-width:1024.98px){.slideMen:not(.auth){display:none;}}.bi-house-door-fill{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");}.bi-plus-square-fill{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");}.bi-list-nested{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");}.nav-item{font-size:.9rem;padding-bottom:.5rem;}.nav-item:first-of-type{padding-top:1rem;}.nav-item:last-of-type{padding-bottom:1rem;}.nav-item ::deep a{color:#212427;border-radius:4px;height:3rem;display:flex;align-items:center;line-height:3rem;}.nav-item ::deep a.active{background-color:#212427;color:#fff;}.nav-item ::deep a:hover{background-color:rgba(33,36,39,.4);color:#fff;}.nav-scrollable{display:none;background-color:#f2f2f2;border-radius:.375rem;}.navbar-toggler:checked~.nav-scrollable{display:block;}@media(min-width:1024px){.navbar-toggler{display:none;}.nav-scrollable{display:block;overflow-y:auto;}} \ No newline at end of file +.navbar-toggler{appearance:none;cursor:pointer;width:3.5rem;height:2.5rem;color:#fff;position:absolute;top:.5rem;right:1rem;border:1px solid rgba(255,255,255,.1);background:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255,255,255,.1);}.navbar-toggler:checked{background-color:rgba(255,255,255,.5);}.top-row{height:3.5rem;background-color:rgba(0,0,0,.4);}.navbar-brand{font-size:1.1rem;}.bi{display:inline-block;position:relative;width:1.25rem;height:1.25rem;margin-right:.75rem;top:-1px;background-size:cover;}@media(max-width:1023.98px){.slideMen:not(.auth){display:none;}}.bi-house-door-fill{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");}.bi-plus-square-fill{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");}.bi-list-nested{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");}.nav-item{font-size:.9rem;padding-bottom:.5rem;}.nav-item:first-of-type{padding-top:1rem;}.nav-item:last-of-type{padding-bottom:1rem;}.nav-item ::deep a{color:#212427;border-radius:4px;height:3rem;display:flex;align-items:center;line-height:3rem;}.nav-item ::deep a.active{background-color:#212427;color:#fff;}.nav-item ::deep a:hover{background-color:rgba(33,36,39,.4);color:#fff;}.nav-scrollable{display:none;background-color:#f2f2f2;border-radius:.375rem;}.navbar-toggler:checked~.nav-scrollable{display:block;}@media(min-width:1024px){.navbar-toggler{display:none;}.nav-scrollable{display:block;overflow-y:auto;}} \ No newline at end of file diff --git a/MP-TAB3/wwwroot/css/site.css b/MP-TAB3/wwwroot/css/site.css index 508a0b26..4f5fad1f 100644 --- a/MP-TAB3/wwwroot/css/site.css +++ b/MP-TAB3/wwwroot/css/site.css @@ -32,7 +32,7 @@ body { .longStopListNotes { height: 100%; } -@media (max-width: 640.98px) { +@media (max-width: 639.98px) { .longStopListNotes { max-height: 120px; } @@ -124,7 +124,7 @@ a, overflow: hidden; text-overflow: ellipsis; } -@media (max-width: 640.98px) { +@media (max-width: 800px) { .top-row:not(.auth) { display: none; } diff --git a/MP-TAB3/wwwroot/css/site.less b/MP-TAB3/wwwroot/css/site.less index 3623ea46..d292f25a 100644 --- a/MP-TAB3/wwwroot/css/site.less +++ b/MP-TAB3/wwwroot/css/site.less @@ -32,7 +32,7 @@ html, body { height: 100%; } -@media (max-width: 640.98px) { +@media (max-width: 639.98px) { .longStopListNotes{ max-height: 120px; } @@ -140,7 +140,7 @@ html, body { } -@media (max-width: 640.98px) { +@media (max-width: 800px) { .top-row:not(.auth) { display: none; } diff --git a/MP-TAB3/wwwroot/css/site.min.css b/MP-TAB3/wwwroot/css/site.min.css index c429c6c5..f2d09f2e 100644 --- a/MP-TAB3/wwwroot/css/site.min.css +++ b/MP-TAB3/wwwroot/css/site.min.css @@ -1 +1 @@ -@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');html,body{font-family:'Open Sans Condensed',sans-serif;background-color:#151321;color:#ededed;}.cardObj{border-radius:.375rem;background:linear-gradient(121deg,rgba(255,255,255,.2) -.71%,rgba(255,255,255,.05) 97.66%);box-shadow:0 4px 24px -1px rgba(0,0,0,.25);flex-shrink:0;}.cardObjNoBL{border-radius:.375rem 0 0 .375rem;background:linear-gradient(121deg,rgba(255,255,255,.2) -.71%,rgba(255,255,255,.05) 97.66%);box-shadow:0 4px 24px -1px rgba(0,0,0,.25);flex-shrink:0;}.cardFullHeight{border-radius:.375rem;background:linear-gradient(121deg,rgba(255,255,255,.2) -.71%,rgba(255,255,255,.05) 97.66%);box-shadow:0 4px 24px -1px rgba(0,0,0,.25);flex-shrink:0;height:100%;}.longStopListNotes{height:100%;}@media(max-width:640.98px){.longStopListNotes{max-height:120px;}}.borderStd{border-radius:.375rem;}.table-dark{--bs-table-color:#fff;--bs-table-bg:transparent;--bs-table-border-color:#4d5154;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color);}h1:focus{outline:0;}a,.btn-link{color:#0071c1;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.blazor-error-boundary{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem,#b32121;padding:1rem 1rem 1rem 3.7rem;color:#fff;}.blazor-error-boundary::after{content:"An error has occurred.";}.top-row{background-color:#05173d;justify-content:flex-end;height:3.5rem;display:flex;align-items:center;}.top-row ::deep a,.top-row ::deep .btn-link{white-space:nowrap;text-decoration:none;}.top-row ::deep a:hover,.top-row ::deep .btn-link:hover{text-decoration:underline;}.top-row ::deep a:first-child{overflow:hidden;text-overflow:ellipsis;}@media(max-width:640.98px){.top-row:not(.auth){display:none;}#mainBody{width:100%;}.top-row.auth{justify-content:space-between;}.top-row ::deep a,.top-row ::deep .btn-link{margin-left:0;}}.top-row{position:sticky;top:0;z-index:1;}.top-row.auth ::deep a:first-child{flex:1;text-align:right;width:0;}.top-row,article{padding-left:1rem!important;padding-right:.5rem!important;} \ No newline at end of file +@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');html,body{font-family:'Open Sans Condensed',sans-serif;background-color:#151321;color:#ededed;}.cardObj{border-radius:.375rem;background:linear-gradient(121deg,rgba(255,255,255,.2) -.71%,rgba(255,255,255,.05) 97.66%);box-shadow:0 4px 24px -1px rgba(0,0,0,.25);flex-shrink:0;}.cardObjNoBL{border-radius:.375rem 0 0 .375rem;background:linear-gradient(121deg,rgba(255,255,255,.2) -.71%,rgba(255,255,255,.05) 97.66%);box-shadow:0 4px 24px -1px rgba(0,0,0,.25);flex-shrink:0;}.cardFullHeight{border-radius:.375rem;background:linear-gradient(121deg,rgba(255,255,255,.2) -.71%,rgba(255,255,255,.05) 97.66%);box-shadow:0 4px 24px -1px rgba(0,0,0,.25);flex-shrink:0;height:100%;}.longStopListNotes{height:100%;}@media(max-width:639.98px){.longStopListNotes{max-height:120px;}}.borderStd{border-radius:.375rem;}.table-dark{--bs-table-color:#fff;--bs-table-bg:transparent;--bs-table-border-color:#4d5154;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff;color:var(--bs-table-color);border-color:var(--bs-table-border-color);}h1:focus{outline:0;}a,.btn-link{color:#0071c1;}.btn-primary{color:#fff;background-color:#1b6ec2;border-color:#1861ac;}.content{padding-top:1.1rem;}.valid.modified:not([type=checkbox]){outline:1px solid #26b050;}.invalid{outline:1px solid #f00;}.validation-message{color:#f00;}#blazor-error-ui{background:#ffffe0;bottom:0;box-shadow:0 -1px 2px rgba(0,0,0,.2);display:none;left:0;padding:.6rem 1.25rem .7rem 1.25rem;position:fixed;width:100%;z-index:1000;}#blazor-error-ui .dismiss{cursor:pointer;position:absolute;right:.75rem;top:.5rem;}.blazor-error-boundary{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem,#b32121;padding:1rem 1rem 1rem 3.7rem;color:#fff;}.blazor-error-boundary::after{content:"An error has occurred.";}.top-row{background-color:#05173d;justify-content:flex-end;height:3.5rem;display:flex;align-items:center;}.top-row ::deep a,.top-row ::deep .btn-link{white-space:nowrap;text-decoration:none;}.top-row ::deep a:hover,.top-row ::deep .btn-link:hover{text-decoration:underline;}.top-row ::deep a:first-child{overflow:hidden;text-overflow:ellipsis;}@media(max-width:800px){.top-row:not(.auth){display:none;}#mainBody{width:100%;}.top-row.auth{justify-content:space-between;}.top-row ::deep a,.top-row ::deep .btn-link{margin-left:0;}}.top-row{position:sticky;top:0;z-index:1;}.top-row.auth ::deep a:first-child{flex:1;text-align:right;width:0;}.top-row,article{padding-left:1rem!important;padding-right:.5rem!important;} \ No newline at end of file From 70f4f8ce8b353312714bea2283a53cd4a13e93f6 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 7 Mar 2025 12:28:07 +0100 Subject: [PATCH 4/7] inizio fix tab3 x DP --- MP-TAB3/Components/MachineBlock.razor.cs | 102 ++++++++++++++++++----- MP-TAB3/MP-TAB3.csproj | 2 +- MP-TAB3/Pages/StatusMap.razor | 2 +- MP-TAB3/Resources/ChangeLog.html | 2 +- MP-TAB3/Resources/VersNum.txt | 2 +- MP-TAB3/Resources/manifest.xml | 2 +- 6 files changed, 84 insertions(+), 28 deletions(-) diff --git a/MP-TAB3/Components/MachineBlock.razor.cs b/MP-TAB3/Components/MachineBlock.razor.cs index 8e9e633a..10b5c90d 100644 --- a/MP-TAB3/Components/MachineBlock.razor.cs +++ b/MP-TAB3/Components/MachineBlock.razor.cs @@ -28,17 +28,33 @@ namespace MP_TAB3.Components public string IdxMacchSub { get; set; } = ""; [Parameter] - public int keepAliveMin { get; set; } = 5; + public int KeepAliveMin { get; set; } = 5; [Parameter] public MappaStatoExpl? RecMSE { get; set; } = null; [Parameter] - public bool showCard { get; set; } + public bool ShowCard { get; set; } [Parameter] public int Width { get; set; } = 0; + private bool LastFullMode = true; + private MappaStatoExpl? LastRecMSE = null; + private bool LastShowCard = true; + private int LastKeepAliveMin = 5; + private string LastIdxMacchSub = ""; + + /// + /// Info correnti secondo tipo selezione + /// + private MappaStatoExpl? CRecMSE + { + get => string.IsNullOrEmpty(IdxMacchSub) ? RecMSE : RecMSESub; + } + + private MappaStatoExpl? RecMSESub { get; set; } = null; + #endregion Public Properties #region Public Methods @@ -244,6 +260,8 @@ namespace MP_TAB3.Components protected override async Task OnInitializedAsync() { isLoading = true; + // salvo i parametri precedenti x calcolare variazioni... + saveParams(); // abilitazione disegni... TabDServ.ConfigGetVal("enableDisegno", ref enableDisegno); await ReloadXDL(true); @@ -260,35 +278,73 @@ namespace MP_TAB3.Components await Task.Delay(1); } + private void saveParams() + { + LastIdxMacchSub = IdxMacchSub; + LastRecMSE = RecMSE; + LastFullMode = FullMode; + LastShowCard = ShowCard; + LastKeepAliveMin = KeepAliveMin; + } + + /// + /// Verifica variazione parametri + /// + /// + private bool paramsChanged() + { + if (LastFullMode != FullMode) + return true; + if (LastKeepAliveMin != KeepAliveMin) + return true; + if (LastShowCard != ShowCard) + return true; + if (LastIdxMacchSub != IdxMacchSub) + return true; + if (LastRecMSE != RecMSE) + return true; + + return false; + } + protected override async Task OnParametersSetAsync() { - DateTime adesso = DateTime.Now; - isLoading = RecMSE == null; - // controllo SE ho variazioni così rileggo - if (RecMSE != null) + // controllo variazione parametri... + if (paramsChanged()) { - if (SDService.MachNumPzGet(RecMSE.IdxMacchina) != RecMSE.PezziProd || SDService.MachProdStGet(RecMSE.IdxMacchina).IdxOdl != RecMSE.IdxOdl || (datiProdAct != null && datiProdAct.PzTotODL != RecMSE.PezziProd)) + saveParams(); + DateTime adesso = DateTime.Now; + isLoading = RecMSE == null; + // controllo SE ho variazioni così rileggo + if (RecMSE != null) { - datiProdAct = await TabDServ.StatoProdMacchina(RecMSE.IdxMacchina, adesso); - SDService.MachProdStSet(RecMSE.IdxMacchina, datiProdAct); - SDService.MachNumPzSet(RecMSE.IdxMacchina, RecMSE.PezziProd); + if (SDService.MachNumPzGet(RecMSE.IdxMacchina) != RecMSE.PezziProd || SDService.MachProdStGet(RecMSE.IdxMacchina).IdxOdl != RecMSE.IdxOdl || (datiProdAct != null && datiProdAct.PzTotODL != RecMSE.PezziProd)) + { + datiProdAct = await TabDServ.StatoProdMacchina(RecMSE.IdxMacchina, adesso); + SDService.MachProdStSet(RecMSE.IdxMacchina, datiProdAct); + SDService.MachNumPzSet(RecMSE.IdxMacchina, RecMSE.PezziProd); + } + else + { + datiProdAct = SDService.MachProdStGet(RecMSE.IdxMacchina); + } + + if (string.IsNullOrEmpty(IdxMaccSel)) + { + IdxMaccSel = RecMSE.IdxMacchina; + } + isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1; + } + if (!string.IsNullOrEmpty(IdxMacchSub) && RecMSE != null) + { + RecMSESub = TabDServ.MseGetSub(RecMSE.IdxMacchina, IdxMacchSub, true); } else { - datiProdAct = SDService.MachProdStGet(RecMSE.IdxMacchina); + RecMSESub = RecMSE; } - - if (string.IsNullOrEmpty(IdxMaccSel)) - { - IdxMaccSel = RecMSE.IdxMacchina; - } - isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1; + setGaugeVals(); } - if (!string.IsNullOrEmpty(IdxMacchSub) && RecMSE != null) - { - RecMSE = TabDServ.MseGetSub(RecMSE.IdxMacchina, IdxMacchSub, true); - } - setGaugeVals(); } protected void setGaugeVals() @@ -406,7 +462,7 @@ namespace MP_TAB3.Components { DateTime lastUpdate = lastUpdateN.HasValue ? (DateTime)lastUpdateN : DateTime.Now.AddHours(-1); string answ = cssStatus(semaforo); - if (DateTime.Now.Subtract(lastUpdate).TotalSeconds > (keepAliveMin * kaFactor)) + if (DateTime.Now.Subtract(lastUpdate).TotalSeconds > (KeepAliveMin * kaFactor)) { answ = $"{baseCss}Ro"; // blink se secondo pari... diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index 0021cee7..d3746fcf 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2503.709 + 6.16.2503.712 enable MP_TAB3 diff --git a/MP-TAB3/Pages/StatusMap.razor b/MP-TAB3/Pages/StatusMap.razor index 22989052..bd01ee07 100644 --- a/MP-TAB3/Pages/StatusMap.razor +++ b/MP-TAB3/Pages/StatusMap.razor @@ -36,7 +36,7 @@ { currIdx++;
- +
@if (currIdx >= maxBlocks) { diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index 1f22f900..67a1420b 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2503.709

+

Versione: 6.16.2503.712


Note di rilascio:
  • diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt index c7f8b226..75d36873 100644 --- a/MP-TAB3/Resources/VersNum.txt +++ b/MP-TAB3/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2503.709 +6.16.2503.712 diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml index 034531e3..2b8d53ab 100644 --- a/MP-TAB3/Resources/manifest.xml +++ b/MP-TAB3/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2503.709 + 6.16.2503.712 https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html false From 8621c5b5cbbdf2a39f5829d922c0be21f919c074 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 7 Mar 2025 13:00:56 +0100 Subject: [PATCH 5/7] Fix selezione tavola su DP --- MP-TAB3/Components/MachineBlock.razor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MP-TAB3/Components/MachineBlock.razor b/MP-TAB3/Components/MachineBlock.razor index 67a70b1e..df15344f 100644 --- a/MP-TAB3/Components/MachineBlock.razor +++ b/MP-TAB3/Components/MachineBlock.razor @@ -282,15 +282,15 @@ else
    ART
    -
    @RecMSE.CodArticolo
    +
    @CRecMSE.CodArticolo
    ODL
    -
    @RecMSE.IdxOdl
    +
    @CRecMSE.IdxOdl
    PODL:
    -
    @RecMSE.IdxPOdl
    +
    @CRecMSE.IdxPOdl
From 750745209f70ed19d0b249301991aaaca5daa820 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 7 Mar 2025 13:16:17 +0100 Subject: [PATCH 6/7] Fix errrore detail DP in prod: uso solo CRecMSE su tutta la pagina --- MP-TAB3/Components/MachineBlock.razor | 58 ++++++++++++------------ MP-TAB3/Components/MachineBlock.razor.cs | 10 +++- MP-TAB3/MP-TAB3.csproj | 2 +- MP-TAB3/Resources/ChangeLog.html | 2 +- MP-TAB3/Resources/VersNum.txt | 2 +- MP-TAB3/Resources/manifest.xml | 2 +- 6 files changed, 42 insertions(+), 34 deletions(-) diff --git a/MP-TAB3/Components/MachineBlock.razor b/MP-TAB3/Components/MachineBlock.razor index df15344f..1f3fb84d 100644 --- a/MP-TAB3/Components/MachineBlock.razor +++ b/MP-TAB3/Components/MachineBlock.razor @@ -20,7 +20,7 @@ } else { - @if (RecMSE == null) + @if (CRecMSE == null) {
@@ -48,31 +48,31 @@ else if (Width > 640) {
- @RecMSE.CodMacchina + @CRecMSE.CodMacchina
- @RecMSE.Nome + @CRecMSE.Nome
-
+
- @RecMSE.DescrizioneStato + @CRecMSE.DescrizioneStato
- @(FormatDurata(RecMSE.Durata)) + @(FormatDurata(CRecMSE.Durata))
-   @($" {RecMSE.PezziConf}")   +   @($" {CRecMSE.PezziConf}")  
@if (datiProdAct != null && datiProdAct.PzConfScarto > 0) @@ -83,7 +83,7 @@ else
-   @($" {RecMSE.PezziProd}") +   @($" {CRecMSE.PezziProd}")
@@ -94,15 +94,15 @@ else
ART:
-
@($"{RecMSE.CodArticolo}")
+
@($"{CRecMSE.CodArticolo}")
ODL:
-
@($"ODL{RecMSE.IdxOdl:00000000}")
+
@($"ODL{CRecMSE.IdxOdl:00000000}")
PODL:
-
@($"PODL{RecMSE.IdxPOdl:00000000}")
+
@($"PODL{CRecMSE.IdxPOdl:00000000}")
@@ -112,25 +112,25 @@ else else {
- @RecMSE.CodMacchina + @CRecMSE.CodMacchina
- @RecMSE.Nome + @CRecMSE.Nome
-
+
- @RecMSE.DescrizioneStato + @CRecMSE.DescrizioneStato
- @(FormatDurata(RecMSE.Durata)) + @(FormatDurata(CRecMSE.Durata))
@@ -138,7 +138,7 @@ else
-   @($" {RecMSE.PezziConf}")   +   @($" {CRecMSE.PezziConf}")  
@if (datiProdAct != null && datiProdAct.PzConfScarto > 0) @@ -149,7 +149,7 @@ else
-   @($" {RecMSE.PezziProd}") +   @($" {CRecMSE.PezziProd}")
@@ -161,15 +161,15 @@ else
ART:
-
@($"{RecMSE.CodArticolo}")
+
@($"{CRecMSE.CodArticolo}")
ODL:
-
@($"ODL{RecMSE.IdxOdl:00000000}")
+
@($"ODL{CRecMSE.IdxOdl:00000000}")
PODL:
-
@($"PODL{RecMSE.IdxPOdl:00000000}")
+
@($"PODL{CRecMSE.IdxPOdl:00000000}")
@@ -183,7 +183,7 @@ else

- @RecMSE.Nome + @CRecMSE.Nome

@@ -198,7 +198,7 @@ else } else { -
@($"{RecMSE.PezziProd}")
+
@($"{CRecMSE.PezziProd}")
}
@if (datiProdAct != null) @@ -256,13 +256,13 @@ else
} - @if (RecMSE.extraVal > 0) + @if (CRecMSE.extraVal > 0) {
Qta Extra
-
@($"{RecMSE.extraVal}")
+
@($"{CRecMSE.extraVal}")
}
@@ -308,13 +308,13 @@ else }
-
+
- @RecMSE.DescrizioneStato + @CRecMSE.DescrizioneStato
- @(FormatDurata(RecMSE.Durata)) + @(FormatDurata(CRecMSE.Durata))
@@ -346,7 +346,7 @@ else } @if (enableDisegno && showDraw) { - string docUrl = string.IsNullOrEmpty(RecMSE.Disegno) ? $"disegni/{RecMSE.CodArticolo}.pdf" : $"disegni/{RecMSE.Disegno}.pdf"; + string docUrl = string.IsNullOrEmpty(CRecMSE.Disegno) ? $"disegni/{CRecMSE.CodArticolo}.pdf" : $"disegni/{CRecMSE.Disegno}.pdf";
diff --git a/MP-TAB3/Components/MachineBlock.razor.cs b/MP-TAB3/Components/MachineBlock.razor.cs index 10b5c90d..f6a58099 100644 --- a/MP-TAB3/Components/MachineBlock.razor.cs +++ b/MP-TAB3/Components/MachineBlock.razor.cs @@ -50,7 +50,15 @@ namespace MP_TAB3.Components /// private MappaStatoExpl? CRecMSE { - get => string.IsNullOrEmpty(IdxMacchSub) ? RecMSE : RecMSESub; + get + { + MappaStatoExpl? answ = RecMSE; + if (!string.IsNullOrEmpty(IdxMacchSub)) + { + answ = RecMSESub; + } + return answ; + } } private MappaStatoExpl? RecMSESub { get; set; } = null; diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index d3746fcf..f9c48599 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2503.712 + 6.16.2503.713 enable MP_TAB3 diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index 67a1420b..8fd158f0 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2503.712

+

Versione: 6.16.2503.713


Note di rilascio:
  • diff --git a/MP-TAB3/Resources/VersNum.txt b/MP-TAB3/Resources/VersNum.txt index 75d36873..28869a2c 100644 --- a/MP-TAB3/Resources/VersNum.txt +++ b/MP-TAB3/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2503.712 +6.16.2503.713 diff --git a/MP-TAB3/Resources/manifest.xml b/MP-TAB3/Resources/manifest.xml index 2b8d53ab..0520aa60 100644 --- a/MP-TAB3/Resources/manifest.xml +++ b/MP-TAB3/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2503.712 + 6.16.2503.713 https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/MP-TAB3.zip https://nexus.steamware.net/repository/SWS/MP-TAB3/stable/LAST/ChangeLog.html false From df32e85aab784aee9e719aaa3dab179f80946dcd Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 7 Mar 2025 13:54:44 +0100 Subject: [PATCH 7/7] Completato review TAB3 x DP --- MP-TAB3/Components/MachineBlock.razor.cs | 551 +++++++++++------------ MP-TAB3/Components/OdlMan.razor.cs | 2 +- 2 files changed, 263 insertions(+), 290 deletions(-) diff --git a/MP-TAB3/Components/MachineBlock.razor.cs b/MP-TAB3/Components/MachineBlock.razor.cs index f6a58099..eb06be66 100644 --- a/MP-TAB3/Components/MachineBlock.razor.cs +++ b/MP-TAB3/Components/MachineBlock.razor.cs @@ -11,9 +11,43 @@ namespace MP_TAB3.Components { public partial class MachineBlock { + #region Protected Fields + + protected string baseCss = "sem"; + protected int currMaxVal = 1000; + protected List innerCircleVals = new List(); + protected int kaFactor = 60 / 2; + protected int maxVal = 1000; + protected List outerCircleVals = new List(); + + #endregion Protected Fields + + #region Private Fields + + private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); + private bool enableDisegno = false; + private bool forceCloseOdl = true; + private int IdxOdl = 0; + private int IdxOdlAltra = 0; + private string imgBasePath = ""; + private bool inAttr = false; + private bool isLoading = false; + private bool isMulti = false; + private bool LastFullMode = true; + private string LastIdxMacchSub = ""; + private int LastKeepAliveMin = 5; + private MappaStatoExpl? LastRecMSE = null; + private bool LastShowCard = true; + private bool showOdlDetail = false; + private bool showPodl = false; + + #endregion Private Fields + #region Public Properties - public string currIpv4 { get; set; } = ""; +#if false + public string currIpv4 { get; set; } = ""; +#endif [Parameter] public bool doBlink { get; set; } = false; @@ -39,96 +73,8 @@ namespace MP_TAB3.Components [Parameter] public int Width { get; set; } = 0; - private bool LastFullMode = true; - private MappaStatoExpl? LastRecMSE = null; - private bool LastShowCard = true; - private int LastKeepAliveMin = 5; - private string LastIdxMacchSub = ""; - - /// - /// Info correnti secondo tipo selezione - /// - private MappaStatoExpl? CRecMSE - { - get - { - MappaStatoExpl? answ = RecMSE; - if (!string.IsNullOrEmpty(IdxMacchSub)) - { - answ = RecMSESub; - } - return answ; - } - } - - private MappaStatoExpl? RecMSESub { get; set; } = null; - #endregion Public Properties - #region Public Methods - - /// - /// formatta la durata in minuti in un modo "human readable" gg/ore/min - /// - /// minuti - /// - public static string FormatDurata(double? minuti) - { - string answ = "??"; - TimeSpan tempo = TimeSpan.FromMinutes(minuti ?? 0); - if (tempo.TotalMinutes < 60) - { - answ = $"{tempo.Minutes:00}:{tempo.Seconds:00}"; - } - else if (tempo.TotalHours < 24) - { - answ = $"{tempo.Hours}h {tempo.Minutes}m"; - } - else - { - answ = $"{tempo.Days}g {tempo.Hours}h"; - } - return answ; - } - - /// - /// url completo immagine - /// - /// - /// - public string ImgUrlMacc(string url) - { - if (string.IsNullOrEmpty(url.ToString())) - { - url = "Steamware.png"; - } - string fullPath = Path.Combine(imgBasePath, url); - return fullPath; - } - - protected int NumScartiConf - { - get => datiProdAct != null ? datiProdAct.PzConfScarto - datiProdAct.PzConfRilav : 0; - } - - #endregion Public Methods - - #region Protected Fields - - protected string baseCss = "sem"; - - protected int currMaxVal = 1000; - - protected List innerCircleVals = new List(); - - protected int kaFactor = 60 / 2; - - protected int maxVal = 1000; - - protected List outerCircleVals = new List(); - - #endregion Protected Fields - #region Protected Properties [Inject] @@ -241,6 +187,11 @@ namespace MP_TAB3.Components [Inject] protected NavigationManager NavMan { get; set; } = null!; + protected int NumScartiConf + { + get => datiProdAct != null ? datiProdAct.PzConfScarto - datiProdAct.PzConfRilav : 0; + } + [Inject] protected StatusData SDService { get; set; } = null!; @@ -252,8 +203,136 @@ namespace MP_TAB3.Components #endregion Protected Properties + #region Private Properties + + /// + /// Info correnti secondo tipo selezione + /// + private MappaStatoExpl? CRecMSE + { + get + { + MappaStatoExpl? answ = RecMSE; + if (!string.IsNullOrEmpty(IdxMacchSub)) + { + answ = RecMSESub; + } + return answ; + } + } + + private ODLExpModel currOdl { get; set; } = new ODLExpModel(); + private PODLExpModel currPodl { get; set; } = new PODLExpModel(); + private Dictionary heightList { get; set; } = new Dictionary() { { "200", "200px" }, { "400", "400px" }, { "600", "600px" }, { "800", "800px" }, { "1000", "1000px" } }; + + /// + /// Restituisce il codice IdxMacchina dell'altra tavola (se multi) altrimenti la stessa macchina... + /// + private string idxMaccAltraTav + { + get + { + string answ = ""; + if (RecMSE != null) + { + try + { + // verifico se SIA una tavola (ha char "#") + int iSharp = IdxMaccMain.IndexOf('#'); + if (iSharp > 0) + { + // ora verifico SE ALTRA TAVOLA ha ODL... + string nomeTav = IdxMaccMain.Substring(iSharp); + string altraTav = nomeTav.Substring(0, nomeTav.Length - 1); + altraTav += nomeTav.EndsWith("1") ? "2" : "1"; + // sistemo nome + answ = IdxMaccMain.Replace(nomeTav, altraTav); + } + } + catch + { } + } + return answ; + } + } + + /// + /// Macchina selezionata MAIN + /// + private string IdxMaccMain + { + get => CRecMSE != null ? CRecMSE.IdxMacchina : ""; + } + + /// + /// Macchina corrente (main oppure sub) + /// + private string IdxMaccCur + { + get => string.IsNullOrEmpty(IdxMacchSub) ? IdxMaccMain : IdxMacchSub; + } + + /// + /// Boolean Mobile vs Desktop + /// + private bool isMobile { get; set; } + + private MappaStatoExpl? RecMSESub { get; set; } = null; + + private bool showDraw { get; set; } = false; + + #endregion Private Properties + + #region Public Methods + + /// + /// formatta la durata in minuti in un modo "human readable" gg/ore/min + /// + /// minuti + /// + public static string FormatDurata(double? minuti) + { + string answ = "??"; + TimeSpan tempo = TimeSpan.FromMinutes(minuti ?? 0); + if (tempo.TotalMinutes < 60) + { + answ = $"{tempo.Minutes:00}:{tempo.Seconds:00}"; + } + else if (tempo.TotalHours < 24) + { + answ = $"{tempo.Hours}h {tempo.Minutes}m"; + } + else + { + answ = $"{tempo.Days}g {tempo.Hours}h"; + } + return answ; + } + + /// + /// url completo immagine + /// + /// + /// + public string ImgUrlMacc(string url) + { + if (string.IsNullOrEmpty(url.ToString())) + { + url = "Steamware.png"; + } + string fullPath = Path.Combine(imgBasePath, url); + return fullPath; + } + + #endregion Public Methods + #region Protected Methods + protected string isDisabled(bool testCond) + { + return testCond ? $"disabled" : ""; + } + protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) @@ -286,15 +365,84 @@ namespace MP_TAB3.Components await Task.Delay(1); } - private void saveParams() + protected override async Task OnParametersSetAsync() { - LastIdxMacchSub = IdxMacchSub; - LastRecMSE = RecMSE; - LastFullMode = FullMode; - LastShowCard = ShowCard; - LastKeepAliveMin = KeepAliveMin; + // controllo variazione parametri... + if (paramsChanged()) + { + saveParams(); + DateTime adesso = DateTime.Now; + isLoading = RecMSE == null; + // controllo SE ho variazioni così rileggo + if (!string.IsNullOrEmpty(IdxMacchSub) && RecMSE != null) + { + RecMSESub = TabDServ.MseGetSub(RecMSE.IdxMacchina, IdxMacchSub, true); + } + else + { + RecMSESub = RecMSE; + } + if (CRecMSE != null) + { + 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); + } + isMulti = SMServ.DictMacchMulti[IdxMaccMain] == 1; + await ReloadXDL(true); + } + setGaugeVals(); + } } + protected void setGaugeVals() + { + if (RecMSE != null) + { + innerCircleVals.Clear(); + outerCircleVals.Clear(); + currMaxVal = int.Parse(CRecMSE.NumPezzi.ToString()!); + innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#FFC107", Value = CRecMSE.PezziProd }); + if (CRecMSE.PezziConf > 0) + { + innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#198754", Value = CRecMSE.PezziConf }); + // se ho scarti aggiungo all'inizio + if (datiProdAct != null && datiProdAct.PzConfScarto > 0) + { + innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#CD1916", Value = datiProdAct.PzConfScarto }); + } + } + if (CRecMSE.extraVal > 0) + { + outerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#1367FD", Value = CRecMSE.extraVal }); + } + //Log.Trace($"MBlock | {RecMSE.IdxMacchina} | 03"); + } + else + { + Log.Info("MBlock NO DATA"); + } + } + + protected async Task ShowDetail() + { + // salvo idxMacch + await MServ.IdxMaccSet(RecMSE!.IdxMacchina); + await MServ.LastOpenedPageSet("machine-detail"); + // navigo! + NavMan.NavigateTo($"machine-detail"); + } + + #endregion Protected Methods + + #region Private Methods + /// /// Verifica variazione parametri /// @@ -315,200 +463,16 @@ namespace MP_TAB3.Components return false; } - protected override async Task OnParametersSetAsync() - { - // controllo variazione parametri... - if (paramsChanged()) - { - saveParams(); - DateTime adesso = DateTime.Now; - isLoading = RecMSE == null; - // controllo SE ho variazioni così rileggo - if (RecMSE != null) - { - if (SDService.MachNumPzGet(RecMSE.IdxMacchina) != RecMSE.PezziProd || SDService.MachProdStGet(RecMSE.IdxMacchina).IdxOdl != RecMSE.IdxOdl || (datiProdAct != null && datiProdAct.PzTotODL != RecMSE.PezziProd)) - { - datiProdAct = await TabDServ.StatoProdMacchina(RecMSE.IdxMacchina, adesso); - SDService.MachProdStSet(RecMSE.IdxMacchina, datiProdAct); - SDService.MachNumPzSet(RecMSE.IdxMacchina, RecMSE.PezziProd); - } - else - { - datiProdAct = SDService.MachProdStGet(RecMSE.IdxMacchina); - } - - if (string.IsNullOrEmpty(IdxMaccSel)) - { - IdxMaccSel = RecMSE.IdxMacchina; - } - isMulti = SMServ.DictMacchMulti[RecMSE.IdxMacchina] == 1; - } - if (!string.IsNullOrEmpty(IdxMacchSub) && RecMSE != null) - { - RecMSESub = TabDServ.MseGetSub(RecMSE.IdxMacchina, IdxMacchSub, true); - } - else - { - RecMSESub = RecMSE; - } - setGaugeVals(); - } - } - - protected void setGaugeVals() - { - if (RecMSE != null) - { - innerCircleVals.Clear(); - outerCircleVals.Clear(); - currMaxVal = int.Parse(RecMSE.NumPezzi.ToString()!); - innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#FFC107", Value = RecMSE.PezziProd }); - if (RecMSE.PezziConf > 0) - { - innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#198754", Value = RecMSE.PezziConf }); - // se ho scarti aggiungo all'inizio - if (datiProdAct != null && datiProdAct.PzConfScarto > 0) - { - innerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#CD1916", Value = datiProdAct.PzConfScarto }); - } - } - if (RecMSE.extraVal > 0) - { - outerCircleVals.Add(new CircleGaugeMulti.CircSegm() { Color = "#1367FD", Value = RecMSE.extraVal }); - } - //Log.Trace($"MBlock | {RecMSE.IdxMacchina} | 03"); - } - else - { - Log.Info("MBlock NO DATA"); - } - } - - protected async Task ShowDetail() - { - // salvo idxMacch - await MServ.IdxMaccSet(RecMSE!.IdxMacchina); - await MServ.LastOpenedPageSet("machine-detail"); - // navigo! - NavMan.NavigateTo($"machine-detail"); - } - - #endregion Protected Methods - - #region Private Fields - - private static NLog.Logger Log = LogManager.GetCurrentClassLogger(); - private bool enableDisegno = false; - private bool forceCloseOdl = true; - private int IdxOdl = 0; - private int IdxOdlAltra = 0; - private string imgBasePath = ""; - private bool inAttr = false; - private bool isLoading = false; - private bool isMulti = false; - private bool showOdlDetail = false; - private bool showPodl = false; - - protected string isDisabled(bool testCond) - { - return testCond ? $"disabled" : ""; - } - - #endregion Private Fields - - #region Private Properties - - private ODLExpModel currOdl { get; set; } = new ODLExpModel(); - private PODLExpModel currPodl { get; set; } = new PODLExpModel(); - private Dictionary heightList { get; set; } = new Dictionary() { { "200", "200px" }, { "400", "400px" }, { "600", "600px" }, { "800", "800px" }, { "1000", "1000px" } }; - - /// - /// Restituisce il codice IdxMacchina dell'altra tavola (se multi) altrimenti la stessa macchina... - /// - private string idxMaccAltraTav - { - get - { - string answ = ""; - if (RecMSE != null) - { - try - { - // verifico se SIA una tavola (ha char "#") - int iSharp = IdxMaccSel.IndexOf('#'); - if (iSharp > 0) - { - // ora verifico SE ALTRA TAVOLA ha ODL... - string nomeTav = IdxMaccSel.Substring(iSharp); - string altraTav = nomeTav.Substring(0, nomeTav.Length - 1); - altraTav += nomeTav.EndsWith("1") ? "2" : "1"; - // sistemo nome - answ = IdxMaccSel.Replace(nomeTav, altraTav); - } - } - catch - { } - } - return answ; - } - } - - private string IdxMaccSel { get; set; } = ""; - - /// - /// Boolean Mobile vs Desktop - /// - private bool isMobile { get; set; } - - private bool showDraw { get; set; } = false; - - #endregion Private Properties - - #region Private Methods - - private string cssComStatus(string semaforo, DateTime? lastUpdateN) - { - DateTime lastUpdate = lastUpdateN.HasValue ? (DateTime)lastUpdateN : DateTime.Now.AddHours(-1); - string answ = cssStatus(semaforo); - if (DateTime.Now.Subtract(lastUpdate).TotalSeconds > (KeepAliveMin * kaFactor)) - { - answ = $"{baseCss}Ro"; - // blink se secondo pari... - DateTime adesso = DateTime.Now; - int resto = 0; - Math.DivRem(adesso.Second, 2, out resto); - if (resto == 0) - { - answ += "_b"; - } - } - - return answ; - } - - private string cssStatus(string codSemaforo) - { - // se vuoto --> mostra nero! - if (string.IsNullOrEmpty(codSemaforo)) - { - codSemaforo = "sNe"; - } - - string codColore = codSemaforo.Substring(1, 2); - string answ = $"{baseCss}{codColore}"; - return answ; - } - private async Task ReloadXDL(bool reloadFromOdl) { - if (RecMSE != null) + if (CRecMSE != null) { - int currIdxPOdl = RecMSE.IdxPOdl ?? 0; - if (RecMSE != null) + int currIdxPOdl = CRecMSE.IdxPOdl ?? 0; + if (CRecMSE != null) { if (reloadFromOdl) { - currIdxPOdl = RecMSE.IdxPOdl ?? 0; + currIdxPOdl = CRecMSE.IdxPOdl ?? 0; } // se ho PODL valido... if (currIdxPOdl > 0) @@ -519,12 +483,12 @@ namespace MP_TAB3.Components { currPodl = new PODLExpModel() { - IdxOdl = RecMSE.IdxOdl ?? 0, + IdxOdl = CRecMSE.IdxOdl ?? 0, KeyRichiesta = "-", - CodArticolo = RecMSE.CodArticolo, - DescArticolo = RecMSE.CodArticolo, - NumPezzi = RecMSE.NumPezzi, - Tcassegnato = RecMSE.TCAssegnato + CodArticolo = CRecMSE.CodArticolo, + DescArticolo = CRecMSE.CodArticolo, + NumPezzi = CRecMSE.NumPezzi, + Tcassegnato = CRecMSE.TCAssegnato }; } } @@ -537,6 +501,15 @@ namespace MP_TAB3.Components } } + private void saveParams() + { + LastIdxMacchSub = IdxMacchSub; + LastRecMSE = RecMSE; + LastFullMode = FullMode; + LastShowCard = ShowCard; + LastKeepAliveMin = KeepAliveMin; + } + /// /// Toggle visibilità button /// @@ -558,7 +531,7 @@ namespace MP_TAB3.Components if (RecMSE != null) { // sistemo idxOdl... - var tabOdl = await TabDServ.OdlCurrByMacc(IdxMaccSel, false); + var tabOdl = await TabDServ.OdlCurrByMacc(IdxMaccMain, false); IdxOdl = tabOdl.IdxOdl; if (isMulti) { diff --git a/MP-TAB3/Components/OdlMan.razor.cs b/MP-TAB3/Components/OdlMan.razor.cs index 1f9318f0..23958164 100644 --- a/MP-TAB3/Components/OdlMan.razor.cs +++ b/MP-TAB3/Components/OdlMan.razor.cs @@ -1242,7 +1242,7 @@ namespace MP_TAB3.Components // var pUpd = Task.Run(async () => // { // // controllo ANCHE che la tav correntemente selezionata NON abbia pezzi da confermare - // datiProdAct = await TabDServ.StatoProdMacchina(IdxMaccSel, adesso); + // datiProdAct = await TabDServ.StatoProdMacchina(IdxMaccMain, adesso); // answ = datiProdAct.PzConfBuoni == 0 && datiProdAct.Pz2RecScarto == 0; // }); // pUpd.Wait();