This file contains hidden or 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
| </CardContent> | |
| </CardActionArea> | |
| <ReservationModal | |
| open={open} | |
| handleClose={handleClose} | |
| card={item} | |
| currentUserReserved={currentUserReserved} | |
| /> | |
| </Card> |
This file contains hidden or 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
| const dispatch = useDispatch(); | |
| const { open, handleClose, card, currentUserReserved } = props; | |
| const userDetails = useSelector((state) => state.user.userDetails); | |
| const [fields, setFields] = useState({}); | |
| const history = useHistory(); | |
| useEffect(() => { | |
| if (card) { | |
| setFields(card.fields); |
This file contains hidden or 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
| import React from "react"; | |
| import { | |
| reservationBasicFormFields, | |
| reservationPremiumFormFields, | |
| } from "../utilities/configs/componentConfig"; | |
| import CustomFormComponent from "../components/CustomFormComponent"; | |
| function FormContainer(props) { | |
| const { fields, handleFieldChange, currentUserReserved, tier } = props; | |
| const configFields = |
This file contains hidden or 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
| <> | |
| <FormContainer | |
| tier="basic" | |
| card={card} | |
| fields={fields} | |
| currentUserReserved={currentUserReserved} | |
| handleFieldChange={handleFieldChange} | |
| /> | |
| </>; |
This file contains hidden or 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
| const reservationBasicFormFields = [ | |
| { | |
| label: "Email Address", | |
| name: "email", | |
| fieldtype: "text", | |
| id: "email", | |
| margin: "dense", | |
| type: "email", | |
| fullWidth: true, | |
| autoFocus: true, |
This file contains hidden or 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
| <CustomFormComponent | |
| key="email" | |
| item={{ | |
| label: "Email Address", | |
| name: "email", | |
| fieldtype: "text", | |
| id: "email", | |
| margin: "dense", | |
| type: "email", | |
| fullWidth: true, |
This file contains hidden or 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
| import React from "react"; | |
| import Text from "./forms/text"; | |
| import RadioGroup from "./forms/radioGroup"; | |
| import Multiselect from "./forms/multiselect"; | |
| function CustomFormComponent(props) { | |
| const FORM_COMPONENTS = { | |
| text: <Text {...props} />, | |
| radio: <RadioGroup {...props} />, | |
| multiselect: <Multiselect {...props} />, |
This file contains hidden or 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
| import React from "react"; | |
| import { TextField } from "@material-ui/core"; | |
| function Text(props) { | |
| const { item, fields, handleFieldChange, currentUserReserved } = props; | |
| return ( | |
| <TextField | |
| {...item} | |
| disabled={currentUserReserved} |
This file contains hidden or 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
| const dispatch = useDispatch(); | |
| const { open, handleClose, card, currentUserReserved } = props; | |
| const userDetails = useSelector((state) => state.user.userDetails); | |
| const [fields, setFields] = useState({}); | |
| const history = useHistory(); | |
| useEffect(() => { | |
| if (card) { | |
| setFields(card.fields); |
This file contains hidden or 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
| const initialReservationFields = { | |
| email: "", | |
| phone: "", | |
| time: "", | |
| }; | |
| const yesNoOptions = [ | |
| { | |
| key: 1, | |
| value: "yes", |
NewerOlder