import { FormControl, Grid } from "@mui/material"; import PropTypes from "prop-types"; import Input from "../common/Input"; import SingleSelect from "../common/SingleSelect"; //import TextArea from "../TextArea"; const TrainingDetailForm = ({ values, touched, handleBlur, errors, handleChange, setFieldValue, handleSubmit, modeOptions, }) => { TrainingDetailForm.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 Type = ["online","offline"]; return (
{errors.trainingName} ) : null } /> {errors.description} ) : null } /> {errors.duration} ) : null } /> { const syntheticEvent = { target: { name: "modeId", value: newValue, }, }; handleChange(syntheticEvent); }} // onChange={handleChange} onBlur={handleBlur} type="text" helperText={ errors.modeId && touched.modeId ? ( {errors.modeId} ) : null } /> { const syntheticEvent = { target: { name: "typeOfTraining", value: newValue, }, }; handleChange(syntheticEvent); }} onBlur={handleBlur} type="text" helperText={ errors.typeOfTraining && touched.typeOfTraining ? ( {errors.typeOfTraining} ) : null } /> {errors.keyHealthParameterId} ) : null } />
); }; export default TrainingDetailForm;