diff --git a/frontend/src/app/dashboard/jobs/page.tsx b/frontend/src/app/dashboard/jobs/page.tsx index 09ba499..2a43422 100644 --- a/frontend/src/app/dashboard/jobs/page.tsx +++ b/frontend/src/app/dashboard/jobs/page.tsx @@ -173,12 +173,9 @@ export default function AdminJobsPage() { setIsEditDialogOpen(true) } - const handleDeleteJob = async (idStr: string) => { + const handleDeleteJob = async (id: string) => { if (!confirm("Are you sure you want to delete this job?")) return - const id = parseInt(idStr) - if (isNaN(id)) return - try { // await adminJobsApi.delete(id) setJobs((prevJobs) => prevJobs.filter((job) => job.id !== id)) @@ -190,13 +187,11 @@ export default function AdminJobsPage() { const handleSaveEdit = async () => { if (!selectedJob) return - const id = parseInt(selectedJob.id) - if (isNaN(id)) return try { setIsLoading(true) - // const updated = await adminJobsApi.update(id, editForm) - // setJobs((prev) => prev.map((j) => (j.id === id ? updated : j))) + // const updated = await adminJobsApi.update(selectedJob.id, editForm) + // setJobs((prev) => prev.map((j) => (j.id === selectedJob.id ? updated : j))) setIsEditDialogOpen(false) } catch (error) { console.error("Failed to update job:", error)