OnChanged { get; set; }
- [Parameter] public string SavedSearch { get; set; } = "";
-
- protected override void OnParametersSet()
- {
- _searchTerm = SavedSearch;
- }
-
- protected override void OnInitialized()
- {
- if (string.IsNullOrWhiteSpace(SavedSearch)) return;
- _searchTerm = SavedSearch;
- OnChanged.InvokeAsync(_searchTerm);
- }
private void ClearSearch()
{
- SavedSearch = "";
_searchTerm = "";
OnChanged.InvokeAsync("");
}
@@ -48,7 +34,6 @@ namespace Wonky.Client.Components
private void OnSearchChanged()
{
_timer.Dispose();
- // create new timer
_timer = new Timer(500);
_timer.AutoReset = false;
_timer.Elapsed += OnTimerElapsed;
@@ -57,7 +42,6 @@ namespace Wonky.Client.Components
private void OnTimerElapsed(object? sender, ElapsedEventArgs e)
{
- // if (!string.IsNullOrWhiteSpace(_searchTerm) && _searchTerm.Length < 3) return;
OnChanged.InvokeAsync(_searchTerm);
_timer.Elapsed -= OnTimerElapsed;
_timer.Enabled = false;
diff --git a/Wonky.Client/Pages/AllCustomersListPage.razor b/Wonky.Client/Pages/AllCustomersListPage.razor
index cc0cb50a..bc3be123 100644
--- a/Wonky.Client/Pages/AllCustomersListPage.razor
+++ b/Wonky.Client/Pages/AllCustomersListPage.razor
@@ -32,7 +32,7 @@
-
+
diff --git a/Wonky.Client/Pages/CustomerListPage.razor b/Wonky.Client/Pages/CustomerListPage.razor
index 6440d14b..9d768f28 100644
--- a/Wonky.Client/Pages/CustomerListPage.razor
+++ b/Wonky.Client/Pages/CustomerListPage.razor
@@ -28,7 +28,7 @@
-
+
diff --git a/Wonky.Client/Pages/CustomerListPage.razor.cs b/Wonky.Client/Pages/CustomerListPage.razor.cs
index 70810c4d..cf18fd93 100644
--- a/Wonky.Client/Pages/CustomerListPage.razor.cs
+++ b/Wonky.Client/Pages/CustomerListPage.razor.cs
@@ -92,16 +92,17 @@ namespace Wonky.Client.Pages
private async Task SetSearchPhrase(string searchTerm)
{
- _savedSearch = searchTerm;
- await _preferenceService.SetCompanyFilterPhrase(searchTerm.Trim());
-
- // do not trigger search unless minimum 4 chars
- if (!string.IsNullOrWhiteSpace(searchTerm) && searchTerm.Length < 4) return;
+ // if (!string.IsNullOrWhiteSpace(searchTerm) && searchTerm.Length < 3) return;
_companyList = new List();
_paging.PageNumber = 1;
_paging.SearchTerm = searchTerm;
await GetCompanies();
+ if (!string.IsNullOrWhiteSpace(searchTerm) && searchTerm.TrimEnd().Length > 2)
+ {
+ _savedSearch = searchTerm;
+ await _preferenceService.SetCompanyFilterPhrase(searchTerm.Trim());
+ }
}
private async Task SetSortCol(string orderBy)
diff --git a/Wonky.Client/Pages/ItemCatalogPage.razor b/Wonky.Client/Pages/ItemCatalogPage.razor
index c9c25fc4..1ed52282 100644
--- a/Wonky.Client/Pages/ItemCatalogPage.razor
+++ b/Wonky.Client/Pages/ItemCatalogPage.razor
@@ -31,7 +31,7 @@
-
+
diff --git a/Wonky.Client/Pages/ItemCatalogPage.razor.cs b/Wonky.Client/Pages/ItemCatalogPage.razor.cs
index 96d893d4..cab0de20 100644
--- a/Wonky.Client/Pages/ItemCatalogPage.razor.cs
+++ b/Wonky.Client/Pages/ItemCatalogPage.razor.cs
@@ -38,7 +38,6 @@ public partial class ItemCatalogPage : IDisposable
private MetaData? _metaData { get; set; } = new();
private CatalogPagingParams _paging = new();
private Preferences _preferences = new();
- private string _searchTerm { get; set; } = "";
protected override async Task OnInitializedAsync()
{
@@ -61,12 +60,6 @@ public partial class ItemCatalogPage : IDisposable
private async Task SetSearchPhrase(string searchTerm)
{
- _searchTerm = searchTerm;
-
- if (_paging.SearchColumn != "shortName"
- && !string.IsNullOrWhiteSpace(_searchTerm)
- && _searchTerm.Length < 4) return;
-
_items = new List();
_paging.PageNumber = 1;
_paging.SearchTerm = searchTerm;
diff --git a/Wonky.Client/Shared/PriceListModal.razor b/Wonky.Client/Shared/PriceListModal.razor
index 28c7c044..818caae2 100644
--- a/Wonky.Client/Shared/PriceListModal.razor
+++ b/Wonky.Client/Shared/PriceListModal.razor
@@ -30,7 +30,7 @@
-
+
@* *@
@* *@
diff --git a/Wonky.Client/Shared/PriceListModal.razor.cs b/Wonky.Client/Shared/PriceListModal.razor.cs
index b30b6d79..fa31134b 100644
--- a/Wonky.Client/Shared/PriceListModal.razor.cs
+++ b/Wonky.Client/Shared/PriceListModal.razor.cs
@@ -35,7 +35,6 @@ public partial class PriceListModal : IDisposable
private MetaData? _metaData { get; set; } = new();
private CatalogPagingParams _paging = new();
private Preferences _preferences = new();
- private string _searchTerm { get; set; } = "";
protected override async Task OnInitializedAsync()
{
@@ -56,7 +55,6 @@ public partial class PriceListModal : IDisposable
private async Task SetSearchPhrase(string searchTerm)
{
- _searchTerm = searchTerm;
_items = new List();
_paging.PageNumber = 1;
_paging.SearchTerm = searchTerm;
diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json
index b90a9357..6b76ca6d 100644
--- a/Wonky.Client/wwwroot/appsettings.json
+++ b/Wonky.Client/wwwroot/appsettings.json
@@ -1,13 +1,13 @@
{
"appInfo": {
"name": "Wonky Client",
- "version": "0.10.120",
+ "version": "0.10.125",
"rc": true,
"sandBox": false,
"image": "grumpy-coder.png"
},
"apiConfig": {
- "innoBaseUrl": "https://app.innotec.dk",
+ "innoBaseUrl": "https://api.innotec.dk",
"glsTrackUrl": "https://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/DK01/DA/5004.htm?txtAction=71000&txtRefNo=",
"glsId": "",
"serviceVirk": "api/v2/services/virk",