Add sorting functionality for prospects with new ProspectSortControl component
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
@page "/prospect"
|
||||
@page "/prospects"
|
||||
|
||||
@using FoodsharingSiegen.Contracts
|
||||
@using FoodsharingSiegen.Contracts.Enums
|
||||
@using FoodsharingSiegen.Shared.Helper
|
||||
@inherits FsBase
|
||||
@@ -25,28 +26,11 @@
|
||||
><i class="fa-solid fa-plus"></i>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
Color="Color.Primary"
|
||||
Width="Width.Px(50)"
|
||||
Height="Height.Px(50)"
|
||||
title="Sortieren"
|
||||
style="min-width: auto;"
|
||||
Clicked="@OpenSortDialogAsync"
|
||||
><i class="fa-solid fa-sort"></i>
|
||||
</Button>
|
||||
|
||||
<div class="badge-row mt-2">
|
||||
@if (HasCustomSort)
|
||||
{
|
||||
<Badge Color="Color.Primary" Closable="true" CloseClicked="@EventCallback.Factory.Create(this, ResetSortAsync)">@CurrentSortText</Badge>
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
<ProspectSortControl @bind-CurrentSort="CurrentSort" StorageKey="@StorageKeys.SortProspects" OnSortChanged="StateHasChanged" />
|
||||
|
||||
@{
|
||||
var filterList = ProspectList.ApplyFilter(Filter);
|
||||
var sortList = SortProspects(filterList);
|
||||
var sortList = filterList.ApplySort(CurrentSort);
|
||||
}
|
||||
|
||||
<hr/>
|
||||
|
||||
Reference in New Issue
Block a user