Bozza distribuzione durate periodi x DayHoriz

This commit is contained in:
Samuele Locatelli
2021-12-10 17:52:35 +01:00
parent ccfc4a525f
commit dc96cf8d4e
3 changed files with 69 additions and 5 deletions
+33 -2
View File
@@ -27,7 +27,20 @@
}
else
{
<Test></Test>
@if (@noData)
{
<i>NO data</i>
}
else if (DayDTO != null && DayDTO.ListRA != null)
{
<div class="d-flex justify-content-around text-center border border-dark border-top-0 border-left-0 border-right-0">
@foreach (var item in DayDTO.ListRA)
{
<RegAtt CurrData="item" Periodo="periodo"></RegAtt>
}
</div>
}
@*<Test></Test>*@
}
</div>
<div class="py-2 px-1 small text-right" style="width: 5.5em;">
@@ -59,13 +72,18 @@
[Parameter]
public bool IsTitle { get; set; } = false;
private bool noData
{
get => DayDTO == null || DayDTO.ListRA == null || DayDTO.ListRA.Count == 0;
}
private string TotLav
{
get
{
TimeSpan tSpan = TimeSpan.Zero;
double answ = 0;
if (DayDTO != null && DayDTO.TimbrExpl != null)
if (DayDTO != null && DayDTO.TimbrExpl != null && DayDTO.TimbrExpl.HLav != null)
{
answ = (double)DayDTO.TimbrExpl.HLav;
tSpan = TimeSpan.FromHours(answ);
@@ -89,4 +107,17 @@
}
}
private int periodo
{
get
{
int answ=1;
if (DayDTO != null)
{
answ = EndHour - StartHour;
}
return answ;
}
}
}
+30
View File
@@ -0,0 +1,30 @@
@using CORE.Data.DbModels
<div class="px-1 py-0 small border flex-fill" style="width: @widthPerc">
<div>@CurrData.Inizio</div>
<div>@CurrData.Fine</div>
</div>
@code {
[Parameter]
public RegAttivitaModel CurrData { get; set; }
[Parameter]
public int Periodo { get; set; } = 1;
private string widthPerc
{
get
{
string answ = "1%";
if (CurrData != null)
{
answ = $"{CurrData.OreTot/Periodo:P0}";
}
return answ;
}
}
}
+6 -3
View File
@@ -1,7 +1,7 @@
<div style="height: 4em;">
<div class="progress" style="height: 4em; width: 20%; float:left; vertical-align: middle;">
<div class="progress-bar bg-light text-dark" style="width:100%">
vuoto
vuoto
</div>
</div>
<div class="progress" style="height: 4em; width: 30%;float:left;">
@@ -9,12 +9,15 @@
Free Space
</div>
<div class="progress-bar bg-warning" style="width:34%">
Warning
<div>
Warning
<button class="btn btn-sm btn-primary">+</button>
</div>
</div>
</div>
<div class="progress" style="height: 4em; width: 10%; float:left;">
<div class="progress-bar bg-light text-dark" style="width:100%">
vuoto
vuoto
</div>
</div>
<div class="progress" style="height: 4em; width: 40%;float:left;">