From f4c0c5bf1564febe018432320b76bc3522e8bf5e Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Wed, 7 Aug 2024 21:21:24 +0100 Subject: [PATCH 01/15] signup country bug fixed --- src/services/UsersService.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/services/UsersService.js b/src/services/UsersService.js index a708886..d4d7545 100644 --- a/src/services/UsersService.js +++ b/src/services/UsersService.js @@ -32,7 +32,7 @@ class usersService { } blogData() { - return this.getAuxEnd("/blogdata", null); + return this.getAuxEnd("/blogdata", {}); } CompleteOauthLogin(reqData) { @@ -130,7 +130,7 @@ class usersService { } getApiGate() { // localStorage.setItem("session_token", ``); - return this.postAuxEnd("/apigate", null); + return this.postAuxEnd("/apigate", {}); } getLoadProfile() { @@ -141,7 +141,7 @@ class usersService { page: 0, limit: 100, }; - return this.postAuxEnd("/loadprofile", null); + return this.postAuxEnd("/loadprofile", {}); } getUploadedList() { @@ -791,7 +791,7 @@ class usersService { // Country Data {GET} getSignupCountryData() { - return this.postAuxEnd("/signupcountry", null); + return this.postAuxEnd("/signupcountry", {}); } // END POINT TO GET BANK NAME @@ -1529,7 +1529,7 @@ class usersService { */ getUserReminders() { - return this.getAuxEnd("/reminders", null); + return this.getAuxEnd("/reminders", {}); } //---------------------------------------- ----- //---------------------------------------- ----- From fe3306cb9877f12044e64b4c891cc976a6c3acde Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Thu, 15 Aug 2024 21:26:09 +0100 Subject: [PATCH 02/15] auth layout adjusted --- src/components/AuthPages/AuthLayout2.jsx | 83 ++++++++++++----------- src/components/AuthPages/Login/index2.jsx | 2 +- 2 files changed, 45 insertions(+), 40 deletions(-) diff --git a/src/components/AuthPages/AuthLayout2.jsx b/src/components/AuthPages/AuthLayout2.jsx index 2edb006..0014a6c 100644 --- a/src/components/AuthPages/AuthLayout2.jsx +++ b/src/components/AuthPages/AuthLayout2.jsx @@ -13,11 +13,12 @@ export default function LoginLayout({ slogan, children }) { return (
+
{/* -
- -

- - © {new Date().getFullYear()} - - - - WrenchBoard - {" "} -

-
+ +
+
+
+ +
+

+ + © {new Date().getFullYear()} - + + + WrenchBoard + {" "} +

+
+
+ ); } diff --git a/src/components/AuthPages/Login/index2.jsx b/src/components/AuthPages/Login/index2.jsx index 56639c4..4a36003 100644 --- a/src/components/AuthPages/Login/index2.jsx +++ b/src/components/AuthPages/Login/index2.jsx @@ -563,7 +563,7 @@ export default function Login() { {loginType == "full" && ( <>
- This site is protected by a Captcha. Our Privacy Policy and + This site is protected by a Captcha.
Our Privacy Policy and Terms of Service apply.
From 41a617a265118c060958b1994bf297c5a1bf7ec5 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Thu, 22 Aug 2024 11:39:15 +0100 Subject: [PATCH 03/15] depends on select tage added --- src/components/MyJobs/MyJobTable.jsx | 1 + src/components/jobPopout/JobListPopout.jsx | 384 +++++++++++---------- 2 files changed, 202 insertions(+), 183 deletions(-) diff --git a/src/components/MyJobs/MyJobTable.jsx b/src/components/MyJobs/MyJobTable.jsx index ad49b1f..a403c0d 100644 --- a/src/components/MyJobs/MyJobTable.jsx +++ b/src/components/MyJobs/MyJobTable.jsx @@ -165,6 +165,7 @@ export default function MyJobTable({ MyJobList, reloadJobList, className }) { setWalletItem={setWalletItem} openWallet={openPopUp} situation={jobPopout.show} + myJobList={MyJobList} /> )} {/* End of Job List Popout */} diff --git a/src/components/jobPopout/JobListPopout.jsx b/src/components/jobPopout/JobListPopout.jsx index 879517c..6145cf2 100644 --- a/src/components/jobPopout/JobListPopout.jsx +++ b/src/components/jobPopout/JobListPopout.jsx @@ -10,17 +10,19 @@ import LoadingSpinner from "../Spinners/LoadingSpinner"; import Detail from "./popoutcomponent/Detail"; import { SocketValues } from "../Contexts/SocketIOContext"; +// .required("This is required ") + const validationSchema = Yup.object().shape({ - family: Yup.string().required("This is required "), + family: Yup.string(), public: Yup.string(), individual: Yup.string() .email("Invalid email format") .matches( /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/, "Invalid email format" - ) - .required("Email is required"), + ), group: Yup.string(), + depend_uid: Yup.string(), }); function JobListPopout({ @@ -29,6 +31,7 @@ function JobListPopout({ situation, openWallet, setWalletItem, + myJobList }) { let {marketUpdate} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET @@ -46,12 +49,7 @@ function JobListPopout({ const [familyList, setFamilyList] = useState([]); let [loader, setLoader] = useState({ member: false, - jobFields: { - family: false, - public: false, - individual: false, - group: false, - }, + jobFields: false }); const apiCall = useMemo(() => new usersService(), []); @@ -106,6 +104,7 @@ function JobListPopout({ public: "", individual: "", group: "", + depend_uid: '' }; let [textArea, setTextArea] = useState(details?.job_detail); @@ -141,6 +140,7 @@ function JobListPopout({ }; const jobFieldHandler = async (values, helpers) => { + setLoader({ jobFields: true }); let { job_id, job_uid } = details; if (!textArea) { @@ -163,15 +163,14 @@ function JobListPopout({ family_uid: values?.family, assign_mode: 110011, }; - setLoader({ jobFields: { family: true } }); } else if (values?.public !== "") { // for public input reqData = { ...jobReq, duration: Number(values?.public), assign_mode: 110022, + depend_uid: values?.depend_uid }; - setLoader({ jobFields: { public: true } }); } else if (values?.individual !== "") { // for individual input reqData = { @@ -179,7 +178,6 @@ function JobListPopout({ email: values?.individual, assign_mode: 110033, }; - setLoader({ jobFields: { individual: true } }); } else if (values?.group !== "") { // for group input reqData = { @@ -190,8 +188,8 @@ function JobListPopout({ duration: details?.timeline_days, // duration: 0, }; - setLoader({ jobFields: { group: true } }); } else { + setLoader({ jobFields: false }); return; } @@ -355,142 +353,198 @@ function JobListPopout({ ))}
- {selectedTab == "family" && ( - - {(props) => { - return ( -
- {/* Assign to Family */} - -

- {" "} - {props?.values?.family === "" && ( - {errMsg?.jobFields?.family} - )} -

{" "} - - ); - }} -
- )} - {selectedTab == "public" && ( - - {(props) => { - return ( -
- {/* Offer this job to public input */} - -

- {" "} - {props?.values.public === "" && ( - {errMsg?.jobFields?.public} - )} -

{" "} - - ); - }} -
- )} + + {(props) => { + return ( +
+
+ +
+
+ {/* ASSIGN TO FAMILY */} + {selectedTab == "family" && ( +
+ +

+ {" "} + {props?.values?.family === "" && ( + {errMsg?.jobFields?.family} + )} +

{" "} +
+ )} - {selectedTab == "individual" && ( - - {(props) => { - return ( - - {/* Offer this job to individual input */} - -

- {" "} - {props?.values.individual === "" && ( - {errMsg?.jobFields?.individual} - )} -

{" "} - - ); - }} -
- )} + {/* ASSIGN TO PUBLIC/MARKET */} + {selectedTab == "public" && ( +
+
+ + {/* */} +
+ +
+
+ +
+ +
+ + {/*

+ {" "} + {props?.values.public === "" && ( + {errMsg?.jobFields?.public} + )} +

{" "} */} +
+
+
+ )} - {/* { process.env.REACT_APP_SHOW_OFFER_GROUP_JOB != 0 && } */} - {selectedTab == "group" && ( - - {(props) => { - return ( -
- {/* Offer this job to your group input */} - -

- {" "} - {props?.values.group === "" && ( - {errMsg?.jobFields?.group} - )} -

- - ); - }} -
- )} + {/* ASSIGN TO INDIVIDUAL */} + {selectedTab == "individual" && ( +
+ +

+ {" "} + {props?.values.individual === "" && ( + {errMsg?.jobFields?.individual} + )} +

{" "} +
+ )} + + {/* ASSIGN TO GROUP */} + {selectedTab == "group" && ( +
+ +

+ {" "} + {props?.values.group === "" && ( + {errMsg?.jobFields?.group} + )} +

+
+ )} +
+
+ +
+ + ); + }} +

{ return ( -

+
{select && ( <>
-
- {label && ( - - )} -
@@ -616,8 +655,6 @@ const JobFieldInput = ({ {input && ( )} - - {/* btn */} -
- -
); }; From bdc67590d163d0de23ad6dff2fe642bdedb31ba9 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Thu, 22 Aug 2024 15:01:04 +0100 Subject: [PATCH 04/15] job lock key add --- src/components/Cards/AvailableJobsCard.jsx | 8 +++++--- src/components/MarketPlace/PopUp/MarketPopUp.jsx | 3 ++- src/components/jobPopout/JobListPopout.jsx | 10 +++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/Cards/AvailableJobsCard.jsx b/src/components/Cards/AvailableJobsCard.jsx index 19506da..0e860b7 100644 --- a/src/components/Cards/AvailableJobsCard.jsx +++ b/src/components/Cards/AvailableJobsCard.jsx @@ -103,9 +103,10 @@ export default function AvailableJobsCard({ {/*
*/}
-
-

+

+

{/* {thePrice} | {datas.timeline_days} day(s) */} + {datas?.offer_depend_uid && } {thePrice}

@@ -171,7 +172,8 @@ export default function AvailableJobsCard({

-

+

+ {datas?.offer_depend_uid && } Price: {thePrice}

diff --git a/src/components/MarketPlace/PopUp/MarketPopUp.jsx b/src/components/MarketPlace/PopUp/MarketPopUp.jsx index 6ac59c8..45e3904 100644 --- a/src/components/MarketPlace/PopUp/MarketPopUp.jsx +++ b/src/components/MarketPlace/PopUp/MarketPopUp.jsx @@ -145,7 +145,8 @@ const MarketPopUp = ({ details, onClose, situation, marketInt }) => {

-

+

+ {details?.offer_depend_uid && } {details?.title}

diff --git a/src/components/jobPopout/JobListPopout.jsx b/src/components/jobPopout/JobListPopout.jsx index 6145cf2..b7101a3 100644 --- a/src/components/jobPopout/JobListPopout.jsx +++ b/src/components/jobPopout/JobListPopout.jsx @@ -135,7 +135,7 @@ function JobListPopout({ } finally { setTimeout(() => { setErrMsg({ jobFields: "" }); - }, 3000); + }, 5000); } }; @@ -201,7 +201,7 @@ function JobListPopout({ return setTimeout(() => { setLoader({ jobFields: false }); setRequestStatus({ message: "", status: false }); - }, 3000); + }, 5000); } marketUpdate('market', 'full-markets-jobs') // sends an event to the socket to update market lists dispatch(tableReload({ type: "JOBTABLE" })); // reloads my job page @@ -211,14 +211,14 @@ function JobListPopout({ setLoader({ jobFields: false }); onClose(); // throw new Response(data); - }, 3000); + }, 5000); } catch (error) { setRequestStatus({ message: "Unable to complete", status: false }); setTimeout(() => { setRequestStatus({ message: "", status: false }); setLoader({ jobFields: false }); throw new Error(error); - }, 3000); + }, 5000); } }; @@ -431,7 +431,7 @@ function JobListPopout({ ) : myJobList?.data?.result_list?.length > 0 ? ( <> - {myJobList?.data?.result_list?.map((item, index) => ( + {myJobList?.data?.result_list?.filter(item => item.job_uid != details.job_uid)?.map((item, index) => ( From 13da84099cedfeaf396d320cf5655d11a754053c Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Fri, 23 Aug 2024 15:52:16 +0100 Subject: [PATCH 05/15] lock job popout --- src/components/Cards/AvailableJobsCard.jsx | 2 + src/components/MarketPlace/MainSection.jsx | 1 + src/components/MarketPlace/PopUp/LockJob.jsx | 252 ++++++++++++ .../MarketPlace/PopUp/MarketPopUp.jsx | 359 +++++++++--------- src/lib/apiConst.js | 1 + src/services/UsersService.js | 12 + 6 files changed, 456 insertions(+), 171 deletions(-) create mode 100644 src/components/MarketPlace/PopUp/LockJob.jsx diff --git a/src/components/Cards/AvailableJobsCard.jsx b/src/components/Cards/AvailableJobsCard.jsx index 0e860b7..04523e7 100644 --- a/src/components/Cards/AvailableJobsCard.jsx +++ b/src/components/Cards/AvailableJobsCard.jsx @@ -10,6 +10,7 @@ export default function AvailableJobsCard({ hidden = false, contentDisplay, image_server, + marketPlaceProduct }) { //debugger; const [marketPopUp, setMarketPopUp] = useState({ show: false, data: {} }); @@ -222,6 +223,7 @@ export default function AvailableJobsCard({ setMarketPopUp({ show: false, data: {} }); }} situation={marketPopUp.show} + marketPlaceProduct={marketPlaceProduct} /> )} diff --git a/src/components/MarketPlace/MainSection.jsx b/src/components/MarketPlace/MainSection.jsx index 837380f..8878039 100644 --- a/src/components/MarketPlace/MainSection.jsx +++ b/src/components/MarketPlace/MainSection.jsx @@ -150,6 +150,7 @@ export default function MainSection({ contentDisplay={contentDisplay} image_server={image_server} datas={datum} + marketPlaceProduct={marketPlaceProduct} />
)) diff --git a/src/components/MarketPlace/PopUp/LockJob.jsx b/src/components/MarketPlace/PopUp/LockJob.jsx new file mode 100644 index 0000000..cf41baa --- /dev/null +++ b/src/components/MarketPlace/PopUp/LockJob.jsx @@ -0,0 +1,252 @@ +import React, {useEffect, useState} from 'react' +import { PriceFormatter } from "../../Helpers/PriceFormatter"; +import usersService from "../../../services/UsersService"; +import LoadingSpinner from "../../Spinners/LoadingSpinner"; + + +export default function LockJob({details, marketPlaceProduct, ManageInterest, manageInt, handleInputChange, MarketDetail, marketMsg, errMsg, textValue}) { + const apiCall = new usersService() + + const [completedTask, setCompletedTask] = useState({ + loading: true, + data: [] + }) + + let thePrice = PriceFormatter( + details?.price * 0.01, + details?.currency_code, + details?.currency + ); + + let cleanedText = details?.job_description + ?.replace(/</g, "<") + .replace(/>/g, ">") + .replace(/"/g, '"') + .replace(/&/g, "&"); + + let dependOn = marketPlaceProduct?.filter(item => item?.job_uid == details?.offer_depend_uid)[0] + + useEffect(()=>{ + apiCall.getVerifyCompletedTask({offer_depend_uid:details?.offer_depend_uid}).then(res => { + console.log('RES', res.data) + setCompletedTask({loading:false, data:res?.data?.result_list}) + }).catch(err =>{ + setCompletedTask({loading:false, data:[]}) + }) + },[]) + + return ( + <> + {completedTask.loading ? +
+ +
+ : + <> +
+
+

+ {details?.offer_depend_uid && } + {details?.title} +

+ + {/* INPUT SECTION */} + {[ + { + name: "Description", + content: details.description, + }, + { + name: "", + content: { + text: `Timeline: ${details.timeline_days} day(s) -- `, + bold: `Budget: ${thePrice}`, + }, + }, + { + name: "Delivery Detail", + content: cleanedText, + danger: true, + }, + ].map(({ name, content, danger }, idx) => ( +
+ +
+ {danger ? ( +

+ ) : ( +

+ {name !== "Delivery Detail" ? ( + <> + {typeof content !== "object" ? content : null} + {typeof content === "object" && ( + <> + {/*


*/} + + + {content?.text} + {thePrice} + + + {/*
*/} + + )} + + ) : ( + "" + )} +

+ )} +
+
+ ))} +
+
+ {completedTask.loading ? +

Loading...

+ :completedTask?.data?.filter(item => item?.job_uid == details.offer_depend_uid).length > 0 ? +
+ +
+
+