// Woodbury Operator — Properties (asset grid). Registers window.PropertiesScreen. (function () { const NS = window.WoodburyPropertiesDesignSystem_7290ca; const { Card, Button, Badge, Input, ProgressBar, Modal, Select } = NS; function PropertyCard({ p, onManage }) { const tone = p.status === "Flagship" ? "accent" : p.status === "Premium" ? "brand" : "neutral"; return (
{p.name}
{p.status}

{p.name}

{p.type} · {p.units} units

Occupancy{p.occ}%
= 95 ? "success" : "brand"} />
{p.vacant ? `${p.vacant} vacant` : "Fully occupied"}
); } function PropertiesScreen() { const D = window.WB_DATA; const all = D.properties; const [modal, setModal] = React.useState(null); // 'map' | 'add' | property const [q, setQ] = React.useState(""); const [addUnit, setAddUnit] = React.useState(false); const [editP, setEditP] = React.useState(false); const [pDraft, setPDraft] = React.useState(null); const [unitDraft, setUnitDraft] = React.useState({ label: "", status: "Vacant" }); const [, force] = React.useReducer((x) => x + 1, 0); const close = () => setModal(null); React.useEffect(() => { const f = window.WBFocus; if (f && f.kind === "property") { const p = all.find((x) => x.name === f.key); if (p) setModal(p); window.WBFocus = null; } }, []); const shown = all.filter((p) => !q || (p.name + p.type).toLowerCase().includes(q.toLowerCase())); return (
} />
setQ(e.target.value)} containerStyle={{ flex: 1 }} />
All Types
{shown.map((p) => )}
{shown.length === 0 &&
No estates match “{q}”.
} {/* Map view modal */}
{[ { l: "22%", t: "30%", n: "Lashibi Townhouses" }, { l: "58%", t: "22%", n: "Cantonments City" }, { l: "70%", t: "58%", n: "Mirage" }, { l: "34%", t: "64%", n: "Onehive Tse Addo" }, { l: "48%", t: "44%", n: "Hamlet" }, ].map((pin) => (
{pin.n}
))}
Greater Accra · schematic
{/* Add property modal */} }>
setUnitDraft((d) => ({ ...d, label: e.target.value }))} /> setUnitDraft((d) => ({ ...d, tenant: e.target.value }))} options={["Select a tenant…", ...window.WB_TENANT_NAMES]} /> )}
{/* Edit property modal */} setEditP(false)} icon="pencil" title="Edit Property" subtitle={pDraft && pDraft.name} width={480} footer={}> {pDraft && (
setPDraft((d) => ({ ...d, name: e.target.value }))} />
setPDraft((d) => ({ ...d, status: e.target.value }))} options={["Standard", "Premium", "Flagship"]} containerStyle={{ flex: 1 }} />
)}
); } window.PropertiesScreen = PropertiesScreen; })();