Move edit prospect dialog logic
This commit is contained in:
@@ -30,7 +30,7 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
#region Private Properties
|
||||
|
||||
private ProspectFilter Filter { get; set; } = new();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the interaction modal (ab)
|
||||
/// </summary>
|
||||
@@ -41,11 +41,6 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
/// </summary>
|
||||
private List<Prospect>? ProspectList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the prospect modal (ab)
|
||||
/// </summary>
|
||||
private AddProspectModal ProspectModal { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the users (ab)
|
||||
/// </summary>
|
||||
@@ -69,6 +64,19 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method CreateProspectAsync
|
||||
|
||||
/// <summary>
|
||||
/// Asynchronously creates a new prospect by displaying the AddProspectModal dialog and refreshing the prospect list.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
private async Task CreateProspectAsync()
|
||||
{
|
||||
await EditProspectDialog.ShowAsync(ModalService, LoadProspects);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method LoadProspects
|
||||
|
||||
/// <summary>
|
||||
@@ -80,7 +88,7 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
{
|
||||
CannotHaveInteractions = [InteractionType.Complete, InteractionType.Verify, InteractionType.ReleasedForVerification]
|
||||
};
|
||||
|
||||
|
||||
var prospectsR = await ProspectService.GetProspectsAsync(parameter);
|
||||
if (prospectsR.Success) ProspectList = prospectsR.Data;
|
||||
|
||||
@@ -132,7 +140,7 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method RemoveInteraction
|
||||
#region Private Method RemoveInteractionAsync
|
||||
|
||||
/// <summary>
|
||||
/// Removes the interaction using the specified arg (a. beging, 11.04.2022)
|
||||
|
||||
Reference in New Issue
Block a user