From 7e91f23ddb47b1c7eab5e97dee9d8b6702cdf4dd Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Tue, 8 Apr 2025 17:45:47 +0200 Subject: [PATCH] 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; + } } }