feat: add menu and event to show clients page, also add a basic clients page

This commit is contained in:
Rodolfo Ruiz
2025-06-11 17:27:52 -06:00
parent c436e08b10
commit f4d7f86d1b
4 changed files with 140 additions and 11 deletions

View File

@@ -3,10 +3,10 @@ import { Drawer, List, ListItem, ListItemText, useMediaQuery } from '@mui/materi
const menuOptions = {
public: ['Home', 'Explore', 'Contact'],
restricted: ['Dashboard', 'Projects', 'Support'],
private: ['Products', 'Provider', 'Categories', 'Users', 'Orders', 'Settings', 'Logout'],
private: ['Products', 'Clients', 'Categories', 'Users', 'Orders', 'Settings', 'Logout'],
};
export default function MenuDrawer({ zone = 'public', open, onClose }) {
export default function MenuDrawer({ zone = 'public', open, onClose, onSelect }) {
const isMobile = useMediaQuery('(max-width:900px)');
const items = menuOptions[zone];
@@ -21,7 +21,10 @@ export default function MenuDrawer({ zone = 'public', open, onClose }) {
}}>
<List sx={{ width: isMobile ? '100vw' : 250, marginTop: 14 }}>
{items.map((text, index) => (
<ListItem key={index} onClick={onClose}>
<ListItem key={index} onClick={() => {
onClose(); // Close drawer
onSelect?.(text); // Notify parent of selected item
}}>
<ListItemText
primary={text}
slotProps={{