Suche auf den Prospectseiten implementieren
This commit is contained in:
@@ -27,6 +27,11 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the filter text (ab)
|
||||
/// </summary>
|
||||
private string? FilterText { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the interaction modal (ab)
|
||||
/// </summary>
|
||||
@@ -36,14 +41,14 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
/// Gets or sets the value of the prospect list (ab)
|
||||
/// </summary>
|
||||
private List<Prospect>? ProspectList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the users (ab)
|
||||
/// </summary>
|
||||
private List<User>? Users { get; set; }
|
||||
|
||||
private AddProspectModal? ProspectModal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the users (ab)
|
||||
/// </summary>
|
||||
private List<User>? Users { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Override OnAfterRenderAsync
|
||||
@@ -62,6 +67,32 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
|
||||
#endregion
|
||||
|
||||
#region Override OnInitializedAsync
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var getUsersR = await UserService.GetUsersAsync();
|
||||
if (getUsersR.Success)
|
||||
Users = getUsersR.Data;
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method FilterText_Changed
|
||||
|
||||
/// <summary>
|
||||
/// Filters the text changed using the specified filter text (a. beging, 08.02.2023)
|
||||
/// </summary>
|
||||
/// <param name="filterText">The filter text</param>
|
||||
private void FilterText_Changed(string filterText)
|
||||
{
|
||||
FilterText = filterText;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method LoadProspects
|
||||
|
||||
/// <summary>
|
||||
@@ -82,15 +113,6 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
|
||||
#endregion
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var getUsersR = await UserService.GetUsersAsync();
|
||||
if (getUsersR.Success)
|
||||
Users = getUsersR.Data;
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
#region Private Method OnAddInteraction
|
||||
|
||||
/// <summary>
|
||||
@@ -105,6 +127,20 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method OnUpdateProspect
|
||||
|
||||
/// <summary>
|
||||
/// Ons the update prospect using the specified prospect (a. beging, 11.04.2022)
|
||||
/// </summary>
|
||||
/// <param name="prospect">The prospect</param>
|
||||
private async Task OnUpdateProspect(Prospect prospect)
|
||||
{
|
||||
var updateProspectR = await ProspectService.UpdateAsync(prospect);
|
||||
if (updateProspectR.Success) await LoadProspects();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method RemoveInteraction
|
||||
|
||||
/// <summary>
|
||||
@@ -130,19 +166,5 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method OnUpdateProspect
|
||||
|
||||
/// <summary>
|
||||
/// Ons the update prospect using the specified prospect (a. beging, 11.04.2022)
|
||||
/// </summary>
|
||||
/// <param name="prospect">The prospect</param>
|
||||
private async Task OnUpdateProspect(Prospect prospect)
|
||||
{
|
||||
var updateProspectR = await ProspectService.UpdateAsync(prospect);
|
||||
if (updateProspectR.Success) await LoadProspects();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user