diff --git a/shared/types/member.ts b/shared/types/member.ts index 20e0469..c0fbf95 100644 --- a/shared/types/member.ts +++ b/shared/types/member.ts @@ -14,6 +14,7 @@ export enum MemberState { export type Member = { member_id: number; member_name: string; + displayName?: string; rank: string | null; rank_date: string | null; unit: string | null; diff --git a/ui/src/components/loa/loaForm.vue b/ui/src/components/loa/loaForm.vue index a7362b8..2bb5d20 100644 --- a/ui/src/components/loa/loaForm.vue +++ b/ui/src/components/loa/loaForm.vue @@ -2,7 +2,8 @@ import { Check, Search } from "lucide-vue-next" import { ComboboxAnchor, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxItemIndicator, ComboboxList } from "@/components/ui/combobox" import { computed, onMounted, ref, watch } from "vue"; -import { Member, getMembers } from "@/api/member"; +import { getMembers } from "@/api/member"; +import { Member } from "@shared/types/member"; import Button from "@/components/ui/button/Button.vue"; import { CalendarDate, @@ -70,6 +71,8 @@ const { handleSubmit, values, resetForm } = useForm({ validationSchema: toTypedSchema(loaSchema), }) +const formSubmitted = ref(false); + const onSubmit = handleSubmit(async (values) => { console.log(values); const out: LOARequest = { @@ -85,6 +88,7 @@ const onSubmit = handleSubmit(async (values) => { await submitLOA(out); userStore.loadUser(); } + formSubmitted.value = true; }) onMounted(async () => { @@ -137,7 +141,7 @@ const maxEndDate = computed(() => {
-
+
@@ -272,6 +276,24 @@ const maxEndDate = computed(() => {
+
+

+ LOA Request Submitted +

+ +

+ Your Leave of Absence request has been submitted successfully. + It will take effect on your selected start date. +

+ + +
+ +
+
+
\ No newline at end of file