/* ============================================ KNOWLEDGE MANAGEMENT — Manual table with bulk actions ============================================ */ const MANUALS = [ { id: "DOC-CNC-204", name: "CNC-Mazak-INTEGREX-i400 — Maintenance v7.2", tags: ["CNC", "Mazak", "Maintenance"], status: "indexed", chunks: 1842, size: "24.6 MB", indexed: "2026-03-04" }, { id: "DOC-CNC-205", name: "CNC-Mazak-INTEGREX-i400 — Operator Guide v3.1", tags: ["CNC", "Mazak", "Operations"], status: "indexed", chunks: 904, size: "12.1 MB", indexed: "2026-03-04" }, { id: "DOC-HYD-018", name: "Bosch Rexroth Hydraulic Systems Vol. III", tags: ["Hydraulic", "Rexroth"], status: "indexed", chunks: 2104, size: "31.8 MB", indexed: "2026-02-28" }, { id: "DOC-ELEC-091", name: "Siemens S7-1500 PLC Programming Reference", tags: ["PLC", "Siemens", "Electrical"], status: "indexed", chunks: 3216, size: "42.0 MB", indexed: "2026-02-12" }, { id: "DOC-ELEC-092", name: "ABB ACS580 Variable Frequency Drives", tags: ["VFD", "ABB", "Electrical"], status: "indexed", chunks: 1502, size: "19.4 MB", indexed: "2026-02-12" }, { id: "DOC-SAFETY-018",name: "Plant Safety SOP — LOTO & Confined Spaces", tags: ["Safety", "SOP", "Critical"], status: "indexed", chunks: 412, size: "5.2 MB", indexed: "2026-01-30" }, { id: "DOC-SAFETY-019",name: "ISO 13849-1 Compliance Reference Notes", tags: ["Safety", "ISO", "Compliance"], status: "needs-review", chunks: 188, size: "2.1 MB", indexed: "2025-12-10" }, { id: "DOC-LUBE-007", name: "Lubrication Standards 2025 — Master Reference", tags: ["Lubrication", "Maintenance"], status: "indexed", chunks: 326, size: "4.4 MB", indexed: "2026-01-15" }, { id: "DOC-CAL-001", name: "Calibration Master Log & Schedule", tags: ["QA", "Calibration"], status: "stale", chunks: 92, size: "1.0 MB", indexed: "2025-09-22" }, { id: "DOC-PNEU-003", name: "Pneumatic Systems — FRL Maintenance Manual", tags: ["Pneumatic", "Maintenance"], status: "indexed", chunks: 540, size: "7.2 MB", indexed: "2026-02-01" }, { id: "DOC-REL-014", name: "Reliability Engineering Handbook (Internal)", tags: ["Reliability", "Internal"], status: "indexed", chunks: 1980, size: "28.0 MB", indexed: "2026-01-18" }, { id: "DOC-WELD-006", name: "Welding SOP & Consumables Reference", tags: ["Welding", "Fabrication", "SOP"], status: "indexed", chunks: 218, size: "3.0 MB", indexed: "2026-02-19" }, ]; function statusBadge(status) { switch (status) { case "indexed": return Indexed; case "needs-review": return Needs review; case "stale": return Stale > 180 d; default: return {status}; } } function KnowledgeScreen({ onNavigate }) { const [selected, setSelected] = useState(new Set(["DOC-CAL-001", "DOC-SAFETY-019"])); const toggle = (id) => { setSelected(prev => { const next = new Set(prev); if (next.has(id)) next.delete(id); else next.add(id); return next; }); }; const allSelected = selected.size === MANUALS.length; const toggleAll = () => { setSelected(allSelected ? new Set() : new Set(MANUALS.map(m => m.id))); }; return ( <>

Knowledge Management

{MANUALS.length} documents · 13,324 chunks · 181 MB indexed corpus

{/* Bulk action bar */}
0 ? "var(--orange-50)" : "var(--ink-50)", borderBottom: "1px solid var(--ink-200)", display: "flex", alignItems: "center", gap: 12, transition: "background 0.15s", }}> 0 ? "var(--orange-700)" : "var(--ink-600)" }}> {selected.size > 0 ? `${selected.size} document${selected.size > 1 ? "s" : ""} selected` : `${MANUALS.length} documents · Bulk actions available on selection`} {selected.size > 0 && ( <> )}
{MANUALS.map(m => { const isSel = selected.has(m.id); return ( ); })}
Document ID Document Name Metadata Tags Status Chunks Indexed Inspect
toggle(m.id)} /> {m.id}
{m.name}
{m.size}
{m.tags.map(t => ( {t} ))}
{statusBadge(m.status)} {m.chunks.toLocaleString()} {m.indexed}
{/* Footer pagination */}
Showing 1–{MANUALS.length} of {MANUALS.length} page 1 / 1
); } window.KnowledgeScreen = KnowledgeScreen;