Userverwaltung improved

This commit is contained in:
Wieland, Marc
2026-06-08 15:45:27 +02:00
parent ee4d6cb5b1
commit dd2d47e57d
8 changed files with 164 additions and 2 deletions
+14
View File
@@ -4,6 +4,8 @@
@inject AuthService AuthService
@inject ISnackbar Snackbar
@inject AuthenticationStateProvider AuthStateProvider
@inject timetracker.Data.UserNotificationService UserNotificationService
@implements IDisposable
<PageTitle>Benutzerverwaltung Timetracker</PageTitle>
@@ -122,10 +124,22 @@ else
.User.FindFirst(ClaimTypes.NameIdentifier);
if (claim == null) return;
UserNotificationService.OnUsersChanged += RefreshUsers;
_users = await AuthService.GetAllUsersAsync();
_loading = false;
}
private async Task RefreshUsers()
{
_users = await AuthService.GetAllUsersAsync();
await InvokeAsync(StateHasChanged);
}
public void Dispose()
{
UserNotificationService.OnUsersChanged -= RefreshUsers;
}
private void StartEdit(User user)
{
_editUserId = user.Id;