Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a6900f6a9 | |||
| 8b3e1e8923 | |||
| c87657eaef | |||
| 9cccd72512 | |||
| 146e8b383e | |||
| 7bb78772f7 | |||
| 094ba4fde8 | |||
| d31005c1ce | |||
| 3992ab696c | |||
| f1ed5f3a95 | |||
| 65b4c59129 |
@@ -51,7 +51,7 @@ const validationSchema = Yup.object().shape({
|
||||
.required("Price is required"),
|
||||
title: Yup.string()
|
||||
.min(5, "Minimum 5 characters")
|
||||
.max(149, "Maximum 149 characters")
|
||||
.max(80, "Maximum 80 characters")
|
||||
.required("Title is required"),
|
||||
description: Yup.string()
|
||||
.min(5, "Minimum 5 characters")
|
||||
|
||||
@@ -63,7 +63,7 @@ export default function ForgotPassword() {
|
||||
setResetLoading(true);
|
||||
try {
|
||||
const res = await userApi.StartResetPassword(reqData);
|
||||
if (res.status === 200) {
|
||||
if (res.status === 200 && res?.data?.internal_return >= 0) {
|
||||
setMsgSuccess(true);
|
||||
setMail("");
|
||||
setValue(false);
|
||||
|
||||
@@ -6,8 +6,14 @@ import LoadingSpinner from '../../Spinners/LoadingSpinner'
|
||||
|
||||
import usersService from '../../../services/UsersService'
|
||||
|
||||
import {NewDateTimeFormatter }from '../../../lib/NewDateTimeFormatter'
|
||||
|
||||
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 navigate = useNavigate()
|
||||
|
||||
@@ -65,7 +71,7 @@ function CurrentTaskAction({jobDetails}) {
|
||||
<div className="h-full w-full text-sm text-left text-gray-500">
|
||||
{jobDetails.job_type == 'MEDIA' ?
|
||||
<div className="h-full flex justify-center items-center">
|
||||
<button onClick={popUpHandler} type="button" className="btn-gradient h-full text-white p-1 lg:p-2 border-4 border-slate-300 text-lg lg:text-xl font-medium rounded-2xl">
|
||||
<button onClick={popUpHandler} type="button" className="btn-gradient h-full text-white px-5 py-2 border-4 border-slate-300 text-lg lg:text-xl font-medium rounded-2xl">
|
||||
I have completed this task
|
||||
</button>
|
||||
</div>
|
||||
@@ -78,7 +84,7 @@ function CurrentTaskAction({jobDetails}) {
|
||||
</div>
|
||||
|
||||
<div className="flex justify-center items-center">
|
||||
<button onClick={popUpHandler} type="button" className="custom-btn btn-gradient text-white">
|
||||
<button onClick={popUpHandler} type="button" className="custom-btn btn-gradient px-5 py-2 text-white">
|
||||
Send for Review
|
||||
</button>
|
||||
</div>
|
||||
@@ -120,36 +126,57 @@ function CurrentTaskAction({jobDetails}) {
|
||||
</button>
|
||||
</div>
|
||||
<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="mb-10 flex justify-center items-center gap-2">
|
||||
<input
|
||||
type='checkbox'
|
||||
checked={checked}
|
||||
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>
|
||||
</div>
|
||||
|
||||
<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]'}`}
|
||||
<div className="w-full flex flex-col min-h-[150px] gap-8 items-center">
|
||||
{!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'
|
||||
>
|
||||
{reqStatus.message}
|
||||
This task can be marked completed after {NewDateTimeFormatter(jobDetails?.minimum_due)}
|
||||
</h1>
|
||||
|
||||
</>
|
||||
:
|
||||
<>
|
||||
<div className="flex justify-center items-center gap-2">
|
||||
<input
|
||||
type='checkbox'
|
||||
checked={checked}
|
||||
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>
|
||||
</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*/}
|
||||
|
||||
</>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
{/* cancel btn */}
|
||||
|
||||
@@ -121,7 +121,7 @@ function PastDueJobAction({jobDetails}) {
|
||||
<button
|
||||
type="button"
|
||||
onClick={popUpHandler}
|
||||
className="custom-btn btn-gradient text-base text-white"
|
||||
className="custom-btn btn-gradient px-5 py-2 text-base text-white"
|
||||
>
|
||||
Cancel or Extend Timeline
|
||||
</button>
|
||||
|
||||
@@ -129,7 +129,7 @@ function PastDueTaskAction({jobDetails}) {
|
||||
<button
|
||||
type="button"
|
||||
onClick={popUpHandler}
|
||||
className="custom-btn btn-gradient text-base text-white"
|
||||
className="custom-btn btn-gradient px-5 py-2 text-base text-white"
|
||||
>
|
||||
Request Extension
|
||||
</button>
|
||||
|
||||
@@ -36,7 +36,21 @@ export default function JobDetailPopout({action, situation, jobDetail}) {
|
||||
</button>
|
||||
</div>
|
||||
<div className="modal-body-wrapper">
|
||||
<p className='w-full text-left text-sm md:text-lg lg:text-xl text-slate-900 dark:text-white'>{jobDetail}</p>
|
||||
{/* <p className='w-full text-left text-sm md:text-lg lg:text-xl text-slate-900 dark:text-white'>{jobDetail}</p> */}
|
||||
{/* <div
|
||||
className='w-full text-left text-sm md:text-lg lg:text-xl text-slate-900 dark:text-white'
|
||||
dangerouslySetInnerHTML={{__html: jobDetail}}
|
||||
>
|
||||
</div> */}
|
||||
<textarea
|
||||
id="Job Delivery Details"
|
||||
readOnly
|
||||
// rows="5"
|
||||
className={`w-full h-full overflow-y-auto text-left text-sm md:text-lg lg:text-xl text-slate-900 dark:text-white`}
|
||||
style={{ resize: "none" }}
|
||||
name="job_detail"
|
||||
value={jobDetail}
|
||||
/>
|
||||
</div>
|
||||
<div className="modal-footer-wrapper justify-end">
|
||||
<button
|
||||
|
||||
@@ -27,7 +27,7 @@ const validationSchema = Yup.object().shape({
|
||||
.required("Price is required"),
|
||||
title: Yup.string()
|
||||
.min(5, "Minimum 5 characters")
|
||||
.max(149, "Maximum 149 characters")
|
||||
.max(80, "Maximum 80 characters")
|
||||
.required("Title is required"),
|
||||
description: Yup.string()
|
||||
.min(5, "Minimum 5 characters")
|
||||
|
||||
@@ -28,7 +28,7 @@ const validationSchema = Yup.object().shape({
|
||||
.required("Price is required"),
|
||||
title: Yup.string()
|
||||
.min(5, "Minimum 5 characters")
|
||||
.max(149, "Maximum 149 characters")
|
||||
.max(80, "Maximum 80 characters")
|
||||
.required("Title is required"),
|
||||
description: Yup.string()
|
||||
.min(5, "Minimum 5 characters")
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@
|
||||
.job-action {
|
||||
background-color: #4687ba;
|
||||
border-radius: 15px;
|
||||
padding: 3px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.msg_box {
|
||||
|
||||
Reference in New Issue
Block a user