diff --git a/MP.Data/Controllers/MpSpecController.cs b/MP.Data/Controllers/MpSpecController.cs index d2e07b20..7e67c870 100644 --- a/MP.Data/Controllers/MpSpecController.cs +++ b/MP.Data/Controllers/MpSpecController.cs @@ -581,7 +581,7 @@ namespace MP.Data.Controllers .AsNoTracking() .Include(m => m.MachineNav) .Include(a => a.ArticoloNav) - .OrderBy(x => x.InsertDate) + .OrderByDescending(x => x.InsertDate) .ToList(); } return dbResult; diff --git a/MP.SPEC/Components/CmpTop.razor b/MP.SPEC/Components/CmpTop.razor index 8061e546..79c66797 100644 --- a/MP.SPEC/Components/CmpTop.razor +++ b/MP.SPEC/Components/CmpTop.razor @@ -10,7 +10,10 @@
@userName
-
+
+ +
+ @*
@TipoSearch
@@ -18,7 +21,7 @@ { } -
+
*@ @code { @@ -62,4 +65,22 @@ userName = "N.A."; } } + + public async Task flushCache() + { + await Task.Delay(1); + await MDService.FlushRedisCache(); + await JSRuntime.InvokeAsync("location.reload"); + // rimando a home + //NavManager.NavigateTo("", true); + } + + [Inject] + private NavigationManager NavManager { get; set; } = null!; + + [Inject] + protected MpDataService MDService { get; set; } = null!; + + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; } diff --git a/MP.SPEC/Components/DossiersFilter.razor b/MP.SPEC/Components/DossiersFilter.razor index 145fc9dd..d8607670 100644 --- a/MP.SPEC/Components/DossiersFilter.razor +++ b/MP.SPEC/Components/DossiersFilter.razor @@ -1,7 +1,25 @@ 
- - - +
+ @if (filtActive) + { +
+ @**@ + @if (selMacchina != "*") + { + + } + @if (selArticolo != "*") + { + + } +
+ } +
+ + + +
+

FILTRI

diff --git a/MP.SPEC/Components/DossiersFilter.razor.cs b/MP.SPEC/Components/DossiersFilter.razor.cs index f5dd2bbe..98cdbe8f 100644 --- a/MP.SPEC/Components/DossiersFilter.razor.cs +++ b/MP.SPEC/Components/DossiersFilter.razor.cs @@ -38,7 +38,18 @@ namespace MP.SPEC.Components } } } - + private bool filtActive + { + get => selMacchina != "*" || selArticolo != "*"; + } + protected void resetMacchina() + { + selMacchina = "*"; + } + protected void resetArticolo() + { + selArticolo = "*"; + } protected DateTime selDtMax { get diff --git a/MP.SPEC/Components/ListPARAMS.razor.cs b/MP.SPEC/Components/ListPARAMS.razor.cs index 48e215a9..48e9b2bb 100644 --- a/MP.SPEC/Components/ListPARAMS.razor.cs +++ b/MP.SPEC/Components/ListPARAMS.razor.cs @@ -245,7 +245,7 @@ namespace MP.SPEC.Components // copio il filtro var currFilt = SelFilter; // fermo update - currFilt.LiveUpdate = true; + //currFilt.LiveUpdate = true; currFilt.CurrPage = 0; currFilt.lastUpdate = $"{DateTime.Now:yyyy/MM/dd HH:mm:ss}"; currFilt.dtMax = RoundDatetime(5); diff --git a/MP.SPEC/Components/ListPODL.razor b/MP.SPEC/Components/ListPODL.razor index 85641a6c..4bcc0552 100644 --- a/MP.SPEC/Components/ListPODL.razor +++ b/MP.SPEC/Components/ListPODL.razor @@ -37,13 +37,13 @@ else @if (canStartOdl(record.IdxMacchina)) { - } else - { - } diff --git a/MP.SPEC/Components/ParamsFilter.razor b/MP.SPEC/Components/ParamsFilter.razor index 729eff45..60bfd4ab 100644 --- a/MP.SPEC/Components/ParamsFilter.razor +++ b/MP.SPEC/Components/ParamsFilter.razor @@ -3,13 +3,13 @@
@if (!liveUpdate) { - } else { - @@ -41,103 +41,103 @@
@if (filtActive) { -
- @if (selMacchina != "*") - { - - } - @if (selFlux != "*") - { - - } -
+ @**@ + @if (selMacchina != "*") + { + + } + @if (selFlux != "*") + { + + } + } -
+
-
-
-

FILTRI

- +
+
+
+

FILTRI

+ +
+
+
+
-
-
- -
-
- - + + @if (ListMacchine != null) + { + foreach (var item in ListMacchine) { - foreach (var item in ListMacchine) - { - - } + } - -
-
- -
-
- - +
+
+ +
+
+ + -
-
- -
-
- - -
-
- -
-
- - -
-
- -
-
- - -
-
- -
-
- - -
+ } + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ +
diff --git a/MP.SPEC/Components/ParamsFilter.razor.cs b/MP.SPEC/Components/ParamsFilter.razor.cs index 0aed527a..c29423a6 100644 --- a/MP.SPEC/Components/ParamsFilter.razor.cs +++ b/MP.SPEC/Components/ParamsFilter.razor.cs @@ -211,6 +211,14 @@ namespace MP.SPEC.Components aTimer.Enabled = true; aTimer.Start(); } + protected void resetMacchina() + { + selMacchina = "*"; + } + protected void resetFase() + { + selFlux = "*"; + } protected async Task takeSnapshot() { @@ -234,18 +242,19 @@ namespace MP.SPEC.Components selDtMax = null; } - protected async Task toggleUpdate() + protected async Task notLive() { - liveUpdate = !liveUpdate; + liveUpdate = false; await Task.Delay(1); if (!liveUpdate) { lastUpdate = $"{DateTime.Now:yyyy/MM/dd HH:mm:ss}"; } - else - { - selDtMax = null; - } + } + protected async Task live() + { + liveUpdate = true; + await Task.Delay(1); } #endregion Protected Methods diff --git a/MP.SPEC/Pages/ODL.razor b/MP.SPEC/Pages/ODL.razor index e1d49972..b31a35a4 100644 --- a/MP.SPEC/Pages/ODL.razor +++ b/MP.SPEC/Pages/ODL.razor @@ -20,9 +20,27 @@
- - - +
+ @if (filtActive) + { +
+ @**@ + @if (selMacchina != "*") + { + + } + @if (selStato != "*") + { + + } +
+ } +
+ + + +
+

FILTRI

diff --git a/MP.SPEC/Pages/ODL.razor.cs b/MP.SPEC/Pages/ODL.razor.cs index a29dcdd0..592e6c2a 100644 --- a/MP.SPEC/Pages/ODL.razor.cs +++ b/MP.SPEC/Pages/ODL.razor.cs @@ -71,7 +71,19 @@ namespace MP.SPEC.Pages #endregion Protected Properties #region Protected Methods + private bool filtActive + { + get => selMacchina != "*" || selStato != "*"; + } + protected void resetMacchina() + { + selMacchina = "*"; + } + protected void resetFase() + { + selStato = "*"; + } protected void ForceReload(int newNum) { numRecord = newNum; diff --git a/MP.SPEC/Pages/PARAMS.razor.cs b/MP.SPEC/Pages/PARAMS.razor.cs index a04de781..2428b24d 100644 --- a/MP.SPEC/Pages/PARAMS.razor.cs +++ b/MP.SPEC/Pages/PARAMS.razor.cs @@ -30,7 +30,7 @@ namespace MP.SPEC.Pages currPage = newNum; DateTime adesso = DateTime.Now.AddSeconds(1); var updFilter = currFilter; - updFilter.LiveUpdate = (currPage == 1); + //updFilter.LiveUpdate = (currPage == 1); updFilter.lastUpdate = updFilter.LiveUpdate ? "-" : $"{adesso:yyyy/MM/dd HH:mm:ss}"; // salvo filtro currFilter = updFilter; @@ -127,7 +127,7 @@ namespace MP.SPEC.Pages } else { - newParams.LiveUpdate = (currPage == 1); + //newParams.LiveUpdate = (currPage == 1); } await Task.Delay(1); await InvokeAsync(() => StateHasChanged()); diff --git a/MP.SPEC/Pages/PODL.razor b/MP.SPEC/Pages/PODL.razor index edd74ebb..929bc105 100644 --- a/MP.SPEC/Pages/PODL.razor +++ b/MP.SPEC/Pages/PODL.razor @@ -12,7 +12,7 @@
@if (addEnabled) { - + }
@@ -21,19 +21,20 @@
@* *@ diff --git a/MP.SPEC/Pages/PODL.razor.cs b/MP.SPEC/Pages/PODL.razor.cs index 56c65581..351d2ed0 100644 --- a/MP.SPEC/Pages/PODL.razor.cs +++ b/MP.SPEC/Pages/PODL.razor.cs @@ -203,6 +203,21 @@ namespace MP.SPEC.Pages } } + private bool selectFirst(string idxMacchina) + { + string firstMacchina=""; + bool ans = false; + if (ListMacchine != null) + { + firstMacchina = ListMacchine.Select(x => x.IdxMacchina).FirstOrDefault(); + } + if (firstMacchina == idxMacchina) + { + ans = true; + } + return ans; + } + private string btnNewText { get => currArticolo == "" ? "Sel Articolo" : "Nuovo PODL"; diff --git a/MP.SPEC/Shared/NavMenu.razor b/MP.SPEC/Shared/NavMenu.razor index a21d13ba..f0496859 100644 --- a/MP.SPEC/Shared/NavMenu.razor +++ b/MP.SPEC/Shared/NavMenu.razor @@ -38,6 +38,7 @@ { foreach (var item in ElencoLink) { +