Commit 09260aab by Ravindra Kanojiya

updated ui

1 parent 3ddd0dc9
...@@ -277,7 +277,7 @@ const ActivityDetails = ({ isUpdate, loadedUser }) => { ...@@ -277,7 +277,7 @@ const ActivityDetails = ({ isUpdate, loadedUser }) => {
}} }}
validationSchema={activityDetailsValidationSchema} validationSchema={activityDetailsValidationSchema}
// enableReinitialize={true} // enableReinitialize={true}
onSubmit={values => {}} onSubmit={values => { }}
> >
{({ values, errors, touched, handleChange, handleBlur, handleSubmit, setFieldValue, resetForm }) => ( {({ values, errors, touched, handleChange, handleBlur, handleSubmit, setFieldValue, resetForm }) => (
<Form <Form
...@@ -475,8 +475,8 @@ const ActivityDetails = ({ isUpdate, loadedUser }) => { ...@@ -475,8 +475,8 @@ const ActivityDetails = ({ isUpdate, loadedUser }) => {
options={ options={
pincodeData && pincodeData.length > 0 pincodeData && pincodeData.length > 0
? pincodeData.map(item => { ? pincodeData.map(item => {
return { name: item.attributes.name, id: item.id }; return { name: item.attributes.name, id: item.id };
}) })
: [{}] : [{}]
} }
placeholder="Choose a pincode" placeholder="Choose a pincode"
...@@ -529,45 +529,39 @@ const ActivityDetails = ({ isUpdate, loadedUser }) => { ...@@ -529,45 +529,39 @@ const ActivityDetails = ({ isUpdate, loadedUser }) => {
<div className="col-12 col-lg-6"> <div className="col-12 col-lg-6">
<div className="input-group mb-2"> <div className="input-group mb-2">
<label>Gifting to Someone</label> <label>Gifting to Someone</label>
<div className="row"> <select id="giftingToSomeone" name="giftingToSomeone" value={values.giftingToSomeone} onChange={handleChange} onBlur={handleBlur}>
<div className="col-12 col-lg-12"> {" "}
<select id="giftingToSomeone" name="giftingToSomeone" value={values.giftingToSomeone} onChange={handleChange} onBlur={handleBlur}> Gift someone
{" "} <option value="">Select</option>
Gift someone <option value={true}>Yes</option>
<option value="">Select</option> <option value={false}>No</option>
<option value={true}>Yes</option> </select>
<option value={false}>No</option>
</select> {touched.giftingToSomeone && errors.giftingToSomeone && (
</div> <span className="form-error" style={{ color: "red", fontSize: "10px" }}>
{touched.giftingToSomeone && errors.giftingToSomeone && ( {errors.giftingToSomeone}
<span className="form-error" style={{ color: "red", fontSize: "10px" }}> </span>
{errors.giftingToSomeone} )}
</span>
)}
</div>
</div> </div>
</div> </div>
<div className="col-12 col-lg-6"> <div className="col-12 col-lg-6">
<div className="input-group mb-2"> <div className="input-group mb-2">
<label>Activity Type</label> <label>Activity Type</label>
<div className="row"> <select id="activityType" name="activityType" onChange={handleChange} onBlur={handleBlur} value={values.activityType}>
<div className=""> {" "}
<div className="col-12 col-lg-12"> Activity Type
<select id="activityType" name="activityType" onChange={handleChange} onBlur={handleBlur} value={values.activityType}> <option value="">Select</option>
{" "} <option value={"indoor"}>Indoor</option>
Activity Type <option value={"outdoor"}>Outdoor</option>
<option value="">Select</option> </select>
<option value={"indoor"}>Indoor</option>
<option value={"outdoor"}>Outdoor</option> {touched.activityType && errors.activityType && (
</select> <span className="form-error" style={{ color: "red", fontSize: "10px" }}>
</div> {errors.activityType}
{touched.activityType && errors.activityType && ( </span>
<span className="form-error" style={{ color: "red", fontSize: "10px" }}> )}
{errors.activityType}
</span>
)}
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -987,7 +981,7 @@ const ActivityDetails = ({ isUpdate, loadedUser }) => { ...@@ -987,7 +981,7 @@ const ActivityDetails = ({ isUpdate, loadedUser }) => {
<p className="textH">Add display image</p> <p className="textH">Add display image</p>
{/* {console.log(displayImage)} */} {/* {console.log(displayImage)} */}
<UploadImageCustom isUpdate={isUpdate} setImage={setdisplayImage} populatedImages={activityById?.data.attributes.image} /> <UploadImageCustom isUpdate={isUpdate} setImage={setdisplayImage} populatedImages={activityById?.data.attributes.image} />
<hr /> <hr className="mt-5" />
</div> </div>
<div className="row d-flex "> <div className="row d-flex ">
<p className="textH">Add other images</p> <p className="textH">Add other images</p>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!