Fix round tempi
This commit is contained in:
@@ -28,27 +28,4 @@
|
||||
.selDate {
|
||||
background-color: #E67E22;
|
||||
color: #000;
|
||||
}
|
||||
/*.statsContainer {
|
||||
border: 0.3rem solid #E67E22;
|
||||
border-radius: 0.8rem;*/
|
||||
/*border-radius: 0rem 0rem 0.8rem 0.8rem;*/
|
||||
/*margin: 0px 10px 20px 10px;*/
|
||||
/*padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.baseBtn{
|
||||
height: 2.5rem;
|
||||
border: none;
|
||||
border-radius: 0.8rem;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.btnReset {
|
||||
.baseBtn;
|
||||
background-color: #1AB7EA;
|
||||
}
|
||||
.btnTemp {
|
||||
.baseBtn;
|
||||
background-color: #1ABC9C;
|
||||
}*/
|
||||
}
|
||||
@@ -35,27 +35,3 @@
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/*.statsContainer {
|
||||
border: 0.3rem solid #E67E22;
|
||||
border-radius: 0.8rem;*/
|
||||
/*border-radius: 0rem 0rem 0.8rem 0.8rem;*/
|
||||
/*margin: 0px 10px 20px 10px;*/
|
||||
/*padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.baseBtn{
|
||||
height: 2.5rem;
|
||||
border: none;
|
||||
border-radius: 0.8rem;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.btnReset {
|
||||
.baseBtn;
|
||||
background-color: #1AB7EA;
|
||||
}
|
||||
.btnTemp {
|
||||
.baseBtn;
|
||||
background-color: #1ABC9C;
|
||||
}*/
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@ namespace GPW.CORE.Comp
|
||||
/// Valore da rappresentare
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public double currVal { get; set; } = 0;
|
||||
public int currVal { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Valore MASSIMO da rappresentare (=100%)
|
||||
/// </summary>
|
||||
[Parameter]
|
||||
public double maxVal { get; set; } = 0;
|
||||
public int maxVal { get; set; } = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -56,11 +56,11 @@ namespace GPW.CORE.Comp
|
||||
get => currVal > maxVal;
|
||||
}
|
||||
|
||||
private double valInner
|
||||
private int valInner
|
||||
{
|
||||
get => currVal < maxVal ? currVal : maxVal;
|
||||
}
|
||||
private double valOuter
|
||||
private int valOuter
|
||||
{
|
||||
get => currVal < maxVal ? 0 : currVal - maxVal;
|
||||
}
|
||||
|
||||
@@ -3,14 +3,6 @@
|
||||
"outputFile": "CircleGauge.razor.css",
|
||||
"inputFile": "CircleGauge.razor.less"
|
||||
},
|
||||
{
|
||||
"outputFile": "dtCard.razor.css",
|
||||
"inputFile": "dtCard.razor.less"
|
||||
},
|
||||
{
|
||||
"outputFile": "BottoniEntrEsc.razor.css",
|
||||
"inputFile": "BottoniEntrEsc.razor.less"
|
||||
},
|
||||
{
|
||||
"outputFile": "CmpTop.razor.css",
|
||||
"inputFile": "CmpTop.razor.less"
|
||||
|
||||
@@ -64,15 +64,19 @@ namespace GPW.CORE.Data.DTO
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
public int MinComm
|
||||
{
|
||||
get => (int)Math.Round(OreComm * 60);
|
||||
}
|
||||
public int MinLav
|
||||
{
|
||||
get => (int)Math.Round(OreLav * 60);
|
||||
}
|
||||
|
||||
public string OreMinLav
|
||||
{
|
||||
get
|
||||
{
|
||||
//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}";
|
||||
}
|
||||
@@ -81,10 +85,6 @@ namespace GPW.CORE.Data.DTO
|
||||
{
|
||||
get
|
||||
{
|
||||
//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}";
|
||||
|
||||
|
||||
@@ -64,10 +64,10 @@ else
|
||||
{
|
||||
<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>
|
||||
<CircleGauge Titolo="@timbratureOggi.OreMinComm" Testo="Caricate" maxVal="480" currVal="@timbratureOggi.MinComm" 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>
|
||||
<CircleGauge Titolo="@timbratureOggi.OreMinLav" Testo="Lavorate" maxVal="480" currVal="@timbratureOggi.MinLav" strokeColorVal="#00FF00" StyleTesto="font-size: 1em; fill: #fff;"></CircleGauge>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -1,34 +1,33 @@
|
||||
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.Data;
|
||||
using GPW.CORE.Smart.Shared;
|
||||
using GPW.CORE.Comp;
|
||||
using GPW.CORE.Data.DTO;
|
||||
using GPW.CORE.Data.Controllers;
|
||||
using GPW.CORE.Smart.Data;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace GPW.CORE.Smart.Components
|
||||
{
|
||||
public partial class Calendario
|
||||
{
|
||||
[Inject]
|
||||
protected CoreSmartDataService CSDataService { get; set; } = null!;
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public int IdxDipendente { get; set; } = -1;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected List<DailyDataDTO>? listRecords = null;
|
||||
|
||||
protected DailyDataDTO? timbratureOggi = null;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected CoreSmartDataService CSDataService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
@@ -40,8 +39,6 @@ namespace GPW.CORE.Smart.Components
|
||||
|
||||
listRecords = await CSDataService.DailyDetails(IdxDipendente, MeseStart, MeseEnd);
|
||||
|
||||
|
||||
|
||||
DateCheck = new Dictionary<DateTime, string>();
|
||||
Random rnd = new Random();
|
||||
// random colorate...
|
||||
@@ -59,11 +56,6 @@ namespace GPW.CORE.Smart.Components
|
||||
}
|
||||
}
|
||||
|
||||
private bool showDetail { get; set; } = false;
|
||||
|
||||
protected List<DailyDataDTO>? listRecords = null;
|
||||
protected DailyDataDTO? timbratureOggi = null;
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
@@ -75,7 +67,7 @@ namespace GPW.CORE.Smart.Components
|
||||
#region Private Properties
|
||||
|
||||
private DateTime dtCurr { get; set; } = DateTime.Today;
|
||||
|
||||
private bool showDetail { get; set; } = false;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
@@ -88,6 +80,12 @@ namespace GPW.CORE.Smart.Components
|
||||
updateDetail();
|
||||
}
|
||||
|
||||
private async Task resetCal()
|
||||
{
|
||||
showDetail = false;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
private void updateDetail()
|
||||
{
|
||||
if (listRecords != null)
|
||||
@@ -96,12 +94,6 @@ namespace GPW.CORE.Smart.Components
|
||||
}
|
||||
}
|
||||
|
||||
private async Task resetCal()
|
||||
{
|
||||
showDetail = false;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,40 +1,4 @@
|
||||
/*.cssTable {
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #34495E;
|
||||
}
|
||||
|
||||
.cssTable tr {
|
||||
margin: 0 0.9rem 0 0.9rem;
|
||||
}
|
||||
.cssTable td {
|
||||
padding: 0.4rem 0rem 0.25rem 0rem;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.cssTable thead tr {
|
||||
margin-top: 0.625rem;
|
||||
}
|
||||
|
||||
.meseAnno{
|
||||
text-transform: capitalize;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.containerBtnTemp {
|
||||
position: relative;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;*/
|
||||
/*margin-bottom: 20px;*/
|
||||
/*}
|
||||
|
||||
.selDate {
|
||||
background-color: #E67E22;
|
||||
color: #000;
|
||||
}*/
|
||||
.statsContainer {
|
||||
.statsContainer {
|
||||
border: 0.3rem solid #E67E22;
|
||||
border-radius: 0.8rem;
|
||||
/*border-radius: 0rem 0rem 0.8rem 0.8rem;*/
|
||||
|
||||
@@ -1,40 +1,4 @@
|
||||
/*.cssTable {
|
||||
border-radius: 12px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #34495E;
|
||||
}
|
||||
|
||||
.cssTable tr {
|
||||
margin: 0 0.9rem 0 0.9rem;
|
||||
}
|
||||
.cssTable td {
|
||||
padding: 0.4rem 0rem 0.25rem 0rem;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.cssTable thead tr {
|
||||
margin-top: 0.625rem;
|
||||
}
|
||||
|
||||
.meseAnno{
|
||||
text-transform: capitalize;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.containerBtnTemp {
|
||||
position: relative;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;*/
|
||||
/*margin-bottom: 20px;*/
|
||||
/*}
|
||||
|
||||
.selDate {
|
||||
background-color: #E67E22;
|
||||
color: #000;
|
||||
}*/
|
||||
|
||||
|
||||
.statsContainer {
|
||||
border: 0.3rem solid #E67E22;
|
||||
border-radius: 0.8rem;
|
||||
|
||||
Reference in New Issue
Block a user