// Woodbury Operator — Screening. Registers window.ScreeningScreen. (function () { const NS = window.WoodburyPropertiesDesignSystem_7290ca; const { Card, CardHeader, Button, Badge, Avatar, StatCard, ProgressBar, Modal, Input, Select } = NS; const CHECKS = [ { label: "Identity Verification", done: true }, ]; function ScreeningScreen() { const D = window.WB_DATA; const pending = D.applicants.filter((a) => a.status === "Pending"); const [modal, setModal] = React.useState(null); // 'invite' | applicant const close = () => setModal(null); const approve = (a) => { const site = window.WB_SITES.find((s) => a.asset.indexOf(s.split(" ")[0]) !== -1) || window.WB_SITES[0]; const vacant = window.WBunitsFor(site, true)[0] || "Unit TBD"; window.WBadd("tenants", { name: a.name, email: a.email, phone: a.phone, avatar: a.avatar, property: site, unit: vacant, lease: "Applicant", leaseTone: "neutral", leaseSub: "Move-in pending", maint: "—", maintTone: "neutral" }); window.WBadd("moves", { id: "MV-" + Math.floor(3100 + Math.random() * 800), type: "Move-in", tenant: a.name, avatar: a.avatar, property: site, unit: vacant, date: "TBD", step: 0 }); window.WBToast("Approved — " + a.name + " added to Tenants & Move-in started"); }; React.useEffect(() => { const f = window.WBFocus; if (f && f.kind === "invite-applicant") { setModal("invite"); window.WBFocus = null; } else if (f && f.kind === "applicant") { const a = D.applicants.find((x) => x.name === f.key); if (a) setModal(a); window.WBFocus = null; } }, []); return (