115 lines
4.2 KiB
Plaintext
115 lines
4.2 KiB
Plaintext
<div class="card border-dark shadow">
|
|
<div class="card-header py-1 bg-dark text-light">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="d-flex">
|
|
<div>
|
|
<div class="h3 mb-0">Statistiche</div>
|
|
</div>
|
|
<div class="px-2">
|
|
<button class="btn @CssToggleChart" @onclick="ToggleGraph">
|
|
<i class="fas fa-chart-area"></i> @ChartTitle
|
|
@if (ShowCharts)
|
|
{
|
|
<i class="fas fa-chevron-down"></i>
|
|
}
|
|
else
|
|
{
|
|
<i class="fas fa-chevron-up"></i>
|
|
}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="d-flex">
|
|
<div>
|
|
<div class="custom-control custom-switch text-center pt-2 px-2">
|
|
<input type="checkbox" class="custom-control-input" id="swtFattParz" @bind="@ShowCumSum">
|
|
<label class="custom-control-label" for="swtFattParz">@cumSumMsg</label>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<select @bind="@StatReq" class="form-control form-control">
|
|
@foreach (var value in Enum.GetValues(typeof(StatAvail)))
|
|
{
|
|
<option>@value</option>
|
|
}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body p-2 py-0">
|
|
@if (MonthStatRecords == null)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (MonthStatRecords.Count == 0)
|
|
{
|
|
<alert class="alert alert-primary p-3 my-0 w-100 text-center">
|
|
Nessun record trovato
|
|
</alert>
|
|
}
|
|
else
|
|
{
|
|
@if (ShowCharts)
|
|
{
|
|
<div class="row" style="height: 400px;">
|
|
<div class="col-12">
|
|
@if (MonthlyDS == null || MonthlyDS.Count == 0)
|
|
{
|
|
<LoadingDataSmall></LoadingDataSmall>
|
|
}
|
|
else
|
|
{
|
|
<ChartMultiLine DataSets="MonthlyDS" ChartLabels="ChartLabels" Id="MonthData"></ChartMultiLine>
|
|
}
|
|
</div>
|
|
</div>
|
|
}
|
|
<table class="table table-sm table-striped mb-1">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
Anno
|
|
</th>
|
|
@for (int i = 1; i <= 12; i++)
|
|
{
|
|
<th class="text-right">
|
|
@($"{i:00}")
|
|
</th>
|
|
}
|
|
@if (!showCumSum)
|
|
{
|
|
<th class="text-right">
|
|
Tot
|
|
</th>
|
|
}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
@foreach (var anno in MonthStatRecords)
|
|
{
|
|
decimal totalVal = 0;
|
|
<tr>
|
|
<td><b>@anno.Key</b></td>
|
|
@foreach (var mese in anno.Value)
|
|
{
|
|
totalVal += @mese.Value;
|
|
<td class="text-right">
|
|
@mese.Value.ToString("C2")
|
|
</td>
|
|
}
|
|
@if (!showCumSum)
|
|
{
|
|
<td class="text-right">
|
|
<b>@totalVal.ToString("C2")</b>
|
|
</td>
|
|
}
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
}
|
|
</div>
|
|
</div>
|