Prospects Page

This commit is contained in:
Andre Beging
2022-04-02 15:28:45 +02:00
parent efa27a2122
commit 51088460b4
6 changed files with 242 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
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 EventCallback<Guid> RemoveInteraction { get; set; }
private async Task AddInteraction(InteractionType type)
{
await InteractionModal.Show(type, Prospect?.Id);
}
private List<Interaction> GetTyped(InteractionType type)
{
return Prospect?.Interactions?.Where(x => x.Type == type).ToList() ?? new List<Interaction>();
}
}
}