Newer
Older
import React, { FC } from 'react';
import { makeStyles } from '@material-ui/core/styles';
import {
CssBaseline,
Grid,
Typography,
Hidden,
createMuiTheme,
responsiveFontSizes,
MuiThemeProvider,
Dialog,
DialogActions,
DialogContent,
DialogContentText,
DialogTitle,
TextField,
Button,
} from '@material-ui/core';
import AddIcon from '@material-ui/icons/Add';
import Fab from '@material-ui/core/Fab';
import { NavBar } from 'components/Dashboard/HomePage/NavBar';
import { Reservation } from 'components/Dashboard/ReservationPage/Reservation/Reservation';
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
let themeResp = createMuiTheme();
themeResp = responsiveFontSizes(themeResp);
const useStyles = makeStyles(() => ({
root: {
minHeight: '36vh',
backgroundImage: `url(${'/assets/bg7.png'})`,
backgroundRepeat: 'no-repeat',
backgroundSize: 'cover',
},
rightAlign: {
marginLeft: 'auto',
},
whiteText: {
color: 'white',
},
imageIcon: {
maxHeight: '50%',
},
paddingBottom: {
paddingBottom: '65px',
},
paddingTop: {
paddingTop: '65px',
},
bodyIcon: {
fontSize: '90px',
paddingBottom: '10px',
paddingTop: '10px',
},
contIcon: {
width: '100%',
left: '0',
right: '0',
},
noShadow: {
border: 'none',
boxShadow: 'none',
backgroundColor: 'transparent',
},
extendedIcon: {
fontSize: '50px',
},
fab: {
margin: '10px 90px 80px 10px',
bottom: '0',
right: '0',
position: 'fixed',
padding: '45px',
},
fabSmall: {
margin: '10px 45px 70px 10px',
bottom: '0',
right: '0',
position: 'fixed',
padding: '35px',
},
}));
export const ReservationPage: FC = () => {
const classes = useStyles();
const [open, setOpen] = React.useState(false);
const handleClickOpen = (): void => {
setOpen(true);
};
const handleClose = (): void => {
setOpen(false);
};
return (
<div data-testid="Reservation">
<Grid container direction="column" className={classes.paddingBottom}>
<div className={classes.root}>
<CssBaseline />
<Grid item>
<NavBar />
</Grid>
<Dialog
open={open}
onClose={handleClose}
aria-labelledby="form-dialog-title"
>
<DialogTitle id="form-dialog-title">
Book New Reservation
</DialogTitle>
<DialogContent>
<DialogContentText>
Write here below the details of your next reservation
</DialogContentText>
<TextField
autoFocus
margin="dense"
id="name"
label="Name Reservation"
type="text"
fullWidth
/>
<TextField
autoFocus
margin="dense"
id="name"
label="Date"
type="date"
fullWidth
InputLabelProps={{ shrink: true }}
/>
<TextField
autoFocus
margin="dense"
id="name"
label="Department Time"
type="time"
fullWidth
InputLabelProps={{ shrink: true }}
/>
<TextField
autoFocus
margin="dense"
id="name"
label="Destination"
type="text"
fullWidth
/>
</DialogContent>
<DialogActions>
<Button onClick={handleClose} color="primary">
Cancel
</Button>
<Button onClick={handleClose} color="primary" variant="contained">
Subscribe
</Button>
</DialogActions>
</Dialog>
<MuiThemeProvider theme={themeResp}>
<Grid item container className={classes.paddingBottom}>
<Grid item xs={1} md={2} lg={2} />
<Grid item xs={10} md={6} lg={4}>
<Typography variant="h2" className={classes.whiteText}>
Plan Here Your
</Typography>
<Typography variant="h1" className={classes.whiteText}>
RESERVATIONS
</Typography>
</Grid>
<Grid item xs={1} />
</Grid>
</MuiThemeProvider>
</div>
<Hidden mdDown>
<Fab
color="primary"
size="large"
aria-label="add"
className={classes.fab}
onClick={handleClickOpen}
>
<AddIcon className={classes.extendedIcon} />
</Fab>
</Hidden>
<Hidden lgUp>
<Fab
color="primary"
size="small"
aria-label="add"
className={classes.fabSmall}
>
<AddIcon />
</Fab>
</Hidden>
<Grid item container className={classes.paddingTop}>
<Grid item xs={2} />
<Grid item xs={8}>
<Typography variant="h3">Your Next Reservations</Typography>
</Grid>
<Grid item xs={2} />
</Grid>
<Grid item container style={{ paddingTop: '20px' }}>
<Grid item xs={1} lg={2} />
<Grid item xs={10} lg={8}>
<Reservation />
</Grid>
<Grid item xs={1} lg={2} />
</Grid>
<Grid item container style={{ paddingTop: '20px' }}>
<Grid item xs={1} lg={2} />
<Grid item xs={10} lg={8}>
<Reservation />
</Grid>
<Grid item xs={1} lg={2} />
</Grid>
<Grid item container style={{ paddingTop: '20px' }}>
<Grid item xs={1} lg={2} />
<Grid item xs={10} lg={8}>
<Reservation />
</Grid>
<Grid item xs={1} lg={2} />
</Grid>
<Grid item container className={classes.paddingTop}>
<Grid item xs={2} />
<Grid item xs={8}>
<Typography variant="h3" align="right">
Your Past Reservations
</Typography>
</Grid>
<Grid item xs={2} />
</Grid>
<Grid item container style={{ paddingTop: '20px' }}>
<Grid item xs={1} lg={2} />
<Grid item xs={10} lg={8}>
<Reservation />
</Grid>
<Grid item xs={1} lg={2} />
</Grid>
</Grid>
</div>
);
};