/* 慶宜僱傭代理 — Helper Database page (filter + search) */ function DatabasePage({ setPage, t }) { const D = t.ext.db; const [nat, setNat] = React.useState("all"); const [spec, setSpec] = React.useState("all"); const [q, setQ] = React.useState(""); const [cv, setCv] = React.useState(null); const list = t.helpers.filter((p) => { if (nat !== "all" && p.nat !== nat) return false; if (spec !== "all" && p.spec !== spec) return false; if (q.trim()) { const hay = (p.name + " " + p.skills.join(" ") + " " + p.langs.join(" ") + " " + p.nat).toLowerCase(); if (!hay.includes(q.trim().toLowerCase())) return false; } return true; }); return (
{/* filter bar */}
setQ(e.target.value)} placeholder={D.searchPh} />
{list.length} {D.resultsLabel}
{list.length === 0 ? (

{D.empty}

) : (
{list.map((p, i) => (
{p.rating} {p.nat}

{p.name} {p.age}

{D.fYears}{p.years} {t.helperSection.yrsLabel}
{D.fMarital}{p.marital}
{D.fChild}{p.child}
{D.fElder}{p.elder}
{D.fLangs}{p.langs.join("、")}
{p.skills.map((s) => {s})}
))}
)}
{/* CV modal */} {cv && (
setCv(null)}>
e.stopPropagation()}>

{cv.name} {cv.age}

{cv.rating}{cv.nat}{cv.marital}
{cv.skills.map((s) => {s})}
{D.fYears}{cv.years} {t.helperSection.yrsLabel}
{D.fLangs}{cv.langs.join("、")}
{D.fChild}{cv.child}
{D.fElder}{cv.elder}

{cv.blurb}

)}
); } window.DatabasePage = DatabasePage;