diff --git a/GPW.CORE.SMART/Pages/DayOff.razor b/GPW.CORE.SMART/Pages/DayOff.razor
index e819e50..4d75832 100644
--- a/GPW.CORE.SMART/Pages/DayOff.razor
+++ b/GPW.CORE.SMART/Pages/DayOff.razor
@@ -33,8 +33,7 @@
@if (!isLoading)
{
- @**@
-
+
}
diff --git a/GPW.CORE.SMART/Pages/DayOff.razor.cs b/GPW.CORE.SMART/Pages/DayOff.razor.cs
index ec82617..0f4bbba 100644
--- a/GPW.CORE.SMART/Pages/DayOff.razor.cs
+++ b/GPW.CORE.SMART/Pages/DayOff.razor.cs
@@ -173,7 +173,7 @@ namespace GPW.CORE.Smart.Pages
{
isLoading = true;
CalendarTasksList = new List();
- DateFerFestCheck = new Dictionary();
+ DateCFF = new Dictionary();
DateTime oggi = DateTime.Today;
dtMin = new DateTime(oggi.Year, oggi.Month, 1);
// recupero mesi da gestire
@@ -186,6 +186,17 @@ namespace GPW.CORE.Smart.Pages
}
dtMax = dtMin.AddMonths(numMesi);
+ // dichiaraizone codici CSS di base
+ string cssOkComm = "bg-success text-light rounded-circle p-2";
+ string cssOkLav = "bg-warning text-light rounded-circle p-2";
+ string cssToday = "bg-info text-dark rounded-circle p-2";
+ string cssFest = "bg-danger text-warning";
+ string cssChius = "bg-warning text-dark";
+ string cssRichFer = "bg-warning text-dark rounded-circle p-2";
+ string cssRichPerm = "bg-info text-light rounded-circle p-2";
+ string cssMal = "bg-dark text-light rounded-circle p-2";
+
+
// recupero le fermate aziendali
ListFermateAzienda = await CDService.CalFestFeriePeriodo(dtMin, dtMax);
if (ListFermateAzienda.Count > 0)
@@ -207,8 +218,11 @@ namespace GPW.CORE.Smart.Pages
string cssSpec = "";
foreach (var item in ListFermateAzienda)
{
- cssSpec = item.codGiust == "FEST" ? "bg-danger text-warning" : "bg-warning text-dark";
- DateFerFestCheck.Add(item.data, cssSpec);
+ cssSpec = item.codGiust == "FEST" ? cssFest : cssChius;
+ if (!DateCFF.ContainsKey(item.data))
+ {
+ DateCFF.Add(item.data, cssSpec);
+ }
}
}
// recupero e converto le richieste dipendente...
@@ -228,6 +242,36 @@ namespace GPW.CORE.Smart.Pages
NotBeDraggable = x.IdxDipendente != idxDipendente
}).ToList();
CalendarTasksList.AddRange(taskDip);
+
+
+
+ string cssSpec = "";
+ DateTime dtIns = DateTime.Today;
+ foreach (var item in ListRichiesteDip)
+ {
+ switch (item.CodGiust)
+ {
+ case "PERM":
+ case "104":
+ cssSpec = cssRichPerm;
+ break;
+ case "FER":
+ cssSpec = cssRichFer;
+ break;
+ default:
+ break;
+ }
+ // aggiungo x tutte le date richieste...
+ int numGG = item.DtEnd.Subtract(item.DtStart).Days;
+ for (int i = 0; i <= numGG; i++)
+ {
+ dtIns = item.DtStart.Date.AddDays(i);
+ if (!DateRDip.ContainsKey(dtIns))
+ {
+ DateRDip.Add(dtIns, cssSpec);
+ }
+ }
+ }
}
// recupero e converto le malattie...
ListMalattie = await CDService.RegMalattieGetAll(100);
@@ -246,6 +290,21 @@ namespace GPW.CORE.Smart.Pages
NotBeDraggable = x.IdxDipendente != idxDipendente
}).ToList();
CalendarTasksList.AddRange(taskDip);
+
+ string cssSpec = cssMal;
+ DateTime dtIns = DateTime.Today;
+ foreach (var item in ListMalattie)
+ {
+ // aggiungo x tutte le date richieste...
+ for (int i = 0; i < item.NumGG; i++)
+ {
+ dtIns = item.DtInizio.Date.AddDays(i - 1);
+ if (!DateRDip.ContainsKey(dtIns))
+ {
+ DateRDip.Add(dtIns, cssSpec);
+ }
+ }
+ }
}
await Task.Delay(1);
isLoading = false;
@@ -265,7 +324,8 @@ namespace GPW.CORE.Smart.Pages
updateDetail();
MService.ReportDateChange();
}
- private Dictionary DateFerFestCheck = new Dictionary();
+ private Dictionary DateCFF = new Dictionary();
+ private Dictionary DateRDip = new Dictionary();
private async void updateDetail()
{