// Schaffner OS — app shell: sidebar, topbar, router, tweaks const NAV = [ ['command', 'Command Center'], ['intake', 'Intake'], ['insights', 'Insights'], ['compounding', 'Compounding'], ['queue', 'Fill Queue'], ['inventory', 'Inventory'], ['reports', 'Reports'], ]; const TITLES = { command: 'Good morning, Chris.', intake: 'Intake', insights: 'Insights', compounding: 'Compounding', queue: 'Fill Queue', inventory: 'Inventory', reports: 'Reports', patient: 'Patient Profile', }; const ACCENTS = { '#a8652f': { ink: '#8a4f20', bright: '#c98b52' }, // copper '#4a7a5c': { ink: '#39604a', bright: '#7fae93' }, // fern '#5b6b8c': { ink: '#46546f', bright: '#93a4c4' }, // dusk }; function Sidebar({ screen, go, scope, setScope, counts, open, onClose }) { return (
); } function TopBar({ screen, scope, setScope, onMenu }) { return (

{TITLES[screen]}

Thursday, June 11 · week 24
{STORES.map(s => ( ))}
); } const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{ "accent": "#a8652f", "density": "regular", "showAlerts": true }/*EDITMODE-END*/; function App() { const { useState } = React; const [screen, setScreen] = useState('command'); const [scope, setScope] = useState('all'); const [menuOpen, setMenuOpen] = useState(false); const [patientId, setPatientId] = useState(null); const [queueTab, setQueueTab] = useState('queue'); const [queueCards, setQueueCards] = useState(() => QUEUE_RX.map(c => ({ ...c }))); const [enteredIntake, setEnteredIntake] = useState({}); const [t, setTweak] = useTweaks(TWEAK_DEFAULTS); const acc = ACCENTS[t.accent] || ACCENTS['#a8652f']; const nav = { go: (s) => { if (s === 'queue') setQueueTab('queue'); setScreen(s); }, goPatient: (id) => { setPatientId(id); setScreen('patient'); }, goQueue: (tabName) => { setQueueTab(tabName); setScreen('queue'); }, addRx: (rec) => setQueueCards(cs => cs.some(c => c.rx === rec.rx) ? cs : [...cs, { ...rec }]), }; const intakeCount = INTAKE_ITEMS.filter(i => i.id !== 'in5' && !enteredIntake[i.id]).length; const counts = { queue: queueCards.length, intake: intakeCount }; const screenEl = { command: , intake: , insights: , compounding: , queue: , inventory: , reports: , patient: , }[screen]; return (
setMenuOpen(false)}>
setMenuOpen(true)}> {screenEl}
setTweak('accent', v)}> setTweak('density', v)}>
); } ReactDOM.createRoot(document.getElementById('root')).render();