Data loading update, prospect container styling
This commit is contained in:
@@ -16,12 +16,14 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the prospect service (ab)
|
||||
/// </summary>
|
||||
[Inject] public ProspectService ProspectService { get; set; } = null!;
|
||||
[Inject]
|
||||
public ProspectService ProspectService { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the user service (ab)
|
||||
/// </summary>
|
||||
[Inject] public UserService UserService { get; set; } = null!;
|
||||
[Inject]
|
||||
public UserService UserService { get; set; } = null!;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -54,34 +56,18 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
|
||||
#endregion
|
||||
|
||||
#region Override OnAfterRenderAsync
|
||||
#region Override InitializeDataAsync
|
||||
|
||||
/// <summary>
|
||||
/// Ons the after render using the specified first render (a. beging, 11.04.2022)
|
||||
/// </summary>
|
||||
/// <param name="firstRender">The first render</param>
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
/// <inheritdoc />
|
||||
protected override async Task InitializeDataAsync()
|
||||
{
|
||||
if (firstRender)
|
||||
await LoadProspects();
|
||||
// Load prospects
|
||||
await LoadProspects();
|
||||
|
||||
await base.OnAfterRenderAsync(firstRender);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Override OnInitializedAsync
|
||||
|
||||
/// <summary>
|
||||
/// Ons the initialized (a. beging, 11.04.2022)
|
||||
/// </summary>
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
// Load users
|
||||
var getUsersR = await UserService.GetUsersAsync();
|
||||
if (getUsersR.Success)
|
||||
Users = getUsersR.Data;
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -108,7 +94,7 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
{
|
||||
var parameter = new GetProspectsParameter
|
||||
{
|
||||
CannotHaveInteractions = new List<InteractionType> { InteractionType.Complete, InteractionType.Verify }
|
||||
CannotHaveInteractions = [InteractionType.Complete, InteractionType.Verify]
|
||||
};
|
||||
var prospectsR = await ProspectService.GetProspectsAsync(parameter);
|
||||
if (prospectsR.Success) ProspectList = prospectsR.Data;
|
||||
|
||||
Reference in New Issue
Block a user