Fix controllo filtro (grafico)
This commit is contained in:
@@ -31,9 +31,9 @@
|
||||
<InputDateTime id="dtFine" class="form-control form-control-sm" @bind-Value="@DateEnd"></InputDateTime>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label for="idxMacc" class="small">macchina:</label>
|
||||
<div class="input-group input-group-sm" style="min-width: 15rem;">
|
||||
<div class="col" style="min-width: 10rem;">
|
||||
<label class="small">macchina:</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<select @bind="@IdxMacchina" class="form-select">
|
||||
@foreach (var item in ddlMacchine)
|
||||
{
|
||||
@@ -46,7 +46,7 @@
|
||||
{
|
||||
<div class="col">
|
||||
<div class="form-group mb-0">
|
||||
<label for="idxMacc" class="small">azione:</label>
|
||||
<label class="small">azione:</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<select @bind="@Azione" class="form-select" disabled="@(!CommessaEnabled)">
|
||||
@foreach (var item in ddlAzioni)
|
||||
@@ -61,48 +61,56 @@
|
||||
<div class="col" style="min-width: 10rem;">
|
||||
@if (!OnlyEnergy)
|
||||
{
|
||||
<label class="small">commessa:</label>
|
||||
<div class="form-group mb-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text">commessa:</label>
|
||||
</div>
|
||||
@if (string.IsNullOrEmpty(SearchCom))
|
||||
{
|
||||
<button class="btn btn-sm btn-outline-secondary"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-primary" @onclick="ResetCom"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
}
|
||||
<input class="form-control form-control-sm" @bind="@SearchCom" placeholder="search (> @minChar char)" disabled="@(!CommessaEnabled)" />
|
||||
</div>
|
||||
@if (!string.IsNullOrEmpty(SearchCom) && SearchCom.Length >= minChar)
|
||||
{
|
||||
<div class="input-group input-group-sm">
|
||||
<select @bind="@KeyRichiesta" class="form-select" disabled="@(!CommessaEnabled)">
|
||||
@if (!string.IsNullOrEmpty(SearchCom) && SearchCom.Length >= minChar)
|
||||
{
|
||||
<select @bind="@KeyRichiesta" class="form-select" style="min-width: 9rem;" disabled="@(!CommessaEnabled)">
|
||||
@foreach (var item in ddlCommesse)
|
||||
{
|
||||
<option value="@item.ValueField">@item.LabelField</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col" style="min-width: 10rem;">
|
||||
@if (!OnlyEnergy)
|
||||
{
|
||||
<label class="small">articolo:</label>
|
||||
<div class="form-group mb-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<label class="input-group-text">articolo:</label>
|
||||
</div>
|
||||
@if (string.IsNullOrEmpty(SearchArt))
|
||||
{
|
||||
<button class="btn btn-sm btn-outline-secondary"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-primary" @onclick="ResetArt"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
}
|
||||
<input class="form-control form-control-sm" @bind="@SearchArt" placeholder="search (> @minChar char)" />
|
||||
</div>
|
||||
@if (!string.IsNullOrEmpty(SearchArt) && SearchArt.Length >= minChar)
|
||||
{
|
||||
<div class="input-group input-group-sm">
|
||||
<select @bind="@CodArticolo" class="form-select">
|
||||
@if (!string.IsNullOrEmpty(SearchArt) && SearchArt.Length >= minChar)
|
||||
{
|
||||
<select @bind="@CodArticolo" class="form-select small" style="min-width: 9rem;">
|
||||
@foreach (var item in ddlArticoli)
|
||||
{
|
||||
<option value="@item.ValueField">@item.LabelField</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -111,7 +119,7 @@
|
||||
<div class="p-2">
|
||||
<div class="form-group mb-0">
|
||||
<label for="btnReset" class="small">reset</label><br />
|
||||
<button id="btnReset" class="btn btn-info btn-sm btn-block" Clicked="resetFilter"><span class="oi oi-loop-circular"></span></button>
|
||||
<button id="btnReset" class="btn btn-info btn-sm btn-block" @onclick="ResetFilter"><span class="oi oi-loop-circular"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -207,8 +207,20 @@ namespace MP.Stats.Components
|
||||
await reloadData();
|
||||
}
|
||||
|
||||
protected void resetFilter()
|
||||
protected void ResetArt()
|
||||
{
|
||||
SearchArt = "";
|
||||
}
|
||||
|
||||
protected void ResetCom()
|
||||
{
|
||||
SearchCom = "";
|
||||
}
|
||||
|
||||
protected void ResetFilter()
|
||||
{
|
||||
SearchArt = "";
|
||||
SearchCom = "";
|
||||
filterReset.InvokeAsync(SelFilter);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>MP.Stats</RootNamespace>
|
||||
<UserSecretsId>826e877c-ba70-4253-84cb-d0b1cafd4440</UserSecretsId>
|
||||
<Version>6.16.2507.0318</Version>
|
||||
<Version>6.16.2507.0318</Version>
|
||||
<Version>6.16.2507.0408</Version>
|
||||
<Version>6.16.2507.0408</Version>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<NoWarn>$(NoWarn);1591</NoWarn>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
|
||||
@@ -20,8 +20,21 @@
|
||||
<div class="card-footer d-flex justify-content-between">
|
||||
<div class="px-0">
|
||||
<div class="input-group flex-nowrap">
|
||||
<span class="input-group-text" id="addon-wrapping">Max Points</span>
|
||||
<input type="number" class="form-control" @bind="MaxPoints">
|
||||
<span class="input-group-text" id="addon-wrapping">Res</span>
|
||||
<select @bind="@ReqRes" class="form-select">
|
||||
@foreach (var item in Enum.GetValues(typeof(ResolutionLevel)))
|
||||
{
|
||||
<option value="@item">@item</option>
|
||||
}
|
||||
</select>
|
||||
@if (ReqRes == ResolutionLevel.Custom)
|
||||
{
|
||||
<input type="number" class="form-control" @bind="MaxPoints">
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="input-group-text small text-secondary">@MaxPoints</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-0">
|
||||
|
||||
@@ -141,6 +141,45 @@ namespace MP.Stats.Pages
|
||||
private List<FLModel> PlotRecords;
|
||||
private List<FLModel> SearchRecords;
|
||||
|
||||
protected ResolutionLevel ReqRes
|
||||
{
|
||||
get => _reqRes;
|
||||
set
|
||||
{
|
||||
if (_reqRes != value)
|
||||
{
|
||||
_reqRes = value;
|
||||
if (value < ResolutionLevel.Custom)
|
||||
{
|
||||
int scale = 256;
|
||||
switch (value)
|
||||
{
|
||||
case ResolutionLevel.Low:
|
||||
MaxPoints = (int)Math.Round(totalCount / 10 / (double)scale) * scale;
|
||||
break;
|
||||
case ResolutionLevel.Med:
|
||||
MaxPoints = (int)Math.Round(totalCount / 3 / (double)scale) * scale;
|
||||
break;
|
||||
case ResolutionLevel.High:
|
||||
MaxPoints = (int)Math.Round(totalCount / (double)scale) * scale;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private ResolutionLevel _reqRes = ResolutionLevel.Low;
|
||||
|
||||
protected enum ResolutionLevel
|
||||
{
|
||||
Low,
|
||||
Med,
|
||||
High,
|
||||
Custom
|
||||
}
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo statistiche MAPO</i>
|
||||
<h4>Versione: 6.16.2507.0318</h4>
|
||||
<h4>Versione: 6.16.2507.0408</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2507.0318
|
||||
6.16.2507.0408
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2507.0318</version>
|
||||
<version>6.16.2507.0408</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/MP.Stats.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-STATS/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user