fixed error preventing LOA form from providing user feedback on submit when used from admin panel

This commit is contained in:
2025-12-16 19:00:27 -05:00
parent 05e6030626
commit 9196a86570
2 changed files with 4 additions and 4 deletions

View File

@@ -31,9 +31,9 @@ export async function adminSubmitLOA(request: LOARequest): Promise<{ id?: number
}); });
if (res.ok) { if (res.ok) {
return res.json(); return
} else { } else {
return { error: "Failed to submit LOA" }; throw new Error("Failed to submit LOA");
} }
} }

View File

@@ -286,8 +286,8 @@ const maxEndDate = computed(() => {
</h2> </h2>
<p class="max-w-md text-muted-foreground"> <p class="max-w-md text-muted-foreground">
Your Leave of Absence request has been submitted successfully. {{ 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. It will take effect on your selected start date.` }}
</p> </p>