fixed error when opening application from recruiter view when sidepanel is closed
This commit is contained in:
@@ -105,7 +105,6 @@ async function postApp(appData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function handleApprove(id) {
|
async function handleApprove(id) {
|
||||||
console.log("hi");
|
|
||||||
await approveApplication(id);
|
await approveApplication(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +163,8 @@ async function handleDeny(id) {
|
|||||||
</ApplicationForm>
|
</ApplicationForm>
|
||||||
<div v-if="!newApp" class="pb-15">
|
<div v-if="!newApp" class="pb-15">
|
||||||
<h3 class="scroll-m-20 text-2xl font-semibold tracking-tight mb-4">Discussion</h3>
|
<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>
|
</ApplicationChat>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
TableRow,
|
TableRow,
|
||||||
} from '@/components/ui/table'
|
} from '@/components/ui/table'
|
||||||
import Button from '@/components/ui/button/Button.vue';
|
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 { useRoute, useRouter } from 'vue-router';
|
||||||
import { CheckIcon, XIcon } from 'lucide-vue-next';
|
import { CheckIcon, XIcon } from 'lucide-vue-next';
|
||||||
import Application from './Application.vue';
|
import Application from './Application.vue';
|
||||||
@@ -54,24 +54,24 @@ function formatExact(iso) {
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
function openApplication(id) {
|
function openApplication(id) {
|
||||||
|
if (!id) return;
|
||||||
router.push(`/administration/applications/${id}`)
|
router.push(`/administration/applications/${id}`)
|
||||||
openPanel.value = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeApplication() {
|
function closeApplication() {
|
||||||
router.push('/administration/applications')
|
router.push('/administration/applications')
|
||||||
openPanel.value = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
watch(() => route.params.id, (newId) => {
|
watch(() => route.params.id, (newId) => {
|
||||||
if (newId === undefined) {
|
if (newId === undefined) {
|
||||||
openPanel.value = false;
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const openPanel = ref(false);
|
// const openPanel = ref(false);
|
||||||
|
const openPanel = computed(() => route.params.id !== undefined)
|
||||||
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
appList.value = await getAllApplications();
|
appList.value = await getAllApplications();
|
||||||
|
|||||||
Reference in New Issue
Block a user