diff --git a/GPW.CORE.Data/DTO/DailyDataDTO.cs b/GPW.CORE.Data/DTO/DailyDataDTO.cs
index 6ba21e3..ea8fdc0 100644
--- a/GPW.CORE.Data/DTO/DailyDataDTO.cs
+++ b/GPW.CORE.Data/DTO/DailyDataDTO.cs
@@ -69,20 +69,25 @@ namespace GPW.CORE.Data.DTO
{
get
{
- int numOre = (int)OreLav;
- int numMin = (int)(60 * (OreLav - (int)OreLav));
- string answ = $"{numOre}:{numMin:00}";
- return answ;
+ //int numOre = (int)OreLav;
+ //int numMin = (int)(60 * (OreLav - (int)OreLav));
+ //string answ = $"{numOre}:{numMin:00}";
+ //return answ;
+ TimeSpan durTs = TimeSpan.FromHours(OreLav);
+ return $"{durTs.Hours}:{durTs.Minutes:00}";
}
}
public string OreMinComm
{
get
{
- int numOre = (int)OreComm;
- int numMin = (int)(60 * (OreComm - (int)OreComm));
- string answ = $"{numOre}:{numMin:00}";
- return answ;
+ //int numOre = (int)OreComm;
+ //int numMin = (int)(60 * (OreComm - (int)OreComm));
+ //string answ = $"{numOre}:{numMin:00}";
+ //return answ;
+ TimeSpan durTs = TimeSpan.FromHours(OreComm);
+ return $"{durTs.Hours}:{durTs.Minutes:00}";
+
}
}
}
diff --git a/GPW.CORE.SMART/Components/BottoniEntrEsc.razor b/GPW.CORE.SMART/Components/BottoniEntrEsc.razor
new file mode 100644
index 0000000..c187234
--- /dev/null
+++ b/GPW.CORE.SMART/Components/BottoniEntrEsc.razor
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.cs b/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.cs
new file mode 100644
index 0000000..0a878d3
--- /dev/null
+++ b/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Components;
+using System.Net.Http;
+using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Components.Authorization;
+using Microsoft.AspNetCore.Components.Forms;
+using Microsoft.AspNetCore.Components.Routing;
+using Microsoft.AspNetCore.Components.Web;
+using Microsoft.AspNetCore.Components.Web.Virtualization;
+using Microsoft.JSInterop;
+using GPW.CORE.Smart;
+using GPW.CORE.Smart.Shared;
+using GPW.CORE.Comp;
+
+namespace GPW.CORE.Smart.Components
+{
+ public partial class BottoniEntrEsc
+ {
+
+ [Parameter]
+ public int IdxDipendente { get; set; } = -1;
+ }
+}
\ No newline at end of file
diff --git a/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.css b/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.css
new file mode 100644
index 0000000..b42d81a
--- /dev/null
+++ b/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.css
@@ -0,0 +1,48 @@
+.buttons {
+ display: flex;
+ justify-content: space-between;
+ gap: 15px;
+ width: 95%;
+ height: 100%;
+}
+.buttonsAll {
+ border-radius: 12px;
+ border: none;
+ color: white;
+ /*width: 10.313rem;
+ height: 2.438rem;*/
+ width: 95%;
+ height: 2.438rem;
+ text-align: center;
+ display: inline-block;
+ font-size: 16px;
+ box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.7);
+}
+.entrata {
+ border-radius: 12px;
+ border: none;
+ color: white;
+ /*width: 10.313rem;
+ height: 2.438rem;*/
+ width: 95%;
+ height: 2.438rem;
+ text-align: center;
+ display: inline-block;
+ font-size: 16px;
+ box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.7);
+ background-color: #9B59B6;
+}
+.uscita {
+ border-radius: 12px;
+ border: none;
+ color: white;
+ /*width: 10.313rem;
+ height: 2.438rem;*/
+ width: 95%;
+ height: 2.438rem;
+ text-align: center;
+ display: inline-block;
+ font-size: 16px;
+ box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.7);
+ background-color: #4CAF50;
+}
\ No newline at end of file
diff --git a/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.less b/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.less
new file mode 100644
index 0000000..ffd19ed
--- /dev/null
+++ b/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.less
@@ -0,0 +1,31 @@
+.buttons {
+ display: flex;
+ justify-content: space-between;
+ gap: 15px;
+ width: 95%;
+ height: 100%;
+}
+
+.buttonsAll {
+ border-radius: 12px;
+ border: none;
+ color: white;
+ /*width: 10.313rem;
+ height: 2.438rem;*/
+ width: 95%;
+ height: 2.438rem;
+ text-align: center;
+ display: inline-block;
+ font-size: 16px;
+ box-shadow: 0px 3px 4px rgba(0,0,0,0.7);
+}
+
+.entrata {
+ .buttonsAll;
+ background-color: #9B59B6;
+}
+
+.uscita {
+ .buttonsAll;
+ background-color: #4CAF50;
+}
diff --git a/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.min.css b/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.min.css
new file mode 100644
index 0000000..7ed363f
--- /dev/null
+++ b/GPW.CORE.SMART/Components/BottoniEntrEsc.razor.min.css
@@ -0,0 +1 @@
+.buttons{display:flex;justify-content:space-between;gap:15px;width:95%;height:100%;}.buttonsAll{border-radius:12px;border:0;color:#fff;width:95%;height:2.438rem;text-align:center;display:inline-block;font-size:16px;box-shadow:0 3px 4px rgba(0,0,0,.7);}.entrata{border-radius:12px;border:0;color:#fff;width:95%;height:2.438rem;text-align:center;display:inline-block;font-size:16px;box-shadow:0 3px 4px rgba(0,0,0,.7);background-color:#9b59b6;}.uscita{border-radius:12px;border:0;color:#fff;width:95%;height:2.438rem;text-align:center;display:inline-block;font-size:16px;box-shadow:0 3px 4px rgba(0,0,0,.7);background-color:#4caf50;}
\ No newline at end of file
diff --git a/GPW.CORE.SMART/Components/Calendario.razor b/GPW.CORE.SMART/Components/Calendario.razor
index 6ff3883..bccd96b 100644
--- a/GPW.CORE.SMART/Components/Calendario.razor
+++ b/GPW.CORE.SMART/Components/Calendario.razor
@@ -1,9 +1,90 @@
-@if (timbratureOggi != null)
+@if (listRecords == null)
+{
+
+}
+else
{
-
-
-
+
+
+ @if (showStats)
+ {
+
+
+ @if (timbratureOggi != null)
+ {
+
+ }
+
+
+
+
+
+
+
+
+
+ }
+ }
+
}
diff --git a/GPW.CORE.SMART/Components/Calendario.razor.cs b/GPW.CORE.SMART/Components/Calendario.razor.cs
index 75d1ac5..3dd5d1a 100644
--- a/GPW.CORE.SMART/Components/Calendario.razor.cs
+++ b/GPW.CORE.SMART/Components/Calendario.razor.cs
@@ -26,19 +26,21 @@ namespace GPW.CORE.Smart.Components
[Inject]
protected CoreSmartDataService CSDataService { get; set; } = null!;
+ [Parameter]
+ public int IdxDipendente { get; set; } = -1;
+
#region Protected Methods
- protected override async Task OnInitializedAsync()
+ protected override async Task OnParametersSetAsync()
{
dtCurr = DateTime.Today;
+ DateTime MeseStart = new DateTime(dtCurr.Year, dtCurr.Month, 1);
+ DateTime MeseEnd = MeseStart.AddMonths(1);
await Task.Delay(1);
- listRecords = await CSDataService.DailyDetails(56, DateTime.Today.AddDays(-3), DateTime.Today.AddDays(1));
+ listRecords = await CSDataService.DailyDetails(IdxDipendente, MeseStart, MeseEnd);
- timbratureOggi = listRecords.Where(x=> x.DtRif == DateTime.Today).FirstOrDefault();
- oreCaricate = timbratureOggi.OreMinComm;
- oreLavorate = timbratureOggi.OreMinLav;
DateCheck = new Dictionary();
Random rnd = new Random();
@@ -57,7 +59,9 @@ namespace GPW.CORE.Smart.Components
}
}
- protected string oreCaricate {get;set;}= "";
+ private bool showStats { get; set; } = false;
+
+ protected string oreCaricate { get; set; } = "";
protected string oreLavorate { get; set; } = "";
protected List? listRecords = null;
@@ -85,6 +89,19 @@ namespace GPW.CORE.Smart.Components
{
dtCurr = dtSel;
singleWeek = true;
+ showStats = true;
+ updateDetail();
+ }
+
+ private void updateDetail()
+ {
+ if (listRecords != null)
+ {
+ timbratureOggi = listRecords.Where(x => x.DtRif == dtCurr).FirstOrDefault();
+
+ oreCaricate = timbratureOggi.OreMinComm;
+ oreLavorate = timbratureOggi.OreMinLav;
+ }
}
private async Task resetCal()
diff --git a/GPW.CORE.SMART/Components/DtCard.razor b/GPW.CORE.SMART/Components/DtCard.razor
new file mode 100644
index 0000000..e81d1fc
--- /dev/null
+++ b/GPW.CORE.SMART/Components/DtCard.razor
@@ -0,0 +1,10 @@
+
+
+ @dateForm
+
+
+ @hourForm
+
+
+
+
diff --git a/GPW.CORE.SMART/Components/DtCard.razor.cs b/GPW.CORE.SMART/Components/DtCard.razor.cs
new file mode 100644
index 0000000..2b0ea5c
--- /dev/null
+++ b/GPW.CORE.SMART/Components/DtCard.razor.cs
@@ -0,0 +1,37 @@
+using Microsoft.AspNetCore.Components;
+
+namespace GPW.CORE.Smart.Components
+{
+ public partial class DtCard
+ {
+ #region Public Properties
+
+ [Parameter]
+ public string cardBg { get; set; } = "background-color: #7F8C8D;";
+
+ [Parameter]
+ public int IdxDipendente { get; set; } = -1;
+
+ #endregion Public Properties
+
+ #region Protected Fields
+
+ protected DateTime dtOggi = DateTime.Now;
+
+ #endregion Protected Fields
+
+ #region Private Properties
+
+ private string dateForm
+ {
+ get => $"{dtOggi.ToString("dddd dd MMMM")}";
+ }
+
+ private string hourForm
+ {
+ get => $"{dtOggi.ToString("HH:mm")}";
+ }
+
+ #endregion Private Properties
+ }
+}
\ No newline at end of file
diff --git a/GPW.CORE.SMART/Components/DtCard.razor.css b/GPW.CORE.SMART/Components/DtCard.razor.css
new file mode 100644
index 0000000..e9d2c8b
--- /dev/null
+++ b/GPW.CORE.SMART/Components/DtCard.razor.css
@@ -0,0 +1,22 @@
+.cardContainer {
+ height: 8.563rem;
+ border-radius: 12px;
+ width: 100%;
+ box-shadow: 0px 3px 4px rgba(0, 0, 0, 0.7);
+ color: #fff;
+}
+.data {
+ font-weight: bold;
+ padding-top: 1.5rem;
+ padding-left: 1.5rem;
+ position: relative;
+ font-size: 1.25rem;
+ text-transform: uppercase;
+}
+.ora {
+ width: 100%;
+ font-weight: bold;
+ position: relative;
+ font-size: 3.5rem;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/GPW.CORE.SMART/Components/DtCard.razor.less b/GPW.CORE.SMART/Components/DtCard.razor.less
new file mode 100644
index 0000000..7a15008
--- /dev/null
+++ b/GPW.CORE.SMART/Components/DtCard.razor.less
@@ -0,0 +1,24 @@
+.cardContainer {
+ height: 8.563rem;
+ border-radius: 12px;
+ width: 100%;
+ box-shadow: 0px 3px 4px rgba(0,0,0,0.7);
+ color: #fff;
+}
+
+.data {
+ font-weight: bold;
+ padding-top: 1.5rem;
+ padding-left: 1.5rem;
+ position: relative;
+ font-size: 1.25rem;
+ text-transform: uppercase;
+}
+
+.ora {
+ width: 100%;
+ font-weight: bold;
+ position: relative;
+ font-size: 3.5rem;
+ text-align: center;
+}
diff --git a/GPW.CORE.SMART/Components/DtCard.razor.min.css b/GPW.CORE.SMART/Components/DtCard.razor.min.css
new file mode 100644
index 0000000..c838f55
--- /dev/null
+++ b/GPW.CORE.SMART/Components/DtCard.razor.min.css
@@ -0,0 +1 @@
+.cardContainer{height:8.563rem;border-radius:12px;width:100%;box-shadow:0 3px 4px rgba(0,0,0,.7);color:#fff;}.data{font-weight:bold;padding-top:1.5rem;padding-left:1.5rem;position:relative;font-size:1.25rem;text-transform:uppercase;}.ora{width:100%;font-weight:bold;position:relative;font-size:3.5rem;text-align:center;}
\ No newline at end of file
diff --git a/GPW.CORE.SMART/Pages/Timbratura.razor b/GPW.CORE.SMART/Pages/Timbratura.razor
index 1d81b91..184d710 100644
--- a/GPW.CORE.SMART/Pages/Timbratura.razor
+++ b/GPW.CORE.SMART/Pages/Timbratura.razor
@@ -4,11 +4,13 @@
-
+
-
+
diff --git a/GPW.CORE.SMART/Pages/Timbratura.razor.cs b/GPW.CORE.SMART/Pages/Timbratura.razor.cs
index 5804382..be4dc2f 100644
--- a/GPW.CORE.SMART/Pages/Timbratura.razor.cs
+++ b/GPW.CORE.SMART/Pages/Timbratura.razor.cs
@@ -19,5 +19,11 @@ namespace GPW.CORE.Smart.Pages
{
public partial class Timbratura
{
+
+ ///
+ /// Idx DIpendente
+ /// !!!FixMe mettere vera gestione idx...
+ ///
+ private int idxDipendente { get; set; } = 56;
}
}
\ No newline at end of file
diff --git a/GPW.CORE.SMART/compilerconfig.json b/GPW.CORE.SMART/compilerconfig.json
index eb5eafc..9904963 100644
--- a/GPW.CORE.SMART/compilerconfig.json
+++ b/GPW.CORE.SMART/compilerconfig.json
@@ -10,5 +10,13 @@
{
"outputFile": "Pages/ProvaCalendar.razor.css",
"inputFile": "Pages/ProvaCalendar.razor.less"
+ },
+ {
+ "outputFile": "Components/BottoniEntrEsc.razor.css",
+ "inputFile": "Components/BottoniEntrEsc.razor.less"
+ },
+ {
+ "outputFile": "Components/DtCard.razor.css",
+ "inputFile": "Components/DtCard.razor.less"
}
]
\ No newline at end of file
diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index 92dc1df..e00691c 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
GPW - Gestione Presenze Web
- Versione: 3.0.2301.1107
+ Versione: 3.0.2301.1108
Note di rilascio:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index 0418e8d..4ddde9a 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-3.0.2301.1107
+3.0.2301.1108
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index 37c83fa..27f09c9 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 3.0.2301.1107
+ 3.0.2301.1108
http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip
http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html
false