From 9196a86570f75c095b748476cee00e4898b48f6c Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Tue, 16 Dec 2025 19:00:27 -0500 Subject: [PATCH] fixed error preventing LOA form from providing user feedback on submit when used from admin panel --- ui/src/api/loa.ts | 4 ++-- ui/src/components/loa/loaForm.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/src/api/loa.ts b/ui/src/api/loa.ts index bd8802f..9d03071 100644 --- a/ui/src/api/loa.ts +++ b/ui/src/api/loa.ts @@ -31,9 +31,9 @@ export async function adminSubmitLOA(request: LOARequest): Promise<{ id?: number }); if (res.ok) { - return res.json(); + return } else { - return { error: "Failed to submit LOA" }; + throw new Error("Failed to submit LOA"); } } diff --git a/ui/src/components/loa/loaForm.vue b/ui/src/components/loa/loaForm.vue index 44dd7a9..a85fa07 100644 --- a/ui/src/components/loa/loaForm.vue +++ b/ui/src/components/loa/loaForm.vue @@ -286,8 +286,8 @@ const maxEndDate = computed(() => {

- Your Leave of Absence request has been submitted successfully. - It will take effect on your selected start date. + {{ adminMode ? 'You have successfully submitted a Leave of Absence for a member.' : `Your Leave of Absence request has been submitted successfully. + It will take effect on your selected start date.` }}