Update smart x componenti e gest calendario(start)
This commit is contained in:
@@ -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}";
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<div class="buttons">
|
||||
<button class="entrata">ENTRATA</button>
|
||||
<button class="uscita">USCITA</button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;}
|
||||
@@ -1,9 +1,90 @@
|
||||
@if (timbratureOggi != null)
|
||||
@if (listRecords == null)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<div class="col">
|
||||
<CalendarMonth RightGaugeTitle="@oreLavorate" LeftGaugeText="Caricate" RightGaugeText="Lavorate" LeftGaugeTitle="@oreCaricate" DtRif="@dtCurr" MainCss="table table-dark table-borderless" DateSelected="DisplayDate" DateCheck="@DateCheck" SingleWeek="@singleWeek" SelDayCss="selDate rounded-top p-2" HeadCss="color: #E67E22"></CalendarMonth>
|
||||
</div>
|
||||
<div style="background-color: #34495E; border-radius: 12px; width:100%" class="pb-1 mb-5">
|
||||
<CalendarMonth DtRif="@dtCurr" MainCss="table table-dark table-borderless" DateSelected="DisplayDate" DateCheck="@DateCheck" SingleWeek="@singleWeek" SelDayCss="selDate rounded-top p-2" HeadCss="color: #E67E22"></CalendarMonth>
|
||||
@if (showStats)
|
||||
{
|
||||
<div class="statsContainer m-2 mt-0">
|
||||
<div class="d-flex justify-content-between px-1 text-light small">
|
||||
<div>
|
||||
<div class="d-flex justify-content-between text-center">
|
||||
<div class="pe-1">
|
||||
Entrata
|
||||
<div class="text-success small">
|
||||
08:00
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
Uscita
|
||||
<div class="text-primary small">
|
||||
12:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="d-flex justify-content-between text-center">
|
||||
<div class="pe-1">
|
||||
Entrata
|
||||
<div class="text-success small">
|
||||
08:00
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
Uscita
|
||||
<div class="text-primary small">
|
||||
12:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="d-flex justify-content-between text-center">
|
||||
<div class="pe-1">
|
||||
Entrata
|
||||
<div class="text-success small">
|
||||
08:00
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
Uscita
|
||||
<div class="text-primary small">
|
||||
12:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (timbratureOggi != null)
|
||||
{
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
<CircleGauge Titolo="@timbratureOggi.OreMinComm" Testo="Caricate" maxVal="480" currVal="@timbratureOggi.OreComm" strokeColorVal="#F1C40F" StyleTesto="font-size: 1em; fill: #fff;"></CircleGauge>
|
||||
</div>
|
||||
<div>
|
||||
<CircleGauge Titolo="@timbratureOggi.OreMinLav" Testo="Lavorate" maxVal="480" currVal="@timbratureOggi.OreLav" strokeColorVal="#00FF00" StyleTesto="font-size: 1em; fill: #fff;"></CircleGauge>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="row p-2 pt-3">
|
||||
<div class="col-6 d-grid gap-2">
|
||||
<button class="btnReset" @onclick="()=>resetCal()">Reset</button>
|
||||
</div>
|
||||
<div class="col-6 d-grid gap-2">
|
||||
<button class="btnTemp">
|
||||
TEMP
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -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<DateTime, string>();
|
||||
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<DailyDataDTO>? 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()
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<div class="cardContainer" style="@cardBg">
|
||||
<div class="data">
|
||||
<span>@dateForm</span>
|
||||
</div>
|
||||
<div class="ora">
|
||||
<span>@hourForm</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;}
|
||||
@@ -4,11 +4,13 @@
|
||||
|
||||
|
||||
|
||||
<DtCard cardBg="background-color: #E74C3C"></DtCard>
|
||||
<DtCard cardBg="background-color: #E74C3C" IdxDipendente="@idxDipendente"></DtCard>
|
||||
<div class="row m-3">
|
||||
<BottoniEntrEsc></BottoniEntrEsc>
|
||||
<BottoniEntrEsc IdxDipendente="@idxDipendente"></BottoniEntrEsc>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2">
|
||||
<Calendario></Calendario>
|
||||
<div class="col">
|
||||
<Calendario IdxDipendente="@idxDipendente"></Calendario>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,5 +19,11 @@ namespace GPW.CORE.Smart.Pages
|
||||
{
|
||||
public partial class Timbratura
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Idx DIpendente
|
||||
/// !!!FixMe mettere vera gestione idx...
|
||||
/// </summary>
|
||||
private int idxDipendente { get; set; } = 56;
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>GPW - Gestione Presenze Web</i>
|
||||
<h4>Versione: 3.0.2301.1107</h4>
|
||||
<h4>Versione: 3.0.2301.1108</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.0.2301.1107
|
||||
3.0.2301.1108
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>3.0.2301.1107</version>
|
||||
<version>3.0.2301.1108</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user