import React from 'react'; import { Head, Link, router } from '@inertiajs/react'; import EmployerLayout from '@/Layouts/EmployerLayout'; import { ArrowLeft, Briefcase, MapPin, DollarSign, Calendar, Users, FileText, CheckCircle2, XCircle, Clock, Edit2, Trash2, Eye } from 'lucide-react'; import { Badge } from '@/components/ui/badge'; import { toast } from 'sonner'; export default function Show({ job }) { const handleDelete = () => { if (confirm('Are you sure you want to delete this job posting? This action cannot be undone.')) { router.delete(`/employer/jobs/${job.id}`, { onSuccess: () => { toast.success('Job deleted successfully.'); }, onError: () => { toast.error('Failed to delete job.'); } }); } }; const handleClose = () => { if (confirm('Are you sure you want to close this job posting? No more workers will be able to apply.')) { router.post(`/employer/jobs/${job.id}/close`, {}, { onSuccess: () => { toast.success('Job closed successfully.'); }, onError: () => { toast.error('Failed to close job.'); } }); } }; return (
Back to My Jobs
{/* Header */}

{job.title}

Posted on {job.posted_at} {job.job_type}
{job.status === 'Active' && } {job.status === 'Closed' && } {job.status === 'Draft' && } {job.status}
{/* Stats Grid */}

Location

{job.location}

Salary

{job.salary} AED / month

Workers Needed

{job.workers_needed} ({job.applied_count} applied)

{/* Start Date */}
Expected Start Date {job.start_date || 'Immediate'}
{/* Description */}

Job Description

{job.description}
{/* Requirements */} {job.requirements && (

Special Requirements

{job.requirements}
)} {/* Actions */}
View Applicants ({job.applied_count}) Edit Posting {job.status !== 'Closed' && ( )}
); }