From 7e91f23ddb47b1c7eab5e97dee9d8b6702cdf4dd Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 8 Apr 2025 17:45:47 +0200 Subject: [PATCH 1/3] Fix primo record giornaliero editabile in orario --- MP-TAB3/Components/InsManual.razor.cs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/MP-TAB3/Components/InsManual.razor.cs b/MP-TAB3/Components/InsManual.razor.cs index 6f1f57bc..d2eba4b4 100644 --- a/MP-TAB3/Components/InsManual.razor.cs +++ b/MP-TAB3/Components/InsManual.razor.cs @@ -63,6 +63,11 @@ namespace MP_TAB3.Components { startPeriod = dtCurr.Date.AddHours(6); } + enableEditTime = ListDay.Count == 0; + } + else + { + enableEditTime = true; } // evento da richiesta: default lavora/spenta int idxTipo = isWork ? 1 : 12; @@ -118,6 +123,7 @@ namespace MP_TAB3.Components } else { + enableEditTime = true; if (ListDay != null && ListDay.Count > 0) { var firstRec = ListDay.FirstOrDefault(); @@ -509,7 +515,7 @@ namespace MP_TAB3.Components string cssOkDay = "bg-success bg-opacity-50 text-light rounded-circle p-2"; string cssPartDay = "bg-info bg-opacity-25 text-light rounded-circle p-2"; string cssHasData = "bg-warning text-light rounded-circle p-2"; - string cssToday = "border border-info text-info rounded-circle p-2"; + string cssToday = " border border-info rounded-circle p-2"; if (ListDTO != null) { string currCss = ""; @@ -521,10 +527,12 @@ namespace MP_TAB3.Components { currCss = cssImport; } +#if false else if (item.DataRif == oggi) { currCss = cssToday; - } + } +#endif else if (IsTimeInfoOk(item.DataRif.Date, true)) { currCss = item.MinProdTot < 1440 ? cssPartDay : cssOkDay; @@ -541,6 +549,10 @@ namespace MP_TAB3.Components { DateCheck.Add(oggi, cssToday); } + else + { + DateCheck[oggi] += cssToday; + } } } From a95447e3556a8076e8d9e868f1cd2107fad4e4b7 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 8 Apr 2025 18:27:20 +0200 Subject: [PATCH 2/3] TAB3: - blocco display durante freeze update info --- MP-TAB3/Components/InsManual.razor | 8 +++---- MP-TAB3/Components/InsManual.razor.cs | 34 +++++++++++++++++---------- MP-TAB3/MP-TAB3.csproj | 2 +- MP-TAB3/Resources/ChangeLog.html | 2 +- MP-TAB3/Resources/VersNum.txt | 2 +- MP-TAB3/Resources/manifest.xml | 2 +- MP.Data/Services/TabDataService.cs | 3 +++ 7 files changed, 33 insertions(+), 20 deletions(-) diff --git a/MP-TAB3/Components/InsManual.razor b/MP-TAB3/Components/InsManual.razor index 884b41b9..dd370a41 100644 --- a/MP-TAB3/Components/InsManual.razor +++ b/MP-TAB3/Components/InsManual.razor @@ -262,9 +262,9 @@ -
-
} - - +@if (showProgress) +{ + +} diff --git a/MP-TAB3/Components/InsManual.razor.cs b/MP-TAB3/Components/InsManual.razor.cs index d2eba4b4..294aa501 100644 --- a/MP-TAB3/Components/InsManual.razor.cs +++ b/MP-TAB3/Components/InsManual.razor.cs @@ -377,19 +377,35 @@ namespace MP_TAB3.Components // esegue stored bool fatto = false; + progressTitle = "Avvio processo"; + showProgress = true; + currVal = 0; + nextVal = 20; + await InvokeAsync(StateHasChanged); if (RecMSE != null) { + currVal = 20; + nextVal = 90; + progressTitle = "Start conferma giornaliera"; + await InvokeAsync(StateHasChanged); string IdxMacc = RecMSE.IdxMacchina; fatto = await TabDServ.InsManFreezeDay(IdxMacc, dtCurr); - if (fatto) - { - EditRecord = null; - ReloadData(); - RecalcDayData(dtCurr); - } + currVal = 90; + nextVal = 100; + progressTitle = "Ricalcolo giornata"; + await InvokeAsync(StateHasChanged); + EditRecord = null; + ReloadData(); + RecalcDayData(dtCurr); + showProgress = false; } return; } + private int currVal = 0; + private int nextVal = 0; + private int expTimeMsec = 100; + private bool showProgress = false; + private string progressTitle = "Approvazione Giornata"; private bool IsTimeInfoOk(DateTime reqDate, bool reloadDay) { @@ -527,12 +543,6 @@ namespace MP_TAB3.Components { currCss = cssImport; } -#if false - else if (item.DataRif == oggi) - { - currCss = cssToday; - } -#endif else if (IsTimeInfoOk(item.DataRif.Date, true)) { currCss = item.MinProdTot < 1440 ? cssPartDay : cssOkDay; diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index e80c50bc..4c009b44 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2504.817 + 6.16.2504.818 enable MP_TAB3 diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index df8aac49..74311ea4 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2504.817

+

Versione: 6.16.2504.818


Note di rilascio: