// Job Requisitions — list + detail panel. LIGHT. const { useState: usR } = React; function RequisitionsScreen({ onOpenCandidate }) { const [selectedId, setSelectedId] = usR(DATA.REQUISITIONS[0].id); const [filterStatus, setFilterStatus] = usR('Active'); const [search, setSearch] = usR(''); const [view, setView] = usR('list'); const filtered = DATA.REQUISITIONS.filter((r) => { if (filterStatus !== 'All' && r.status !== filterStatus) return false; if (search && !(`${r.title} ${r.client}`.toLowerCase().includes(search.toLowerCase()))) return false; return true; }); const selected = DATA.REQUISITIONS.find((r) => r.id === selectedId) || filtered[0]; const client = selected ? DATA.CLIENTS.find((c) => c.id === selected.clientId) : null; const matchedCandidates = selected ? DATA.CANDIDATES.filter((c) => c.matchedReq === selected.id || c.matchScore >= 80).slice(0, 6) : []; return (
Vacantes

Requisiciones abiertas

7 activas · 1 borrador · 0 en pausa · 142 nuevos matches generados por SOFIA esta semana.

} />
r.status==='Active').length }, { id: 'Draft', label: 'Borradores', count: DATA.REQUISITIONS.filter(r=>r.status==='Draft').length }, ]} />
} onClick={() => setView('list')} /> } onClick={() => setView('grid')} />
{/* Table */}
Vacante · Cliente
Match AI
Matches
Plazas
Deadline
{filtered.map((r) => { const c = DATA.CLIENTS.find((x) => x.id === r.clientId); const active = selected?.id === r.id; return ( ); })}
{/* Detail */}
{selected && client && ( <>
{client.monogram}
{client.name} · {client.city}
{selected.title}
}>{selected.status} }>{selected.location} }>{selected.modality}
Descripción

{selected.description}

Must-have
{selected.mustHave.map((s) => {s})}
Nice-to-have
{selected.niceHave.map((s) => {s})}
{selected.salary}
Abierta {selected.opened}
SOFIA · Perfil ideal extraído

{selected.profile}

{selected.soft.map((s) => {s})}
Candidatos rankeados por SOFIA
Top {matchedCandidates.length} · de {selected.matched} matches
{matchedCandidates.map((c) => ( ))}
)}
); } function Stat({ label, value, accent }) { return (
{label}
{value}
); } window.RequisitionsScreen = RequisitionsScreen;