From b79e78c2a6d24837a9767b243a921f9533056bee Mon Sep 17 00:00:00 2001 From: ajdj100 Date: Wed, 3 Dec 2025 15:20:37 -0500 Subject: [PATCH] overhauled recruiter tools --- ui/src/pages/Application.vue | 4 +- ui/src/pages/ManageApplications.vue | 142 ++++++++++++++++++++-------- ui/src/router/index.js | 2 +- 3 files changed, 106 insertions(+), 42 deletions(-) diff --git a/ui/src/pages/Application.vue b/ui/src/pages/Application.vue index 3670654..81d87c4 100644 --- a/ui/src/pages/Application.vue +++ b/ui/src/pages/Application.vue @@ -121,7 +121,7 @@ async function handleDeny(id) { \ No newline at end of file diff --git a/ui/src/pages/ManageApplications.vue b/ui/src/pages/ManageApplications.vue index 02ed0ae..e794834 100644 --- a/ui/src/pages/ManageApplications.vue +++ b/ui/src/pages/ManageApplications.vue @@ -10,9 +10,10 @@ import { TableRow, } from '@/components/ui/table' import Button from '@/components/ui/button/Button.vue'; -import { onMounted, ref } from 'vue'; -import { useRouter } from 'vue-router'; +import { onMounted, ref, watch } from 'vue'; +import { useRoute, useRouter } from 'vue-router'; import { CheckIcon, XIcon } from 'lucide-vue-next'; +import Application from './Application.vue'; const appList = ref([]); const now = Date.now(); @@ -61,48 +62,111 @@ async function handleDeny(id) { const router = useRouter(); function openApplication(id) { - router.push(`./application/${id}`) + router.push(`/administration/applications/${id}`) + openPanel.value = true; } +function closeApplication() { + router.push('/administration/applications') + openPanel.value = false; +} + +const route = useRoute(); + +watch(() => route.params.id, (newId) => { + if (newId === undefined) { + openPanel.value = false; + } +}) + +const openPanel = ref(false); + onMounted(async () => { appList.value = await getAllApplications(); + + //preload application + if (route.params.id != undefined) { + openApplication(route.params.id) + } }) \ No newline at end of file + + + \ No newline at end of file diff --git a/ui/src/router/index.js b/ui/src/router/index.js index 5957564..29cc862 100644 --- a/ui/src/router/index.js +++ b/ui/src/router/index.js @@ -29,7 +29,7 @@ const router = createRouter({ meta: { requiresAuth: true, memberOnly: true, roles: ['staff', 'admin'] }, children: [ { path: 'applications', component: () => import('@/pages/ManageApplications.vue') }, - { path: 'application/:id', component: () => import('@/pages/Application.vue') }, + { path: 'applications/:id', component: () => import('@/pages/ManageApplications.vue') }, { path: 'rankChange', component: () => import('@/pages/RankChange.vue') }, { path: 'applications/:id', component: () => import('@/pages/Application.vue') }, { path: 'transfer', component: () => import('@/pages/ManageTransfers.vue') },