fixed error when opening application from recruiter view when sidepanel is closed

This commit is contained in:
2025-12-15 12:47:00 -05:00
parent 4670b568a5
commit a73431f622
2 changed files with 7 additions and 7 deletions

View File

@@ -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();