Move edit prospect dialog logic
This commit is contained in:
@@ -10,8 +10,6 @@ namespace FoodsharingSiegen.Server.Controls
|
||||
|
||||
[Parameter] public AddInteractionModal InteractionModal { get; set; } = null!;
|
||||
|
||||
[Parameter] public AddProspectModal? ProspectModal { get; set; } = null!;
|
||||
|
||||
[Parameter] public Func<Guid, Task>? RemoveInteraction { get; set; }
|
||||
|
||||
[Parameter] public ProspectStateFilter StateFilter { get; set; }
|
||||
@@ -26,7 +24,12 @@ namespace FoodsharingSiegen.Server.Controls
|
||||
|
||||
private List<Interaction> GetTyped(InteractionType type)
|
||||
{
|
||||
return Prospect?.Interactions?.Where(x => x.Type == type).ToList() ?? new List<Interaction>();
|
||||
return Prospect?.Interactions?.Where(x => x.Type == type).ToList() ?? [];
|
||||
}
|
||||
|
||||
private async Task EditProspectAsync()
|
||||
{
|
||||
await EditProspectDialog.ShowAsync(ModalService, () => InvokeAsync(StateHasChanged), Prospect);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user