From 88d2f7313c334c4797af051ec5b8ed323a0cc718 Mon Sep 17 00:00:00 2001 From: Ebube Date: Thu, 25 May 2023 08:48:41 +0100 Subject: [PATCH 1/3] . --- src/components/MyJobs/StartJob.jsx | 28 +++------------------------- src/components/Partials/Sidebar.jsx | 14 +++----------- src/services/UsersService.js | 2 +- 3 files changed, 7 insertions(+), 37 deletions(-) diff --git a/src/components/MyJobs/StartJob.jsx b/src/components/MyJobs/StartJob.jsx index 58f22a9..54e10db 100644 --- a/src/components/MyJobs/StartJob.jsx +++ b/src/components/MyJobs/StartJob.jsx @@ -15,10 +15,6 @@ export default function StartJob(props) { const navigate = useNavigate() let [request, setRequest] = useState({loading: false, status: false, message: ''}) - const [selectTab, setValue] = useState("today"); - const filterHandler = (value) => { - setValue(value); - }; const handleOnclick = () => { setRequest({loading: true, status: false, message: ''}) @@ -28,9 +24,10 @@ export default function StartJob(props) { return } setRequest({loading: false, status: true, message: 'Request completed successfully'}) + console.log("Job agree", res?.data) setTimeout(()=>{ - navigate('/', {replace: true}) - window.location.reload() + // navigate('/', {replace: true}) + // window.location.reload() }, 2000) }).catch(error => { setRequest({loading: false, status: false, message: 'Opps! An Error Occured. Try Again'}) @@ -42,25 +39,6 @@ export default function StartJob(props) { {/**/}
- {/* heading */} - {/*
-
-

- - Additional Terms for Jobs Posting. - - -

-
-
-
filterHandler("today")} className="relative"> - -
-
-
*/} -
diff --git a/src/components/Partials/Sidebar.jsx b/src/components/Partials/Sidebar.jsx index 4ca93bb..5a4df91 100644 --- a/src/components/Partials/Sidebar.jsx +++ b/src/components/Partials/Sidebar.jsx @@ -12,9 +12,10 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) { const darkMode = useContext(DarkModeContext); let { userDetails } = useSelector((state) => state.userDetails); - console.log(userDetails); + console.log('user-details for job',userDetails); //const jobLists = getJobList(); // pass from upper - we need in a lot of places let { jobLists } = useSelector((state) => state.jobLists); + console.log('checking for jobList',jobLists) const marketData = jobLists?.result_list; let noOfJobs = marketData?.length <= 0 ? "0" : marketData?.length; @@ -29,7 +30,7 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) { elm.classList.remove("active"); }); } - }); + }, [jobLists]); return (
{/* logo-area */} @@ -167,15 +168,6 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) { sidebar ? "mb-14" : "rounded-none p-0" }`} > - {/*
-
- - - Enable Job Post - - -
-
*/}

diff --git a/src/services/UsersService.js b/src/services/UsersService.js index d7473bf..9f30d0e 100644 --- a/src/services/UsersService.js +++ b/src/services/UsersService.js @@ -97,7 +97,7 @@ class usersService { */ getActiveJobList() { var postData = { - uuid: localStorage.getItem("uid"), + uid: localStorage.getItem("uid"), member_id: localStorage.getItem("member_id"), sessionid: localStorage.getItem("session_token"), page: 0, From c46e94cd8804f479f1c82ecc81ea0f66ca6f5cdf Mon Sep 17 00:00:00 2001 From: Ebube Date: Thu, 25 May 2023 10:06:56 +0100 Subject: [PATCH 2/3] updated endpoint --- src/components/AuthPages/AuthLayout.jsx | 2 +- src/components/AuthPages/Login/index.jsx | 4 ++-- src/middleware/AuthRoute.jsx | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/AuthPages/AuthLayout.jsx b/src/components/AuthPages/AuthLayout.jsx index 582bc01..1bcd83f 100644 --- a/src/components/AuthPages/AuthLayout.jsx +++ b/src/components/AuthPages/AuthLayout.jsx @@ -4,7 +4,7 @@ import { Link } from "react-router-dom"; export default function LoginLayout({ slogan, children }) { return (
-
+
{children && children} diff --git a/src/components/AuthPages/Login/index.jsx b/src/components/AuthPages/Login/index.jsx index dd37fb5..a22dd60 100644 --- a/src/components/AuthPages/Login/index.jsx +++ b/src/components/AuthPages/Login/index.jsx @@ -187,7 +187,7 @@ export default function Login() {
{ // Getting market data const getMarketActiveJobList = async () => { try { - const res = await apiCall.getActiveJobList(); + const res = await apiCall.getMyJobList(); dispatch(updateJobs(res.data)); } catch (error) { console.log("Error getting mode"); From 87c09229742b323d25836d4c92fd47f74a6074b5 Mon Sep 17 00:00:00 2001 From: Ebube Date: Thu, 25 May 2023 12:17:52 +0100 Subject: [PATCH 3/3] . --- src/components/MyJobs/StartJob.jsx | 5 ++--- src/components/Partials/Sidebar.jsx | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/components/MyJobs/StartJob.jsx b/src/components/MyJobs/StartJob.jsx index 54e10db..d6f3370 100644 --- a/src/components/MyJobs/StartJob.jsx +++ b/src/components/MyJobs/StartJob.jsx @@ -24,10 +24,9 @@ export default function StartJob(props) { return } setRequest({loading: false, status: true, message: 'Request completed successfully'}) - console.log("Job agree", res?.data) setTimeout(()=>{ - // navigate('/', {replace: true}) - // window.location.reload() + navigate('/', {replace: true}) + window.location.reload() }, 2000) }).catch(error => { setRequest({loading: false, status: false, message: 'Opps! An Error Occured. Try Again'}) diff --git a/src/components/Partials/Sidebar.jsx b/src/components/Partials/Sidebar.jsx index 5a4df91..a1b605b 100644 --- a/src/components/Partials/Sidebar.jsx +++ b/src/components/Partials/Sidebar.jsx @@ -15,7 +15,6 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) { console.log('user-details for job',userDetails); //const jobLists = getJobList(); // pass from upper - we need in a lot of places let { jobLists } = useSelector((state) => state.jobLists); - console.log('checking for jobList',jobLists) const marketData = jobLists?.result_list; let noOfJobs = marketData?.length <= 0 ? "0" : marketData?.length;