Did more stuff than I even wanna write. Notably:

- Auth/account management
- Navigation system
- Admin views for LOA stuff
This commit is contained in:
2025-09-18 20:33:19 -04:00
parent 4fcd485e75
commit f708349a99
20 changed files with 2139 additions and 85 deletions

View File

@@ -0,0 +1,59 @@
<script setup lang="ts">
import {
Table,
TableBody,
TableCaption,
TableCell,
TableHead,
TableHeader,
TableRow,
} from "@/components/ui/table"
import { getAllLOAs, LOARequest } from "@/api/loa";
import { onMounted, ref } from "vue";
const LOAList = ref<LOARequest[]>([]);
onMounted(async () => {
LOAList.value = await getAllLOAs();
});
function formatDate(dateStr: string): string {
if (!dateStr) return "";
return new Date(dateStr).toLocaleDateString("en-US", {
year: "numeric",
month: "short",
day: "numeric",
});
}
</script>
<template>
<div class="w-5xl mx-auto">
<Table>
<TableHeader>
<TableRow>
<TableHead class="w-[100px]">Member</TableHead>
<TableHead>Start</TableHead>
<TableHead>End</TableHead>
<TableHead>Reason</TableHead>
<TableHead>Posted on</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow
v-for="post in LOAList"
:key="post.id"
class="hover:bg-muted/50"
>
<TableCell class="font-medium">
{{ post.name }}
</TableCell>
<TableCell>{{ formatDate(post.start_date) }}</TableCell>
<TableCell>{{ formatDate(post.end_date) }}</TableCell>
<TableCell>{{ post.reason }}</TableCell>
<TableCell>{{ formatDate(post.filed_date) }}</TableCell>
</TableRow>
</TableBody>
</Table>
</div>
</template>