Files
fs-onboarding/FoodsharingSiegen.Server/Controls/ProspectSortControl.razor
2026-04-18 16:36:32 +02:00

52 lines
2.3 KiB
Plaintext

@using FoodsharingSiegen.Contracts.Enums
@inherits FoodsharingSiegen.Server.BaseClasses.FsBase
<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>
<Button Color="Color.Primary"
Width="Width.Px(50)"
Height="Height.Px(50)"
title="Filtern"
style="min-width: auto;"
Clicked="@OpenFilterDialogAsync">
<i class="fa-solid fa-filter"></i>
</Button>
<div style="flex-grow: 1;" class="mt-3">
<TextEdit Text="@Filter.Text" TextChanged="TextChangedAsync" Placeholder="Suchen..." Debounce="true" DebounceInterval="200" />
</div>
<div class="badge-row mt-1 mb-3">
@if (HasCustomSort)
{
<Badge class="mr-1" Color="Color.Primary" Closable="true" CloseClicked="@EventCallback.Factory.Create(this, ResetSortAsync)">@CurrentSortText</Badge>
}
@if (Filter.WithoutStepInBriefing)
{
<Badge class="mr-1 mb-1" Color="Color.Info" Closable="true" CloseClicked="@EventCallback.Factory.Create(this, () => DisableFilterAsync(nameof(Filter.WithoutStepInBriefing)))">Ohne @AppSettings.Terms.StepInName</Badge>
}
@if (Filter.WithoutIdCheck)
{
<Badge class="mr-1 mb-1" Color="Color.Info" Closable="true" CloseClicked="@EventCallback.Factory.Create(this, () => DisableFilterAsync(nameof(Filter.WithoutIdCheck)))">Perso noch nicht geprüft</Badge>
}
@if (Filter.RecentActivity)
{
<Badge class="mr-1 mb-1" Color="Color.Info" Closable="true" CloseClicked="@EventCallback.Factory.Create(this, () => DisableFilterAsync(nameof(Filter.RecentActivity)))">Kürzlich geändert</Badge>
}
@if (Filter.NoActivity)
{
<Badge class="mr-1 mb-1" Color="Color.Info" Closable="true" CloseClicked="@EventCallback.Factory.Create(this, () => DisableFilterAsync(nameof(Filter.NoActivity)))">Lange keine Aktivität</Badge>
}
@if (Filter.DeletedOnly)
{
<Badge class="mr-1 mb-1" Color="Color.Info" Closable="true" CloseClicked="@EventCallback.Factory.Create(this, () => DisableFilterAsync(nameof(Filter.DeletedOnly)))">Gelöschte</Badge>
}
</div>