import React, { useState } from 'react'; import { Head, Link } from '@inertiajs/react'; import EmployerLayout from '@/Layouts/EmployerLayout'; import { ArrowLeft, MessageSquare, CheckCircle2, XCircle, Globe2, Briefcase, DollarSign, MoreHorizontal, Search, Filter, ShieldCheck, Star } from 'lucide-react'; import { Badge } from '@/components/ui/badge'; export default function Applicants({ job, applicants: initialApplicants }) { const [searchTerm, setSearchTerm] = useState(''); const [applicants, setApplicants] = useState(initialApplicants || [ { id: 101, name: 'Anjali Sharma', nationality: 'Indian', category: 'Nanny', salary: 2500, experience: '5 Years', status: 'Reviewing', match_score: 95 }, { id: 102, name: 'Siti Rahma', nationality: 'Indonesian', category: 'Housemaid', salary: 1800, experience: '3 Years', status: 'Hired', match_score: 88 }, { id: 103, name: 'Maricel Cruz', nationality: 'Filipino', category: 'Domestic Helper', salary: 2200, experience: '7 Years', status: 'Rejected', match_score: 72 }, { id: 104, name: 'Bebeth Santos', nationality: 'Filipino', category: 'Cook', salary: 3000, experience: '10 Years', status: 'Reviewing', match_score: 98 }, ]); const filteredApplicants = applicants.filter(a => a.name.toLowerCase().includes(searchTerm.toLowerCase()) || a.nationality.toLowerCase().includes(searchTerm.toLowerCase()) ); return (
{/* Job Header Info */}
Back to My Jobs

Applicants for {job?.title || 'Senior Mason Project'}

{job?.category || 'Mason'} {job?.salary || '2800'} AED
Hiring Progress
{applicants.filter(a => a.status === 'Hired').length} / 5 Positions
{/* Filters */}
setSearchTerm(e.target.value)} />
{/* Applicants List */}
{filteredApplicants.length > 0 ? ( filteredApplicants.map((applicant) => (
{/* Applicant Header */}
{applicant.name.charAt(0)}

{applicant.name}

{applicant.nationality}
{applicant.match_score}% Match
{/* Stats Grid */}
Experience
{applicant.experience}
Expected Pay
{applicant.salary} AED
{/* Current Status Badge */}
{applicant.status}
View Full Profile
{/* Actions Bar */}
)) ) : (

No applicants found for this job yet.

)}
); }