From 0c98c6d86aa0bcc071f216624f93f05be6b7eb74 Mon Sep 17 00:00:00 2001 From: Florian Edlmayer Date: Sun, 22 Feb 2026 12:47:53 +0100 Subject: [PATCH] =?UTF-8?q?Delete=20Button=20f=C3=BCr=20eigenen=20Antrag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Apply.razor | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/Apply.razor b/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/Apply.razor index c183ea6..e7ad04c 100644 --- a/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/Apply.razor +++ b/Client/Modules/SZUAbsolventenverein.Module.PremiumArea/Apply.razor @@ -74,7 +74,18 @@ else

Datum: @_existingApp.CreatedOn.ToShortDateString()

- +
+ + @if (!_confirmDelete) + { + + } + else + { + + + } +
} @@ -85,6 +96,7 @@ else private EngineerApplication _existingApp = new EngineerApplication(); private bool _showForm = true; + private bool _confirmDelete = false; private string _message = ""; protected override async Task OnInitializedAsync() @@ -160,6 +172,23 @@ else NavManager.NavigateTo(NavigateUrl()); } + private async Task DeleteApp() + { + try + { + await ApplicationService.DeleteApplicationAsync(_existingApp.ApplicationId, ModuleState.ModuleId); + _existingApp = new EngineerApplication { Status = "New" }; + _showForm = true; + _confirmDelete = false; + _message = "Antrag erfolgreich gelöscht."; + } + catch (Exception ex) + { + _message = "Fehler beim Löschen: " + ex.Message; + _confirmDelete = false; + } + } + private Task OnSelectFile(int fileId) {