Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c87657eaef | |||
| 9cccd72512 | |||
| 146e8b383e | |||
| 7bb78772f7 | |||
| 094ba4fde8 | |||
| d31005c1ce | |||
| 3992ab696c | |||
| f1ed5f3a95 | |||
| 65b4c59129 |
@@ -51,7 +51,7 @@ const validationSchema = Yup.object().shape({
|
|||||||
.required("Price is required"),
|
.required("Price is required"),
|
||||||
title: Yup.string()
|
title: Yup.string()
|
||||||
.min(5, "Minimum 5 characters")
|
.min(5, "Minimum 5 characters")
|
||||||
.max(149, "Maximum 149 characters")
|
.max(80, "Maximum 80 characters")
|
||||||
.required("Title is required"),
|
.required("Title is required"),
|
||||||
description: Yup.string()
|
description: Yup.string()
|
||||||
.min(5, "Minimum 5 characters")
|
.min(5, "Minimum 5 characters")
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export default function ForgotPassword() {
|
|||||||
setResetLoading(true);
|
setResetLoading(true);
|
||||||
try {
|
try {
|
||||||
const res = await userApi.StartResetPassword(reqData);
|
const res = await userApi.StartResetPassword(reqData);
|
||||||
if (res.status === 200) {
|
if (res.status === 200 && res?.data?.internal_return >= 0) {
|
||||||
setMsgSuccess(true);
|
setMsgSuccess(true);
|
||||||
setMail("");
|
setMail("");
|
||||||
setValue(false);
|
setValue(false);
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ import usersService from '../../../services/UsersService'
|
|||||||
|
|
||||||
function CurrentTaskAction({jobDetails}) {
|
function CurrentTaskAction({jobDetails}) {
|
||||||
|
|
||||||
|
const currTime = new Date().getTime() / (1000*60*60)
|
||||||
|
const minDueTime = new Date(jobDetails?.minimum_due).getTime() / (1000*60*60)
|
||||||
|
const canSendForReview = jobDetails.strict_timeline ? currTime >= minDueTime : true // calculation to determine when send for review button will be active
|
||||||
|
|
||||||
const apiCall = new usersService()
|
const apiCall = new usersService()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
@@ -120,36 +124,57 @@ function CurrentTaskAction({jobDetails}) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="job-action-modal-body w-full px-10 py-8 gap-4">
|
<div className="job-action-modal-body w-full px-10 py-8 gap-4">
|
||||||
<div className="w-full flex flex-col items-center">
|
<div className="w-full flex flex-col gap-8 items-center">
|
||||||
<div className="mb-10 flex justify-center items-center gap-2">
|
<>
|
||||||
<input
|
<div className="flex justify-center items-center gap-2">
|
||||||
type='checkbox'
|
<input
|
||||||
checked={checked}
|
type='checkbox'
|
||||||
onChange={()=>{setChecked(prev => !prev)}}
|
checked={checked}
|
||||||
className='w-6 h-6 text-sky-blue bg-gray-100 focus:ring-sky-blue'
|
onChange={()=>{setChecked(prev => !prev)}}
|
||||||
/>
|
className='w-6 h-6 text-sky-blue bg-gray-100 focus:ring-sky-blue'
|
||||||
<p className='font-bold text-base tracking-wide text-dark-gray dark:text-white'>If you have completed this task</p>
|
disabled={!canSendForReview}
|
||||||
</div>
|
/>
|
||||||
|
<p className='font-bold text-base tracking-wide text-dark-gray dark:text-white'>If you have completed this task</p>
|
||||||
<div className="mb-10 flex justify-center items-center">
|
|
||||||
{reqStatus.loading ?
|
|
||||||
<LoadingSpinner color='sky-blue' size='10' />
|
|
||||||
:
|
|
||||||
<button type="button" onClick={taskCompletedSubmit} className="px-2 py-1 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white">
|
|
||||||
Send for Review & Acceptance
|
|
||||||
</button>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* FOR SUCCESS/ERROR DISPLAY SECTION*/}
|
|
||||||
<div className="w-full">
|
|
||||||
<div
|
|
||||||
className={`relative p-4 text-center text-md font-light leading-[19.5px] text-[13px] ${reqStatus.status ? 'text-green-700':'text-[#912741]'}`}
|
|
||||||
>
|
|
||||||
{reqStatus.message}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
{/* END OF FOR SUCCESS/ERROR DISPLAY SECTION*/}
|
<div className="flex justify-center items-center">
|
||||||
|
{reqStatus.loading ?
|
||||||
|
<LoadingSpinner color='sky-blue' size='10' />
|
||||||
|
:
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={taskCompletedSubmit}
|
||||||
|
className={`px-2 py-1 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white ${!canSendForReview && 'pointer-events-none opacity-50'}`}
|
||||||
|
>
|
||||||
|
Send for Review & Acceptance
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* FOR SUCCESS/ERROR DISPLAY SECTION*/}
|
||||||
|
{reqStatus.message &&
|
||||||
|
<div className="w-full">
|
||||||
|
<div
|
||||||
|
className={`relative p-4 text-center text-md font-light leading-[19.5px] text-[13px] ${reqStatus.status ? 'text-green-700':'text-[#912741]'}`}
|
||||||
|
>
|
||||||
|
{reqStatus.message}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
{/* END OF FOR SUCCESS/ERROR DISPLAY SECTION*/}
|
||||||
|
|
||||||
|
{!canSendForReview &&
|
||||||
|
<>
|
||||||
|
<h1
|
||||||
|
// className='font-bold text-base tracking-wide text-dark-gray dark:text-white'
|
||||||
|
className='font-bold text-xl tracking-wide text-red-500 text-center'
|
||||||
|
>
|
||||||
|
This task requires you use about 80% of the time allocated
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
</>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* cancel btn */}
|
{/* cancel btn */}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const validationSchema = Yup.object().shape({
|
|||||||
.required("Price is required"),
|
.required("Price is required"),
|
||||||
title: Yup.string()
|
title: Yup.string()
|
||||||
.min(5, "Minimum 5 characters")
|
.min(5, "Minimum 5 characters")
|
||||||
.max(149, "Maximum 149 characters")
|
.max(80, "Maximum 80 characters")
|
||||||
.required("Title is required"),
|
.required("Title is required"),
|
||||||
description: Yup.string()
|
description: Yup.string()
|
||||||
.min(5, "Minimum 5 characters")
|
.min(5, "Minimum 5 characters")
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ const validationSchema = Yup.object().shape({
|
|||||||
.required("Price is required"),
|
.required("Price is required"),
|
||||||
title: Yup.string()
|
title: Yup.string()
|
||||||
.min(5, "Minimum 5 characters")
|
.min(5, "Minimum 5 characters")
|
||||||
.max(149, "Maximum 149 characters")
|
.max(80, "Maximum 80 characters")
|
||||||
.required("Title is required"),
|
.required("Title is required"),
|
||||||
description: Yup.string()
|
description: Yup.string()
|
||||||
.min(5, "Minimum 5 characters")
|
.min(5, "Minimum 5 characters")
|
||||||
|
|||||||
Reference in New Issue
Block a user