// Woodbury Operator — Audit Log / activity trail. Registers window.AuditLogScreen. (function () { const NS = window.WoodburyPropertiesDesignSystem_7290ca; const { Card, CardHeader, Button, Badge, Avatar, Input, SegmentedControl } = NS; const CATS = ["All", "Access", "Screening", "Maintenance", "Security", "Documents", "Comms"]; const catTone = { Access: "brand", Screening: "success", Maintenance: "accent", Security: "danger", Documents: "neutral", Comms: "warning" }; function AuditLogScreen() { const [cat, setCat] = React.useState("All"); const [q, setQ] = React.useState(""); const rows = window.WB_AUDIT.filter((r) => (cat === "All" || r.cat === cat) && (!q || (r.who + r.action + r.target).toLowerCase().includes(q.toLowerCase()))); return (
window.WBToast("Audit log exported")}>Export} />
setQ(e.target.value)} containerStyle={{ flex: 1, minWidth: 240 }} />
{rows.length} events} /> {rows.map((r, i) => (
{r.who} {r.action} {r.target}
{r.time}
{r.cat}
))} {rows.length === 0 &&
No events match your filters.
}
); } window.AuditLogScreen = AuditLogScreen; })();