diff --git a/GWMS.UI/Extensions/NavigationManagerExtension.cs b/GWMS.UI/Extensions/NavigationManagerExtension.cs
index ae4544e..befd252 100644
--- a/GWMS.UI/Extensions/NavigationManagerExtension.cs
+++ b/GWMS.UI/Extensions/NavigationManagerExtension.cs
@@ -7,6 +7,15 @@ namespace GWMS.UI.Extensions
{
#region Public Methods
+ ///
+ /// Estensione metodo NavigationManager
+ ///
+ /// https://code-maze.com/query-strings-blazor-webassembly/
+ ///
+ ///
+ ///
+ ///
+ ///
public static T ExtractQueryStringByKey(this NavigationManager navManager, string key)
{
var uri = navManager.ToAbsoluteUri(navManager.Uri);
diff --git a/GWMS.UI/GWMS.UI.csproj b/GWMS.UI/GWMS.UI.csproj
index c2760d7..e3a02f9 100644
--- a/GWMS.UI/GWMS.UI.csproj
+++ b/GWMS.UI/GWMS.UI.csproj
@@ -2,7 +2,7 @@
net5.0
- 1.0.2108.2408
+ 1.0.2108.2409
95c9f021-52d1-4390-a670-5810b7b777b0
diff --git a/GWMS.UI/Pages/Transporters.razor b/GWMS.UI/Pages/Transporters.razor
index 9fe09fc..aa19632 100644
--- a/GWMS.UI/Pages/Transporters.razor
+++ b/GWMS.UI/Pages/Transporters.razor
@@ -1,5 +1,4 @@
@page "/Transporters"
-@page "/Transporters/{TransporterIdReq}"
@using Blazorise.Components
@using GWMS.UI.Components
@@ -12,11 +11,18 @@
Consegne
-
-
-
-
-
+
+
+
+
+
+ @*
+
+
*@
+
+
+
+
@@ -36,7 +42,6 @@
}
-
@if (showFiltDest)
{
@@ -61,6 +66,27 @@
}
+
diff --git a/GWMS.UI/Pages/Transporters.razor.cs b/GWMS.UI/Pages/Transporters.razor.cs
index fd8a54c..2e34be2 100644
--- a/GWMS.UI/Pages/Transporters.razor.cs
+++ b/GWMS.UI/Pages/Transporters.razor.cs
@@ -20,6 +20,8 @@ namespace GWMS.UI.Pages
private List PlantsList;
private List SearchRecords;
+ private List TransportersList;
+
#endregion Private Fields
#region Private Properties
@@ -58,6 +60,14 @@ namespace GWMS.UI.Pages
}
}
+ private string icnFiltTran
+ {
+ get
+ {
+ return showFiltTrasp ? "fas fa-chevron-up" : "fas fa-chevron-down";
+ }
+ }
+
private bool isLoading { get; set; } = false;
private int numRecord
@@ -97,6 +107,29 @@ namespace GWMS.UI.Pages
}
}
+ private int SelTranspId
+ {
+ get
+ {
+ int answ = 0;
+ if (MessageService.Order_Filter != null)
+ {
+ answ = MessageService.Order_Filter.TransporterId;
+ }
+ return answ;
+ }
+ set
+ {
+ if (!MessageService.Order_Filter.TransporterId.Equals(value))
+ {
+ currRecord = null;
+ MessageService.Order_Filter.TransporterId = value;
+ var pUpd = Task.Run(async () => await ReloadData());
+ pUpd.Wait();
+ }
+ }
+ }
+
#endregion Private Properties
#region Protected Properties
@@ -160,39 +193,23 @@ namespace GWMS.UI.Pages
protected bool showFiltDest { get; set; } = false;
protected bool showFiltTime { get; set; } = false;
+ protected bool showFiltTrasp { get; set; } = false;
protected int totalCount
{
get
{
int answ = 0;
- if (SearchRecords != null)
+ if (ListRecords != null)
{
- answ = SearchRecords.Count;
+ answ = ListRecords.Count;
}
return answ;
}
}
- protected int TransporterIdFilt
- {
- get
- {
- int answ = 0;
- int.TryParse(TransporterIdReq, out answ);
- return answ;
- }
- }
-
#endregion Protected Properties
- #region Public Properties
-
- [Parameter]
- public string TransporterIdReq { get; set; } = "";
-
- #endregion Public Properties
-
#region Private Methods
private void OnDateEndChanged(DateTime? date)
@@ -211,7 +228,8 @@ namespace GWMS.UI.Pages
{
isLoading = true;
SearchRecords = await DataService.OrdersGetFilt(MessageService.Order_Filter);
- ListRecords = SearchRecords.Where(x => x.TransporterId == TransporterIdFilt).Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
+ ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
+ //ListRecords = SearchRecords.Where(x => x.TransporterId == TransporterIdFilt).Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
isLoading = false;
}
@@ -237,6 +255,7 @@ namespace GWMS.UI.Pages
protected override async Task OnInitializedAsync()
{
SelPlantId = 0;
+ SelTranspId = 0;
MessageService.ShowSearch = false;
MessageService.PageName = "Fornitore";
MessageService.PageIcon = "fas fa-industry pr-2";
@@ -247,6 +266,7 @@ namespace GWMS.UI.Pages
protected async Task ReloadAllData()
{
PlantsList = await DataService.PlantsGetAll();
+ TransportersList = await DataService.TransportersGetAll();
await ReloadData();
}
@@ -274,7 +294,6 @@ namespace GWMS.UI.Pages
protected void ToggleFiltDest()
{
showFiltDest = !showFiltDest;
- // se nascosto --> reset
if (!showFiltDest)
{
SelPlantId = 0;
@@ -286,6 +305,11 @@ namespace GWMS.UI.Pages
showFiltTime = !showFiltTime;
}
+ protected void ToggleFiltTransp()
+ {
+ showFiltTrasp = !showFiltTrasp;
+ }
+
protected async Task UpdateData()
{
currRecord = null;
diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html
index be9c5d4..f36a3f8 100644
--- a/Resources/ChangeLog.html
+++ b/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
GWMS - Gas Warehouse Management System
- Versione: 1.0.2108.2408
+ Versione: 1.0.2108.2409
Note di rilascio:
-
diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt
index 1873de6..c3ae201 100644
--- a/Resources/VersNum.txt
+++ b/Resources/VersNum.txt
@@ -1 +1 @@
-1.0.2108.2408
+1.0.2108.2409
diff --git a/Resources/manifest.xml b/Resources/manifest.xml
index c0da644..25aee9f 100644
--- a/Resources/manifest.xml
+++ b/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 1.0.2108.2408
+ 1.0.2108.2409
http://nexus.steamware.net/repository/SWS/GWMS/stable/0/GWMS.UI.zip
http://nexus.steamware.net/repository/SWS/GWMS/stable/0/ChangeLog.html
false