diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index ecdc497..0000000 --- a/.eslintrc +++ /dev/null @@ -1,26 +0,0 @@ -{ - "extends": [ - "react-app" - ], - "plugins": [ - "prettier", - "react-hooks" - ], - "rules": { - "prettier/prettier": [ - "error", - { - "singleQuote": true - } - ], - "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "warn", - "quotes": [ - 2, - "single", - { - "avoidEscape": true - } - ] - } -} \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..2d718fd --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,31 @@ +module.exports = { + env: { + browser: true, + commonjs: true, + es2021: true, + }, + // extends: ['plugin:react/recommended'], + overrides: [], + parserOptions: { + sourceType: "module", + ecmaFeatures: { + jsx: true, + modules: true, + ecmaVersion: 12, + }, + }, + // plugins: ['react'], + rules: { + // quotes: [2, 'single', { allowTemplateLiterals: true }], + // 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', + "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", + "no-restricted-syntax": "off", + "comma-dangle": "off", + "no-unused-vars": "warn", + "no-underscore-dangle": "off", + "react/jsx-filename-extension": "off", + "react/function-component-definition": "off", + "react/react-in-jsx-scope": "off", + "react/prop-types": "off", + }, +}; diff --git a/package.json b/package.json index 68645e4..f6f500c 100644 --- a/package.json +++ b/package.json @@ -3,20 +3,33 @@ "version": "0.1.0", "private": true, "dependencies": { - "@date-io/date-fns": "^1.3.13", + "@emotion/react": "^11.10.6", + "@emotion/styled": "^11.10.6", + "@fortawesome/fontawesome-svg-core": "^6.4.0", + "@fortawesome/free-regular-svg-icons": "^6.4.0", + "@fortawesome/free-solid-svg-icons": "^6.4.0", + "@fortawesome/react-fontawesome": "^0.2.0", "@material-ui/core": "^4.9.0", + "@material-ui/icons": "^4.11.3", "@material-ui/pickers": "^3.2.10", + "@mui/icons-material": "^5.11.11", + "@mui/joy": "^5.0.0-alpha.72", + "@mui/material": "^5.11.14", + "@mui/x-date-pickers": "^6.0.4", "@testing-library/jest-dom": "^5.0.2", "@testing-library/react": "^9.4.0", "@testing-library/user-event": "^8.1.0", "date-fns": "^2.9.0", + "dayjs": "^1.11.7", "formik": "^2.1.3", "lodash": "^4.17.15", "moment": "^2.24.0", "prop-types": "^15.7.2", - "react": "^16.12.0", - "react-dom": "^16.12.0", + "react": "^18.2.0", + "react-calendar": "^4.1.0", + "react-dom": "^18.2.0", "react-scripts": "3.3.0", + "sassy-datepicker": "^0.10.2", "yup": "^0.28.1" }, "scripts": { @@ -46,4 +59,4 @@ "eslint-plugin-react-hooks": "^2.3.0", "prettier": "1.19.1" } -} \ No newline at end of file +} diff --git a/public/icon_3.png b/public/icon_3.png new file mode 100644 index 0000000..06b7519 Binary files /dev/null and b/public/icon_3.png differ diff --git a/public/imag.png b/public/imag.png new file mode 100644 index 0000000..74b3410 Binary files /dev/null and b/public/imag.png differ diff --git a/src/App.js b/src/App.js index bb41053..996aee7 100644 --- a/src/App.js +++ b/src/App.js @@ -1,14 +1,13 @@ -import React from 'react'; -import MaterialLayout from './components/Layout/MaterialLayout'; -import CheckoutPage from './components/CheckoutPage'; +import React, { useState } from "react"; +import MaterialLayout from "./components/Layout/MaterialLayout"; +import AppointmentForm from "./components/AppointmentForm"; function App() { + const [activeStepColor, setActiveStepColor] = useState("#FFFFFF"); return ( -
- - - -
+ + + ); } diff --git a/src/components/AppointmentForm/Appointment/Calendar.jsx b/src/components/AppointmentForm/Appointment/Calendar.jsx new file mode 100644 index 0000000..765953c --- /dev/null +++ b/src/components/AppointmentForm/Appointment/Calendar.jsx @@ -0,0 +1,35 @@ +// import * as React from 'react'; +// // import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; +// // import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider'; +// // import { DateCalendar } from '@mui/x-date-pickers/DateCalendar'; +// import DatePicker from 'sassy-datepicker'; +// import 'sassy-datepicker/dist/styles.css'; + +// export default function Calendar() { +// return ( +// // +// // +// // +// +// ); +// } +import React from 'react'; + +import { useState } from 'react'; +import DatePicker from 'sassy-datepicker'; +import 'sassy-datepicker/dist/styles.css'; + +function Calendar() { + const [date, setDate] = useState(new Date()); + const onChange = newDate => { + setDate(newDate); + }; + + return ( + + ); +} + + + export default Calendar; + diff --git a/src/components/AppointmentForm/Appointment/index.js b/src/components/AppointmentForm/Appointment/index.js new file mode 100644 index 0000000..2dc94f0 --- /dev/null +++ b/src/components/AppointmentForm/Appointment/index.js @@ -0,0 +1,68 @@ +import React, { useState } from "react"; +import Calendar from "react-calendar"; +import { Typography } from "@material-ui/core"; +import "react-calendar/dist/Calendar.css"; +//import Calendar from '../Appointment/Calendar'; +import Radio from "@mui/material/Radio"; +import RadioGroup from "@mui/material/RadioGroup"; +import FormControlLabel from "@mui/material/FormControlLabel"; +import appointmentFormStyle from "../styles"; +function Appointment() { + const classes = appointmentFormStyle(); + const [value, onChange] = useState(new Date()); + + return ( +
+ +
+ + } + label="11:30 AM - 2:30 PM EST" + /> + } + label="4:00 PM - 5:30 PM EST" + /> + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque + interdum, diam vel fermentum posuere, enim massa. + +
+
+ ); +} +export default Appointment; diff --git a/src/components/AppointmentForm/ButtonAppBar.js b/src/components/AppointmentForm/ButtonAppBar.js new file mode 100644 index 0000000..4a93d37 --- /dev/null +++ b/src/components/AppointmentForm/ButtonAppBar.js @@ -0,0 +1,125 @@ +import * as React from "react"; +import Box from "@mui/material/Box"; +import { makeStyles } from "@material-ui/core/styles"; +import { Button, CircularProgress } from "@material-ui/core"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { + faArrowLeftLong, + faCheck, + faArrowRightLong, +} from "@fortawesome/free-solid-svg-icons"; + +const useStyles = makeStyles((theme) => ({ + backButton: { + backgroundColor: theme.palette.primary.main, + color: theme.palette.primary.contrastText, + "&:hover": { + backgroundColor: theme.palette.primary.dark, + }, + }, + nextButton: { + backgroundColor: theme.palette.primary.main, + color: "#fff !Important", + "&.MuiButton-root.Mui-disabled": { + opacity: "0.4 !Important", + color: "#fff !Important", + }, + "&:hover": { + backgroundColor: theme.palette.primary.dark, + }, + }, +})); + +export default function ButtonAppBar(props) { + const classes = useStyles(); + const { + nextHide, + _handleBack, + isSubmitting, + isNextdisabled, + isLastStep, + } = props; + + return ( + + + + {!nextHide ? ( + + ) : ( + "" + )} + + {isSubmitting && } + + + ); +} diff --git a/src/components/AppointmentForm/Client/ClientInfo/Autocomplete.jsx b/src/components/AppointmentForm/Client/ClientInfo/Autocomplete.jsx new file mode 100644 index 0000000..6131c61 --- /dev/null +++ b/src/components/AppointmentForm/Client/ClientInfo/Autocomplete.jsx @@ -0,0 +1,84 @@ +import React from "react"; +import Autocomplete from "@mui/material/Autocomplete"; +import TextField from "@material-ui/core/TextField"; +import IconButton from "@material-ui/core/IconButton"; + +import { SearchIcon } from "../../../Icons"; +const CountriesList = [ + "Alabama", + "Alaska", + "Arizona", + "Arkansas", + "California", + "Colorado", + "Connecticut", + "Delaware", + "District Of Columbia", + "Florida", + "Georgia", + "Hawaii", + "Idaho", + "Illinois", + "Indiana", + "Iowa", + "Kansas", + "Kentucky", + "Louisiana", + "Maine", + "Maryland", + "Massachusetts", + "Michigan", + "Minnesota", + "Mississippi", + "Missouri", + "Montana", + "Nebraska", + "Nevada", + "New Hampshire", + "New Jersey", + "New Mexico", + "New York", + "North Carolina", + "North Dakota", + "Ohio", + "Oklahoma", + "Oregon", + "Pennsylvania", + "Rhode Island", + "South Carolina", + "South Dakota", + "Tennessee", + "Texas", + "Utah", + "Vermont", + "Virginia", + "Washington", + "West Virginia", + "Wisconsin", + "Wyoming", +]; +const AutocompleteWithSearchIcon = () => { + return ( + ( + + + + ), + }} + /> + )} + /> + ); +}; + +export default AutocompleteWithSearchIcon; diff --git a/src/components/AppointmentForm/Client/ClientInfo/ErrorDetail.jsx b/src/components/AppointmentForm/Client/ClientInfo/ErrorDetail.jsx new file mode 100644 index 0000000..f19880f --- /dev/null +++ b/src/components/AppointmentForm/Client/ClientInfo/ErrorDetail.jsx @@ -0,0 +1,81 @@ +import React from "react"; +import { Typography } from "@material-ui/core"; +import WarningAmberRoundedIcon from '@mui/icons-material/WarningAmberRounded'; +import List from '@mui/material/List'; +import ListItem from '@mui/material/ListItem'; +import ListItemText from '@mui/material/ListItemText'; +import LocationOnOutlinedIcon from '@mui/icons-material/LocationOnOutlined'; +import {Button } from "@material-ui/core"; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { faPencil,faCheck } from '@fortawesome/free-solid-svg-icons'; + + +function ErrorDetail() { + +return ( +
+ +
+ + + Address not found + + + + + + + We couldn’t locate your address, please double check to avoid any errors. + + + + + + + 65 Westington St. Suit 5C, Brooklyn, + New York, NY 11249" + + + + + +
+ + +
+ +
+
+ +); + } + export default ErrorDetail; \ No newline at end of file diff --git a/src/components/AppointmentForm/Client/ClientInfo/ExistingCustomerAddress.jsx b/src/components/AppointmentForm/Client/ClientInfo/ExistingCustomerAddress.jsx new file mode 100644 index 0000000..8c2a0cf --- /dev/null +++ b/src/components/AppointmentForm/Client/ClientInfo/ExistingCustomerAddress.jsx @@ -0,0 +1,69 @@ +import React from "react"; +import { Typography } from "@material-ui/core"; +import { Button } from "@material-ui/core"; +import RadioGroup from "@mui/material/RadioGroup"; +import FormControlLabel from "@mui/material/FormControlLabel"; +import Radio from "@mui/material/Radio"; +import appointmentFormStyle from "../../styles"; +const ExistingCustomerAddress = () => { + const classes = appointmentFormStyle(); + return ( +
+ + Address where our team is needed +
+
+
+ + } + /> + } + /> + + +
+
+ ); +}; + +export default ExistingCustomerAddress; diff --git a/src/components/AppointmentForm/Client/ClientInfo/ExistingCustomerDetail.jsx b/src/components/AppointmentForm/Client/ClientInfo/ExistingCustomerDetail.jsx new file mode 100644 index 0000000..5a45d5d --- /dev/null +++ b/src/components/AppointmentForm/Client/ClientInfo/ExistingCustomerDetail.jsx @@ -0,0 +1,57 @@ +import React, { useEffect, useState } from "react"; +import { Typography } from "@material-ui/core"; +import InputAdornment from "@mui/material/InputAdornment"; +import TextField from "@mui/material/TextField"; +import { PhoneIcon } from "../../../Icons"; +import { SvgIcon } from "@mui/material"; +import appointmentFormStyle from "../../styles"; + +const ExistingCustomerDetail = (props) => { + const classes = appointmentFormStyle(); + const { _setClientFormData, setIsNextdisabled } = props; + const [accountPhoneNumber, setAccountPhoneNumber] = useState(""); + + useEffect(() => { + if (accountPhoneNumber === "") { + setIsNextdisabled(true); + } else { + setIsNextdisabled(false); + } + }, [accountPhoneNumber]); + + return ( +
+ + Existing customer +
+
+ +
+ + Please enter your account phone number + + + { + setAccountPhoneNumber(event.target.value); + _setClientFormData(event.target.name, event.target.value); + }} + className={classes.textFieldDiv} + InputProps={{ + startAdornment: ( + + + + ), + }} + /> +
+
+ ); +}; + +export default ExistingCustomerDetail; diff --git a/src/components/AppointmentForm/Client/ClientInfo/NewCustomerAddress.jsx b/src/components/AppointmentForm/Client/ClientInfo/NewCustomerAddress.jsx new file mode 100644 index 0000000..adfa06b --- /dev/null +++ b/src/components/AppointmentForm/Client/ClientInfo/NewCustomerAddress.jsx @@ -0,0 +1,198 @@ +import React from "react"; +import { Button, Typography } from "@material-ui/core"; +import InputLabel from "@mui/material/InputLabel"; +import TextField from "@mui/material/TextField"; +import MenuItem from "@mui/material/MenuItem"; +import FormControl from "@mui/material/FormControl"; +import Select from "@mui/material/Select"; +import Checkbox from "@mui/material/Checkbox"; +import AutocompleteWithSearchIcon from "../../../FormFields/AutocompleteWithSearchIcon"; +import appointmentFormStyle from "../../styles"; +import ErrorDetail from "./ErrorDetail"; +import { useState } from "react"; + +const NewCustomerAddress = () => { + const classes = appointmentFormStyle(); + const [state, setState] = React.useState(""); + + const [showResults, setShowResults] = useState(false); + const onClick = () => setShowResults(true); + const handleChange = (event) => { + setState(event.target.value); + }; + return ( +
+ + Address where our team is needed +
+
+ +
+ + Please enter your details below + + + + + +
+ + + {/* + state + + */} +
+ +
+ + +
+ + + {" "} + I own this residence + +
+
+ +
+ + {showResults ? : null} +
+
+
+ ); +}; + +export default NewCustomerAddress; diff --git a/src/components/AppointmentForm/Client/ClientInfo/NewCustomerDetail.jsx b/src/components/AppointmentForm/Client/ClientInfo/NewCustomerDetail.jsx new file mode 100644 index 0000000..c6791c9 --- /dev/null +++ b/src/components/AppointmentForm/Client/ClientInfo/NewCustomerDetail.jsx @@ -0,0 +1,73 @@ +import React, { useEffect, useState } from "react"; +import { Typography } from "@material-ui/core"; +import InputAdornment from "@mui/material/InputAdornment"; +import TextField from "@mui/material/TextField"; +import appointmentFormStyle from "../../styles"; + +import { EmailIcon, ProfileIcon, PhoneIcon } from "../../../Icons"; +import { SvgIcon } from "@mui/material"; + +const NewCustomerDetail = (props) => { + const classes = appointmentFormStyle(); + const { _setClientFormData, setIsNextdisabled } = props; + + useEffect(() => { + setIsNextdisabled(false); + }, []); + return ( +
+ + New customer +
+
+
+ + Please enter your details below + + + + + + ), + }} + /> + + + + ), + }} + /> + + + + ), + }} + /> +
+
+ ); +}; + +export default NewCustomerDetail; diff --git a/src/components/AppointmentForm/Client/CustomerAddress.jsx b/src/components/AppointmentForm/Client/CustomerAddress.jsx new file mode 100644 index 0000000..c4aa6dc --- /dev/null +++ b/src/components/AppointmentForm/Client/CustomerAddress.jsx @@ -0,0 +1,25 @@ +import React, { useEffect, useState } from "react"; +import NewCustomerAddress from "./ClientInfo/NewCustomerAddress"; +import ExistingCustomerAddress from "./ClientInfo/ExistingCustomerAddress"; + +const CustomerAddress = (props) => { + const { customerType, _setClientFormData, setIsNextdisabled } = props; + + return ( + <> + {customerType === "newCustomer" ? ( + + ) : ( + + )} + + ); +}; + +export default CustomerAddress; diff --git a/src/components/AppointmentForm/Client/CustomerDetail.jsx b/src/components/AppointmentForm/Client/CustomerDetail.jsx new file mode 100644 index 0000000..718a681 --- /dev/null +++ b/src/components/AppointmentForm/Client/CustomerDetail.jsx @@ -0,0 +1,34 @@ +import React, { useEffect, useState } from "react"; +import NewCustomerDetail from "./ClientInfo/NewCustomerDetail"; +import ExistingCustomerDetail from "./ClientInfo/ExistingCustomerDetail"; + +const CustomerDetail = (props) => { + const { + customerType, + _setClientFormData, + setIsNextdisabled, + setNextHide, + } = props; + + useEffect(() => { + setNextHide(false); + }, []); + + return ( + <> + {customerType === "newCustomer" ? ( + + ) : ( + + )} + + ); +}; + +export default CustomerDetail; diff --git a/src/components/AppointmentForm/Client/CustomerType.jsx b/src/components/AppointmentForm/Client/CustomerType.jsx new file mode 100644 index 0000000..31f1db2 --- /dev/null +++ b/src/components/AppointmentForm/Client/CustomerType.jsx @@ -0,0 +1,46 @@ +import React, { useEffect, useState } from "react"; +import { Typography, Button } from "@material-ui/core"; +import appointmentFormStyle from "../styles"; +export default function CustomerType(props) { + const classes = appointmentFormStyle(); + const { setCustomerType, setNextHide, _handleNextStep } = props; + + useEffect(() => { + setNextHide(true); + }, []); + + return ( + +
+
+ FIX +
+ {/* */} + +
+ + + +
+
+
+ ); +} diff --git a/src/components/AppointmentForm/Client/index.js b/src/components/AppointmentForm/Client/index.js new file mode 100644 index 0000000..d87d48f --- /dev/null +++ b/src/components/AppointmentForm/Client/index.js @@ -0,0 +1,58 @@ +import React, { useEffect, useState } from "react"; +import CustomerType from "./CustomerType"; +import CustomerDetail from "./CustomerDetail"; +import CustomerAddress from "./CustomerAddress"; + +export default function Client(props) { + const { + clientFormField, + setClientFormField, + clientActiveStep, + _handleNext, + setIsNextdisabled, + setNextHide, + } = props; + const [customerType, setCustomerType] = useState(""); + // const currentValidationSchema = validationSchema[activeStep]; + + function _setClientFormData(keyName, value) { + setClientFormField({ ...clientFormField, [keyName]: value }); + } + + function _renderStepContent(step) { + switch (step) { + case 0: + return ( + + ); + case 1: + return ( + + ); + case 2: + return ( + + ); + default: + return
Not Found
; + } + } + + return ( + {_renderStepContent(clientActiveStep)} + ); +} diff --git a/src/components/AppointmentForm/Confirm/index.js b/src/components/AppointmentForm/Confirm/index.js new file mode 100644 index 0000000..ae3fb3e --- /dev/null +++ b/src/components/AppointmentForm/Confirm/index.js @@ -0,0 +1,149 @@ +import React from "react"; +import { Grid, Typography } from "@material-ui/core"; +import TodayIcon from "@mui/icons-material/Today"; +import AccessTimeIcon from "@mui/icons-material/AccessTime"; +//import LocationOnOutlinedIcon from '@mui/icons-material/LocationOnOutlined'; +//import LocalPhoneOutlinedIcon from "@mui/icons-material/LocalPhoneOutlined"; +import { PhoneIcons, Location } from "../../Icons"; +import { SvgIcon } from "@mui/material"; +import Checkbox from "@mui/material/Checkbox"; +import appointmentFormStyle from "../styles"; +export default function Confirm() { + const classes = appointmentFormStyle(); + return ( + +
+
+ + Please review and confirm appointment +
+
+
+ + +
+ + March 30, 2023 +
+
+ +
+ + + 11:30 AM - 2:30 PM EST +
+
+ +
+ {/* */} + + + March 30, 202365 Westington St. Suit 5C, Brooklyn, New York, NY + 11249 + +
+
+ +
+ {/* */} + + 492-990-2789 +
+
+
+ + +
+ + + I accept the{" "} + terms and conditions + +
+
+ + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque + interdum, diam vel fermentum posuere, enim massa. + +
+
+ ); +} diff --git a/src/components/AppointmentForm/CookiesPopup.jsx b/src/components/AppointmentForm/CookiesPopup.jsx new file mode 100644 index 0000000..dd350d4 --- /dev/null +++ b/src/components/AppointmentForm/CookiesPopup.jsx @@ -0,0 +1,32 @@ +import React, { useState } from "react"; +import Button from "@mui/material/Button"; +import Card from '@mui/joy/Card'; +import Snackbar from "@mui/material/Snackbar"; +import zIndex from "@mui/material/styles/zIndex"; + +const CookiesPopup = (props) => { + const { setIsShowCookies, isShowCookies } = props; + const handleClose = () => { + setIsShowCookies(false); + }; + + return ( +
+
+ +
Cookie Consent
+ This website uses cookies to improve your experience. By using this site, you agree to our use of cookies. + + + +
+
+ ); +}; + +export default CookiesPopup; diff --git a/src/components/AppointmentForm/Description/AdditionalInfoStep.jsx b/src/components/AppointmentForm/Description/AdditionalInfoStep.jsx new file mode 100644 index 0000000..4b37037 --- /dev/null +++ b/src/components/AppointmentForm/Description/AdditionalInfoStep.jsx @@ -0,0 +1,89 @@ +import React, { useEffect, useState } from "react"; +import { Typography } from "@material-ui/core"; +import TextField from "@mui/material/TextField"; +import appointmentFormStyle from "../styles"; +const AdditonalInfoStep = (props) => { + const classes = appointmentFormStyle(); + const { _setDescriptionFormData, setIsNextdisabled } = props; + const [AdditionalInfo, setAdditionalInfo] = useState(""); + + const handleChange = (event) => { + setAdditionalInfo(event.target.value); + _setDescriptionFormData("AdditionalInfo", event.target.value); + }; + + useEffect(() => { + if (AdditionalInfo === "") { + setIsNextdisabled(true); + } else { + setIsNextdisabled(false); + } + }, [AdditionalInfo]); + + return ( +
+ + Heating & Air - Water leak from HVAC unit - Repair and service + + + Additional information +
+
+ +
+ + Please share any information you'd like about your equipment, project, + or issues you are facing. + +
+
+ +
+
+ ); +}; + +export default AdditonalInfoStep; diff --git a/src/components/AppointmentForm/Description/DiagnosticFeeStep.jsx b/src/components/AppointmentForm/Description/DiagnosticFeeStep.jsx new file mode 100644 index 0000000..b8b4ac9 --- /dev/null +++ b/src/components/AppointmentForm/Description/DiagnosticFeeStep.jsx @@ -0,0 +1,100 @@ +import React, { useEffect, useState } from "react"; +import { Typography } from "@material-ui/core"; +import Checkbox from "@mui/material/Checkbox"; +import appointmentFormStyle from "../styles"; +const DiagnosticFeeStep = (props) => { + const classes = appointmentFormStyle(); + const { _setDescriptionFormData, setIsNextdisabled } = props; + const [isChecked, setIschecked] = useState(false); + + useEffect(() => { + if (isChecked) { + setIsNextdisabled(false); + } else { + setIsNextdisabled(true); + } + _setDescriptionFormData("DiagnosticFee", isChecked); + }, [isChecked]); + + return ( +
+ + Heating & Air - Water leak from HVAC unit - Repair and service + + + This visit requires a diagnostic fee of $99 +
+
+ +
+ + Pellentesque bibendum sapien at dui accumsan, condimentum cursus + turpis porta. Suspendisse euismod risus nibh, sit amet tristique elit + posuere in. Sed ut lacinia nisl. Sed non leo auctor est porta + fermentum sed eu erat. + +
+
+ setIschecked(!isChecked)} + /> + + I understand there is a $99 diagnostic cost + +
+
+ ); +}; + +export default DiagnosticFeeStep; diff --git a/src/components/AppointmentForm/Description/SystemAgeStep.jsx b/src/components/AppointmentForm/Description/SystemAgeStep.jsx new file mode 100644 index 0000000..d9898e5 --- /dev/null +++ b/src/components/AppointmentForm/Description/SystemAgeStep.jsx @@ -0,0 +1,186 @@ +import React, { useEffect, useState } from "react"; +import { Typography } from "@material-ui/core"; +/// import { InputField, DatePickerField } from '../../FormFields'; +import Radio from "@mui/joy/Radio"; +import RadioGroup from "@mui/joy/RadioGroup"; +import Sheet from "@mui/joy/Sheet"; +import appointmentFormStyle from "../styles"; +export default function SystemAgeStep(props) { + const classes = appointmentFormStyle(); + const { _setDescriptionFormData, setIsNextdisabled } = props; + const [unitLocated, setUnitLocated] = useState(""); + const [systemAge, setSystemAge] = useState(""); + useEffect(() => { + if (systemAge !== "" && unitLocated !== "") { + setIsNextdisabled(false); + } + }, [unitLocated, systemAge]); + + return ( + +
+ + Heating & Air - Water leak from HVAC unit - Repair and service + + + What is the approximate age of your system? +
+
+ + + {[ + "Less than 5 years", + "6 to 9 years old", + "10 to 15 years old", + "Not sure", + ].map((value) => ( + + { + _setDescriptionFormData( + event.target.name, + event.target.value + ); + setSystemAge(event.target.value); + }} + slotProps={{ + label: ({ checked }) => ({ + sx: { + fontWeight: "lg", + fontSize: "md", + color: checked ? "text.primary" : "text.secondary", + }, + }), + action: ({ checked }) => ({ + sx: (theme) => ({ + ...(checked && { + "--variant-borderWidth": "2px", + "&&": { + // && to increase the specificity to win the base :hover styles + borderColor: theme.vars.palette.primary[500], + }, + }), + }), + }), + }} + /> + + ))} + + + Where is the leaking unit located? +
+
+ + {[ + "Attic", + "Upstairs", + "Main floor", + "Basement", + "Garage", + "Outside", + "Other", + ].map((value) => ( + + { + _setDescriptionFormData( + event.target.name, + event.target.value + ); + setUnitLocated(event.target.value); + }} + slotProps={{ + label: ({ checked }) => ({ + sx: { + fontWeight: "lg", + fontSize: "md", + color: checked ? "text.primary" : "text.secondary", + }, + }), + action: ({ checked }) => ({ + sx: (theme) => ({ + ...(checked && { + "--variant-borderWidth": "2px", + "&&": { + // && to increase the specificity to win the base :hover styles + borderColor: theme.vars.palette.primary[500], + }, + }), + }), + }), + }} + /> + + ))} + +
+
+ ); +} diff --git a/src/components/AppointmentForm/Description/index.js b/src/components/AppointmentForm/Description/index.js new file mode 100644 index 0000000..a7471c7 --- /dev/null +++ b/src/components/AppointmentForm/Description/index.js @@ -0,0 +1,56 @@ +import React, { useEffect, useState } from "react"; +import SystemAgeStep from "./SystemAgeStep"; +import DiagnosticFeeStep from "./DiagnosticFeeStep"; +import AdditionalInfoStep from "./AdditionalInfoStep"; + +export default function Problem(props) { + const { + _handleNext, + descriptionActiveStep, + descriptionFormField, + setDescriptionFormField, + setIsNextdisabled, + setNextHide, + } = props; + + useEffect(() => { + setNextHide(false); + }, []); + + function _setDescriptionFormData(keyName, value) { + setDescriptionFormField({ ...descriptionFormField, [keyName]: value }); + } + + function _renderStepContent(step) { + switch (step) { + case 0: + return ( + + ); + case 1: + return ( + + ); + case 2: + return ( + + ); + default: + return
Not Found
; + } + } + + return ( + {_renderStepContent(descriptionActiveStep)} + ); +} diff --git a/src/components/AppointmentForm/FormModel/appointmentFormModel.js b/src/components/AppointmentForm/FormModel/appointmentFormModel.js new file mode 100644 index 0000000..e927c2e --- /dev/null +++ b/src/components/AppointmentForm/FormModel/appointmentFormModel.js @@ -0,0 +1,52 @@ +export default { + formId: "checkoutForm", + problemFormField: { + service: { + name: "service", + label: "Service*", + requiredErrorMsg: "service name is required", + }, + serviceType: { + name: "serviceType", + label: "Service Type*", + requiredErrorMsg: "service type is required", + }, + serviceIssues: { + name: "serviceIssues", + label: "Service Issues*", + requiredErrorMsg: "service issues is required", + }, + }, + descriptionFormIntialValues: { + systemAge: { + name: "systemAge", + label: "System Age*", + }, + unitLocated: { + name: "unitLocated", + label: "unit Located*", + }, + DiagnosticFee: { + name: "DiagnosticFee", + label: "Diagnostic Fee*", + }, + AdditionalInfo: { + name: "AdditionalInfo", + label: "Additional Info*", + }, + }, + ClientFormIntialValues: { + clientType: { + name: "clientType", + label: "Client Type*", + }, + clientDetail: { + name: "clientDetail", + label: "Client Detail*", + }, + clientAddress: { + name: "clientAddress", + label: "Client Address*", + }, + }, +}; diff --git a/src/components/AppointmentForm/FormModel/formInitialValues.js b/src/components/AppointmentForm/FormModel/formInitialValues.js new file mode 100644 index 0000000..0a80b72 --- /dev/null +++ b/src/components/AppointmentForm/FormModel/formInitialValues.js @@ -0,0 +1,30 @@ +import AppointmentFormModel from "./appointmentFormModel"; +const { + problemFormField: { service, serviceType, serviceIssues }, + descriptionFormIntialValues: { + systemAge, + unitLocated, + DiagnosticFee, + AdditionalInfo, + }, + ClientFormIntialValues: { clientType, clientDetail, clientAddress }, +} = AppointmentFormModel; + +export default { + problemIntialValues: { + [service.name]: "", + [serviceType.name]: "", + [serviceIssues.name]: "", + }, + descriptionIntialValues: { + [systemAge.name]: "", + [unitLocated.name]: "", + [DiagnosticFee.name]: false, + [AdditionalInfo.name]: "", + }, + clientIntialValues: { + [clientType.name]: "", + [clientDetail.name]: "", + [clientAddress.name]: "", + }, +}; diff --git a/src/components/CheckoutPage/FormModel/validationSchema.js b/src/components/AppointmentForm/FormModel/validationSchema.js similarity index 100% rename from src/components/CheckoutPage/FormModel/validationSchema.js rename to src/components/AppointmentForm/FormModel/validationSchema.js diff --git a/src/components/AppointmentForm/Problem/IssuesStep.jsx b/src/components/AppointmentForm/Problem/IssuesStep.jsx new file mode 100644 index 0000000..c1b433a --- /dev/null +++ b/src/components/AppointmentForm/Problem/IssuesStep.jsx @@ -0,0 +1,131 @@ +import React, { useState, useEffect } from "react"; +import { Typography, Box } from "@material-ui/core"; +import Button from "@mui/material/Button"; +import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight"; +import { Heating } from "../../Icons"; +import { SvgIcon } from "@mui/material"; +import appointmentFormStyle from "../styles"; + +const IssuesStep = (props) => { + const { _setProblemFormData, _handleNext, setActiveStepColor } = props; + const classes = appointmentFormStyle(); + + useEffect(() => { + setActiveStepColor("#FFFFFF"); + }, []); + + const faultList = [ + { + id: 1, + label: "No heat", + }, + { + id: 2, + label: "No cooling", + }, + { + id: 3, + label: "Water leak from HVAC unit", + }, + { + id: 4, + label: "Noise", + }, + { + id: 5, + label: "Thermostat", + }, + { + id: 6, + label: "Gas leak", + }, + { + id: 7, + label: "Air quality", + }, + ]; + + return ( +
+ + Heating & Air - Repair and service + +
+ + Heating & Air +
+
+ + + +
+
+ {React.Children.toArray( + faultList.map((item) => ( + + )) + )} +
+
+ ); +}; + +export default IssuesStep; diff --git a/src/components/AppointmentForm/Problem/ServiceStep.jsx b/src/components/AppointmentForm/Problem/ServiceStep.jsx new file mode 100644 index 0000000..54ddcf1 --- /dev/null +++ b/src/components/AppointmentForm/Problem/ServiceStep.jsx @@ -0,0 +1,127 @@ +import React, { useEffect } from "react"; +import { + FormControl, + FormControlLabel, + Radio, + Box, + RadioGroup, + Typography, + makeStyles, +} from "@material-ui/core"; + +import { Heating, Plumbing, Electrical } from "../../Icons"; +import { SvgIcon } from "@mui/material"; +import appointmentFormStyle from "../styles"; + +const ServiceStep = (props) => { + // const classes = useStyles(); // Apply the custom styles + const classes = appointmentFormStyle(); + const services = [ + { id: "Plumbing", label: "Plumbing", icon: Plumbing }, + { id: "Heating", label: "Heating & Air", icon: Heating }, + { id: "Electrical", label: "Electrical", icon: Electrical }, + ]; + const { _setProblemFormData, _handleNextStep, setActiveStepColor } = props; + const [selectedOption, setSelectedOption] = React.useState({}); + + const handleOptionChange = (event) => { + setSelectedOption(event.target.value); + _setProblemFormData(event.target.name, event.target.value); + _handleNextStep(); + }; + + useEffect(() => { + setActiveStepColor("#FFFFFF"); + }, []); + + return ( + + + What do you need help with? +
+
+ + + + {services.map((service) => ( + } + style={{ + boxSizing: "border-box", + display: "flex", + flexDirection: "column", + alignItems: "center", + padding: "16px", + gap: "16px", + width: "235px", + height: "116px", + left: 0, + right: 0, + background: "#FFFFFF", + borderRadius: "16px", + cursor: "pointer", + border: "1px solid #D3D7E1", + }} + label={ + + + + + + {service?.label} + + + } + classes={{ root: classes.myFormControlLabelRoot }} + /> + ))} + + +
+ ); +}; + +export default ServiceStep; diff --git a/src/components/AppointmentForm/Problem/ServiceTypeStep.jsx b/src/components/AppointmentForm/Problem/ServiceTypeStep.jsx new file mode 100644 index 0000000..a45a504 --- /dev/null +++ b/src/components/AppointmentForm/Problem/ServiceTypeStep.jsx @@ -0,0 +1,105 @@ +import React, { useEffect } from "react"; +import { Typography } from "@material-ui/core"; +import Button from "@mui/material/Button"; +import ConstructionIcon from "@mui/icons-material/Construction"; +//import EventIcon from "@mui/icons-material/Event"; +import { RepeatIcon,EventIcon } from "../../Icons"; +import { SvgIcon } from "@mui/material"; +import appointmentFormStyle from "../styles"; +const ServiceTypeStep = (props) => { + const classes = appointmentFormStyle(); + const { _setProblemFormData, _handleNextStep, setActiveStepColor } = props; + + const serviceTypeList = [ + { + id: 1, + label: ( + + Repair and service + + ), + icon: , + }, + { + id: 2, + label: ( + + New equipment estimate + + ), + icon: , + }, + { + id: 3, + label: ( + + Preventive maintenance + + ), + icon: , + }, + ]; + + useEffect(() => { + setActiveStepColor("#F2F0FA"); + }, []); + + return ( + //
+
+ + What type of service do you need? +
+
+ +
+ {React.Children.toArray( + serviceTypeList.map((item) => ( + + )) + )} +
+
+ ); +}; + +export default ServiceTypeStep; diff --git a/src/components/AppointmentForm/Problem/index.jsx b/src/components/AppointmentForm/Problem/index.jsx new file mode 100644 index 0000000..9b0d614 --- /dev/null +++ b/src/components/AppointmentForm/Problem/index.jsx @@ -0,0 +1,144 @@ +import React, { useEffect, useState } from "react"; +import { Button } from "@material-ui/core"; +import ServiceStep from "./ServiceStep"; +import ServiceTypeStep from "./ServiceTypeStep"; +import IssuesStep from "./IssuesStep"; +import useStyles from "../styles"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faArrowLeftLong } from "@fortawesome/free-solid-svg-icons"; +//import ArrowBackIcon from '@mui/icons-material/ArrowBack'; +// import WestIcon from '@mui/icons-material/West'; + +export default function Problem(props) { + const { + _handleNext, + problemActiveStep, + setProblemActiveStep, + setProblemFormField, + problemFormField, + setActiveStepColor, + } = props; + const classes = useStyles(); + + // const currentValidationSchema = validationSchema[activeStep]; + + function _handleBack() { + setProblemActiveStep(problemActiveStep - 1); + } + + function _setProblemFormData(keyName, value) { + setProblemFormField({ ...problemFormField, [keyName]: value }); + } + + function _renderStepContent(step) { + switch (step) { + case 0: + return ( + + ); + case 1: + return ( + + ); + case 2: + return ( + + ); + default: + return
Not Found
; + } + } + + return ( + + {_renderStepContent(problemActiveStep)} + + {problemActiveStep !== 0 && ( + <> + {problemActiveStep === 1 ? ( +
+ {" "} + +
+ ) : ( +
+ +
+ )} + + )} +
+ ); +} diff --git a/src/components/AppointmentForm/Thanks/index.js b/src/components/AppointmentForm/Thanks/index.js new file mode 100644 index 0000000..4a724b8 --- /dev/null +++ b/src/components/AppointmentForm/Thanks/index.js @@ -0,0 +1,55 @@ +import React, { useEffect } from "react"; +import { Typography } from "@material-ui/core"; +import Button from "@mui/material/Button"; +import ThumbUpIcon from "@mui/icons-material/ThumbUp"; +import appointmentFormStyle from "../styles"; +function Thanks(props) { + const { setActiveStepColor } = props; + const classes = appointmentFormStyle(); + useEffect(() => { + setActiveStepColor("#F2F0FA"); + }, []); + return ( + +
style={{ backgroundColor: "#F2F0FA", height: "593px" }}*/ + > + + Thank you, appointment created +
+
+ +
+ +
+
+
+ ); +} + +export default Thanks; diff --git a/src/components/AppointmentForm/index.js b/src/components/AppointmentForm/index.js new file mode 100644 index 0000000..3bafd96 --- /dev/null +++ b/src/components/AppointmentForm/index.js @@ -0,0 +1,311 @@ +import React, { useState, useEffect } from "react"; +import "./style.css"; +import { + Stepper, + Step, + StepLabel, + Box, + Typography, + Button, +} from "@material-ui/core"; +import { SvgIcon } from "@mui/material"; +import { CrossIcon } from "../Icons"; + +import { Formik, Form } from "formik"; +import ButtonAppBar from "./ButtonAppBar"; +import Problem from "./Problem"; +import Description from "./Description"; +import Client from "./Client"; +import Appointment from "./Appointment"; +import Confirm from "./Confirm"; +import Thanks from "./Thanks"; +import CookiesPopup from "./CookiesPopup"; +//import validationSchema from "./FormModel/validationSchema"; +import AppointmentFormModel from "./FormModel/appointmentFormModel"; +import formInitialValues from "./FormModel/formInitialValues"; +import { steps, problemSteps, descriptionSteps, clientSteps } from "./steps"; +import useStyles from "./styles"; + +const { formId } = AppointmentFormModel; + +export default function AppointmentForm(props) { + const { setActiveStepColor } = props; + const classes = useStyles(); + const { + problemIntialValues, + descriptionIntialValues, + clientIntialValues, + } = formInitialValues; + + const [isNextdisabled, setIsNextdisabled] = useState(true); + const [nextHide, setNextHide] = useState(false); + const [problemFormField, setProblemFormField] = useState(problemIntialValues); + const [descriptionFormField, setDescriptionFormField] = useState( + descriptionIntialValues + ); + const [clientFormField, setClientFormField] = useState(clientIntialValues); + // set default step for each + const [activeStep, setActiveStep] = useState(2); + const [problemActiveStep, setProblemActiveStep] = useState(0); + const [descriptionActiveStep, setDescriptionActiveStep] = useState(0); + const [clientActiveStep, setClientActiveStep] = useState(0); + //const currentValidationSchema = validationSchema[activeStep]; + // check last step of each child + const [isShowCookies, setIsShowCookies] = React.useState(true); + const isLastStep = activeStep === steps.length - 1; + const isProblemLastStep = problemActiveStep === problemSteps.length - 1; + const isDescriptionLastStep = + descriptionActiveStep === descriptionSteps.length - 1; + const isClientLastStep = clientActiveStep === clientSteps.length - 1; + + function _handleNext() { + switch (activeStep) { + case 0: + return _handleProblemNext(); + case 1: + return _handleDescriptionNext(); + case 2: + return _handleClientNext(); + case 3: + return setActiveStep(activeStep + 1); + case 4: + return setActiveStep(activeStep + 1); + default: + return; + } + } + + const _handleProblemNext = () => { + if (isProblemLastStep) { + setActiveStep(activeStep + 1); + } else { + setProblemActiveStep(problemActiveStep + 1); + } + }; + + const _handleDescriptionNext = () => { + if (isDescriptionLastStep) { + setActiveStep(activeStep + 1); + } else { + setDescriptionActiveStep(descriptionActiveStep + 1); + } + }; + + const _handleClientNext = () => { + if (isClientLastStep) { + setActiveStep(activeStep + 1); + } else { + setClientActiveStep(clientActiveStep + 1); + } + }; + + function _handleBack() { + switch (activeStep) { + case 0: + return _handleProblemBack(); + case 1: + return _handleDescriptionBack(); + case 2: + return _handleClientBack(); + case 3: + return setActiveStep(activeStep - 1); + case 4: + return setActiveStep(activeStep - 1); + default: + return; + } + } + + const _handleProblemBack = () => { + if (problemActiveStep !== 0) { + setProblemActiveStep(problemActiveStep - 1); + } + }; + + const _handleDescriptionBack = () => { + if (descriptionActiveStep === 0) { + setActiveStep(activeStep - 1); + } else { + setDescriptionActiveStep(descriptionActiveStep - 1); + } + }; + + const _handleClientBack = () => { + if (clientActiveStep === 0) { + setActiveStep(activeStep - 1); + } else { + setClientActiveStep(clientActiveStep - 1); + } + }; + + function _renderStepContent(step) { + switch (step) { + case 0: + return ( + + ); + case 1: + return ( + + ); + case 2: + return ( + + ); + case 3: + return ; + case 4: + return ; + default: + return ; + } + } + + function _sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); + } + + async function _submitForm(values, actions) { + await _sleep(1000); + // alert(JSON.stringify(values, null, 2)); + actions.setSubmitting(false); + + _handleNext(); + } + + function _handleSubmit(values, actions) { + if (isLastStep) { + _submitForm(values, actions); + } else { + _handleNext(); + actions.setTouched({}); + actions.setSubmitting(false); + } + } + + return ( + // + + + + CREATE APPOINTMENT + + + + + + + {steps.map((label) => ( + + {label} + + ))} + + + {isShowCookies && ( + + )} + + {({ isSubmitting }) => ( +
+ {_renderStepContent(activeStep)} + {activeStep !== 0 && activeStep !== steps.length && ( + + )} + + )} +
+
+
+ //
+ ); +} diff --git a/src/components/AppointmentForm/steps.js b/src/components/AppointmentForm/steps.js new file mode 100644 index 0000000..e0966c2 --- /dev/null +++ b/src/components/AppointmentForm/steps.js @@ -0,0 +1,19 @@ +export const steps = [ + "PROBLEM", + "DESCRIPTION", + "CLEINT INFO", + "APPOINTMENT", + "CONFIRM", +]; +export const problemSteps = ["Service Select", "Service Type", "Issues Step"]; +export const descriptionSteps = [ + "System Age", + "Diagnostic Fee", + "Additional Info", +]; + +export const clientSteps = [ + "Customer Type", + "Customer Info", + "Customer Address", +]; diff --git a/src/components/AppointmentForm/style.css b/src/components/AppointmentForm/style.css new file mode 100644 index 0000000..de60df9 --- /dev/null +++ b/src/components/AppointmentForm/style.css @@ -0,0 +1,632 @@ +@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;900&display=swap"); + +body { + font-family: "Poppins"; +} + +.makeStyles-paper-2 { + /* height: 721px!important; */ + padding: 0px !important; + margin-top: 0px !important; + margin-bottom: 0px !important; +} +.Servicetype { + font-family: "Poppins"; + color: black; +} + +.makeStyles-nextButton-158 { + color: rgba(0, 0, 0, 0.5); + background-color: #00bcd4; +} +.css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input{ + padding: 12px 14px!important; +} + +.backstep { + margin-left: 14rem !important; + margin-top: 1rem !important; +} + +.css-1d6wzja-MuiButton-startIcon { + color: #007bff; +} +.react-calendar__month-view__days { + display: grid !important; + grid-template-columns: auto auto auto auto auto auto auto !important; + gap: 8px 35px; + width: 93%; + margin: auto; +} + +.MuiStepper-root { + height: 88px; +} +/* .MuiTypography-body1 { +font-family: 'Poppins'!important; +font-style: normal!important; +font-weight: 600!important; +font-size: 12px!important; +line-height: 16px!important; +letter-spacing: 0.1em; +text-transform: uppercase; + background-color: #fff; +padding: 13px; +color: black; + +position: relative; +} */ +.makeStyles-root-1 { + width: 560px !important; + margin-left: auto; + margin-right: 0px !important; +} +.MuiStepLabel-root { + flex-direction: column !important; + gap: 9px; +} +.makeStyles-stepper-31 { + padding: 24px !important; + color: black !important; + background: #f5f8fb !important; + border-bottom: 1px solid #dde1eb !important; +} + +.MuiCardContent-root { + font-size: 16px; + font-family: "Poppins"; + color: black; + text-align: center; + padding-top: 50px !important; +} +.MuiStepLabel-label.MuiStepLabel-active { + font-family: "Poppins"; + font-style: normal; + font-weight: 400; + font-size: 11px; + line-height: 16px; + /* identical to box height, or 145% */ + + text-align: center; + letter-spacing: 0.04em; + text-transform: uppercase; + + /* Primary */ + + color: #007bff !important; +} +.MuiStepLabel-label { + font-family: "Poppins" !important; + font-style: normal !important; + font-weight: 400 !important; + font-size: 11px !important; + line-height: 16px !important; + /* identical to box height, or 145% */ + + text-align: center; + letter-spacing: 0.04em !important; + text-transform: uppercase !important; + + /* Headings LIGHT */ + + color: #1f2327 !important; +} +.MuiStepIcon-root.MuiStepIcon-active { + color: white !important; + /* border: 1px solid #00bcd4; */ + border: 1px solid #007bff; + border-radius: 50%; + /* border: #00bcd4; */ +} +.MuiStepIcon-text { + fill: #00bcd4 !important; +} + +/* .react-calendar button:enabled:hover { + background: none!important; + color: black; +} +.react-calendar__tile--active { + background: #006edc; + color: white; +} */ + +#checkoutForm { + /* height: 593px; */ + color: black; + position: relative; +} +.MuiTypography-h6 { + padding: 30px 15px 20px 25px; + font-family: "Poppins" !important; + font-style: normal !important; + font-weight: 600 !important; + font-size: 20px !important; + line-height: 28px !important; + color: #1f2327 !important; +} +.react-calendar__month-view__days__day--weekend { + color: black !important; +} +.react-calendar__month-view__days__day--neighboringMonth { + color: #757575 !important; +} + +.cardname { + display: grid; + grid-template-columns: auto auto; + width: 100%; + justify-content: center; + gap: 21px; +} +.MuiCard-root { + overflow: hidden; + border-radius: 16px !important; + width: 244px; + height: 116px; + background-color: #fff !important; +} + +/* .react-calendar button { + flex: 0 0 13%!important; + border-radius: 500px; +} */ +.css-1qs309j-MuiButtonBase-root-MuiPickersDay-root { + font-family: "poppins" !important; + font-weight: 600 !important; + color: #1f2327 !important; +} +.css-7oawqu-MuiButtonBase-root-MuiPickersDay-root { + font-family: "poppins" !important; + font-weight: 600 !important; + color: #1f2327 !important; +} +.css-1qs309j-MuiButtonBase-root-MuiPickersDay-root.Mui-selected { + color: #fff !important; + background-color: #007bff !important; +} +.css-7oawqu-MuiButtonBase-root-MuiPickersDay-root.Mui-selected { + color: #fff !important; + background-color: #007bff !important; +} +.css-1v09r0c-MuiButtonBase-root-MuiPickersDay-root { + font-family: "poppins" !important; + font-weight: 400 !important; +} +.css-rhmlg1-MuiTypography-root-MuiDayCalendar-weekDayLabel { + font-family: "poppins" !important; + font-weight: 500 !important; + color: #1f2327 !important; +} +.css-nk89i7-MuiPickersCalendarHeader-root { + padding-left: 10px !important; +} +.css-cyfsxc-MuiPickersCalendarHeader-labelContainer { + font-family: "poppins" !important; + font-weight: 300 !important; + font-size: 2rem !important; +} +.css-12mkn7b-MuiButtonBase-root-MuiIconButton-root-MuiPickersCalendarHeader-switchViewButton { + display: none !important; +} +.css-cwhad8-MuiDateCalendar-root { + width: 510px !important; +} +.css-9reuh9-MuiPickersArrowSwitcher-root { + display: none !important; +} +.css-flbe84-MuiDayCalendar-weekContainer { + gap: 40px; +} +.css-i5q14k-MuiDayCalendar-header { + gap: 40px; +} + +.MuiButton-root { + color: black; +} +.MuiPaper-elevation1 { + border: 1px solid #d3d7e1; + box-shadow: none !important; +} +.MuiCardActions-root { + justify-content: center !important; +} +.MuiButton-label { + font-family: "Poppins" !important; + font-style: normal !important; + font-weight: 500 !important; + font-size: 16px !important; + line-height: 20px !important; + letter-spacing: 0px !important; + text-transform: none !important; + text-align: center; +} +.MuiPaper-rounded { + border-radius: none !important; +} +.makeStyles-buttons-32 { + margin-top: 100px !important; +} +.MuiStepConnector-lineHorizontal { + border-top: 1px dashed #4ca2ff !important; +} +.MuiStepConnector-root { + margin-top: -23px !important; +} + +.makeStyles-nextButton-160 { + color: white !important; +} +.MuiStep-horizontal { + padding-left: 0px !important; + padding-right: 0px !important; +} +.makeStyles-stepper-3 { + padding: 13px 32px 13px !important; + background: #f5f8fb !important; +} +.makeStyles-buttons-4 { + margin-top: 140px; +} +.two-btn { + display: flex; + flex-direction: column; + gap: 10px; + align-items: center; +} +.exist { + background: #007bff; + padding: 12px 18px !important; + gap: 6px; + width: 267px; + box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15); + border-radius: 500px !important; + color: white !important; +} +.new { + padding: 12px 18px !important; + width: 221px; + background: #edf1f7; + box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.09); + border-radius: 500px !important; +} +.rectangle { + padding-top: 65px; + padding-bottom: 40px; +} +.MuiTypography-h5 { + width: 100px !important; + display: block !important; + font-family: "Poppins" !important; + font-style: normal !important; + font-weight: 900 !important; + border-radius: 24px 0px !important; + font-size: 32px !important; + line-height: 32px !important; + margin-left: auto !important; + padding-top: 33px !important; + margin-right: auto !important; + text-align: center !important; + border-bottom: 10px solid #4ca2ff; + border-right: 10px solid #4ca2ff; + height: 100px; + color: white; + background: #007bff; +} +.MuiStepIcon-root.MuiStepIcon-completed { + color: #007bff !important; +} + +/* payment form */ + +.css-3hx9vb-JoyRadioGroup-root { + display: grid !important; + grid-template-columns: auto auto auto; + gap: 10px !important; + width: 90% !important; + margin-left: auto !important; + margin-right: auto !important; +} +.css-ycie4v-JoySheet-root { + padding: 8px !important; + text-align: center !important; +} +.css-1fjq3ub-JoyRadio-root { + font-family: "Poppins" !important; +} + +.css-1su2bbo-JoyRadio-label { + font-style: normal !important; + font-weight: 400 !important; + font-size: 16px !important; + color: #1f2327 !important; +} + +/*----*/ + +.css-1ahv6t2-JoyList-root { + display: grid !important; + grid-template-columns: auto auto !important; + width: 95%; + align-items: normal !important; + margin-left: auto auto !important; + gap: 10px; +} + +.css-b5w08v-JoySheet-root { + border-radius: 18px; +} +/* +.css-1obzj18-JoySheet-root { + text-align: center; + box-shadow: none !important; + padding-top: 75px; + max-width: 244px !important; +} */ + +.css-pfaso8-JoyRadio-label { + font-size: 15px; + font-family: "Poppins"; + color: #1f2327; + line-height: 20px; + font-weight: 500; +} + +/* calender */ + +.react-calendar { + width: 560px !important; + height: 376px !important; + border: none !important; +} +.react-calendar button { + padding: 16px 0px !important; + font-family: "Poppins"; + font-style: normal; + font-weight: 500; + font-size: 16px; + line-height: 10px !important; + border-radius: 500px; +} + +abbr[title] { + text-decoration: none !important; + font-family: "Poppins"; + font-style: normal; + font-weight: 500; + font-size: 12px; + line-height: 12px; +} + +.react-calendar__month-view__weekdays { + text-transform: capitalize !important; + margin-bottom: 10px; +} + +.makeStyles-nextButton-158 { + color: white !important; +} + +.MuiButton-root.Mui-disabled { + color: rgba(255, 255, 255, 0.3) !important; +} +.react-calendar__navigation__arrow { + display: none; +} + +.svg-inline--fa { + height: 13px !important; +} + +.css-v2ra2r-JoyRadio-action.css-v2ra2r-JoyRadio-action { + border-color: 1px solid #007bff; + border: 1px solid #007bff; + background-color: #e2f0ff; + /* color: #007BFF; */ +} +.css-1uz2tnr-JoyRadio-label { + color: #007bff !important; +} + +.react-calendar__navigation { + height: 70px !important; +} + +.react-calendar__navigation button { + margin-left: 27px !important; + flex-grow: 0 !important; +} + +.react-calendar__navigation__label__labelText { + font-family: "Poppins"; + font-style: normal; + font-weight: 300; + font-size: 32px; + line-height: 40px; + color: #1f2327; +} +.react-calendar__navigation button:hover { + background-color: white !important; +} + +.css-j204z7-MuiFormControlLabel-root { + margin-left: 0px !important; +} +.react-calendar__tile--active { + background: #006edc; + color: white !important; +} +/* .css-dmmspl-MuiFormGroup-root{ + display: flex!important; + flex-direction: row!important; + padding-top: 16px; + padding-left: 20px; +} */ + +/*---SUCCESS---*/ +.MuiTypography-h4 { + padding-top: 30px; + text-align: center; + font-family: "Poppins" !important; + font-style: normal !important; + font-weight: 600 !important; + font-size: 20px !important; + line-height: 28px !important; + color: #1f2327; +} + +.css-1rwt2y5-MuiButtonBase-root-MuiButton-root { + border: none !important; + text-transform: capitalize !important; + display: flex; + flex-direction: row !important; + align-items: center !important; + padding: 16px 24px !important; + gap: 8px !important; + height: 56px !important; + background: #ffffff !important; + box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.09); + border-radius: 500px !important; + flex: none; + order: 1; + flex-grow: 0; +} + +.Okay { + color: black; + text-transform: none; + font-family: Poppins; + font-style: normal; + font-weight: 600; + font-size: 18px; + line-height: 24px; +} + +.css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input { + font-family: "Poppins"; + font-style: normal; + font-weight: 400; + font-size: 16px; + color: #1f2327; +} +.css-1d3z3hw-MuiOutlinedInput-notchedOutline { + border-radius: 10px !important; +} + +.overlay { + position: fixed; + + width: 100%; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.5); + cursor: pointer; +} + +@media screen and (max-width: 631px) { + .makeStyles-root-1 { + margin-left: auto !important; + } +} +@media screen and (max-width: 560px) { + .makeStyles-root-1 { + width: auto !important; + } +} + +@media screen and (max-width: 540px) { + /* #checkoutForm { + height: 672px; + } */ + .bgcover { + height: 672px !important; + } + .css-k3x4pj { + bottom: -95px !important; + } + .radio-text { + height: 250px !important; + } + .checked { + flex-direction: column !important; + gap: 10px !important; + } + /* .css-9ou33r-JoyRadioGroup-root { + display: flex !important; + width: 312px !important; + margin: auto !important; + gap: 24px !important; + height: auto !important; + } + .css-1obzj18-JoySheet-root { + max-width: 312px !important; + height: 116px !important; + }*/ + + .heatstep { + width: 90% !important; + margin: auto auto; + } + .css-3hx9vb-JoyRadioGroup-root { + grid-template-columns: auto auto; + } + + .text-para { + width: 90% !important; + margin: auto auto !important; + } + .text-area { + width: 90% !important; + margin: auto auto !important; + } + .css-1u3bzj6-MuiFormControl-root-MuiTextField-root { + width: 100% !important; + margin: auto auto !important; + } + .react-calendar__month-view__days { + gap: 8px 30px; + } +} + +@media screen and (max-width: 480px) { + .popupcard{ + width: 300px!important; + height: 200px!important; + position: none!important; + background-color: rgb(242, 245, 251); + margin-left: auto; + margin-right: auto; + margin-top: 15rem; + } + + .popupheading{ + + font-size: 20px!important; + padding: 20px 10px 8px!important; + margin: 0px!important; + } +} +.popuptext{ + font-size: 12px!important; + line-height: 24px!important; + padding: 0px 12px!important; + +} +@media screen and (min-width: 560px) { + + .popupcard{ + position: absolute; + } +} + +@media screen and (min-width: 481px) and (max-width: 559px){ + .popupcard{ + margin-left: auto; + margin-right: auto; + margin-top: 15rem; + } +} \ No newline at end of file diff --git a/src/components/AppointmentForm/styles.js b/src/components/AppointmentForm/styles.js new file mode 100644 index 0000000..1258d69 --- /dev/null +++ b/src/components/AppointmentForm/styles.js @@ -0,0 +1,167 @@ +import { makeStyles } from "@material-ui/core/styles"; +import { Calculate } from "@mui/icons-material"; +const appointmentFormStyle = makeStyles((theme) => ({ + stepper: { + padding: theme.spacing(3, 0, 5), + }, + buttons: { + display: "flex", + justifyContent: "flex-end", + }, + button: { + marginTop: theme.spacing(3), + marginLeft: theme.spacing(1), + }, + wrapper: { + margin: theme.spacing(1), + position: "relative", + }, + buttonProgress: { + position: "absolute", + top: "50%", + left: "50%", + }, + myFormControlLabelRoot: { + marginLeft: "0px", + marginRight: "0px", + "&:hover": { + background: "#F8FBFD !Important", + border: "1px solid #007BFF !Important", + color: "#007BFF !Important", + }, + }, + formDiv: { paddingBottom: "24px" }, + formDivWithHeight: { + paddingBottom: "24px", + maxHeight: "100%", + height: "auto", + }, + textFieldDiv: { + "& div.MuiInputBase-root": { + padding: "8px 16px !important", + }, + "& div.css-11u53oe-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input":{ + padding: "13px 16px !important", + }, + "& .MuiIconButton-root":{ + padding: '0 5px' + }, + "& .css-1d3z3hw-MuiOutlinedInput-notchedOutline":{ + top:0 + }, + "& div.MuiInputBase-root Input.MuiInputBase-input": { + padding: "0px !important", + height: "32px", + }, + "& div.css-wb57ya-MuiFormControl-root-MuiTextField-root":{ + // maxHeight:'378px' , + scrollbarWidth: 'thin', + '&::-webkit-scrollbar': { + width: '0.4em', + }, + '&::-webkit-scrollbar-track': { + background: "#f1f1f1", + }, + '&::-webkit-scrollbar-thumb': { + backgroundColor: '#888', + }, + '&::-webkit-scrollbar-thumb:hover': { + background: '#555' + } + } + }, + formTitleTypoGraphy: { + padding: "24px", + paddingBottom: "0px", + fontWeight: 600, + fontSize: "20px", + lineHeight: "28px", + }, + formTitleHr: { + height: "2px", + width: "24px", + border: "none", + background: "#007BFF", + marginLeft: "0px", + margin: 0, + marginTop: "6px", + }, + formTitleDiv: { + display: "flex", + flexDirection: "column", + gap: "24px", + padding: "24px", + margin: "auto", + }, + formInstructionTypo: { + fontWeight: "400", + fontSize: "16px", + lineHeight: "32px", + color: "#4D4F59", + }, + formAddressRadio: { + "& span.MuiButtonBase-root": { + padding: "0px !important", + marginRight: "12px !important", + height: "20px", + width: "20px", + background: "#F2F5FB", + border: "1px solid #C5CEE0", + }, + }, + boxWrapper: { + display:'flex', + flexFlow:'column', + height:'100%', + "& .justifyBetween":{ + justifyContent: 'space-between' + } + }, + h100:{ + height:'100%' + }, + checkField:{ + "&$checked":{ + color: '#007BFF !important' + }, + "& .MuiSvgIcon-root": { + fontSize: 24, + strokeWidth:0.2, + stroke:'#C5CEE0' + } + }, + checked: {}, + selectMenuList:{ + height:'378px' , + scrollbarWidth: 'thin', + '&::-webkit-scrollbar': { + width: '0.4em', + }, + '&::-webkit-scrollbar-track': { + background: "#f1f1f1", + }, + '&::-webkit-scrollbar-thumb': { + backgroundColor: '#888', + }, + '&::-webkit-scrollbar-thumb:hover': { + background: '#555' + } + }, + calenderWrap:{ + display:'flex', + flexFlow:'column', + justifyContent:'space-between', + height:'100%' + }, + calenderField:{ + "& .react-calendar button":{ + width:'2rem', + height:'2rem', + display:'inline-flex', + alignItems:'center', + justifyContent:'center' + } + } +})); + +export default appointmentFormStyle; diff --git a/src/components/CheckoutPage/CheckoutPage.jsx b/src/components/CheckoutPage/CheckoutPage.jsx deleted file mode 100644 index c1d5df5..0000000 --- a/src/components/CheckoutPage/CheckoutPage.jsx +++ /dev/null @@ -1,127 +0,0 @@ -import React, { useState } from 'react'; -import { - Stepper, - Step, - StepLabel, - Button, - Typography, - CircularProgress -} from '@material-ui/core'; -import { Formik, Form } from 'formik'; - -import AddressForm from './Forms/AddressForm'; -import PaymentForm from './Forms/PaymentForm'; -import ReviewOrder from './ReviewOrder'; -import CheckoutSuccess from './CheckoutSuccess'; - -import validationSchema from './FormModel/validationSchema'; -import checkoutFormModel from './FormModel/checkoutFormModel'; -import formInitialValues from './FormModel/formInitialValues'; - -import useStyles from './styles'; - -const steps = ['Shipping address', 'Payment details', 'Review your order']; -const { formId, formField } = checkoutFormModel; - -function _renderStepContent(step) { - switch (step) { - case 0: - return ; - case 1: - return ; - case 2: - return ; - default: - return
Not Found
; - } -} - -export default function CheckoutPage() { - const classes = useStyles(); - const [activeStep, setActiveStep] = useState(0); - const currentValidationSchema = validationSchema[activeStep]; - const isLastStep = activeStep === steps.length - 1; - - function _sleep(ms) { - return new Promise(resolve => setTimeout(resolve, ms)); - } - - async function _submitForm(values, actions) { - await _sleep(1000); - alert(JSON.stringify(values, null, 2)); - actions.setSubmitting(false); - - setActiveStep(activeStep + 1); - } - - function _handleSubmit(values, actions) { - if (isLastStep) { - _submitForm(values, actions); - } else { - setActiveStep(activeStep + 1); - actions.setTouched({}); - actions.setSubmitting(false); - } - } - - function _handleBack() { - setActiveStep(activeStep - 1); - } - - return ( - - - Checkout - - - {steps.map(label => ( - - {label} - - ))} - - - {activeStep === steps.length ? ( - - ) : ( - - {({ isSubmitting }) => ( -
- {_renderStepContent(activeStep)} - -
- {activeStep !== 0 && ( - - )} -
- - {isSubmitting && ( - - )} -
-
-
- )} -
- )} -
-
- ); -} diff --git a/src/components/CheckoutPage/CheckoutSuccess/CheckoutSuccess.jsx b/src/components/CheckoutPage/CheckoutSuccess/CheckoutSuccess.jsx deleted file mode 100644 index b7f503a..0000000 --- a/src/components/CheckoutPage/CheckoutSuccess/CheckoutSuccess.jsx +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { Typography } from '@material-ui/core'; - -function CheckoutSuccess() { - return ( - - - Thank you for your order. - - - Your order number is #2001539. We have emailed your order confirmation, - and will send you an update when your order has shipped. - - - ); -} - -export default CheckoutSuccess; diff --git a/src/components/CheckoutPage/CheckoutSuccess/index.js b/src/components/CheckoutPage/CheckoutSuccess/index.js deleted file mode 100644 index 32bd128..0000000 --- a/src/components/CheckoutPage/CheckoutSuccess/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import CheckoutSuccess from './CheckoutSuccess'; -export default CheckoutSuccess; diff --git a/src/components/CheckoutPage/FormModel/checkoutFormModel.js b/src/components/CheckoutPage/FormModel/checkoutFormModel.js deleted file mode 100644 index 5d1be8c..0000000 --- a/src/components/CheckoutPage/FormModel/checkoutFormModel.js +++ /dev/null @@ -1,71 +0,0 @@ -export default { - formId: 'checkoutForm', - formField: { - firstName: { - name: 'firstName', - label: 'First name*', - requiredErrorMsg: 'First name is required' - }, - lastName: { - name: 'lastName', - label: 'Last name*', - requiredErrorMsg: 'Last name is required' - }, - address1: { - name: 'address1', - label: 'Address Line 1*', - requiredErrorMsg: 'Address Line 1 is required' - }, - address2: { - name: 'address2', - label: 'Address Line 2' - }, - city: { - name: 'city', - label: 'City*', - requiredErrorMsg: 'City is required' - }, - state: { - name: 'state', - label: 'State/Province/Region' - }, - zipcode: { - name: 'zipcode', - label: 'Zipcode*', - requiredErrorMsg: 'Zipcode is required', - invalidErrorMsg: 'Zipcode is not valid (e.g. 70000)' - }, - country: { - name: 'country', - label: 'Country*', - requiredErrorMsg: 'Country is required' - }, - useAddressForPaymentDetails: { - name: 'useAddressForPaymentDetails', - label: 'Use this address for payment details' - }, - nameOnCard: { - name: 'nameOnCard', - label: 'Name on card*', - requiredErrorMsg: 'Name on card is required' - }, - cardNumber: { - name: 'cardNumber', - label: 'Card number*', - requiredErrorMsg: 'Card number is required', - invalidErrorMsg: 'Card number is not valid (e.g. 4111111111111)' - }, - expiryDate: { - name: 'expiryDate', - label: 'Expiry date*', - requiredErrorMsg: 'Expiry date is required', - invalidErrorMsg: 'Expiry date is not valid' - }, - cvv: { - name: 'cvv', - label: 'CVV*', - requiredErrorMsg: 'CVV is required', - invalidErrorMsg: 'CVV is invalid (e.g. 357)' - } - } -}; diff --git a/src/components/CheckoutPage/FormModel/formInitialValues.js b/src/components/CheckoutPage/FormModel/formInitialValues.js deleted file mode 100644 index 8c006cf..0000000 --- a/src/components/CheckoutPage/FormModel/formInitialValues.js +++ /dev/null @@ -1,30 +0,0 @@ -import checkoutFormModel from './checkoutFormModel'; -const { - formField: { - firstName, - lastName, - address1, - city, - zipcode, - country, - useAddressForPaymentDetails, - nameOnCard, - cardNumber, - expiryDate, - cvv - } -} = checkoutFormModel; - -export default { - [firstName.name]: '', - [lastName.name]: '', - [address1.name]: '', - [city.name]: '', - [zipcode.name]: '', - [country.name]: '', - [useAddressForPaymentDetails.name]: false, - [nameOnCard.name]: '', - [cardNumber.name]: '', - [expiryDate.name]: '', - [cvv.name]: '' -}; diff --git a/src/components/CheckoutPage/Forms/AddressForm.jsx b/src/components/CheckoutPage/Forms/AddressForm.jsx deleted file mode 100644 index c48b847..0000000 --- a/src/components/CheckoutPage/Forms/AddressForm.jsx +++ /dev/null @@ -1,130 +0,0 @@ -import React from 'react'; -import { Grid, Typography } from '@material-ui/core'; -import { InputField, CheckboxField, SelectField } from '../../FormFields'; - -const cities = [ - { - value: undefined, - label: 'None' - }, - { - value: '1', - label: 'New York' - }, - { - value: '2', - label: 'Chicago' - }, - { - value: '3', - label: 'Saigon' - } -]; - -const states = [ - { - value: undefined, - label: 'None' - }, - { - value: '11', - label: 'Florida' - }, - { - value: '22', - label: 'Michigan' - }, - { - value: '33', - label: 'Texas' - } -]; - -const countries = [ - { - value: null, - label: 'None' - }, - { - value: '111', - label: 'United States' - }, - { - value: '222', - label: 'Italy' - }, - { - value: '333', - label: 'Vietnam' - } -]; - -export default function AddressForm(props) { - const { - formField: { - firstName, - lastName, - address1, - address2, - city, - state, - zipcode, - country, - useAddressForPaymentDetails - } - } = props; - return ( - - - Shipping address - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ); -} diff --git a/src/components/CheckoutPage/Forms/PaymentForm.jsx b/src/components/CheckoutPage/Forms/PaymentForm.jsx deleted file mode 100644 index 387dba8..0000000 --- a/src/components/CheckoutPage/Forms/PaymentForm.jsx +++ /dev/null @@ -1,47 +0,0 @@ -import React from 'react'; -import { Grid, Typography } from '@material-ui/core'; -import { InputField, DatePickerField } from '../../FormFields'; - -export default function PaymentForm(props) { - const { - formField: { nameOnCard, cardNumber, expiryDate, cvv } - } = props; - - return ( - - - Payment method - - - - - - - - - - - - - - - - - ); -} diff --git a/src/components/CheckoutPage/ReviewOrder/PaymentDetails.jsx b/src/components/CheckoutPage/ReviewOrder/PaymentDetails.jsx deleted file mode 100644 index 1901b41..0000000 --- a/src/components/CheckoutPage/ReviewOrder/PaymentDetails.jsx +++ /dev/null @@ -1,55 +0,0 @@ -import React from 'react'; -import moment from 'moment'; -import { Typography, Grid } from '@material-ui/core'; -import useStyles from './styles'; - -function PaymentDetails(props) { - const { formValues } = props; - const classes = useStyles(); - const { nameOnCard, cardNumber, expiryDate } = formValues; - return ( - - - Payment details - - - - - Card type - - - Visa - - - - - Card holder - - - {nameOnCard} - - - - - Card number - - - {cardNumber} - - - - - Expiry Date - - - - {moment(expiryDate).format('MM/YY')} - - - - - - ); -} - -export default PaymentDetails; diff --git a/src/components/CheckoutPage/ReviewOrder/ProductDetails.jsx b/src/components/CheckoutPage/ReviewOrder/ProductDetails.jsx deleted file mode 100644 index 6d9da8d..0000000 --- a/src/components/CheckoutPage/ReviewOrder/ProductDetails.jsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react'; -import { Typography, List, ListItem, ListItemText } from '@material-ui/core'; -import useStyles from './styles'; - -const products = [ - { name: 'Product 1', desc: 'A nice thing', price: '$9.99' }, - { name: 'Product 2', desc: 'Another thing', price: '$3.45' }, - { name: 'Product 3', desc: 'Something else', price: '$6.51' }, - { name: 'Product 4', desc: 'Best thing of all', price: '$14.11' }, - { name: 'Shipping', desc: '', price: 'Free' } -]; - -function ProductDetails() { - const classes = useStyles(); - return ( - - {products.map(product => ( - - - {product.price} - - ))} - - - - $34.06 - - - - ); -} - -export default ProductDetails; diff --git a/src/components/CheckoutPage/ReviewOrder/ReviewOrder.jsx b/src/components/CheckoutPage/ReviewOrder/ReviewOrder.jsx deleted file mode 100644 index 8308294..0000000 --- a/src/components/CheckoutPage/ReviewOrder/ReviewOrder.jsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from 'react'; -import { useFormikContext } from 'formik'; -import { Typography, Grid } from '@material-ui/core'; -import ProductDetails from './ProductDetails'; -import ShippingDetails from './ShippingDetails'; -import PaymentDetails from './PaymentDetails'; - -export default function ReviewOrder() { - const { values: formValues } = useFormikContext(); - return ( - - - Order summary - - - - - - - - ); -} diff --git a/src/components/CheckoutPage/ReviewOrder/ShippingDetails.jsx b/src/components/CheckoutPage/ReviewOrder/ShippingDetails.jsx deleted file mode 100644 index 3989ac7..0000000 --- a/src/components/CheckoutPage/ReviewOrder/ShippingDetails.jsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import { Typography, Grid } from '@material-ui/core'; -import useStyles from './styles'; - -function PaymentDetails(props) { - const { formValues } = props; - const classes = useStyles(); - const { firstName, lastName, address1 } = formValues; - return ( - - - Shipping - - {`${firstName} ${lastName}`} - {`${address1}`} - - ); -} - -export default PaymentDetails; diff --git a/src/components/CheckoutPage/ReviewOrder/index.js b/src/components/CheckoutPage/ReviewOrder/index.js deleted file mode 100644 index 4a3afc8..0000000 --- a/src/components/CheckoutPage/ReviewOrder/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import ReviewOrder from './ReviewOrder'; -export default ReviewOrder; diff --git a/src/components/CheckoutPage/ReviewOrder/styles.js b/src/components/CheckoutPage/ReviewOrder/styles.js deleted file mode 100644 index 626176a..0000000 --- a/src/components/CheckoutPage/ReviewOrder/styles.js +++ /dev/null @@ -1,12 +0,0 @@ -import { makeStyles } from '@material-ui/core/styles'; -export default makeStyles(theme => ({ - listItem: { - padding: theme.spacing(1, 0) - }, - total: { - fontWeight: '700' - }, - title: { - marginTop: theme.spacing(2) - } -})); diff --git a/src/components/CheckoutPage/index.js b/src/components/CheckoutPage/index.js deleted file mode 100644 index 8728a02..0000000 --- a/src/components/CheckoutPage/index.js +++ /dev/null @@ -1,2 +0,0 @@ -import CheckoutPage from './CheckoutPage'; -export default CheckoutPage; diff --git a/src/components/CheckoutPage/styles.js b/src/components/CheckoutPage/styles.js deleted file mode 100644 index 963c4d2..0000000 --- a/src/components/CheckoutPage/styles.js +++ /dev/null @@ -1,23 +0,0 @@ -import { makeStyles } from '@material-ui/core/styles'; -export default makeStyles(theme => ({ - stepper: { - padding: theme.spacing(3, 0, 5) - }, - buttons: { - display: 'flex', - justifyContent: 'flex-end' - }, - button: { - marginTop: theme.spacing(3), - marginLeft: theme.spacing(1) - }, - wrapper: { - margin: theme.spacing(1), - position: 'relative' - }, - buttonProgress: { - position: 'absolute', - top: '50%', - left: '50%' - } -})); diff --git a/src/components/FormFields/AutocompleteWithSearchIcon.jsx b/src/components/FormFields/AutocompleteWithSearchIcon.jsx new file mode 100644 index 0000000..49d8f09 --- /dev/null +++ b/src/components/FormFields/AutocompleteWithSearchIcon.jsx @@ -0,0 +1,90 @@ +import React from "react"; +// import Autocomplete from "@material-ui/lab/Autocomplete"; +import Autocomplete from '@mui/material/Autocomplete'; +import TextField from "@mui/material/TextField"; +import IconButton from "@material-ui/core/IconButton"; + +import { SearchIcon } from "../Icons"; +import appointmentFormStyle from "../AppointmentForm/styles"; + +const AutocompleteWithSearchIcon = () => { + const classes = appointmentFormStyle(); + const CountriesList=[ + 'Alabama', + 'Alaska', + 'Arizona', + 'Arkansas', + 'California', + 'Colorado', + 'Connecticut', + 'Delaware', + 'District Of Columbia', + 'Florida', + 'Georgia', + 'Hawaii', + 'Idaho', + 'Illinois', + 'Indiana', + 'Iowa', + 'Kansas', + 'Kentucky', + 'Louisiana', + 'Maine', + 'Maryland', + 'Massachusetts', + 'Michigan', + 'Minnesota', + 'Mississippi', + 'Missouri', + 'Montana', + 'Nebraska', + 'Nevada', + 'New Hampshire', + 'New Jersey', + 'New Mexico', + 'New York', + 'North Carolina', + 'North Dakota', + 'Ohio', + 'Oklahoma', + 'Oregon', + 'Pennsylvania', + 'Rhode Island', + 'South Carolina', + 'South Dakota', + 'Tennessee', + 'Texas', + 'Utah', + 'Vermont', + 'Virginia', + 'Washington', + 'West Virginia', + 'Wisconsin', + 'Wyoming' + ]; + return ( + ( + + + + ), + }} + /> + )} + /> + ); +}; + +export default AutocompleteWithSearchIcon; \ No newline at end of file diff --git a/src/components/Icons/Electrical color icon.svg b/src/components/Icons/Electrical color icon.svg new file mode 100644 index 0000000..04358e7 --- /dev/null +++ b/src/components/Icons/Electrical color icon.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/src/components/Icons/Plumbing color icon.svg b/src/components/Icons/Plumbing color icon.svg new file mode 100644 index 0000000..9203181 --- /dev/null +++ b/src/components/Icons/Plumbing color icon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/components/Icons/index.js b/src/components/Icons/index.js new file mode 100644 index 0000000..ac81162 --- /dev/null +++ b/src/components/Icons/index.js @@ -0,0 +1,252 @@ +import React from "react"; +export const Heating = () => ( + + + + + + + + + + + + + + + + + + + + +); + +export const Plumbing = () => ( + + + + + + + + +); + +export const Electrical = () => ( + + + + + + + + + + + + + + + + +); + +export const CrossIcon = () => ( + + + +); + +export const ProfileIcon = () => ( + + + +); + +export const PhoneIcon = () => ( + + + +); + +export const PhoneIcons = () => ( + + + + +); + +export const RepeatIcon = () => ( + + + +); + +export const EventIcon = () => ( + + + +); + +export const Location = () => ( + + + +); + +export const EmailIcon = () => ( + + + +); +export const SearchIcon = () => ( + + + +); diff --git a/src/components/Layout/MaterialLayout.jsx b/src/components/Layout/MaterialLayout.jsx index ffa0477..8337ac2 100644 --- a/src/components/Layout/MaterialLayout.jsx +++ b/src/components/Layout/MaterialLayout.jsx @@ -1,24 +1,32 @@ -import React from 'react'; -import { Paper, CssBaseline } from '@material-ui/core'; -import { ThemeProvider } from '@material-ui/core/styles'; +import React from "react"; +import { Paper, CssBaseline } from "@material-ui/core"; +import { ThemeProvider } from "@material-ui/core/styles"; -import Header from '../Header'; -import Footer from '../Footer'; +// import Header from '../Header'; +// import Footer from '../Footer'; -import { theme, useStyle } from './styles'; +import { theme, useStyle } from "./styles"; export default function MaterialLayout(props) { - const { children } = props; + const { children, activeStepColor } = props; const classes = useStyle(); return ( -
+ {/*
*/}
- {children} + + {" "} + {children} +
-