105 lines
3.1 KiB
JavaScript
105 lines
3.1 KiB
JavaScript
import React from 'react';
|
|
|
|
import MailIcon from '@mui/icons-material/Mail';
|
|
import InboxIcon from '@mui/icons-material/MoveToInbox';
|
|
import { Box, Divider, Drawer, Link, List, ListItem, ListItemButton, ListItemIcon, ListItemText } from '@mui/material';
|
|
import Head from 'next/head';
|
|
|
|
import { useFormik } from 'formik';
|
|
import * as yup from 'yup';
|
|
|
|
const validationSchema = yup.object({
|
|
// email: yup.string('Enter your email').email('Enter a valid email').required('Email is required'),
|
|
// password: yup
|
|
// .string('Enter your password')
|
|
// .min(8, 'Password should be of minimum 8 characters length')
|
|
// .required('Password is required'),
|
|
});
|
|
|
|
export default function Home() {
|
|
const [open, setOpen] = React.useState(false);
|
|
|
|
const toggleDrawer = newOpen => () => {
|
|
setOpen(newOpen);
|
|
};
|
|
|
|
const formik = useFormik({
|
|
initialValues: {
|
|
email: '[email protected]',
|
|
password: 'foobar',
|
|
patient_name: 'default patient name',
|
|
patient_hkid: 'A213456(7)',
|
|
patient_age: 37,
|
|
patient_mobile: '91234567',
|
|
bruisesScratchesMinorBurns: false,
|
|
chestPain: false,
|
|
headache: false,
|
|
myMuiCheck: false,
|
|
nauseaAndVomiting: false,
|
|
runnyOrStuffyNose: false,
|
|
soreThroat: false,
|
|
},
|
|
validationSchema: validationSchema,
|
|
onSubmit: values => {
|
|
alert(JSON.stringify(values, null, 2));
|
|
},
|
|
});
|
|
|
|
const DrawerList = (
|
|
<Box sx={{ width: 250 }} role='presentation' onClick={toggleDrawer(false)}>
|
|
<List>
|
|
{['Inbox', 'Starred', 'Send email', 'Drafts'].map((text, index) => (
|
|
<ListItem key={text} disablePadding>
|
|
<ListItemButton>
|
|
<ListItemIcon>{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}</ListItemIcon>
|
|
<ListItemText primary={text} />
|
|
</ListItemButton>
|
|
</ListItem>
|
|
))}
|
|
</List>
|
|
<Divider />
|
|
<List>
|
|
{['All mail', 'Trash', 'Spam'].map((text, index) => (
|
|
<ListItem key={text} disablePadding>
|
|
<ListItemButton>
|
|
<ListItemIcon>{index % 2 === 0 ? <InboxIcon /> : <MailIcon />}</ListItemIcon>
|
|
<ListItemText primary={text} />
|
|
</ListItemButton>
|
|
</ListItem>
|
|
))}
|
|
</List>
|
|
</Box>
|
|
);
|
|
|
|
return (
|
|
<>
|
|
<Head>
|
|
<title>dashboard - non-urgent case</title>
|
|
<meta name='description' content='Generated by create next app' />
|
|
<link rel='icon' href='/favicon.ico' />
|
|
</Head>
|
|
|
|
<Box
|
|
sx={{
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
minHeight: '90vh',
|
|
}}
|
|
>
|
|
<Link href='/PatientRegister'>PatientRegister</Link>
|
|
<Link href='/PatientQueueDisplay'>PatientQueueDisplay</Link>
|
|
<Link href='/AdminLogin'>AdminLogin</Link>
|
|
<Link href='/AdminHome'>AdminHome</Link>
|
|
<Link href='/SemiUrgentCaseList'>SemiUrgentCaseList</Link>
|
|
<Link href='/NonUrgentCaseList'>NonUrgentCaseList</Link>
|
|
</Box>
|
|
|
|
<Drawer open={open} onClose={toggleDrawer(false)}>
|
|
{DrawerList}
|
|
</Drawer>
|
|
</>
|
|
);
|
|
}
|