From 959d0f8f5a71e8d3aaebca4d10c5922bd4d8909b Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 14 Apr 2025 12:17:24 +0200 Subject: [PATCH] SPEC: inizio gestione filtro selezione a cascata --- .../Components/ProdKit/KitPodlMan.razor.cs | 5 ++- MP.SPEC/Components/ProdKit/Manager.razor.cs | 38 +++++++++++++------ MP.SPEC/MP.SPEC.csproj | 2 +- MP.SPEC/Pages/Podl2Kit.razor | 2 +- MP.SPEC/Pages/Podl2Kit.razor.cs | 13 ++++++- MP.SPEC/Resources/ChangeLog.html | 2 +- MP.SPEC/Resources/VersNum.txt | 2 +- MP.SPEC/Resources/manifest.xml | 2 +- 8 files changed, 45 insertions(+), 21 deletions(-) diff --git a/MP.SPEC/Components/ProdKit/KitPodlMan.razor.cs b/MP.SPEC/Components/ProdKit/KitPodlMan.razor.cs index ef70b1c6..72f71ef1 100644 --- a/MP.SPEC/Components/ProdKit/KitPodlMan.razor.cs +++ b/MP.SPEC/Components/ProdKit/KitPodlMan.razor.cs @@ -24,6 +24,9 @@ namespace MP.SPEC.Components.ProdKit [Parameter] public EventCallback UpdateRecordCount { get; set; } + [Parameter] + public SelectXdlParams ActFilter { get; set; } = new SelectXdlParams(); + #endregion Public Properties #region Public Methods @@ -55,8 +58,6 @@ namespace MP.SPEC.Components.ProdKit #region Protected Properties - protected SelectXdlParams ActFilter { get; set; } = new SelectXdlParams(); - [Inject] protected IJSRuntime JSRuntime { get; set; } = null!; diff --git a/MP.SPEC/Components/ProdKit/Manager.razor.cs b/MP.SPEC/Components/ProdKit/Manager.razor.cs index d6014267..5d9341a8 100644 --- a/MP.SPEC/Components/ProdKit/Manager.razor.cs +++ b/MP.SPEC/Components/ProdKit/Manager.razor.cs @@ -7,20 +7,24 @@ namespace MP.SPEC.Components.ProdKit { public partial class Manager { - #region Protected Properties + #region Public Properties + [Parameter] + public SelectXdlParams ActFilt { get; set; } = new SelectXdlParams(); [Parameter] public bool DoAddNew { get; set; } = false; + #endregion Public Properties + + #region Protected Properties + [Inject] protected MpDataService MDService { get; set; } = null!; #endregion Protected Properties #region Protected Methods - protected SelectXdlParams ActFilt { get; set; } = new SelectXdlParams(); - protected override void OnInitialized() { @@ -50,11 +54,6 @@ namespace MP.SPEC.Components.ProdKit ReloadData(); } - private string KPColClass - { - get => DoAddNew ? "col-6" : "col-12"; - } - /// /// Salvataggio su Tab WIP dei dati del PODL ricevuto... /// @@ -96,17 +95,32 @@ namespace MP.SPEC.Components.ProdKit private PODLExpModel? currPodlRec = null; private bool isLoading = false; + private string keyFilt = ""; - private List listPOdlAct = new List(); - private List listPOdlCheck = new List(); - private List listTSM = new List(); - private List listWSM = new List(); private List listIKP = new List(); + + private List listPOdlAct = new List(); + + private List listPOdlCheck = new List(); + + private List listTSM = new List(); + + private List listWSM = new List(); + private string padCodXdl = "00000"; #endregion Private Fields + #region Private Properties + + private string KPColClass + { + get => DoAddNew ? "col-6" : "col-12"; + } + + #endregion Private Properties + #region Private Methods private void ForceReloadData(bool doReload) diff --git a/MP.SPEC/MP.SPEC.csproj b/MP.SPEC/MP.SPEC.csproj index 3a1d21b8..1f4f11eb 100644 --- a/MP.SPEC/MP.SPEC.csproj +++ b/MP.SPEC/MP.SPEC.csproj @@ -5,7 +5,7 @@ enable enable MP.SPEC - 6.16.2504.1411 + 6.16.2504.1412 1800a78a-6ff1-40f9-b490-87fb8bfc1394 en diff --git a/MP.SPEC/Pages/Podl2Kit.razor b/MP.SPEC/Pages/Podl2Kit.razor index 6e2196b9..7b8a28a5 100644 --- a/MP.SPEC/Pages/Podl2Kit.razor +++ b/MP.SPEC/Pages/Podl2Kit.razor @@ -42,7 +42,7 @@
- + @* *@
diff --git a/MP.SPEC/Pages/Podl2Kit.razor.cs b/MP.SPEC/Pages/Podl2Kit.razor.cs index e6a77182..77f36be8 100644 --- a/MP.SPEC/Pages/Podl2Kit.razor.cs +++ b/MP.SPEC/Pages/Podl2Kit.razor.cs @@ -184,6 +184,16 @@ namespace MP.SPEC.Pages { int.TryParse(rawVal, out minChar); } + // filtro base... + DateTime oggi = DateTime.Today; + currFilter = new SelectXdlParams() + { + DtEnd = oggi.AddDays(1), + DtStart = oggi.AddYears(-1), + HasOdl = false, + MaxRecord = 1000, + NumRec = 5 + }; } protected override void OnParametersSet() @@ -359,10 +369,9 @@ namespace MP.SPEC.Pages { isLoading = true; currPage = 1; - // salvo comunque filtro reparto x utente + // salvo filtro reparto x utente... spostare in componente? await localStorage.SetItemAsync("reparto", repartoSel); ReloadData(); - //await InvokeAsync(() => StateHasChanged()); currFilter = newParams; isLoading = false; } diff --git a/MP.SPEC/Resources/ChangeLog.html b/MP.SPEC/Resources/ChangeLog.html index 677a7472..058f22d3 100644 --- a/MP.SPEC/Resources/ChangeLog.html +++ b/MP.SPEC/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2504.1411

+

Versione: 6.16.2504.1412


Note di rilascio:
  • diff --git a/MP.SPEC/Resources/VersNum.txt b/MP.SPEC/Resources/VersNum.txt index ad4b4271..56661bdd 100644 --- a/MP.SPEC/Resources/VersNum.txt +++ b/MP.SPEC/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2504.1411 +6.16.2504.1412 diff --git a/MP.SPEC/Resources/manifest.xml b/MP.SPEC/Resources/manifest.xml index 73613dfb..7c0db2be 100644 --- a/MP.SPEC/Resources/manifest.xml +++ b/MP.SPEC/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2504.1411 + 6.16.2504.1412 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