using FoodsharingSiegen.Contracts.Entity; using FoodsharingSiegen.Server.Dialogs; using Microsoft.AspNetCore.Components; namespace FoodsharingSiegen.Server.Controls { public partial class ProspectContainer { [Parameter] public Prospect? Prospect { get; set; } [Parameter] public AddInteractionModal InteractionModal { get; set; } = null!; [Parameter] public AddProspectModal? ProspectModal { get; set; } = null!; [Parameter] public EventCallback RemoveInteraction { get; set; } [Parameter] public string? CssClass { get; set; } private async Task AddInteraction(InteractionType type) { await InteractionModal.Show(type, Prospect?.Id); } private List GetTyped(InteractionType type) { return Prospect?.Interactions?.Where(x => x.Type == type).ToList() ?? new List(); } } }