diff --git a/MP.Stats/Components/SelectionFilter.razor b/MP.Stats/Components/SelectionFilter.razor index abc3bb9f..186d369e 100644 --- a/MP.Stats/Components/SelectionFilter.razor +++ b/MP.Stats/Components/SelectionFilter.razor @@ -2,63 +2,82 @@ @using MP.Stats.Data -
-
+
+
- - -
-
-
-
- - -
-
-
-
- - - @foreach (var item in ddlMacchine) +
+
-
-
-
-
- +
+
+
+
+ +
-
- - @foreach (var item in ddlCommesse) - { - - } - -
-
-
-
-
-
- +
+
+ + +
+
+
+
+ + + @foreach (var item in ddlMacchine) + { + + } + +
+
+
+
+
+
+ +
+ +
+ + @foreach (var item in ddlCommesse) + { + + } + +
+
+
+
+
+
+ +
+ +
+ + @foreach (var item in ddlArticoli) + { + + } +
-
- - @foreach (var item in ddlArticoli) - { - - } -
-
+

diff --git a/MP.Stats/Components/SelectionFilter.razor.cs b/MP.Stats/Components/SelectionFilter.razor.cs index 70af721e..6cfab2d6 100644 --- a/MP.Stats/Components/SelectionFilter.razor.cs +++ b/MP.Stats/Components/SelectionFilter.razor.cs @@ -150,6 +150,12 @@ namespace MP.Stats.Components #region Public Properties + [Parameter] + public EventCallback chartsToggle { get; set; } + + [Parameter] + public bool chartVisible { get; set; } = false; + [Parameter] public EventCallback filterChanged { get; set; } @@ -194,6 +200,11 @@ namespace MP.Stats.Components filterReset.InvokeAsync(SelFilter); } + protected void toggleChart() + { + chartsToggle.InvokeAsync(chartVisible); + } + #endregion Protected Methods } } \ No newline at end of file diff --git a/MP.Stats/Pages/Scarti.razor b/MP.Stats/Pages/Scarti.razor index a4973bd9..2cbadff3 100644 --- a/MP.Stats/Pages/Scarti.razor +++ b/MP.Stats/Pages/Scarti.razor @@ -3,11 +3,14 @@ @using MP.Stats.Components
-
- +
+
- + @if (ShowCharts == true) + { + + } @if (ListRecords == null) { diff --git a/MP.Stats/Pages/Scarti.razor.cs b/MP.Stats/Pages/Scarti.razor.cs index bfb8cc7c..bcd6b211 100644 --- a/MP.Stats/Pages/Scarti.razor.cs +++ b/MP.Stats/Pages/Scarti.razor.cs @@ -36,6 +36,7 @@ namespace MP.Stats.Pages private int currPage { get; set; } = 1; private bool isLoading { get; set; } = false; private int numRecord { get; set; } = 10; + private bool ShowCharts { get; set; } = false; #endregion Private Properties @@ -127,6 +128,15 @@ namespace MP.Stats.Pages await reloadData(); } + protected async Task ToggleChart(bool doShow) + { + ShowCharts = !ShowCharts; + if (ShowCharts) + { + await reloadData(); + } + } + protected async Task UpdateData() { currRecord = null;