Add new filters and refactor InteractionDialog handling
Introduced new filters for prospects: "WithoutIdCheck" and "NoActivity" with associated UI controls. Refactored `InteractionDialog.ShowAsync` to use a new parameter record for cleaner code and better extensibility. These changes enhance usability and maintainability by providing additional filtering options and streamlining dialog interactions.
This commit is contained in:
@@ -19,7 +19,24 @@ namespace FoodsharingSiegen.Server.Controls
|
||||
private async Task AddInteraction(InteractionType type)
|
||||
{
|
||||
if (Prospect != null && OnDataChanged != null)
|
||||
await InteractionDialog.ShowAsync(ModalService, OnDataChanged, type, Prospect.Id);
|
||||
{
|
||||
var headerText = type switch
|
||||
{
|
||||
InteractionType.EinAb => "Einführung eintragen",
|
||||
InteractionType.Welcome => "Begrüßung eintragen",
|
||||
InteractionType.IdCheck => "Ausweisprüfung eintragen",
|
||||
InteractionType.PrintPass => "FS-Ausweis (Print)",
|
||||
InteractionType.PdfPass => "FS-Ausweis (PDF)",
|
||||
InteractionType.Verify => "Verifizierung eintragen",
|
||||
InteractionType.Complete => "Als fertig markieren",
|
||||
InteractionType.StepInBriefing => $"{AppSettings.Terms.StepInName} absolviert",
|
||||
InteractionType.ReleasedForVerification => "Zur Verifizierung freigegeben",
|
||||
_ => "Neuer Eintrag"
|
||||
};
|
||||
|
||||
await InteractionDialog.ShowAsync(ModalService, new(type, Prospect.Id, headerText, OnDataChanged));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private List<Interaction> GetTyped(InteractionType type)
|
||||
|
||||
Reference in New Issue
Block a user