Fix primo record giornaliero editabile in orario

This commit is contained in:
Samuele Locatelli
2025-04-08 17:45:47 +02:00
parent e5c53e0c56
commit 7e91f23ddb
+14 -2
View File
@@ -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;
}
}
}