Data loading update, prospect container styling

This commit is contained in:
Andre Beging
2025-03-27 16:16:48 +01:00
parent bb5ec71539
commit 572a35fd3f
11 changed files with 137 additions and 125 deletions

View File

@@ -7,37 +7,34 @@ using Microsoft.AspNetCore.Components;
namespace FoodsharingSiegen.Server.Pages
{
/// <summary>
/// The profile class (a. beging, 21.05.2022)
/// The profile class (a. beging, 21.05.2022)
/// </summary>
public partial class Profile
{
#region Dependencies (Injected)
#region Dependencies (Injected)
#region Dependencies
/// <summary>
/// Gets or sets the value of the user service (ab)
/// Gets or sets the value of the user service (ab)
/// </summary>
[Inject] public UserService? UserService { get; set; }
#endregion
[Inject]
public UserService? UserService { get; set; }
#endregion
#region Private Properties
/// <summary>
/// Gets or sets the value of the password modal (ab)
/// Gets or sets the value of the password modal (ab)
/// </summary>
private SetPasswordModal? PasswordModal { get; set; }
/// <summary>
/// Gets or sets the value of the user (ab)
/// Gets or sets the value of the user (ab)
/// </summary>
private User User { get; set; } = new();
/// <summary>
/// Gets or sets the value of the validations ref (ab)
/// Gets or sets the value of the validations ref (ab)
/// </summary>
private Validations? ValidationsRef { get; set; }
@@ -46,12 +43,12 @@ namespace FoodsharingSiegen.Server.Pages
#region Override OnAfterRenderAsync
/// <summary>
/// Ons the after render using the specified first render (a. beging, 21.05.2022)
/// Ons the after render using the specified first render (a. beging, 21.05.2022)
/// </summary>
/// <param name="firstRender">The first render</param>
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if(firstRender) await ValidationsRef?.ValidateAll()!;
if (firstRender) await ValidationsRef?.ValidateAll()!;
await base.OnAfterRenderAsync(firstRender);
}
@@ -60,13 +57,12 @@ namespace FoodsharingSiegen.Server.Pages
#region Override OnInitializedAsync
/// <summary>
/// Ons the initialized (a. beging, 21.05.2022)
/// Ons the initialized (a. beging, 21.05.2022)
/// </summary>
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
User = CurrentUser.Clone();
}
#endregion
@@ -74,7 +70,7 @@ namespace FoodsharingSiegen.Server.Pages
#region Private Method ChangePassword
/// <summary>
/// Changes the password (a. beging, 23.05.2022)
/// Changes the password (a. beging, 23.05.2022)
/// </summary>
private async Task ChangePassword()
{
@@ -86,7 +82,7 @@ namespace FoodsharingSiegen.Server.Pages
#region Private Method OnPasswordSet
/// <summary>
/// Ons the password set using the specified arg (a. beging, 23.05.2022)
/// Ons the password set using the specified arg (a. beging, 23.05.2022)
/// </summary>
/// <param name="arg">The arg</param>
private async Task OnPasswordSet(User arg)
@@ -94,7 +90,7 @@ namespace FoodsharingSiegen.Server.Pages
var setPasswordR = await UserService?.SetPassword(arg)!;
if (setPasswordR.Success)
NavigationManager?.NavigateTo("/logout");
else
else
await Notification?.Success(setPasswordR.ErrorMessage)!;
}
@@ -103,7 +99,7 @@ namespace FoodsharingSiegen.Server.Pages
#region Private Method RemoveAccount
/// <summary>
/// Removes the account (a. beging, 23.05.2022)
/// Removes the account (a. beging, 23.05.2022)
/// </summary>
private async Task RemoveAccount()
{
@@ -115,7 +111,7 @@ namespace FoodsharingSiegen.Server.Pages
#region Private Method SaveProfile
/// <summary>
/// Saves the profile (a. beging, 21.05.2022)
/// Saves the profile (a. beging, 21.05.2022)
/// </summary>
private async Task SaveProfile()
{