+
Support Dokumentation
+
@@ -80,3 +85,7 @@ else
{
Ingen data
}
+
+
+
+
diff --git a/Wonky.Client/Pages/SupervisorDocumentListPage.razor.cs b/Wonky.Client/Pages/SupervisorDocumentListPage.razor.cs
index dc9ff3d2..48d7ad39 100644
--- a/Wonky.Client/Pages/SupervisorDocumentListPage.razor.cs
+++ b/Wonky.Client/Pages/SupervisorDocumentListPage.razor.cs
@@ -17,6 +17,7 @@ using System.Text.Json;
using Microsoft.AspNetCore.Components;
using Wonky.Client.HttpInterceptors;
using Wonky.Client.HttpRepository;
+using Wonky.Client.Shared;
using Wonky.Entity.DTO;
using Wonky.Entity.Views;
@@ -39,7 +40,8 @@ public partial class SupervisorDocumentListPage : IDisposable
private List
Documents { get; set; } = new();
private SupportAdvisorView Advisor { get; set; } = new();
private bool Working { get; set; } = true;
-
+ private ConfirmActionModal _confirmDeleteDocuments = new();
+ private string _deleteMessage = "";
protected override async Task OnInitializedAsync()
{
@@ -60,7 +62,23 @@ public partial class SupervisorDocumentListPage : IDisposable
Working = false;
}
+
+
+ private void ShowConfirmAction()
+ {
+ _deleteMessage = $"Bekræft sletning af dokumenter for {Advisor.FullName}. Handlinger kan ikke fortryders.";
+ _confirmDeleteDocuments.Show();
+ }
+
+ private async Task RemoveDocuments()
+ {
+ foreach (var document in Documents)
+ {
+ await DocumentRepo.DeleteDocument(document.DocumentId);
+ }
+ Documents.Clear();
+ }
public void Dispose()
{
diff --git a/Wonky.Client/Pages/SupervisorDocumentViewEditPage.razor b/Wonky.Client/Pages/SupervisorDocumentViewEditPage.razor
index 54733e47..bbdec467 100644
--- a/Wonky.Client/Pages/SupervisorDocumentViewEditPage.razor
+++ b/Wonky.Client/Pages/SupervisorDocumentViewEditPage.razor
@@ -36,7 +36,7 @@