diff --git a/ui/src/pages/Application.vue b/ui/src/pages/Application.vue index 6092ab1..30f944a 100644 --- a/ui/src/pages/Application.vue +++ b/ui/src/pages/Application.vue @@ -105,7 +105,6 @@ async function postApp(appData) { } async function handleApprove(id) { - console.log("hi"); await approveApplication(id); } @@ -164,7 +163,8 @@ async function handleDeny(id) {

Discussion

- +
diff --git a/ui/src/pages/ManageApplications.vue b/ui/src/pages/ManageApplications.vue index d54b48a..907a023 100644 --- a/ui/src/pages/ManageApplications.vue +++ b/ui/src/pages/ManageApplications.vue @@ -11,7 +11,7 @@ import { TableRow, } from '@/components/ui/table' import Button from '@/components/ui/button/Button.vue'; -import { onMounted, ref, watch } from 'vue'; +import { computed, onMounted, ref, watch } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { CheckIcon, XIcon } from 'lucide-vue-next'; import Application from './Application.vue'; @@ -54,24 +54,24 @@ function formatExact(iso) { const router = useRouter(); function openApplication(id) { + if (!id) return; 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); +// const openPanel = ref(false); +const openPanel = computed(() => route.params.id !== undefined) + onMounted(async () => { appList.value = await getAllApplications();