Compare commits
7 Commits
signup-bug
...
job-lock
| Author | SHA1 | Date | |
|---|---|---|---|
| bdc67590d1 | |||
| 89d2682eaf | |||
| 41a617a265 | |||
| c72765b38c | |||
| fe3306cb98 | |||
| 13b96a3b8d | |||
| bc2a4340f2 |
+12
-3
@@ -6,9 +6,18 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#000000" />
|
<meta name="theme-color" content="#000000" />
|
||||||
|
|
||||||
|
<meta
|
||||||
<meta name="description" content="wrenchboard.com is an online marketplace to make money from your skills, find, buy and sell professional services. Connect with freelancers to get work done faster. Trade your freelance services."/>
|
name="description"
|
||||||
<meta name="title" content="WrenchBoard: Find a Freelancer | Sell Professional Services"/><meta name="keywords" content="Online Jobs, Online Workers, work online Nigeria, hire a freelancer, hire freelancers, freelance marketplace, freelancer hire, freelance service, freelance professional services, How to make money online, find workers online, Online Services, digital services, freelancers community in Ghana, freelancers community in Nigeria, freelancer site in Africa, Best freelance website in Africa, Freelance Designers, Photographers, Writers in Nigeria, freelancers, freelance outsourcing in Nigeria, freelance IT services in Nigeria, hire freelancers online in Nigeria, freelance services online in Nigeria, freelance contractor in Nigeria, freelance sites in Nigeria, freelance jobs in Nigeria, freelance projects in Nigeria, freelance jobs online in Nigeria, professional freelancers in Nigeria, buy professional services in Nigeria, professional services jobs, professional business services, professional service providers in Nigeria, freelancing services, freelancing sites in Nigeria, freelancers for hire in Nigeria, freelancer search in Nigeria, search freelancer in Nigeria, find freelancers in Nigeria, Find workers US. Outsource from US to Nigeria, find a freelancer in Nigeria, freelancing projects in Nigeria, web freelancing in Nigeria, outsourcing sites freelancers in Nigeria, website for freelancers in Nigeria, marketplace for freelancers "/>
|
content="WrenchBoard.com is the place to set family goals and reward achievements. Find tasks to earn from, or send tasks for others to perform for you."
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
name="title"
|
||||||
|
content="WrenchBoard: Reward Accomplishments | Get Family Engaged"
|
||||||
|
/>
|
||||||
|
<meta
|
||||||
|
name="keywords"
|
||||||
|
content="Empower families to reward accomplishment, set goals, and encourage kids to understand goals, earning, and the benefit of savings – in one app experience."
|
||||||
|
/>
|
||||||
<link rel="manifest" href="/manifest.json"/>
|
<link rel="manifest" href="/manifest.json"/>
|
||||||
<script>
|
<script>
|
||||||
!function(e,a,t,n,g,c,o){e.GoogleAnalyticsObject=g,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,c=a.createElement(t),o=a.getElementsByTagName(t)[0],c.async=1,c.src="https://www.google-analytics.com/analytics.js",o.parentNode.insertBefore(c,o)}(window,document,"script",0,"ga"),ga("create","UA-54829827-4","auto"),ga("send","pageview")</script><script defer="defer" src="/static/js/main.787e423f.js"></script><link href="/static/css/main.418eaf65.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body><script>var LHC_API=LHC_API||{};LHC_API.args={mode:"widget",lhc_base_url:"//chat.live.wrenchboard.com/",wheight:450,wwidth:350,pheight:520,pwidth:500,leaveamessage:!0,check_messages:!1},function(){var e=document.createElement("script");e.type="text/javascript",e.setAttribute("crossorigin","anonymous"),e.async=!0;var t=new Date;e.src="//chat.live.wrenchboard.com/design/defaulttheme/js/widgetv2/index.js?"+t.getFullYear()+t.getMonth()+t.getDate();var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}()
|
!function(e,a,t,n,g,c,o){e.GoogleAnalyticsObject=g,e.ga=e.ga||function(){(e.ga.q=e.ga.q||[]).push(arguments)},e.ga.l=1*new Date,c=a.createElement(t),o=a.getElementsByTagName(t)[0],c.async=1,c.src="https://www.google-analytics.com/analytics.js",o.parentNode.insertBefore(c,o)}(window,document,"script",0,"ga"),ga("create","UA-54829827-4","auto"),ga("send","pageview")</script><script defer="defer" src="/static/js/main.787e423f.js"></script><link href="/static/css/main.418eaf65.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body><script>var LHC_API=LHC_API||{};LHC_API.args={mode:"widget",lhc_base_url:"//chat.live.wrenchboard.com/",wheight:450,wwidth:350,pheight:520,pwidth:500,leaveamessage:!0,check_messages:!1},function(){var e=document.createElement("script");e.type="text/javascript",e.setAttribute("crossorigin","anonymous"),e.async=!0;var t=new Date;e.src="//chat.live.wrenchboard.com/design/defaulttheme/js/widgetv2/index.js?"+t.getFullYear()+t.getMonth()+t.getDate();var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(e,a)}()
|
||||||
|
|||||||
@@ -13,11 +13,12 @@ export default function LoginLayout({ slogan, children }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`h-screen overflow-y-auto bg-cover bg-center`}
|
className={`min-h-screen overflow-y-auto bg-cover bg-center flex flex-col justify-between items-center`}
|
||||||
style={{
|
style={{
|
||||||
backgroundImage: `url(${countryMode == "NG" ? bgImgNig : bgImgCom})`,
|
backgroundImage: `url(${countryMode == "NG" ? bgImgNig : bgImgCom})`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
||||||
<div className={`w-full grid grid-cols-1 xl:grid-cols-2`}>
|
<div className={`w-full grid grid-cols-1 xl:grid-cols-2`}>
|
||||||
{/* <div
|
{/* <div
|
||||||
className={`auth-bg hidden xl:block bg-blue-50 relative bg-cover bg-no-repeat border-0 after:content-[''] after:absolute after:inset-0`}
|
className={`auth-bg hidden xl:block bg-blue-50 relative bg-cover bg-no-repeat border-0 after:content-[''] after:absolute after:inset-0`}
|
||||||
@@ -29,47 +30,51 @@ export default function LoginLayout({ slogan, children }) {
|
|||||||
<div className="w-full flex justify-center items-center">
|
<div className="w-full flex justify-center items-center">
|
||||||
{children && children}
|
{children && children}
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full flex flex-col justify-center items-center px-10">
|
|
||||||
<div className="w-full flex justify-center items-center pt-5">
|
|
||||||
<div className="flex items-center">
|
|
||||||
<a
|
|
||||||
href="https://www.wrenchboard.com/about-us"
|
|
||||||
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
|
||||||
target="_blank"
|
|
||||||
rel="noreferrer"
|
|
||||||
>
|
|
||||||
About
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
href="https://www.wrenchboard.com/service"
|
|
||||||
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
|
||||||
target="_blank"
|
|
||||||
rel="noreferrer"
|
|
||||||
>
|
|
||||||
Services
|
|
||||||
</a>
|
|
||||||
<a
|
|
||||||
href="https://www.wrenchboard.com/contact"
|
|
||||||
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
|
||||||
target="_blank"
|
|
||||||
rel="noreferrer"
|
|
||||||
>
|
|
||||||
Contact Us
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p className="py-1 text-black text-[15px] px-2 font-medium flex items-center gap-1">
|
|
||||||
<span className="dark:text-white">
|
|
||||||
© {new Date().getFullYear()} -
|
|
||||||
</span>
|
|
||||||
<Link to="/" className="text-[#009ef7] ml-1">
|
|
||||||
WrenchBoard
|
|
||||||
</Link>{" "}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className='w-full shadow-md bg-slate-50 dark:bg-dark-white'>
|
||||||
|
<div className="w-full flex flex-col md:flex-row justify-center items-center px-10 py-2">
|
||||||
|
<div className="flex justify-center items-center">
|
||||||
|
<div className="flex items-center">
|
||||||
|
<a
|
||||||
|
href="https://www.wrenchboard.com/about-us"
|
||||||
|
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>
|
||||||
|
About
|
||||||
|
</a>
|
||||||
|
<a
|
||||||
|
href="https://www.wrenchboard.com/service"
|
||||||
|
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>
|
||||||
|
Services
|
||||||
|
</a>
|
||||||
|
<a
|
||||||
|
href="https://www.wrenchboard.com/contact"
|
||||||
|
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
>
|
||||||
|
Contact Us
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p className="text-black text-[15px] px-2 font-medium flex items-center gap-1">
|
||||||
|
<span className="dark:text-white">
|
||||||
|
© {new Date().getFullYear()} -
|
||||||
|
</span>
|
||||||
|
<Link to="/" className="text-[#009ef7] ml-1">
|
||||||
|
WrenchBoard
|
||||||
|
</Link>{" "}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -563,7 +563,7 @@ export default function Login() {
|
|||||||
{loginType == "full" && (
|
{loginType == "full" && (
|
||||||
<>
|
<>
|
||||||
<div className="pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]">
|
<div className="pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]">
|
||||||
This site is protected by a Captcha. Our Privacy Policy and
|
This site is protected by a Captcha. <br />Our Privacy Policy and
|
||||||
Terms of Service apply.
|
Terms of Service apply.
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -103,9 +103,10 @@ export default function AvailableJobsCard({
|
|||||||
{/* <div className="product-two-options flex justify-between mb-5 relative"></div> */}
|
{/* <div className="product-two-options flex justify-between mb-5 relative"></div> */}
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<div>
|
<div className='w-full'>
|
||||||
<p className="w-full font-bold text-xl tracking-wide text-dark-gray dark:text-white">
|
<p className="w-full flex gap-1 items-center font-bold text-xl tracking-wide text-dark-gray dark:text-white">
|
||||||
{/* {thePrice} | {datas.timeline_days} day(s) */}
|
{/* {thePrice} | {datas.timeline_days} day(s) */}
|
||||||
|
{datas?.offer_depend_uid && <i className="fa-solid fa-lock p-1 text-red-500 text-[12px]"></i>}
|
||||||
{thePrice}
|
{thePrice}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-sm text-lighter-gray">
|
<p className="text-sm text-lighter-gray">
|
||||||
@@ -171,7 +172,8 @@ export default function AvailableJobsCard({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="block sm:flex flex-wrap gap-4">
|
<div className="block sm:flex flex-wrap gap-4">
|
||||||
<p className="text-sm text-thin-light-gray flex flext-start gap-1">
|
<p className="text-sm text-thin-light-gray flex flext-start gap-1 items-center">
|
||||||
|
{datas?.offer_depend_uid && <i className="fa-solid fa-lock p-1 text-red-500 text-[12px]"></i>}
|
||||||
Price: <span className="text-purple">{thePrice}</span>
|
Price: <span className="text-purple">{thePrice}</span>
|
||||||
</p>
|
</p>
|
||||||
<p className="text-sm text-thin-light-gray">
|
<p className="text-sm text-thin-light-gray">
|
||||||
|
|||||||
@@ -145,7 +145,8 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {
|
|||||||
<div className="md:grid md:grid-cols-4 bg-white dark:bg-dark-white text-slate-900 dark:text-white rounded-lg">
|
<div className="md:grid md:grid-cols-4 bg-white dark:bg-dark-white text-slate-900 dark:text-white rounded-lg">
|
||||||
<div className="px-4 py-1 w-full md:col-span-3 md:border-r-1">
|
<div className="px-4 py-1 w-full md:col-span-3 md:border-r-1">
|
||||||
<div className="min-h-[300px]">
|
<div className="min-h-[300px]">
|
||||||
<h2 className="font-semibold text-slate-900 dark:text-white tracking-wide">
|
<h2 className="w-full flex gap-1 items-center font-semibold text-slate-900 dark:text-white tracking-wide">
|
||||||
|
{details?.offer_depend_uid && <i className="fa-solid fa-lock p-1 text-red-500 text-[12px]"></i>}
|
||||||
{details?.title}
|
{details?.title}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|||||||
@@ -165,6 +165,7 @@ export default function MyJobTable({ MyJobList, reloadJobList, className }) {
|
|||||||
setWalletItem={setWalletItem}
|
setWalletItem={setWalletItem}
|
||||||
openWallet={openPopUp}
|
openWallet={openPopUp}
|
||||||
situation={jobPopout.show}
|
situation={jobPopout.show}
|
||||||
|
myJobList={MyJobList}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{/* End of Job List Popout */}
|
{/* End of Job List Popout */}
|
||||||
|
|||||||
@@ -10,17 +10,19 @@ import LoadingSpinner from "../Spinners/LoadingSpinner";
|
|||||||
import Detail from "./popoutcomponent/Detail";
|
import Detail from "./popoutcomponent/Detail";
|
||||||
import { SocketValues } from "../Contexts/SocketIOContext";
|
import { SocketValues } from "../Contexts/SocketIOContext";
|
||||||
|
|
||||||
|
// .required("This is required ")
|
||||||
|
|
||||||
const validationSchema = Yup.object().shape({
|
const validationSchema = Yup.object().shape({
|
||||||
family: Yup.string().required("This is required "),
|
family: Yup.string(),
|
||||||
public: Yup.string(),
|
public: Yup.string(),
|
||||||
individual: Yup.string()
|
individual: Yup.string()
|
||||||
.email("Invalid email format")
|
.email("Invalid email format")
|
||||||
.matches(
|
.matches(
|
||||||
/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/,
|
/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/,
|
||||||
"Invalid email format"
|
"Invalid email format"
|
||||||
)
|
),
|
||||||
.required("Email is required"),
|
|
||||||
group: Yup.string(),
|
group: Yup.string(),
|
||||||
|
depend_uid: Yup.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
function JobListPopout({
|
function JobListPopout({
|
||||||
@@ -29,6 +31,7 @@ function JobListPopout({
|
|||||||
situation,
|
situation,
|
||||||
openWallet,
|
openWallet,
|
||||||
setWalletItem,
|
setWalletItem,
|
||||||
|
myJobList
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
let {marketUpdate} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET
|
let {marketUpdate} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET
|
||||||
@@ -46,12 +49,7 @@ function JobListPopout({
|
|||||||
const [familyList, setFamilyList] = useState([]);
|
const [familyList, setFamilyList] = useState([]);
|
||||||
let [loader, setLoader] = useState({
|
let [loader, setLoader] = useState({
|
||||||
member: false,
|
member: false,
|
||||||
jobFields: {
|
jobFields: false
|
||||||
family: false,
|
|
||||||
public: false,
|
|
||||||
individual: false,
|
|
||||||
group: false,
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const apiCall = useMemo(() => new usersService(), []);
|
const apiCall = useMemo(() => new usersService(), []);
|
||||||
@@ -106,6 +104,7 @@ function JobListPopout({
|
|||||||
public: "",
|
public: "",
|
||||||
individual: "",
|
individual: "",
|
||||||
group: "",
|
group: "",
|
||||||
|
depend_uid: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
let [textArea, setTextArea] = useState(details?.job_detail);
|
let [textArea, setTextArea] = useState(details?.job_detail);
|
||||||
@@ -136,11 +135,12 @@ function JobListPopout({
|
|||||||
} finally {
|
} finally {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setErrMsg({ jobFields: "" });
|
setErrMsg({ jobFields: "" });
|
||||||
}, 3000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const jobFieldHandler = async (values, helpers) => {
|
const jobFieldHandler = async (values, helpers) => {
|
||||||
|
setLoader({ jobFields: true });
|
||||||
let { job_id, job_uid } = details;
|
let { job_id, job_uid } = details;
|
||||||
|
|
||||||
if (!textArea) {
|
if (!textArea) {
|
||||||
@@ -163,15 +163,14 @@ function JobListPopout({
|
|||||||
family_uid: values?.family,
|
family_uid: values?.family,
|
||||||
assign_mode: 110011,
|
assign_mode: 110011,
|
||||||
};
|
};
|
||||||
setLoader({ jobFields: { family: true } });
|
|
||||||
} else if (values?.public !== "") {
|
} else if (values?.public !== "") {
|
||||||
// for public input
|
// for public input
|
||||||
reqData = {
|
reqData = {
|
||||||
...jobReq,
|
...jobReq,
|
||||||
duration: Number(values?.public),
|
duration: Number(values?.public),
|
||||||
assign_mode: 110022,
|
assign_mode: 110022,
|
||||||
|
depend_uid: values?.depend_uid
|
||||||
};
|
};
|
||||||
setLoader({ jobFields: { public: true } });
|
|
||||||
} else if (values?.individual !== "") {
|
} else if (values?.individual !== "") {
|
||||||
// for individual input
|
// for individual input
|
||||||
reqData = {
|
reqData = {
|
||||||
@@ -179,7 +178,6 @@ function JobListPopout({
|
|||||||
email: values?.individual,
|
email: values?.individual,
|
||||||
assign_mode: 110033,
|
assign_mode: 110033,
|
||||||
};
|
};
|
||||||
setLoader({ jobFields: { individual: true } });
|
|
||||||
} else if (values?.group !== "") {
|
} else if (values?.group !== "") {
|
||||||
// for group input
|
// for group input
|
||||||
reqData = {
|
reqData = {
|
||||||
@@ -190,8 +188,8 @@ function JobListPopout({
|
|||||||
duration: details?.timeline_days,
|
duration: details?.timeline_days,
|
||||||
// duration: 0,
|
// duration: 0,
|
||||||
};
|
};
|
||||||
setLoader({ jobFields: { group: true } });
|
|
||||||
} else {
|
} else {
|
||||||
|
setLoader({ jobFields: false });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,7 +201,7 @@ function JobListPopout({
|
|||||||
return setTimeout(() => {
|
return setTimeout(() => {
|
||||||
setLoader({ jobFields: false });
|
setLoader({ jobFields: false });
|
||||||
setRequestStatus({ message: "", status: false });
|
setRequestStatus({ message: "", status: false });
|
||||||
}, 3000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
marketUpdate('market', 'full-markets-jobs') // sends an event to the socket to update market lists
|
marketUpdate('market', 'full-markets-jobs') // sends an event to the socket to update market lists
|
||||||
dispatch(tableReload({ type: "JOBTABLE" })); // reloads my job page
|
dispatch(tableReload({ type: "JOBTABLE" })); // reloads my job page
|
||||||
@@ -213,14 +211,14 @@ function JobListPopout({
|
|||||||
setLoader({ jobFields: false });
|
setLoader({ jobFields: false });
|
||||||
onClose();
|
onClose();
|
||||||
// throw new Response(data);
|
// throw new Response(data);
|
||||||
}, 3000);
|
}, 5000);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setRequestStatus({ message: "Unable to complete", status: false });
|
setRequestStatus({ message: "Unable to complete", status: false });
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setRequestStatus({ message: "", status: false });
|
setRequestStatus({ message: "", status: false });
|
||||||
setLoader({ jobFields: false });
|
setLoader({ jobFields: false });
|
||||||
throw new Error(error);
|
throw new Error(error);
|
||||||
}, 3000);
|
}, 5000);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -355,142 +353,198 @@ function JobListPopout({
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="grow flex flex-col bg-red-50 dark:bg-[#D85A5A] rounded-b-2xl">
|
<div className="grow flex flex-col bg-red-50 dark:bg-[#D85A5A] rounded-b-2xl">
|
||||||
{selectedTab == "family" && (
|
|
||||||
<Formik
|
|
||||||
initialValues={initialValues}
|
|
||||||
validationSchema={validationSchema.fields.family}
|
|
||||||
onSubmit={jobFieldHandler}
|
|
||||||
>
|
|
||||||
{(props) => {
|
|
||||||
return (
|
|
||||||
<Form className="hidden">
|
|
||||||
{/* Assign to Family */}
|
|
||||||
<JobFieldInput
|
|
||||||
label="Assign to family"
|
|
||||||
select={true}
|
|
||||||
inputName="family"
|
|
||||||
value={props?.values.family}
|
|
||||||
data={familyList}
|
|
||||||
btnText="Assign to family"
|
|
||||||
optionText="Select Family"
|
|
||||||
loader={loader?.jobFields?.family}
|
|
||||||
errorHandler={errorHandler}
|
|
||||||
parentClass="w-full flex flex-col gap-4"
|
|
||||||
/>
|
|
||||||
<p className="h-4 text-[13px] font-light italic text-red-600 tracking-wide">
|
|
||||||
{" "}
|
|
||||||
{props?.values?.family === "" && (
|
|
||||||
<span>{errMsg?.jobFields?.family}</span>
|
|
||||||
)}
|
|
||||||
</p>{" "}
|
|
||||||
</Form>
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
</Formik>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{selectedTab == "public" && (
|
<Formik
|
||||||
<Formik
|
initialValues={initialValues}
|
||||||
initialValues={initialValues}
|
validationSchema={validationSchema.fields.public}
|
||||||
validationSchema={validationSchema.fields.public}
|
onSubmit={jobFieldHandler}
|
||||||
onSubmit={jobFieldHandler}
|
>
|
||||||
>
|
{(props) => {
|
||||||
{(props) => {
|
return (
|
||||||
return (
|
<Form className="p-3">
|
||||||
<Form className="">
|
<div className='flex items-center justify-start mt-1 mb-2.5'>
|
||||||
{/* Offer this job to public input */}
|
<label
|
||||||
<JobFieldInput
|
className="input-label border-2 w-full border-sky-700 rounded py-4 px-2 text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold block tracking-wide"
|
||||||
label="Offer this job to public"
|
// htmlFor={''}
|
||||||
select={true}
|
>
|
||||||
inputName="public"
|
{selectedTab == 'family' ?
|
||||||
value={props?.values.public}
|
'Assign to family'
|
||||||
data={publicArray}
|
: selectedTab == 'public' ?
|
||||||
btnText="Show Task to Public"
|
'Offer this job to public'
|
||||||
optionText="Select Duration"
|
: selectedTab == 'individual' ?
|
||||||
loader={loader?.jobFields?.public}
|
'Offer this job to individual'
|
||||||
errorHandler={errorHandler}
|
: selectedTab == 'group' ?
|
||||||
parentClass="w-full flex flex-col gap-4"
|
'Offer this job to your Group'
|
||||||
/>
|
:
|
||||||
<p className="h-4 text-[13px] font-light italic text-red-600 tracking-wide">
|
null
|
||||||
{" "}
|
}
|
||||||
{props?.values.public === "" && (
|
</label>
|
||||||
<span>{errMsg?.jobFields?.public}</span>
|
</div>
|
||||||
)}
|
<div className='w-full'>
|
||||||
</p>{" "}
|
{/* ASSIGN TO FAMILY */}
|
||||||
</Form>
|
{selectedTab == "family" && (
|
||||||
);
|
<div className='hidden w-full'>
|
||||||
}}
|
<JobFieldInput
|
||||||
</Formik>
|
select={true}
|
||||||
)}
|
inputName="family"
|
||||||
|
value={props?.values.family}
|
||||||
|
data={familyList}
|
||||||
|
optionText="Select Family"
|
||||||
|
errorHandler={errorHandler}
|
||||||
|
parentClass="w-full flex flex-col gap-4"
|
||||||
|
/>
|
||||||
|
<p className="h-4 text-[13px] font-light italic text-red-600 tracking-wide">
|
||||||
|
{" "}
|
||||||
|
{props?.values?.family === "" && (
|
||||||
|
<span>{errMsg?.jobFields?.family}</span>
|
||||||
|
)}
|
||||||
|
</p>{" "}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{selectedTab == "individual" && (
|
{/* ASSIGN TO PUBLIC/MARKET */}
|
||||||
<Formik
|
{selectedTab == "public" && (
|
||||||
initialValues={initialValues}
|
<div className='w-full'>
|
||||||
validationSchema={validationSchema.fields.individual}
|
<div className='mb-3 w-full flex flex-col xxs:flex-row items-center gap-1'>
|
||||||
onSubmit={jobFieldHandler}
|
<label className='w-full xxs:max-w-[120px] xxs:text-right'>Depends on</label>
|
||||||
>
|
{/* <JobFieldInput
|
||||||
{(props) => {
|
input={true}
|
||||||
return (
|
select={true}
|
||||||
<Form className="">
|
inputName="depend_uid"
|
||||||
{/* Offer this job to individual input */}
|
value={props?.values.depend_uid}
|
||||||
<JobFieldInput
|
data={myJobList}
|
||||||
label="Offer this job to individual"
|
optionText="None"
|
||||||
input={true}
|
parentClass="w-full flex flex-col gap-4"
|
||||||
inputName="individual"
|
/> */}
|
||||||
value={props?.values.individual}
|
<div
|
||||||
placeholder="Enter email of individual"
|
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`}
|
||||||
inputHandler={props?.handleChange}
|
>
|
||||||
btnText="Send Offer to Individual"
|
<select
|
||||||
loader={loader?.jobFields?.individual}
|
className='px-2 w-full h-full bg-white border-0 outline-0'
|
||||||
errorHandler={errorHandler}
|
name="depend_uid"
|
||||||
parentClass="w-full flex flex-col gap-4"
|
value={props?.values.depend_uid}
|
||||||
/>
|
onChange={props.handleChange}
|
||||||
<p className="h-4 text-[13px] font-light italic text-red-600 tracking-wide">
|
>
|
||||||
{" "}
|
<>
|
||||||
{props?.values.individual === "" && (
|
{myJobList.loading ? (
|
||||||
<span>{errMsg?.jobFields?.individual}</span>
|
<option value={""}>Loading...</option>
|
||||||
)}
|
) : myJobList?.data?.result_list?.length > 0 ? (
|
||||||
</p>{" "}
|
<>
|
||||||
</Form>
|
<option value="">None</option>
|
||||||
);
|
{myJobList?.data?.result_list?.filter(item => item.job_uid != details.job_uid)?.map((item, index) => (
|
||||||
}}
|
<option value={item?.job_uid} key={item.job_uid}>
|
||||||
</Formik>
|
{item?.title}
|
||||||
)}
|
</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<option value="">No Job Found</option>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* { process.env.REACT_APP_SHOW_OFFER_GROUP_JOB != 0 && } */}
|
<div className='mb-3 w-full flex flex-col xxs:flex-row items-center gap-1'>
|
||||||
{selectedTab == "group" && (
|
<label className='w-full xxs:max-w-[120px] xxs:text-right'>Duration <span className='text-red-600 tracking-wide'>{(props?.values.public === "" && errMsg?.jobFields?.public) && '*'}</span></label>
|
||||||
<Formik
|
<div className='w-full'>
|
||||||
initialValues={initialValues}
|
<JobFieldInput
|
||||||
validationSchema={validationSchema.fields.group}
|
select={true}
|
||||||
onSubmit={jobFieldHandler}
|
inputName="public"
|
||||||
>
|
value={props?.values.public}
|
||||||
{(props) => {
|
data={publicArray}
|
||||||
return (
|
optionText="Select Duration"
|
||||||
<Form className="">
|
parentClass="w-full flex flex-col gap-4"
|
||||||
{/* Offer this job to your group input */}
|
/>
|
||||||
<JobFieldInput
|
{/* <p className="h-4 text-[13px] font-light italic text-red-600 tracking-wide">
|
||||||
label="Offer this job to your Group"
|
{" "}
|
||||||
select={true}
|
{props?.values.public === "" && (
|
||||||
inputName="group"
|
<span>{errMsg?.jobFields?.public}</span>
|
||||||
value={props?.values.group}
|
)}
|
||||||
btnText="Send Order to Group"
|
</p>{" "} */}
|
||||||
optionText="Select Group"
|
</div>
|
||||||
loader={loader?.jobFields?.group}
|
</div>
|
||||||
errorHandler={errorHandler}
|
</div>
|
||||||
data={groupList}
|
)}
|
||||||
parentClass="w-full flex flex-col gap-4"
|
|
||||||
/>
|
{/* ASSIGN TO INDIVIDUAL */}
|
||||||
<p className="h-4 text-[13px] font-light italic text-red-600 tracking-wide">
|
{selectedTab == "individual" && (
|
||||||
{" "}
|
<div className='w-full'>
|
||||||
{props?.values.group === "" && (
|
<JobFieldInput
|
||||||
<span>{errMsg?.jobFields?.group}</span>
|
input={true}
|
||||||
)}
|
inputName="individual"
|
||||||
</p>
|
value={props?.values.individual}
|
||||||
</Form>
|
placeholder="Enter email of individual"
|
||||||
);
|
inputHandler={props?.handleChange}
|
||||||
}}
|
parentClass="w-full flex flex-col gap-4"
|
||||||
</Formik>
|
/>
|
||||||
)}
|
<p className="h-4 text-[13px] font-light italic text-red-600 tracking-wide">
|
||||||
|
{" "}
|
||||||
|
{props?.values.individual === "" && (
|
||||||
|
<span>{errMsg?.jobFields?.individual}</span>
|
||||||
|
)}
|
||||||
|
</p>{" "}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* ASSIGN TO GROUP */}
|
||||||
|
{selectedTab == "group" && (
|
||||||
|
<div className='w-full'>
|
||||||
|
<JobFieldInput
|
||||||
|
select={true}
|
||||||
|
inputName="group"
|
||||||
|
value={props?.values.group}
|
||||||
|
optionText="Select Group"
|
||||||
|
data={groupList}
|
||||||
|
parentClass="w-full flex flex-col gap-4"
|
||||||
|
/>
|
||||||
|
<p className="h-4 text-[13px] font-light italic text-red-600 tracking-wide">
|
||||||
|
{" "}
|
||||||
|
{props?.values.group === "" && (
|
||||||
|
<span>{errMsg?.jobFields?.group}</span>
|
||||||
|
)}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="mt-3 mb-1 flex justify-end items-center">
|
||||||
|
<button
|
||||||
|
className={`px-4 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white`}
|
||||||
|
type="submit"
|
||||||
|
name={
|
||||||
|
selectedTab == 'family' ?
|
||||||
|
'family'
|
||||||
|
: selectedTab == 'public' ?
|
||||||
|
'public'
|
||||||
|
: selectedTab == 'individual' ?
|
||||||
|
'individual'
|
||||||
|
: selectedTab == 'group' ?
|
||||||
|
'group'
|
||||||
|
:
|
||||||
|
null
|
||||||
|
}
|
||||||
|
onClick={errorHandler}
|
||||||
|
// disabled={!value}
|
||||||
|
>
|
||||||
|
{loader?.jobFields ?
|
||||||
|
<LoadingSpinner size={5} />
|
||||||
|
: selectedTab == 'family' ?
|
||||||
|
'Assign to family'
|
||||||
|
: selectedTab == 'public' ?
|
||||||
|
'Show Task to Public'
|
||||||
|
: selectedTab == 'individual' ?
|
||||||
|
'Send Offer to Individual'
|
||||||
|
: selectedTab == 'group' ?
|
||||||
|
'Send Order to Group'
|
||||||
|
:
|
||||||
|
null
|
||||||
|
}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</Form>
|
||||||
|
);
|
||||||
|
}}
|
||||||
|
</Formik>
|
||||||
<p
|
<p
|
||||||
className={`text-center w-full text-lg ${
|
className={`text-center w-full text-lg ${
|
||||||
requestStatus.status
|
requestStatus.status
|
||||||
@@ -530,30 +584,15 @@ const JobFieldInput = ({
|
|||||||
select,
|
select,
|
||||||
label,
|
label,
|
||||||
labelClass,
|
labelClass,
|
||||||
btnText,
|
|
||||||
parentClass,
|
parentClass,
|
||||||
optionText,
|
optionText,
|
||||||
errorHandler,
|
|
||||||
loader,
|
|
||||||
data,
|
data,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div className="field w-full h-full px-3 pt-5 pb-3 flex flex-col justify-between gap-4">
|
<div className="field w-full flex flex-col justify-between gap-4">
|
||||||
{select && (
|
{select && (
|
||||||
<>
|
<>
|
||||||
<div className={`input-com ${parentClass}`}>
|
<div className={`input-com ${parentClass}`}>
|
||||||
<div
|
|
||||||
className={`flex items-center justify-start mb-2.5 ${labelClass}`}
|
|
||||||
>
|
|
||||||
{label && (
|
|
||||||
<label
|
|
||||||
className="input-label border-2 w-full border-sky-700 rounded py-4 px-2 text-[#181c32] dark:text-white text-[13.975px] leading-[20.9625px] font-semibold block tracking-wide"
|
|
||||||
htmlFor={inputName}
|
|
||||||
>
|
|
||||||
{label}
|
|
||||||
</label>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<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 ${inputClass}`}
|
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 ${inputClass}`}
|
||||||
>
|
>
|
||||||
@@ -616,8 +655,6 @@ const JobFieldInput = ({
|
|||||||
{input && (
|
{input && (
|
||||||
<InputCom
|
<InputCom
|
||||||
fieldClass="px-6"
|
fieldClass="px-6"
|
||||||
label={label}
|
|
||||||
labelClass="tracking-wide border-2 w-full border-sky-700 py-4 px-2"
|
|
||||||
type="email"
|
type="email"
|
||||||
name={inputName}
|
name={inputName}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
@@ -627,25 +664,6 @@ const JobFieldInput = ({
|
|||||||
parentClass={`${parentClass}`}
|
parentClass={`${parentClass}`}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{/* btn */}
|
|
||||||
<div className="my-1 flex justify-end items-center">
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
name={inputName}
|
|
||||||
onClick={errorHandler}
|
|
||||||
// className={`px-2 py-1 text-sm text-white btn-gradient tracking-wide rounded-md ${
|
|
||||||
// !value && "disabled:grayscale-[65%] transition duration-300"
|
|
||||||
// }`}
|
|
||||||
className={`px-4 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white ${
|
|
||||||
!value && ""
|
|
||||||
}
|
|
||||||
`}
|
|
||||||
// disabled={!value}
|
|
||||||
>
|
|
||||||
{loader ? <LoadingSpinner size={5} /> : btnText}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user