Audit all changes made in the admin view.

This commit is contained in:
2020-06-10 00:27:39 +01:00
parent c6941d1450
commit e111dc5e32
89 changed files with 516 additions and 236 deletions

View File

@@ -28,6 +28,7 @@ using System.Linq;
using System.Threading.Tasks;
using Blazorise;
using Marechai.ViewModels;
using Microsoft.AspNetCore.Components.Authorization;
namespace Marechai.Pages.Admin
{
@@ -53,11 +54,12 @@ namespace Marechai.Pages.Admin
_deleteInProgress = true;
_processors = null;
AuthenticationState authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
// Yield thread to let UI to update
await Task.Yield();
await Service.DeleteAsync(_processor.Id);
await Service.DeleteAsync(_processor.Id, (await UserManager.GetUserAsync(authState.User)).Id);
_processors = await Service.GetAsync();
_deleteInProgress = false;