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

@@ -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) {
</ApplicationForm>
<div v-if="!newApp" class="pb-15">
<h3 class="scroll-m-20 text-2xl font-semibold tracking-tight mb-4">Discussion</h3>
<ApplicationChat :messages="chatData" @post="postComment" @post-internal="postCommentInternal" :admin-mode="finalMode === 'view-recruiter'">
<ApplicationChat :messages="chatData" @post="postComment" @post-internal="postCommentInternal"
:admin-mode="finalMode === 'view-recruiter'">
</ApplicationChat>
</div>
</div>

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