From 9fc73c5c855540c30291b3149bb9af7dddb47a37 Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Fri, 7 Oct 2022 18:30:53 +0200 Subject: [PATCH] modifiche richieste --- MP.SPEC/Components/ListODL.razor | 18 +++++- MP.SPEC/Components/ParamsFilter.razor.cs | 20 ------- MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/ODL.razor | 73 +++++++++++++++++------- MP.SPEC/Pages/ODL.razor.cs | 42 +++++++++++++- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 8 files changed, 112 insertions(+), 49 deletions(-) diff --git a/MP.SPEC/Components/ListODL.razor b/MP.SPEC/Components/ListODL.razor index d09e411d..2deaad4d 100644 --- a/MP.SPEC/Components/ListODL.razor +++ b/MP.SPEC/Components/ListODL.razor @@ -80,7 +80,23 @@ else @record.DurataMinuti
- + +
+ + + diff --git a/MP.SPEC/Components/ParamsFilter.razor.cs b/MP.SPEC/Components/ParamsFilter.razor.cs index 76cd2905..25f497c7 100644 --- a/MP.SPEC/Components/ParamsFilter.razor.cs +++ b/MP.SPEC/Components/ParamsFilter.razor.cs @@ -312,26 +312,6 @@ namespace MP.SPEC.Components { FilterChanged.InvokeAsync(SelFilter); } - private void toggleShowParams() - { - showParam = !showParam; - } - private void untoggleSelDt() - { - selDt = false; - liveUpdate = true; - } - private void toggleSelDt() - { - selDt = true; - liveUpdate = false; - - if (selDtMax == null) - { - setDtMax(); - } - - } #endregion Private Methods } diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index f8703f9b..e156d2ec 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2210.717 + 6.16.2210.718 diff --git a/MP.SPEC/Pages/ODL.razor b/MP.SPEC/Pages/ODL.razor index c2c5eef2..4c841cc0 100644 --- a/MP.SPEC/Pages/ODL.razor +++ b/MP.SPEC/Pages/ODL.razor @@ -1,15 +1,16 @@ @page "/ODL"
-
-
-
-
-
-

ODL

-
-
- @**@ +
+
+
+
+

ODL

+
+
+
+
+
Completati @@ -18,19 +19,47 @@
-
-
- - +
+ + + +
+
+

FILTRI

+ +
+
+
+ Seleziona i filtri per: +
+
+ + +
+
+ +
+
+ + +
+
+ +
+
+ + +
+
diff --git a/MP.SPEC/Pages/ODL.razor.cs b/MP.SPEC/Pages/ODL.razor.cs index e80e047f..6acde664 100644 --- a/MP.SPEC/Pages/ODL.razor.cs +++ b/MP.SPEC/Pages/ODL.razor.cs @@ -101,7 +101,6 @@ namespace MP.SPEC.Pages set => currFilter.CodStato = value; } - private SelectGlobalToggle toggleFilter { get; set; } = new SelectGlobalToggle(); private int totalCount { @@ -118,6 +117,28 @@ namespace MP.SPEC.Pages get => currFilter.IsActive; set => currFilter.IsActive = value; } + protected DateTime selDtStart + { + get => currFilter.DtStart; + set + { + if (currFilter.DtStart != value) + { + currFilter.DtStart = value; + } + } + } + protected DateTime selDtEnd + { + get => currFilter.DtEnd; + set + { + if (currFilter.DtEnd != value) + { + currFilter.DtEnd = value; + } + } + } private string leftStringCSS { @@ -127,7 +148,24 @@ namespace MP.SPEC.Pages { get => isActive ? "text-dark" : "text-secondary"; } - + protected void setDtMax() + { + // copio il filtro + currFilter.DtEnd = RoundDatetime(5); + currFilter.DtStart = RoundDatetime(5).AddDays(-1); + } + /// + /// Inizializzazione con periodo e arrotondamento + /// + /// + /// + public static DateTime RoundDatetime(int minRound) + { + TimeSpan DayElapsed = DateTime.Now.Subtract(DateTime.Today); + int minDay = (int)Math.Ceiling((double)(DayElapsed.TotalMinutes / minRound)) * minRound; + DateTime endRounded = DateTime.Today.AddMinutes(minDay); + return endRounded; + } #endregion Private Methods } } \ No newline at end of file diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 3bbfb1d3..19394cc4 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2210.717

+

Versione: 6.16.2210.718


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index b1088291..7f2d395c 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2210.717 +6.16.2210.718 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 0c1a129f..925f8fc6 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2210.717 + 6.16.2210.718 https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html false