You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was trying to replicate the project to a Job Finder or Job Posting, but, for a super rare reason, the function to delete posts or jobs, call it the way you like,
If someone knows about this, please, help. I almost left my head with no hair.
Regards.
The code is this:
<script>
import useJobs from "../../composable/Jobs";
import { onMounted } from "vue";
export default {
setup() {
const { jobs, getJobs, destroyJob } = useJobs();
onMounted(getJobs);
const deleteJob = async (id) => {
if (!window.confirm("Are you sure to delete this Job?")) return;
await destroyJob(id);
await getJobs();
};
return {
jobs,
deleteJob,
};
},
};
</script>
The text was updated successfully, but these errors were encountered:
Hi, I was trying to replicate the project to a Job Finder or Job Posting, but, for a super rare reason, the function to delete posts or jobs, call it the way you like,
<script> import useJobs from "../../composable/Jobs"; import { onMounted } from "vue"; export default { setup() { const { jobs, getJobs, destroyJob } = useJobs(); onMounted(getJobs); const deleteJob = async (id) => { if (!window.confirm("Are you sure to delete this Job?")) return; await destroyJob(id); await getJobs(); }; return { jobs, deleteJob, }; }, }; </script>If someone knows about this, please, help. I almost left my head with no hair.
Regards.
The code is this:
The text was updated successfully, but these errors were encountered: