Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b5e338e19 | |||
| 6f38611606 | |||
| 37774c0aa3 | |||
| 373956da39 | |||
| 397eb7c88b | |||
| 0f0a674fea |
@@ -10,14 +10,14 @@ import { recoverPWD } from '../../services/services';
|
|||||||
|
|
||||||
const validationSchema = Yup.object().shape({
|
const validationSchema = Yup.object().shape({
|
||||||
username: Yup.string()
|
username: Yup.string()
|
||||||
.email("Wrong email format")
|
// .email("Wrong email format")
|
||||||
// .matches(
|
// .matches(
|
||||||
// /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/,
|
// /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/,
|
||||||
// "Invalid email format"
|
// "Invalid email format"
|
||||||
// )
|
// )
|
||||||
.min(3, "Minimum 3 characters")
|
.min(3, "Minimum 3 characters")
|
||||||
.max(50, "Maximum 50 characters")
|
.max(50, "Maximum 50 characters")
|
||||||
.required("Email is required"),
|
.required("Username is required"),
|
||||||
})
|
})
|
||||||
|
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
@@ -50,7 +50,7 @@ export default function Forgetpwd2() {
|
|||||||
<div className="d-flex align-items-center h-100-vh">
|
<div className="d-flex align-items-center h-100-vh">
|
||||||
<div className="login p-50">
|
<div className="login p-50">
|
||||||
<h1 className="mb-2">Recover Password</h1>
|
<h1 className="mb-2">Recover Password</h1>
|
||||||
<p>Please enter your email.</p>
|
<p>Please enter your username.</p>
|
||||||
<Formik
|
<Formik
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
validationSchema={validationSchema}
|
validationSchema={validationSchema}
|
||||||
@@ -64,8 +64,8 @@ export default function Forgetpwd2() {
|
|||||||
<>
|
<>
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label className={`text-black fw-bold control-label ${(props.errors.username && props.touched.username) && 'text-danger'}`}>Email*</label>
|
<label className={`text-black fw-bold control-label ${(props.errors.username && props.touched.username) && 'text-danger'}`}>Username*</label>
|
||||||
<input type="email" name='username' className="form-control" placeholder="Email" value={props.values.username} onChange={props.handleChange} />
|
<input type="text" name='username' className="form-control" placeholder="Username" value={props.values.username} onChange={props.handleChange} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{mutation.error &&
|
{mutation.error &&
|
||||||
|
|||||||
@@ -64,15 +64,15 @@ export default function EventCalendar({draggedEvent, setDraggedEvent, removeAfte
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function handleEventClick(clickInfo) {
|
// function handleEventClick(clickInfo) {
|
||||||
if (
|
// if (
|
||||||
confirm(
|
// confirm(
|
||||||
`Are you sure you want to delete the event '${clickInfo.event.title}'`
|
// `Are you sure you want to delete the event '${clickInfo.event.title}'`
|
||||||
)
|
// )
|
||||||
) {
|
// ) {
|
||||||
clickInfo.event.remove();
|
// clickInfo.event.remove();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
function handleEvents(events) {
|
function handleEvents(events) {
|
||||||
// setCurrentEvents(events);
|
// setCurrentEvents(events);
|
||||||
@@ -98,7 +98,7 @@ export default function EventCalendar({draggedEvent, setDraggedEvent, removeAfte
|
|||||||
events={currentEvents}
|
events={currentEvents}
|
||||||
select={handleDateSelect}
|
select={handleDateSelect}
|
||||||
eventContent={renderEventContent} // custom render function
|
eventContent={renderEventContent} // custom render function
|
||||||
eventClick={handleEventClick}
|
// eventClick={handleEventClick}
|
||||||
eventsSet={handleEvents} // called after events are initialized/added/changed/removed
|
eventsSet={handleEvents} // called after events are initialized/added/changed/removed
|
||||||
/* you can update a remote database when these fire:
|
/* you can update a remote database when these fire:
|
||||||
eventAdd={function(){}}
|
eventAdd={function(){}}
|
||||||
|
|||||||
Reference in New Issue
Block a user