Compare commits

...

2 Commits

Author SHA1 Message Date
victorAnumudu d081dd73d6 timeline default value added 2024-08-26 17:50:50 +01:00
ameye 9b9e10efbb Merge branch 'assign-job-restructure' of WrenchBoard/Users-Wrench into master 2024-08-26 15:22:14 +00:00
6 changed files with 41 additions and 37 deletions
@@ -252,7 +252,7 @@ function NewJobListPopout({
]; ];
return ( return (
<div className="px-4 pb-3 w-full md:border-r-2 flex flex-col justify-between"> <div className="px-4 pb-3 w-full h-full md:border-r-2 flex flex-col justify-between">
{/* <p className='text-lg font-semibold text-slate-900 tracking-wide'>{details.title}</p> */} {/* <p className='text-lg font-semibold text-slate-900 tracking-wide'>{details.title}</p> */}
{/* INPUT SECTION */} {/* INPUT SECTION */}
@@ -320,7 +320,7 @@ function NewJobListPopout({
<> <>
{/* ACTION SECTION */} {/* ACTION SECTION */}
{+taskWalletSelector.amount > +details.price ? ( {+taskWalletSelector.amount > +details.price ? (
<div className="px-4 pb-3 w-full flex flex-col justify-between"> <div className="px-4 pb-3 w-full flex flex-col justify-between h-auto md:min-h-[450px]">
<h1 className="text-lg mt-3 font-medium tracking-wide text-black dark:text-white"> <h1 className="text-lg mt-3 font-medium tracking-wide text-black dark:text-white">
Send this Task to: Send this Task to:
</h1> </h1>
@@ -28,7 +28,7 @@ export default function AssignToFamily({
> >
{(props) => { {(props) => {
return ( return (
<Form className="w-full"> <Form className="w-full h-auto md:h-full flex flex-col justify-between">
<div className='w-full'> <div className='w-full'>
<div className='hidden w-full'> <div className='hidden w-full'>
<JobFieldInput <JobFieldInput
@@ -28,7 +28,7 @@ export default function AssignToGroup({
> >
{(props) => { {(props) => {
return ( return (
<Form className="w-full"> <Form className="w-full h-auto md:h-full flex flex-col justify-between">
<div className='w-full'> <div className='w-full'>
<div className='w-full'> <div className='w-full'>
<JobFieldInput <JobFieldInput
@@ -32,7 +32,7 @@ export default function AssignToIndividual({
> >
{(props) => { {(props) => {
return ( return (
<Form className="w-full"> <Form className="w-full h-auto md:h-full flex flex-col justify-between">
<div className='w-full'> <div className='w-full'>
<div className='w-full'> <div className='w-full'>
<JobFieldInput <JobFieldInput
@@ -41,7 +41,8 @@ export default function AssignToIndividual({
value={props?.values.individual} value={props?.values.individual}
placeholder="Enter email of individual" placeholder="Enter email of individual"
inputHandler={props?.handleChange} inputHandler={props?.handleChange}
parentClass="w-full flex flex-col gap-4" parentClass="w-full"
labelClass="mb-0"
/> />
<p className="h-4 text-[13px] font-light italic text-red-600 tracking-wide"> <p className="h-4 text-[13px] font-light italic text-red-600 tracking-wide">
{(props.errors.individual && props.touched.individual) && ( {(props.errors.individual && props.touched.individual) && (
@@ -15,8 +15,8 @@ const validationSchema = Yup.object().shape({
let initialValues = { let initialValues = {
public: "", public: "",
depend_uid: '', depend_uid: "",
timeline: '' timeline: "0"
}; };
export default function AssignToPublic({ export default function AssignToPublic({
@@ -36,37 +36,37 @@ export default function AssignToPublic({
> >
{(props) => { {(props) => {
return ( return (
<Form className="w-full"> <Form className="w-full h-auto md:h-full flex flex-col justify-between">
<div className='w-full'> <div className='w-full'>
<div className='mb-3 w-full flex flex-col xxs:flex-row items-center gap-1'> <div className='mb-3 w-full flex flex-col xxs:flex-row items-center gap-1'>
<label className='w-full xxs:max-w-[120px] xxs:text-right'>Depends on:</label> <label className='w-full xxs:max-w-[120px] xxs:text-right'>Depends on:</label>
<div <div
className={`input-wrapper border border-[#f5f8fa] dark:border-[#5e6278] w-full rounded-[1rem] h-[42px] overflow-hidden relative font-medium leading-6 bg-clip-padding text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] dark:bg-[#5e6278] text-base`} className={`input-wrapper border border-[#f5f8fa] dark:border-[#5e6278] w-full rounded-[1rem] h-[42px] overflow-hidden relative font-medium leading-6 bg-clip-padding text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] dark:bg-[#5e6278] text-base`}
> >
<select <select
className='px-2 w-full h-full bg-white border-0 outline-0' className='px-2 w-full h-full bg-white border-0 outline-0'
name="depend_uid" name="depend_uid"
value={props?.values.depend_uid} value={props?.values.depend_uid}
onChange={props.handleChange} onChange={props.handleChange}
> >
<> <>
{myJobList.loading ? ( {myJobList.loading ? (
<option value={""}>Loading...</option> <option value={""}>Loading...</option>
) : myJobList?.data?.result_list?.length > 0 ? ( ) : myJobList?.data?.result_list?.length > 0 ? (
<> <>
<option value="">None</option> <option value="">None</option>
{myJobList?.data?.result_list?.filter(item => item.job_uid != details.job_uid)?.map((item, index) => ( {myJobList?.data?.result_list?.filter(item => item.job_uid != details.job_uid)?.map((item, index) => (
<option value={item?.job_uid} key={item.job_uid}> <option value={item?.job_uid} key={item.job_uid}>
{item?.title} {item?.title}
</option> </option>
))} ))}
</> </>
) : ( ) : (
<option value="">No Job Found</option> <option value="">No Job Found</option>
)} )}
</> </>
</select> </select>
</div> </div>
</div> </div>
<div className='mb-3 w-full flex flex-col xxs:flex-row items-center gap-1'> <div className='mb-3 w-full flex flex-col xxs:flex-row items-center gap-1'>
@@ -36,7 +36,9 @@ export default function JobFieldInput({
{(inputName == "family" || inputName == "public" || inputName == "timeline") && {(inputName == "family" || inputName == "public" || inputName == "timeline") &&
Array.isArray(data) && ( Array.isArray(data) && (
<> <>
{inputName != "timeline" &&
<option value="">{optionText}</option> <option value="">{optionText}</option>
}
{data?.map((item, idx) => ( {data?.map((item, idx) => (
<React.Fragment key={idx}> <React.Fragment key={idx}>
{inputName === "family" && {inputName === "family" &&
@@ -98,6 +100,7 @@ export default function JobFieldInput({
inputBg="bg-white" inputBg="bg-white"
parentClass={`${parentClass}`} parentClass={`${parentClass}`}
disable={disabled} disable={disabled}
labelClass={labelClass}
/> />
)} )}
</div> </div>