- @if (IsTitle)
- {
+ @if (IsTitle)
+ {
+
@for (int i = StartHour; i <= EndHour; i++)
{
-
+
@i.ToString("00")
}
- }
- else
- {
+
+ }
+ else
+ {
+
+ @if (@DayDTO != null && @DayDTO.ListTimbr != null)
+ {
+ @foreach (var item in ListTimb())
+ {
+
+ }
+ }
+
+
@if (@noData)
{
@@ -36,14 +47,14 @@
}
}
- }
-
+
+ }
@if (IsTitle)
{
-
Timb
-
Lavo
+
Timb
+
Lavo
}
else
{
diff --git a/GPW.CORE.UI/Components/DayHoriz.razor.cs b/GPW.CORE.UI/Components/DayHoriz.razor.cs
index 0b3ae6a..44438ce 100644
--- a/GPW.CORE.UI/Components/DayHoriz.razor.cs
+++ b/GPW.CORE.UI/Components/DayHoriz.razor.cs
@@ -127,6 +127,80 @@ namespace GPW.CORE.UI.Components
get => OkVC19 ? "text-success" : "text-secondary";
}
+ private List
ListTimb()
+ {
+ // init
+ List result = new List();
+ if (DayDTO != null)
+ {
+ // limiti estremi visualizzazione
+ DateTime currHour = DayDTO.DtRif.AddHours(StartHour);
+ DateTime lastHour = DayDTO.DtRif.AddHours(EndHour);
+ int idxTimb = 0;
+ if (DayDTO.ListTimbr != null)
+ {
+ // divido tra ingressi e uscite
+ var timbIN = DayDTO.ListTimbr.Where(x => x.Entrata == true).ToList();
+ var timbOUT = DayDTO.ListTimbr.Where(x => x.Entrata == false).ToList();
+ DateTime fineLav = currHour;
+
+ // ciclo partendo dal primo evento timbratura IN ed aggiungendo eventuali periodi in testa / coda / intermedi
+ foreach (var item in timbIN)
+ {
+ // se evento > ora corrente --> aggiungo vuoto...
+ if (item.DataOra > currHour)
+ {
+ PeriodoDTO emptyPeriod = new PeriodoDTO()
+ {
+ Inizio = currHour,
+ Fine=item.DataOra,
+ Tipo = CORE.Data.TipoPeriodo.ND,
+ OreTot = (decimal)item.DataOra.Subtract(currHour).TotalHours
+ };
+ result.Add(emptyPeriod);
+ }
+
+ // ...processo cercando uscita relativa oppure NOW
+ if (timbOUT.Count > idxTimb)
+ {
+ fineLav = timbOUT[idxTimb].DataOra;
+ }
+ else
+ {
+ DateTime adesso = DateTime.Now;
+ int minRound = ((int)Math.Floor((double)adesso.Minute / 5)) * 5;
+ fineLav = DateTime.Today.AddHours(adesso.Hour).AddMinutes(minRound);
+ }
+ PeriodoDTO workPeriod = new PeriodoDTO()
+ {
+ Inizio = item.DataOra,
+ Fine=fineLav,
+ Tipo = CORE.Data.TipoPeriodo.Lavoro,
+ OreTot = (decimal)fineLav.Subtract(item.DataOra).TotalHours
+ };
+ result.Add(workPeriod);
+ idxTimb++;
+ currHour = fineLav;
+ }
+ // se non sono in fondo --> aggiungo!
+ if (currHour < lastHour)
+ {
+ PeriodoDTO emptyPeriod = new PeriodoDTO()
+ {
+ Inizio = currHour,
+ Fine = lastHour,
+ Tipo = CORE.Data.TipoPeriodo.ND,
+ OreTot = (decimal)lastHour.Subtract(currHour).TotalHours
+ };
+ result.Add(emptyPeriod);
+ }
+ }
+ }
+
+ return result;
+ }
+
+
private List ListRegAtt()
{
// init
diff --git a/GPW.CORE.UI/Components/PeriodoLav.razor b/GPW.CORE.UI/Components/PeriodoLav.razor
new file mode 100644
index 0000000..feb2428
--- /dev/null
+++ b/GPW.CORE.UI/Components/PeriodoLav.razor
@@ -0,0 +1,15 @@
+@using CORE.Data.DbModels
+@using CORE.Data.DTO
+@using UI.Data
+@inject GpwDataService GDataServ
+@inject MessageService AppMServ
+@inject IJSRuntime JSRuntime
+
+
+@CurrPeriodo.Inizio.ToString("HH:mm")
+
+@code {
+
+ [Parameter]
+ public PeriodoDTO CurrPeriodo { get; set; } = null!;
+}
diff --git a/GPW.CORE.UI/GPW.CORE.UI.csproj b/GPW.CORE.UI/GPW.CORE.UI.csproj
index 420da7c..faf4183 100644
--- a/GPW.CORE.UI/GPW.CORE.UI.csproj
+++ b/GPW.CORE.UI/GPW.CORE.UI.csproj
@@ -2,7 +2,7 @@
net6.0
- 3.0.2201.0518
+ 3.0.2201.1012
enable
enable
diff --git a/GPW.CORE.UI/Pages/Test.razor b/GPW.CORE.UI/Pages/Test.razor
index 3711b6c..b3cf89d 100644
--- a/GPW.CORE.UI/Pages/Test.razor
+++ b/GPW.CORE.UI/Pages/Test.razor
@@ -154,7 +154,7 @@
45
30'
-
+
Steamware - ORG Personale
@@ -281,6 +281,39 @@
+
+
+
+
Testo 1
+
Testo 2
+
Testo 3
+
Testo 4
+
@*
diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index fb68ab0..8a1ef75 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
GPW - Gestione Presenze Web
-
Versione: 3.0.2201.0518
+
Versione: 3.0.2201.1012
Note di rilascio:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index acf6620..8b0807d 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-3.0.2201.0518
+3.0.2201.1012
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index 16a58bc..809e610 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 3.0.2201.0518
+ 3.0.2201.1012
http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip
http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html
false