2023-04-29 12:01:45 -04:00
|
|
|
import React,{useState} from 'react';
|
|
|
|
|
import {Routes, Route, useNavigate} from 'react-router-dom';
|
|
|
|
|
import './Login.css';
|
2023-04-29 16:15:28 -04:00
|
|
|
import Button from "@mui/material/Button";
|
|
|
|
|
import Card from "@mui/material/Card";
|
2023-04-29 21:19:57 -04:00
|
|
|
import { CardMedia, CardContent } from '@mui/material';
|
2023-04-29 16:15:28 -04:00
|
|
|
import TextField from "@mui/material/TextField";
|
|
|
|
|
import FormControlLabel from "@mui/material/FormControlLabel";
|
|
|
|
|
import Checkbox from "@mui/material/Checkbox";
|
|
|
|
|
import Link from "@mui/material/Link";
|
|
|
|
|
import Grid from "@mui/material/Grid";
|
|
|
|
|
import Box from "@mui/material/Box";
|
|
|
|
|
import Typography from "@mui/material/Typography";
|
|
|
|
|
import Container from "@mui/material/Container";
|
|
|
|
|
import AppBar from '@mui/material/AppBar';
|
|
|
|
|
import Toolbar from '@mui/material/Toolbar';
|
|
|
|
|
import IconButton from '@mui/material/IconButton';
|
|
|
|
|
import Avatar from '@mui/material/Avatar';
|
|
|
|
|
import Tooltip from '@mui/material/Tooltip';
|
|
|
|
|
import Menu from '@mui/material/Menu';
|
|
|
|
|
import MenuIcon from '@mui/material/Menu'
|
|
|
|
|
import MenuItem from '@mui/material/MenuItem';
|
|
|
|
|
import {red, green, lightBlue, lightGreen} from '@mui/material/colors';
|
|
|
|
|
import { ThemeProvider, createTheme } from '@mui/material/styles';
|
2023-04-29 23:31:58 -04:00
|
|
|
import { ReactSession } from 'react-client-session';
|
2023-04-30 15:35:02 -04:00
|
|
|
import Axios from 'axios';
|
2023-04-29 23:31:58 -04:00
|
|
|
|
2023-04-29 16:15:28 -04:00
|
|
|
|
|
|
|
|
const theme = createTheme({
|
|
|
|
|
palette: {
|
|
|
|
|
primary: {
|
|
|
|
|
main: lightGreen[700],
|
2023-04-29 17:08:56 -04:00
|
|
|
apple: red[500],
|
2023-04-29 16:15:28 -04:00
|
|
|
},
|
2023-04-29 17:08:56 -04:00
|
|
|
|
2023-04-29 16:15:28 -04:00
|
|
|
},
|
|
|
|
|
});
|
2023-04-29 12:01:45 -04:00
|
|
|
|
|
|
|
|
function Menus() {
|
2023-04-30 18:18:16 -04:00
|
|
|
|
|
|
|
|
const navigate = useNavigate();
|
2023-04-29 21:19:57 -04:00
|
|
|
|
|
|
|
|
const Home = () => {
|
|
|
|
|
navigate('/Plan');
|
|
|
|
|
}
|
|
|
|
|
const Menus = () => {
|
|
|
|
|
navigate('/Menus');
|
|
|
|
|
}
|
|
|
|
|
const Past = () => {
|
|
|
|
|
navigate('/Past');
|
|
|
|
|
}
|
|
|
|
|
const navigateLogin = () => {
|
|
|
|
|
navigate('/');
|
|
|
|
|
}
|
2023-04-29 16:15:28 -04:00
|
|
|
|
2023-04-30 14:14:56 -04:00
|
|
|
const menuExpansion = () => {
|
|
|
|
|
navigate('/MenuExpansion');
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-29 23:31:58 -04:00
|
|
|
const setStarbucks = () => {
|
2023-04-30 15:35:02 -04:00
|
|
|
ReactSession.set("eatery", 6);
|
2023-04-30 14:14:56 -04:00
|
|
|
menuExpansion();
|
2023-04-29 23:31:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const setChick = () => {
|
2023-04-30 15:35:02 -04:00
|
|
|
ReactSession.set("eatery", 2);
|
2023-04-30 14:14:56 -04:00
|
|
|
menuExpansion();
|
2023-04-29 23:31:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const setABP = () => {
|
2023-04-30 15:35:02 -04:00
|
|
|
ReactSession.set("eatery", 5);
|
2023-04-30 14:14:56 -04:00
|
|
|
menuExpansion();
|
2023-04-29 23:31:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const setMoma = () => {
|
2023-04-30 15:35:02 -04:00
|
|
|
ReactSession.set("eatery", 7);
|
2023-04-30 14:14:56 -04:00
|
|
|
menuExpansion();
|
2023-04-29 23:31:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const setTaco = () => {
|
2023-04-30 15:35:02 -04:00
|
|
|
ReactSession.set("eatery", 8);
|
2023-04-30 14:14:56 -04:00
|
|
|
menuExpansion();
|
2023-04-29 23:31:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const setDH = () => {
|
2023-04-30 15:35:02 -04:00
|
|
|
ReactSession.set("eatery", 1);
|
2023-04-30 14:14:56 -04:00
|
|
|
menuExpansion();
|
2023-04-29 23:31:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const setFlip = () => {
|
2023-04-30 15:35:02 -04:00
|
|
|
ReactSession.set("eatery", 4);
|
2023-04-30 14:14:56 -04:00
|
|
|
menuExpansion();
|
2023-04-29 23:31:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const setSmash = () => {
|
2023-04-30 15:35:02 -04:00
|
|
|
ReactSession.set("eatery", 3);
|
2023-04-30 14:14:56 -04:00
|
|
|
menuExpansion();
|
2023-04-29 23:31:58 -04:00
|
|
|
}
|
2023-04-30 15:35:02 -04:00
|
|
|
|
|
|
|
|
|
2023-04-29 23:31:58 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-29 16:15:28 -04:00
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
<ThemeProvider theme={theme}>
|
2023-04-29 21:19:57 -04:00
|
|
|
<AppBar className='bar' position="static">
|
2023-04-29 16:15:28 -04:00
|
|
|
<Toolbar variant="dense">
|
2023-04-29 21:19:57 -04:00
|
|
|
<Button variant="h6" color="main" position="right" onClick={Home}>
|
2023-04-29 17:08:56 -04:00
|
|
|
Home</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
<Button variant="h6" color="main" component="div" onClick={Menus}>
|
2023-04-29 17:08:56 -04:00
|
|
|
Menus
|
2023-04-29 16:15:28 -04:00
|
|
|
</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
<Button variant="h6" onClick="Past">
|
2023-04-29 17:08:56 -04:00
|
|
|
Past Plans</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
<Button variant="h6" color="main" component="div" onClick={navigateLogin} sx={{
|
2023-04-29 17:08:56 -04:00
|
|
|
':hover': {
|
|
|
|
|
bgcolor: '#ffc6c4', // theme.palette.primary.main
|
|
|
|
|
color: 'red',
|
|
|
|
|
},
|
|
|
|
|
}}>
|
|
|
|
|
Log out
|
|
|
|
|
</Button>
|
2023-04-29 16:15:28 -04:00
|
|
|
</Toolbar>
|
|
|
|
|
</AppBar>
|
2023-04-29 21:19:57 -04:00
|
|
|
|
|
|
|
|
<Box sx={{
|
|
|
|
|
margin: 8,
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "row",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
}}>
|
|
|
|
|
<Box sx={{
|
|
|
|
|
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
}}>
|
|
|
|
|
<Card sx={{ maxWidth: 200, margin: 2 }}>
|
|
|
|
|
<CardMedia
|
|
|
|
|
image={ require("./images/south.jpg")}
|
|
|
|
|
title="South Dining Hall"
|
|
|
|
|
sx={{ width: 200, height:170}}
|
|
|
|
|
/>
|
|
|
|
|
<CardContent>
|
|
|
|
|
<Typography gutterBottom variant="h5" component="div">
|
|
|
|
|
Dining Hall
|
|
|
|
|
</Typography>
|
2023-04-29 23:31:58 -04:00
|
|
|
<Button onClick={setDH}>View Items</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
|
<Card sx={{ maxWidth: 200, margin: 2 }}>
|
|
|
|
|
<CardMedia
|
|
|
|
|
image={ require("./images/starb.jpg")}
|
|
|
|
|
title="Starbucks"
|
|
|
|
|
sx={{ width: 200, height:170}}
|
|
|
|
|
/>
|
|
|
|
|
<CardContent>
|
|
|
|
|
<Typography gutterBottom variant="h5" component="div">
|
|
|
|
|
Starbucks
|
|
|
|
|
</Typography>
|
2023-04-29 23:31:58 -04:00
|
|
|
<Button onClick={setStarbucks}>View Items</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
</Box>
|
|
|
|
|
|
|
|
|
|
<Box sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
}}>
|
|
|
|
|
<Card sx={{ maxWidth: 200, margin: 2 }}>
|
|
|
|
|
<CardMedia
|
|
|
|
|
image={ require("./images/abp.jpg")}
|
|
|
|
|
title="ABP"
|
|
|
|
|
sx={{ width: 200, height:170}}
|
|
|
|
|
/>
|
|
|
|
|
<CardContent>
|
|
|
|
|
<Typography gutterBottom variant="h5" component="div">
|
|
|
|
|
ABP
|
|
|
|
|
</Typography>
|
2023-04-29 23:31:58 -04:00
|
|
|
<Button onClick={setABP}>View Items</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
|
<Card sx={{ maxWidth: 200, margin: 2 }}>
|
|
|
|
|
<CardMedia
|
|
|
|
|
image={ require("./images/chick.jpg")}
|
|
|
|
|
title="Chick"
|
|
|
|
|
sx={{ width: 200, height:170}}
|
|
|
|
|
/>
|
|
|
|
|
<CardContent>
|
|
|
|
|
<Typography gutterBottom variant="h5" component="div">
|
|
|
|
|
Chick-fil-a
|
|
|
|
|
</Typography>
|
2023-04-29 23:31:58 -04:00
|
|
|
<Button onClick={setChick}>View Items</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
</Box>
|
|
|
|
|
<Box sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
}}>
|
|
|
|
|
<Card sx={{ maxWidth: 200, margin: 2 }}>
|
|
|
|
|
<CardMedia
|
|
|
|
|
image={ require("./images/flip.jpg")}
|
|
|
|
|
title="Flip"
|
|
|
|
|
sx={{ width: 200, height:170}}
|
|
|
|
|
/>
|
|
|
|
|
<CardContent>
|
|
|
|
|
<Typography gutterBottom variant="h5" component="div">
|
|
|
|
|
Flip Kitchen
|
|
|
|
|
</Typography>
|
2023-04-29 23:31:58 -04:00
|
|
|
<Button onClick={setFlip}>View Items</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
|
<Card sx={{ maxWidth: 200, margin: 2 }}>
|
|
|
|
|
<CardMedia
|
|
|
|
|
image={ require("./images/moma.jpg")}
|
|
|
|
|
title="Moma"
|
|
|
|
|
sx={{ width: 200, height:170}}
|
|
|
|
|
/>
|
|
|
|
|
<CardContent>
|
|
|
|
|
<Typography gutterBottom variant="h5" component="div">
|
|
|
|
|
Modern Market
|
|
|
|
|
</Typography>
|
2023-04-29 23:31:58 -04:00
|
|
|
<Button onClick={setMoma}>View Items</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
</Box>
|
|
|
|
|
<Box sx={{
|
|
|
|
|
display: "flex",
|
|
|
|
|
flexDirection: "column",
|
|
|
|
|
alignItems: "center",
|
|
|
|
|
}}>
|
|
|
|
|
<Card sx={{ maxWidth: 200, margin: 2 }}>
|
|
|
|
|
<CardMedia
|
|
|
|
|
image={ require("./images/taco.jpg")}
|
|
|
|
|
title="Taco Bell"
|
|
|
|
|
sx={{ width: 200, height:170}}
|
|
|
|
|
/>
|
|
|
|
|
<CardContent>
|
|
|
|
|
<Typography gutterBottom variant="h5" component="div">
|
|
|
|
|
Taco Bell
|
|
|
|
|
</Typography>
|
2023-04-29 23:31:58 -04:00
|
|
|
<Button onClick={setTaco}>View Items</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
|
<Card sx={{ maxWidth: 200, margin: 2 }}>
|
|
|
|
|
<CardMedia
|
|
|
|
|
image={ require("./images/smash.jpg")}
|
|
|
|
|
title="smash"
|
|
|
|
|
sx={{ width: 200, height:170}}
|
|
|
|
|
/>
|
|
|
|
|
<CardContent>
|
|
|
|
|
<Typography gutterBottom variant="h5" component="div">
|
|
|
|
|
Smashburger
|
|
|
|
|
</Typography>
|
2023-04-29 23:31:58 -04:00
|
|
|
<Button onClick={setSmash}>View Items</Button>
|
2023-04-29 21:19:57 -04:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
</Box>
|
|
|
|
|
</Box>
|
|
|
|
|
|
2023-04-29 16:15:28 -04:00
|
|
|
</ThemeProvider>
|
2023-04-29 12:01:45 -04:00
|
|
|
|
2023-04-29 16:15:28 -04:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
export default Menus;
|