import Ohclogo from "./Ohclogo"; import { FormControl, Grid, TextField } from "@mui/material"; import PropTypes from "prop-types"; import Input from "../common/Input"; import SingleSelect from "../common/SingleSelect" import MultipleSelect from "../common/MultipleSelect"; import { InputLabel, MenuItem, Select } from "@mui/material"; import Autocomplete from "@mui/material/Autocomplete"; import { useState } from "react"; import MultiCheckbox from "./MultiCheckbox"; const OhcForm = ({ values, touched, handleBlur, errors, handleChange, setFieldValue, handleSubmit, }) => { OhcForm.propTypes = { values: PropTypes.object.isRequired, touched: PropTypes.object.isRequired, errors: PropTypes.object.isRequired, handleBlur: PropTypes.func.isRequired, handleChange: PropTypes.func.isRequired, setFieldValue: PropTypes.func.isRequired, handleSubmit: PropTypes.func.isRequired, }; const ohcselect = ["Student", "Employee"]; const Categoryselect = ["Ohc center", "Ambulance", "First Aid Box", "Other"]; return (
{errors.ohcName} ) : null } /> {errors.ohcDescription} ) : null } /> {errors.ohcCode} ) : null } /> {errors.state} ) : null } /> {errors.pinCode} ) : null } /> {errors.fax} ) : null } /> {errors.primaryPhone} ) : null } /> {errors.primaryEmail} ) : null } /> {errors.iconColor} ) : null } /> {errors.iconText} ) : null } /> { const syntheticEvent = { target: { name: "ohcType", value: newValue, }, }; handleChange(syntheticEvent); }} onBlur={handleBlur} type="text" helperText={ errors.ohcType && touched.ohcType ? ( {errors.ohcType} ) : null } /> {errors.address} ) : null } /> { const syntheticEvent = { target: { name: "ohcCategory", value: newValue, }, }; handleChange(syntheticEvent); }} // onChange={handleChange} onBlur={handleBlur} type="text" helperText={ errors.ohcCategory && touched.ohcCategory ? ( {errors.ohcCategory} ) : null } />
); }; export default OhcForm;