-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from TeamProductionSystem/MM88-Session-Signup…
…-Redesign added card confirm state
- Loading branch information
Showing
4 changed files
with
188 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// Component for previewing the session time prior to submitting the request. | ||
import SubmitButton from "./SubmitButton"; | ||
import { Box, Button, Typography } from "@mui/material"; | ||
|
||
const Preview = ({ | ||
selected, | ||
onCancel, | ||
openSnackbar, | ||
handleCloseSnackbar, | ||
handleSubmitSession, | ||
}) => { | ||
return ( | ||
<div> | ||
<Typography variant="h6" sx={{ textAlign: "center", minWidth: 200 }}> | ||
Confirm Session? | ||
</Typography> | ||
<Typography | ||
sx={{ marginTop: ".5rem", marginBottom: ".5rem", textAlign: "center" }} | ||
> | ||
{new Date(selected.start).toLocaleTimeString([], { | ||
hour: "2-digit", | ||
minute: "2-digit", | ||
})}{" "} | ||
-{" "} | ||
{new Date(selected.end).toLocaleTimeString([], { | ||
hour: "2-digit", | ||
minute: "2-digit", | ||
})} | ||
</Typography> | ||
<Box | ||
sx={{ | ||
display: "flex", | ||
flexDirection: "row", | ||
justifyContent: "space-between", | ||
}} | ||
> | ||
<SubmitButton | ||
handleSubmitSession={handleSubmitSession} | ||
openSnackbar={openSnackbar} | ||
handleCloseSnackbar={handleCloseSnackbar} | ||
/> | ||
<Button variant="outlined" onClick={onCancel}> | ||
Cancel | ||
</Button> | ||
</Box> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters