From cf8113000f196f0f533efc51c8a302d8fc2cfd37 Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Mon, 15 Dec 2025 16:44:48 -0500 Subject: [PATCH 1/6] added submit feedback to LOA form --- shared/types/member.ts | 1 + ui/src/components/loa/loaForm.vue | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) 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 From 45aa59d54ae1daeca5b6a6b3a5cf6ea36ea6432a Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Mon, 15 Dec 2025 17:18:49 -0500 Subject: [PATCH 2/6] Updated end/cancel button wording --- ui/src/components/loa/loaList.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/loa/loaList.vue b/ui/src/components/loa/loaList.vue index 386f392..f0059f5 100644 --- a/ui/src/components/loa/loaList.vue +++ b/ui/src/components/loa/loaList.vue @@ -172,7 +172,7 @@ async function commitExtend() { Extend End + @click="cancelAndReload(post.id)">{{ loaStatus(post) === 'Upcoming' ? 'Cancel' : 'End' }}

From 8aaaea5ed007bdccf6f9ca89c93c07a74ddb4085 Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Mon, 15 Dec 2025 17:28:04 -0500 Subject: [PATCH 3/6] updated button semantics --- ui/src/components/loa/loaList.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/components/loa/loaList.vue b/ui/src/components/loa/loaList.vue index f0059f5..2a911a8 100644 --- a/ui/src/components/loa/loaList.vue +++ b/ui/src/components/loa/loaList.vue @@ -172,10 +172,12 @@ async function commitExtend() { Extend {{ loaStatus(post) === 'Upcoming' ? 'Cancel' : 'End' }} + @click="cancelAndReload(post.id)">{{ loaStatus(post) === 'Upcoming' ? 'Cancel' : + 'End' }} -

+

No actions

From 2a0d7c2ff2606ae0cb37133deb044ad3597d618f Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Mon, 15 Dec 2025 19:06:07 -0500 Subject: [PATCH 4/6] implemented expandable LOA details --- ui/src/components/loa/loaList.vue | 125 ++++++++++++++++++++---------- 1 file changed, 84 insertions(+), 41 deletions(-) diff --git a/ui/src/components/loa/loaList.vue b/ui/src/components/loa/loaList.vue index 2a911a8..edc28c1 100644 --- a/ui/src/components/loa/loaList.vue +++ b/ui/src/components/loa/loaList.vue @@ -15,7 +15,7 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" -import { Ellipsis } from "lucide-vue-next"; +import { ChevronDown, ChevronUp, Ellipsis, X } from "lucide-vue-next"; import { cancelLOA, extendLOA, getAllLOAs, getMyLOAs } from "@/api/loa"; import { onMounted, ref, computed } from "vue"; import { LOARequest } from "@shared/types/loa"; @@ -104,6 +104,9 @@ async function commitExtend() { isExtending.value = false; await loadLOAs(); } + +const expanded = ref(null); +const hoverID = ref(null); diff --git a/ui/src/components/ui/pagination/Pagination.vue b/ui/src/components/ui/pagination/Pagination.vue new file mode 100644 index 0000000..7ac2a36 --- /dev/null +++ b/ui/src/components/ui/pagination/Pagination.vue @@ -0,0 +1,33 @@ + + + diff --git a/ui/src/components/ui/pagination/PaginationContent.vue b/ui/src/components/ui/pagination/PaginationContent.vue new file mode 100644 index 0000000..61f7809 --- /dev/null +++ b/ui/src/components/ui/pagination/PaginationContent.vue @@ -0,0 +1,24 @@ + + + diff --git a/ui/src/components/ui/pagination/PaginationEllipsis.vue b/ui/src/components/ui/pagination/PaginationEllipsis.vue new file mode 100644 index 0000000..48e04a6 --- /dev/null +++ b/ui/src/components/ui/pagination/PaginationEllipsis.vue @@ -0,0 +1,27 @@ + + + diff --git a/ui/src/components/ui/pagination/PaginationFirst.vue b/ui/src/components/ui/pagination/PaginationFirst.vue new file mode 100644 index 0000000..8fe158b --- /dev/null +++ b/ui/src/components/ui/pagination/PaginationFirst.vue @@ -0,0 +1,36 @@ + + + diff --git a/ui/src/components/ui/pagination/PaginationItem.vue b/ui/src/components/ui/pagination/PaginationItem.vue new file mode 100644 index 0000000..7a6b6ef --- /dev/null +++ b/ui/src/components/ui/pagination/PaginationItem.vue @@ -0,0 +1,35 @@ + + + diff --git a/ui/src/components/ui/pagination/PaginationLast.vue b/ui/src/components/ui/pagination/PaginationLast.vue new file mode 100644 index 0000000..7c67efa --- /dev/null +++ b/ui/src/components/ui/pagination/PaginationLast.vue @@ -0,0 +1,36 @@ + + + diff --git a/ui/src/components/ui/pagination/PaginationNext.vue b/ui/src/components/ui/pagination/PaginationNext.vue new file mode 100644 index 0000000..40c1ee6 --- /dev/null +++ b/ui/src/components/ui/pagination/PaginationNext.vue @@ -0,0 +1,36 @@ + + + diff --git a/ui/src/components/ui/pagination/PaginationPrevious.vue b/ui/src/components/ui/pagination/PaginationPrevious.vue new file mode 100644 index 0000000..b682259 --- /dev/null +++ b/ui/src/components/ui/pagination/PaginationPrevious.vue @@ -0,0 +1,36 @@ + + + diff --git a/ui/src/components/ui/pagination/index.js b/ui/src/components/ui/pagination/index.js new file mode 100644 index 0000000..349edff --- /dev/null +++ b/ui/src/components/ui/pagination/index.js @@ -0,0 +1,8 @@ +export { default as Pagination } from "./Pagination.vue"; +export { default as PaginationContent } from "./PaginationContent.vue"; +export { default as PaginationEllipsis } from "./PaginationEllipsis.vue"; +export { default as PaginationFirst } from "./PaginationFirst.vue"; +export { default as PaginationItem } from "./PaginationItem.vue"; +export { default as PaginationLast } from "./PaginationLast.vue"; +export { default as PaginationNext } from "./PaginationNext.vue"; +export { default as PaginationPrevious } from "./PaginationPrevious.vue"; diff --git a/ui/src/pages/ManageLOA.vue b/ui/src/pages/ManageLOA.vue index 1d9298f..37512ac 100644 --- a/ui/src/pages/ManageLOA.vue +++ b/ui/src/pages/ManageLOA.vue @@ -30,10 +30,12 @@ const showLOADialog = ref(false);
-
- +
+

LOA Log

+
+ +
-

LOA Log