Fixed a bunch of warnings
This commit is contained in:
@@ -28,7 +28,7 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the password modal (ab)
|
||||
/// </summary>
|
||||
private SetPasswordModal PasswordModal { get; set; }
|
||||
private SetPasswordModal? PasswordModal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the selected company texts (ab)
|
||||
@@ -43,7 +43,7 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the user data grid (ab)
|
||||
/// </summary>
|
||||
private DataGrid<User> UserDataGrid { get; set; }
|
||||
private DataGrid<User>? UserDataGrid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value of the user groups (ab)
|
||||
@@ -96,9 +96,9 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
/// <param name="user">The user</param>
|
||||
private async Task OnPasswordSet(User user)
|
||||
{
|
||||
var setPasswordR = await UserService?.SetPassword(user)!;
|
||||
var setPasswordR = await UserService.SetPassword(user);
|
||||
if(setPasswordR.Success)
|
||||
await Notification?.Success("Passwort gespeichert")!;
|
||||
await Notification.Success("Passwort gespeichert");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -113,7 +113,7 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
{
|
||||
var addUserR = await UserService.AddUserAsync(arg.Item);
|
||||
if (!addUserR.Success)
|
||||
await Notification?.Error($"Fehler beim Anlegen: {addUserR.ErrorMessage}")!;
|
||||
await Notification.Error($"Fehler beim Anlegen: {addUserR.ErrorMessage}")!;
|
||||
else
|
||||
await LoadUsers();
|
||||
}
|
||||
@@ -130,7 +130,10 @@ namespace FoodsharingSiegen.Server.Pages
|
||||
{
|
||||
if (arg.Item?.Id == null || arg.Item.Id.Equals(Guid.Empty) || arg.Values?.Any() != true) return;
|
||||
|
||||
var result = await UserService.Update(arg.Item);
|
||||
var updateR = await UserService.Update(arg.Item);
|
||||
if(!updateR.Success)
|
||||
await Notification.Error($"Fehler beim Speichern: {updateR.ErrorMessage}")!;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user