51 lines
1.0 KiB
Plaintext
51 lines
1.0 KiB
Plaintext
@using CORE.Data.DbModels
|
|
|
|
|
|
<div class="px-1 py-0 small flex-fill @blockCss" style="width: @widthPerc">
|
|
<div class="d-flex">
|
|
@if (@CurrData.IdxFase > 0)
|
|
{
|
|
<div class="px-1">
|
|
<b>@widthPerc</b>
|
|
</div>
|
|
<div class="px-1">
|
|
<div>@CurrData.Inizio.ToString("HH:mm")</div>
|
|
<div>@CurrData.Fine.ToString("HH:mm")</div>
|
|
</div>
|
|
}
|
|
</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;
|
|
}
|
|
}
|
|
|
|
private string blockCss
|
|
{
|
|
get
|
|
{
|
|
string answ = CurrData.IdxFase == 0 ? "" : "table-info border border-info rounded";
|
|
|
|
return answ;
|
|
}
|
|
}
|
|
}
|