// Woodbury Operator — Documents. Registers window.DocumentsScreen. (function () { const NS = window.WoodburyPropertiesDesignSystem_7290ca; const { Card, Button, Badge, IconTile, Input, Modal, Select } = NS; const FOLDERS = [ { name: "Tenancy Agreements", count: 42, icon: "file-signature", tone: "brand" }, { name: "Land Registration", count: 6, icon: "landmark", tone: "accent" }, { name: "Insurance", count: 18, icon: "shield", tone: "success" }, { name: "Inspection Reports", count: 27, icon: "clipboard-check", tone: "sunken" }, ]; const FILES = [ { name: "Signed Tenancy Agreement.pdf", meta: "Lashibi Townhouses · 248 KB", date: "Signed 12 Apr", tag: "Signed", tagTone: "success" }, { name: "Land Registration Papers.pdf", meta: "Cantonments City · 1.1 MB", date: "Uploaded 30 Mar", tag: "Verified", tagTone: "brand" }, { name: "Insurance Certificate 2026.pdf", meta: "Portfolio-wide · 512 KB", date: "Uploaded 04 Feb", tag: "Active", tagTone: "success" }, { name: "Lashibi Townhouses Floor Plan.pdf", meta: "Lashibi Townhouses · 3.4 MB", date: "Uploaded 21 Jan", tag: "Reference", tagTone: "neutral" }, { name: "Mirage Inspection.pdf", meta: "Mirage · 890 KB", date: "Uploaded 09 Jan", tag: "Review", tagTone: "warning" }, ]; function RowMenu({ file, onClose }) { const act = async (label) => { onClose(); if (label === "Delete") { const yes = await window.WBConfirm({ title: "Delete document?", message: '"' + file.name + '" will be permanently removed.', confirmLabel: "Delete", danger: true }); if (!yes) return; window.WBToast("Deleted " + file.name, "danger"); return; } window.WBToast(label + " · " + file.name); }; return (
{[["Rename", "pencil"], ["Share link", "link"], ["Move to folder", "folder-input"], ["Delete", "trash-2"]].filter(([label]) => label !== "Delete" || window.WBRoleKey === "super").map(([label, icon]) => ( ))}
); } function DocumentsScreen() { const [upload, setUpload] = React.useState(false); const [menu, setMenu] = React.useState(null); // file name with open menu React.useEffect(() => { const onClick = () => setMenu(null); document.addEventListener("click", onClick); return () => document.removeEventListener("click", onClick); }, []); return (
setUpload(true)}>Upload} />
{FOLDERS.map((f) => ( window.WBToast("Opening " + f.name)}>
{f.name}
{f.count} files
))}

Recent Documents

{FILES.map((f, i) => (
{f.name}
{f.meta}
{f.date}
{f.tag}
))} {/* Upload modal */} setUpload(false)} icon="upload" title="Upload Document" subtitle="Add a file to the repository." footer={}>
Drag & drop a file here
or click to browse · PDF, JPG, PNG up to 20 MB
); } window.DocumentsScreen = DocumentsScreen; })();