/* Admin dashboard chrome: Sidebar + Topbar */
const ADMIN_NAV = [
{ id:'dashboard', label:'Dashboard', icon:'layout-dashboard', group:'Overview' },
{ id:'students', label:'Students', icon:'users', group:'Manage' },
{ id:'academics', label:'Gradebook', icon:'graduation-cap', group:'Manage' },
{ id:'transportation', label:'Transportation', icon:'bus', group:'Manage' },
{ id:'pickup', label:'Pickup Manager', icon:'car-front', group:'Manage' },
{ id:'messaging', label:'Messaging', icon:'message-square', group:'Manage' },
{ id:'marketplace', label:'Marketplace', icon:'store', group:'Manage' },
{ id:'payments', label:'Payments', icon:'credit-card', group:'Manage' },
{ id:'reports', label:'Reports', icon:'bar-chart-3', group:'Insights' },
{ id:'settings', label:'Settings', icon:'settings', group:'Insights' },
];
function NavItem({ n, on, onNav }) {
const [hover, setHover] = React.useState(false);
return (
);
}
function Sidebar({ active, onNav }) {
let lastGroup = null;
return (
{ADMIN_NAV.map(n => {
const header = n.group !== lastGroup ? n.group : null;
lastGroup = n.group;
return (
{header && {header}
}
);
})}
District Office
Super Admin
);
}
function Topbar({ title, subtitle }) {
return (
{title}
{subtitle &&
{subtitle}
}
);
}
Object.assign(window, { Sidebar, Topbar, ADMIN_NAV });