// 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 (
setModal("invite")}>Invite Applicant} />
window.WBNavigate&&window.WBNavigate("Screening")} label="In Review" value="3" icon="search-check" iconTone="brand" /> window.WBNavigate&&window.WBNavigate("Screening")} label="Verified" value="3" icon="shield-check" iconTone="success" emphasis="success" /> window.WBNavigate&&window.WBNavigate("Screening")} label="Flagged" value="1" icon="flag" iconTone="danger" emphasis="danger" /> window.WBNavigate&&window.WBNavigate("Screening")} label="Avg. Turnaround" value="2.1d" icon="clock" iconTone="accent" />
{D.applicants.map((a, i) => (
{a.name}
{a.asset}
{a.status === "Verified" ? Verified : Pending}
))}
{pending[0].name}
{pending[0].asset}
Identity verificationVerified
{CHECKS.map((c) => (
{c.done ? "✓" : "•"} {c.label}
))}
{/* Invite modal */} }>