From aadf88db2b49dbf40bad4d7be2585b34e4bbeb97 Mon Sep 17 00:00:00 2001 From: Andre Beging Date: Fri, 28 Mar 2025 19:42:18 +0100 Subject: [PATCH] Refactor prospect filtering to support state-specific filters. Introduced a `StateFilter` parameter to `ProspectFilterControl` to enable filtering by specific prospect states. Updated related pages to utilize the new parameter and adjusted rendering logic to maintain a clean and consistent UI. --- .../Controls/ProspectFilterControl.razor | 11 ++++++++--- FoodsharingSiegen.Server/Pages/Prospects.razor | 2 +- .../Pages/ProspectsDone.razor | 17 ++++++----------- .../Pages/ProspectsVerify.razor | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/FoodsharingSiegen.Server/Controls/ProspectFilterControl.razor b/FoodsharingSiegen.Server/Controls/ProspectFilterControl.razor index 792bbf7..eda0e7e 100644 --- a/FoodsharingSiegen.Server/Controls/ProspectFilterControl.razor +++ b/FoodsharingSiegen.Server/Controls/ProspectFilterControl.razor @@ -7,6 +7,8 @@ [Parameter] public EventCallback FilterChanged { get; set; } + + [Parameter] public ProspectStateFilter StateFilter { get; set; } private async Task WithoutStepInBriefingChangedAsync(bool arg) @@ -28,9 +30,12 @@ Suchfilter
-
- Ohne @AppSettings.Terms.StepInName -
+ @if (StateFilter == ProspectStateFilter.OnBoarding) + { +
+ Ohne @AppSettings.Terms.StepInName +
+ }
\ No newline at end of file diff --git a/FoodsharingSiegen.Server/Pages/Prospects.razor b/FoodsharingSiegen.Server/Pages/Prospects.razor index 315dd52..624d5d0 100644 --- a/FoodsharingSiegen.Server/Pages/Prospects.razor +++ b/FoodsharingSiegen.Server/Pages/Prospects.razor @@ -20,7 +20,7 @@ }
- +
- +
-
@(filterList.Count) Einträge
-@if (filterList.Any()) -{ - -
- - - -
-} \ No newline at end of file + + \ No newline at end of file diff --git a/FoodsharingSiegen.Server/Pages/ProspectsVerify.razor b/FoodsharingSiegen.Server/Pages/ProspectsVerify.razor index fb6e605..74d9848 100644 --- a/FoodsharingSiegen.Server/Pages/ProspectsVerify.razor +++ b/FoodsharingSiegen.Server/Pages/ProspectsVerify.razor @@ -12,7 +12,7 @@ }
- +