import React, { useState } from 'react'; import { Head, Link } from '@inertiajs/react'; import EmployerLayout from '../../Layouts/EmployerLayout'; import { CheckCircle2, Globe2, Briefcase, DollarSign, MessageSquare, UserCheck, Search, FileText, Download, Printer, Copy, FileSpreadsheet, FileJson, Filter, ChevronRight, MoreHorizontal, Users, Send } from 'lucide-react'; import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu'; export default function SelectedCandidates({ selectedWorkers }) { const [workers, setWorkers] = useState((selectedWorkers || []).filter(w => w.status !== 'Searching')); const [searchTerm, setSearchTerm] = useState(''); const stats = [ { label: 'Total Candidates', count: workers.length, icon: Users, color: 'text-slate-600', bg: 'bg-slate-50' }, { label: 'Reviewing', count: workers.filter(w => w.status === 'Reviewing' || !w.status).length, icon: Search, color: 'text-amber-600', bg: 'bg-amber-50' }, { label: 'Offer Sent', count: workers.filter(w => w.status === 'Offer Sent').length, icon: Send, color: 'text-blue-600', bg: 'bg-blue-50' }, { label: 'Hired', count: workers.filter(w => w.status === 'Hired').length, icon: CheckCircle2, color: 'text-emerald-600', bg: 'bg-emerald-50' }, { label: 'Rejected', count: workers.filter(w => w.status === 'Rejected').length, icon: UserCheck, color: 'text-rose-600', bg: 'bg-rose-50' }, ]; return (
{/* Header Section */}

Candidates

Manage your workforce recruitment pipeline

{/* Stats Grid */}
{stats.map((stat) => (
{stat.count}
{stat.label}
))}
{/* Table Section */}
setSearchTerm(e.target.value)} />
{['COPY', 'CSV', 'PDF', 'PRINT'].map(action => ( ))}
{workers.length > 0 ? ( workers.filter(w => w.name.toLowerCase().includes(searchTerm.toLowerCase())).map((worker) => ( )) ) : ( )}
Candidate Selected Category Salary Status Actions
{worker.name.charAt(0)}
{worker.name}
{worker.nationality}
Nov 14, 2026 {worker.category} {worker.salary} AED Change Status Reviewing Offer Sent Hired Rejected
No candidates found
{/* Pagination Footer */}
Showing 1 to {workers.length} of {workers.length} candidates
); }