Update VerificationSettingsDialog: restrict image viewing button to admin and ambassador users, and enhance delete confirmation message
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
@using Blazorise
|
||||
@using FoodsharingSiegen.Contracts.Enums
|
||||
@inherits FsBase
|
||||
|
||||
<div class="mt-1 mb-3">
|
||||
@@ -22,9 +23,13 @@
|
||||
<i class="fa-solid fa-link me-2"></i> Upload-Link erstellen / anzeigen
|
||||
</Button>
|
||||
|
||||
<Button Color="Color.Success" Clicked="@ViewImagesAsync" Disabled="@(ImageCount == 0)">
|
||||
<i class="fa-solid fa-images me-2"></i> Hochgeladene Bilder ansehen (@ImageCount)
|
||||
</Button>
|
||||
@if(CurrentUser.IsAdmin() || CurrentUser.IsInGroup(UserGroup.Ambassador))
|
||||
{
|
||||
<Button Color="Color.Success" Clicked="@ViewImagesAsync" Disabled="@(ImageCount == 0)">
|
||||
<i class="fa-solid fa-images me-2"></i> Hochgeladene Bilder ansehen (@ImageCount)
|
||||
</Button>
|
||||
}
|
||||
|
||||
|
||||
<Button Color="Color.Danger" Clicked="@DeleteImagesAsync" Disabled="@(ImageCount == 0)">
|
||||
<i class="fa-solid fa-trash-can me-2"></i> Alle Bilder löschen
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace FoodsharingSiegen.Server.Dialogs
|
||||
{
|
||||
if (Prospect == null) return;
|
||||
|
||||
await ConfirmDialog.ShowAsync(ModalService, "Bilder Löschen", "Sollen alle Identitätsprüfungsbilder dieses Users unwiderruflich gelöscht werden?", async () =>
|
||||
await ConfirmDialog.ShowAsync(ModalService, "Bilder Löschen", $"Sollen alle Identitätsprüfungsbilder von {Prospect.Name} unwiderruflich gelöscht werden?", async () =>
|
||||
{
|
||||
var result = await ProspectService.DeleteVerificationImagesAsync(Prospect.Id);
|
||||
if (result.Success)
|
||||
|
||||
Reference in New Issue
Block a user