From 159ec53410be47167292d267e5eca3f3a2098064 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Tue, 9 May 2023 08:17:30 -0400 Subject: [PATCH 1/8] Stas compo --- src/components/Partials/RightSideBar.jsx | 247 +++++++++++---------- src/components/Partials/SideStatistics.jsx | 6 + src/services/UsersService.js | 2 +- 3 files changed, 131 insertions(+), 124 deletions(-) diff --git a/src/components/Partials/RightSideBar.jsx b/src/components/Partials/RightSideBar.jsx index 585dbe6..e3592da 100644 --- a/src/components/Partials/RightSideBar.jsx +++ b/src/components/Partials/RightSideBar.jsx @@ -13,6 +13,7 @@ import LtcIco from "../Helpers/Icons/LtcIco"; import Usdt from "../Helpers/Icons/Usdt"; import SelectBox from "../Helpers/SelectBox"; import { NavLink } from "react-router-dom"; +import SideStatistics from "./SideStatistics"; export default function RightSideBar() { const filterDatas = ["Last 15 days", "Last Month", "Last 6 month"]; @@ -201,129 +202,129 @@ export default function RightSideBar() { -
-
-
-

- Statistics -

- -
-
- -
- - - - - - - - - - - - - - - - - -
-
-
-
-
-

- Your All Artwork Statistics -

-
-
-
    -
  • - -
    - - Profit : - - - {/* don't change variable only change state */} - {filterDataSet[0]}% - -
    -
  • -
  • - -
    - - Total Sold : - - - {/* don't change variable only change state */} - {filterDataSet[1]}% - -
    -
  • -
  • - -
    - - Total Sold : - - - {/* don't change variable only change state */} - {filterDataSet[2]}% - -
    -
  • -
  • - -
    - - Total Sold : - - - {/* don't change variable only change state */} - {filterDataSet[3]}% - -
    -
  • -
-
-
-
- + {/*
*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* Statistics*/} + {/*

*/} + {/* */} + {/*
*/} + {/*
*/} + {/* */} + {/*
*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* Your All Artwork Statistics*/} + {/*

*/} + {/*
*/} + {/*
*/} + {/*
    */} + {/*
  • */} + {/* */} + {/*
    */} + {/* */} + {/* Profit :*/} + {/* */} + {/* */} + {/* /!* don't change variable only change state *!/*/} + {/* {filterDataSet[0]}%*/} + {/* */} + {/*
    */} + {/*
  • */} + {/*
  • */} + {/* */} + {/*
    */} + {/* */} + {/* Total Sold :*/} + {/* */} + {/* */} + {/* /!* don't change variable only change state *!/*/} + {/* {filterDataSet[1]}%*/} + {/* */} + {/*
    */} + {/*
  • */} + {/*
  • */} + {/* */} + {/*
    */} + {/* */} + {/* Total Sold :*/} + {/* */} + {/* */} + {/* /!* don't change variable only change state *!/*/} + {/* {filterDataSet[2]}%*/} + {/* */} + {/*
    */} + {/*
  • */} + {/*
  • */} + {/* */} + {/*
    */} + {/* */} + {/* Total Sold :*/} + {/* */} + {/* */} + {/* /!* don't change variable only change state *!/*/} + {/* {filterDataSet[3]}%*/} + {/* */} + {/*
    */} + {/*
  • */} + {/*
*/} + {/*
*/} + {/*
*/} + {/*
*/} + ); diff --git a/src/components/Partials/SideStatistics.jsx b/src/components/Partials/SideStatistics.jsx index a02db0e..b690083 100644 --- a/src/components/Partials/SideStatistics.jsx +++ b/src/components/Partials/SideStatistics.jsx @@ -3,6 +3,12 @@ import DoughnutChart from "../Charts/DoughnutChart"; import SelectBox from "../Helpers/SelectBox"; export default function SideStatistics() { + const showStats = false; + + if( showStats == false){ + return ''; + } +debugger; const filterDatas = ["Last 15 days", "Last Month", "Last 6 month"]; const [filterDataSet, setFilterDataSet] = useState([10, 30, 20, 40]); const dataSetHandler = (value) => { diff --git a/src/services/UsersService.js b/src/services/UsersService.js index b67b52e..6b86125 100644 --- a/src/services/UsersService.js +++ b/src/services/UsersService.js @@ -350,7 +350,7 @@ class usersService { }; return this.postAuxEnd("/familymanage", postData); } - + //END POINT CALL FOR ACCOUNT TOP startTopUp(post){ var postData = { From e49c7eb77924bbaeb07c11f372bc2c5cf3c539da Mon Sep 17 00:00:00 2001 From: Ebube Date: Tue, 9 May 2023 14:59:25 +0100 Subject: [PATCH 2/8] Almost complete --- src/components/FamilyAcc/FamilyTable.jsx | 99 +++++++++++--------- src/components/FamilyAcc/index.jsx | 53 +++++++++-- src/components/Helpers/CustomPopUp/index.jsx | 7 +- src/services/SiteService.js | 4 + 4 files changed, 106 insertions(+), 57 deletions(-) diff --git a/src/components/FamilyAcc/FamilyTable.jsx b/src/components/FamilyAcc/FamilyTable.jsx index e78497d..2d88b6b 100644 --- a/src/components/FamilyAcc/FamilyTable.jsx +++ b/src/components/FamilyAcc/FamilyTable.jsx @@ -1,8 +1,9 @@ import React, { useState } from "react"; import dataImage1 from "../../assets/images/data-table-user-1.png"; -export default function FamilyTable({ className }) { +export default function FamilyTable({ className, familyList }) { const filterCategories = ["All Categories", "Explore", "Featured"]; + console.log(familyList) const [selectedCategory, setCategory] = useState(filterCategories[0]); return (
- + - - - - + {familyList?.length > 0 && + familyList?.map(({firstname, lastname, age}, idx) => ( + + + + - - + + + ))} + {familyList?.length <= 0 && ( +
+ Nothing to see here +
+ )}
Name Last Login No of Tasks Status
-
-
- data -
-
-

- Firstname Lastname (age) -

- - Added 10-10-2029 - -
-
-
-
- - 10-10-2019 - -
-
-
- - 100 - -
-
+
+
+ data +
+
+

+ {`${firstname} ${lastname} (${age})`} +

+ + Added 10-10-2029 + +
+
+
+
+ + 10-10-2019 + +
+
+
+ + 100 + +
+
- -
+ +
diff --git a/src/components/FamilyAcc/index.jsx b/src/components/FamilyAcc/index.jsx index 5d3e384..fb7ae77 100644 --- a/src/components/FamilyAcc/index.jsx +++ b/src/components/FamilyAcc/index.jsx @@ -1,4 +1,4 @@ -import React, { useId, useMemo, useState } from "react"; +import React, { useCallback, useEffect, useId, useMemo, useState } from "react"; import CustomPopUp from "../Helpers/CustomPopUp"; import InputCom from "../Helpers/Inputs/InputCom"; import Layout from "../Partials/Layout"; @@ -8,6 +8,8 @@ import SiteService from "../../services/SiteService"; export default function FamilyAcc() { const [selectTab, setValue] = useState("today"); const [selectedAge, setSelectedAge] = useState(undefined); + const [familyList, setFamilyList] = useState([]); + const [isOpen, setIsOpen] = useState(false); const [loader, setLoader] = useState(false); const [msgErr, setMsgErr] = useState(""); const [formData, setFormData] = useState({ @@ -41,12 +43,13 @@ export default function FamilyAcc() { setFormData({ ...formData, [name]: value }); }; + // Add member const addMember = async () => { - let { first_name, last_name } = formData; + const { first_name, last_name } = formData; setLoader(true); try { if (first_name !== "" && last_name !== "") { - const reqData = { + let reqData = { member_id: localStorage.getItem("member_id"), uid: localStorage.getItem("uid"), session_id: localStorage.getItem("session_token"), @@ -54,11 +57,15 @@ export default function FamilyAcc() { lastname: last_name, age: selectedAge, }; - const res = await apiCall.addFamily(reqData); + console.log(reqData); + let res = await apiCall.addFamily(reqData); const { data } = res; - if (data.internal_return > 0 && data.status == "OK") { + if (data?.internal_return > 0 && data?.status == "OK") { setLoader(false); - console.log(data); + setIsOpen(false); + } else { + setLoader(false); + setMsgErr("Sorry, something went wrong"); } } else { setLoader(false); @@ -67,6 +74,7 @@ export default function FamilyAcc() { } catch (error) { setLoader(false); setMsgErr("An error occurred"); + throw new Error(error); } finally { setTimeout(() => { setMsgErr(null); @@ -74,6 +82,33 @@ export default function FamilyAcc() { } }; + useEffect(() => { + // member listing + const memberList = async () => { + try { + let reqData = { + member_id: localStorage.getItem("member_id"), + uid: localStorage.getItem("uid"), + sessionid: localStorage.getItem("session_token"), + limit: 20, + offset: 1, + action: 22010, + }; + + let res = await apiCall.familyListings(reqData); + const { data } = res; + if (data?.internal_return >= 0 && data?.status == "OK") { + let { result_list } = data; + setFamilyList(result_list); + } else return; + } catch (error) { + throw new Error(error); + } + }; + memberList(); + }, []); + console.log(familyList); + return ( {/**/} @@ -93,6 +128,8 @@ export default function FamilyAcc() { btn_class="text-purple" key={id} title="Add members" + isOpen={isOpen} + setIsOpen={setIsOpen} > - + @@ -187,7 +224,7 @@ const FamilyForm = ({ {msgErr && ( -
+
{msgErr}
)} diff --git a/src/components/Helpers/CustomPopUp/index.jsx b/src/components/Helpers/CustomPopUp/index.jsx index bcfdd04..24215ec 100644 --- a/src/components/Helpers/CustomPopUp/index.jsx +++ b/src/components/Helpers/CustomPopUp/index.jsx @@ -1,7 +1,6 @@ import React, { useState } from "react"; -const CustomPopUp = ({ name, btn_class, title, children }) => { - const [isOpen, setIsOpen] = useState(false); +const CustomPopUp = ({ name, btn_class, title, children, isOpen, setIsOpen }) => { const handleOpen = () => { setIsOpen(true); @@ -12,7 +11,7 @@ const CustomPopUp = ({ name, btn_class, title, children }) => { }; return ( - <> +
@@ -30,7 +29,7 @@ const CustomPopUp = ({ name, btn_class, title, children }) => {
)} - + ); }; diff --git a/src/services/SiteService.js b/src/services/SiteService.js index 0f19ea1..a8e832b 100644 --- a/src/services/SiteService.js +++ b/src/services/SiteService.js @@ -32,6 +32,10 @@ class SiteService { return this.postAuxEnd('/familyadd', reqData) } + familyListings(reqData) { + return this.postAuxEnd('/familylist', reqData) + } + //---------------------------------------- ----- //---------------------------------------- ----- // Unified call below From 5e6d2f3db97d78f61c1301116b8e4b5517320511 Mon Sep 17 00:00:00 2001 From: Ebube Date: Tue, 9 May 2023 15:03:29 +0100 Subject: [PATCH 3/8] added auth links for login page --- src/components/AuthPages/AuthLayout.jsx | 33 ++++++++++++++++++------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/components/AuthPages/AuthLayout.jsx b/src/components/AuthPages/AuthLayout.jsx index 43e745a..582bc01 100644 --- a/src/components/AuthPages/AuthLayout.jsx +++ b/src/components/AuthPages/AuthLayout.jsx @@ -11,15 +11,30 @@ export default function LoginLayout({ slogan, children }) {
- - About - - - Services - - - Contact Us - + + About + + + Services + + + Contact Us +
From f59c0c1522d41ccb8375c48fe22431a5bbd715d3 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Tue, 9 May 2023 20:27:18 +0100 Subject: [PATCH 4/8] terms and agreement implementation --- src/components/MyJobs/StartJob.jsx | 46 ++++++++++++++++++------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/src/components/MyJobs/StartJob.jsx b/src/components/MyJobs/StartJob.jsx index eb5db3a..5aec5ef 100644 --- a/src/components/MyJobs/StartJob.jsx +++ b/src/components/MyJobs/StartJob.jsx @@ -18,7 +18,7 @@ export default function StartJob(props) {
{/* heading */} -
+ {/*

-
+
*/}
-

- Terms & Agreement -

+

+ Additional Terms for Jobs Posting. +

{/**/}
- All terms of sale must follow WrenchBoard policies for buying and selling. Setting and meeting expectations in a listing's terms of sale ensure a smooth transaction and buyer satisfaction while helping WrenchBoard remain a reputable marketplace. +

All terms of sale must follow WrenchBoard policies for buying and selling. Setting and meeting expectations in a listing's terms of sale ensure a smooth transaction and buyer satisfaction while helping WrenchBoard remain a reputable marketplace. +

- What is the policy? - Task or Job owners should provide clear and accurate delivery terms and conditions required to meet the expectations they have set in their listings. These should include: - Delivery mode, timelines, and reviews - The forms of payment available for the task - A returns policy: - Clearly stated criteria under which cancellation will be accepted. - Clearly stated the time period in which the buyer must notify the seller about the delivery delay. - How refunds/returns/cancellations will be issued +

What is the policy?

+

Task or Job owners should provide clear and accurate delivery terms and conditions required to meet the expectations they have set in their listings. These should include:

+
    +
  • Delivery mode, timelines, and reviews
  • +
  • The forms of payment available for the task
  • +
  • A returns policy: +
      +
    • Clearly stated criteria under which cancellation will be accepted.
    • +
    • Clearly stated the time period in which the buyer must notify the seller about the delivery delay.
    • +
    • How refunds/returns/cancellations will be issued
    • +
    +
  • +
- Activity that doesn't follow WrenchBoard policy could result in a range of actions, including for example: administratively ending or canceling listings, hiding or demoting all listings from search results, lowering rating, buying or selling restrictions, and account suspension. - All fees paid or payable concerning listings or accounts on which we take any action will not be refunded or otherwise credited to your account. +

Activity that doesn't follow WrenchBoard policy could result in a range of actions, including for example: administratively ending or canceling listings, hiding or demoting all listings from search results, lowering rating, buying or selling restrictions, and account suspension. + All fees paid or payable concerning listings or accounts on which we take any action will not be refunded or otherwise credited to your account.

- Why does WrencBoard have this policy? - Buyers and sellers enter a contract when they complete transactions, so it's necessary to have precise details on what the transaction entails to guarantee satisfaction. This policy also helps sellers meet our performance standards. +

Why does WrencBoard have this policy?

+ +

Buyers and sellers enter a contract when they complete transactions, so it's necessary to have precise details on what the transaction entails to guarantee satisfaction. This policy also helps sellers meet our performance standards.

+
+ +
From c043eeebbeb7d6e7b788e7c007c59e397a870e8b Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Tue, 9 May 2023 23:00:45 +0100 Subject: [PATCH 5/8] popout style fixed --- .../MyActiveJobs/MyActiveJobTable.jsx | 2 +- src/components/jobPopout/ActiveJobsPopout.jsx | 212 +++++++++++------- .../jobPopout/popoutcomponent/Detail.jsx | 4 +- src/index.css | 16 +- 4 files changed, 131 insertions(+), 103 deletions(-) diff --git a/src/components/MyActiveJobs/MyActiveJobTable.jsx b/src/components/MyActiveJobs/MyActiveJobTable.jsx index 743d3b1..c8e20f0 100644 --- a/src/components/MyActiveJobs/MyActiveJobTable.jsx +++ b/src/components/MyActiveJobs/MyActiveJobTable.jsx @@ -102,7 +102,7 @@ export default function MyActiveJobTable({MyJobList, className }) {
} {jobPopout.show && - {setJobPopout({show:false, data:{}})}} /> + {setJobPopout({show:false, data:{}})}} situation={jobPopout.show} /> }
); diff --git a/src/components/jobPopout/ActiveJobsPopout.jsx b/src/components/jobPopout/ActiveJobsPopout.jsx index d282e3c..5117b70 100644 --- a/src/components/jobPopout/ActiveJobsPopout.jsx +++ b/src/components/jobPopout/ActiveJobsPopout.jsx @@ -1,97 +1,139 @@ import React from 'react' import Detail from './popoutcomponent/Detail' +import ModalCom from '../Helpers/ModalCom' -function ActiveJobsPopout({details, onClose}) { - console.log(details) - return ( -
-
-
-

{details.title}

-
- ! -
-

This Job have been sent to public view

-

This Job will expire

-
-
- - {/* INPUT SECTION */} -
- -
- -
- -
- -
- -
- -
- -
- -
- -
-
- +function ActiveJobsPopout({details, onClose, situation}) { + return ( + +
+
+ {/*

+ Confirm +

*/} + +
+
+
+

Opportunity to make some money by introducing 10 of our recent stories from our

+
+ ! +
+

This Job have been sent to public view

+

This Job will expire

- -
- -
-
- - {/* ACTION SECTION */} -
-

Actions

- -
-

Job sent to public view

-
- -
- -
- -
- -
- -
- -
+ + {/* INPUT SECTION */} +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ + {/* ACTION SECTION */} +
+

Actions

+ +
+

Job sent to public view

+
+ +
+ +
+ +
+ +
+ +
+
+
+
+
- ) +
+ + ) } export default ActiveJobsPopout \ No newline at end of file diff --git a/src/components/jobPopout/popoutcomponent/Detail.jsx b/src/components/jobPopout/popoutcomponent/Detail.jsx index 918d135..c154986 100644 --- a/src/components/jobPopout/popoutcomponent/Detail.jsx +++ b/src/components/jobPopout/popoutcomponent/Detail.jsx @@ -3,8 +3,8 @@ import React from 'react' function Detail({label, value, bg}) { return ( <> - -

{value}

+ +

{value}

) } diff --git a/src/index.css b/src/index.css index f82b867..b717d6d 100644 --- a/src/index.css +++ b/src/index.css @@ -732,18 +732,4 @@ TODO: Responsive =========================== /* For IE10 */ .content-wrapper select::-ms-expand { display: none; -} - -/* JOBS DETAILS ALERT */ -.alert-box{ - animation-name: scale; - animation-duration: .5s; - animation-timing-function: linear; -} - -@keyframes scale { - 0%{transform: scale(0)} - 50%{transform: scale(1.1)} - 100%{transform: scale(1)} -} -/* END OF JOBS DETAILS ALERT */ \ No newline at end of file +} \ No newline at end of file From bb05100c68d44227c0285f68e8ad8a79ea5da5da Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Tue, 9 May 2023 19:55:20 -0400 Subject: [PATCH 6/8] Fix menu --- src/components/FamilyAcc/index.jsx | 6 +- src/components/Partials/RightSideBar.jsx | 125 +---------------------- src/components/Partials/Sidebar.jsx | 16 ++- 3 files changed, 16 insertions(+), 131 deletions(-) diff --git a/src/components/FamilyAcc/index.jsx b/src/components/FamilyAcc/index.jsx index fb7ae77..5cfa8bb 100644 --- a/src/components/FamilyAcc/index.jsx +++ b/src/components/FamilyAcc/index.jsx @@ -26,8 +26,8 @@ export default function FamilyAcc() { let id = useId(); // For the age drop down - let startAge = 16; - let endAge = 70; + let startAge = 5; + let endAge = 16; // creates an array of age values ranging from 16 to 70 const ageRange = Array.from( { length: endAge - startAge + 1 }, @@ -91,7 +91,7 @@ export default function FamilyAcc() { uid: localStorage.getItem("uid"), sessionid: localStorage.getItem("session_token"), limit: 20, - offset: 1, + offset: 0, action: 22010, }; diff --git a/src/components/Partials/RightSideBar.jsx b/src/components/Partials/RightSideBar.jsx index e3592da..6f75a81 100644 --- a/src/components/Partials/RightSideBar.jsx +++ b/src/components/Partials/RightSideBar.jsx @@ -201,130 +201,7 @@ export default function RightSideBar() {
- - {/*
*/} - {/*
*/} - {/*
*/} - {/*

*/} - {/* Statistics*/} - {/*

*/} - {/* */} - {/*
*/} - {/*
*/} - {/* */} - {/*
*/} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - {/*

*/} - {/* Your All Artwork Statistics*/} - {/*

*/} - {/*
*/} - {/*
*/} - {/*
    */} - {/*
  • */} - {/* */} - {/*
    */} - {/* */} - {/* Profit :*/} - {/* */} - {/* */} - {/* /!* don't change variable only change state *!/*/} - {/* {filterDataSet[0]}%*/} - {/* */} - {/*
    */} - {/*
  • */} - {/*
  • */} - {/* */} - {/*
    */} - {/* */} - {/* Total Sold :*/} - {/* */} - {/* */} - {/* /!* don't change variable only change state *!/*/} - {/* {filterDataSet[1]}%*/} - {/* */} - {/*
    */} - {/*
  • */} - {/*
  • */} - {/* */} - {/*
    */} - {/* */} - {/* Total Sold :*/} - {/* */} - {/* */} - {/* /!* don't change variable only change state *!/*/} - {/* {filterDataSet[2]}%*/} - {/* */} - {/*
    */} - {/*
  • */} - {/*
  • */} - {/* */} - {/*
    */} - {/* */} - {/* Total Sold :*/} - {/* */} - {/* */} - {/* /!* don't change variable only change state *!/*/} - {/* {filterDataSet[3]}%*/} - {/* */} - {/*
    */} - {/*
  • */} - {/*
*/} - {/*
*/} - {/*
*/} - {/*
*/} - +
); diff --git a/src/components/Partials/Sidebar.jsx b/src/components/Partials/Sidebar.jsx index 4e5e1cc..e229d36 100644 --- a/src/components/Partials/Sidebar.jsx +++ b/src/components/Partials/Sidebar.jsx @@ -220,12 +220,20 @@ export default function Sidebar({ sidebar, action, logoutModalHandler }) {
+ {/*
*/} + {/*
*/} + {/* */} + {/* */} + {/* Family Account*/} + {/* */} + {/* */} + {/*
*/} + {/*
*/} +
-
+
- - Family Account - +

Family Corner

From 4d076dd649d6772fc436e7604883a3b5244ca495 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Wed, 10 May 2023 07:32:03 -0400 Subject: [PATCH 7/8] Rem stats --- src/components/FamilyAcc/FamilyTable.jsx | 6 +++--- src/components/Partials/RightSideBar.jsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/FamilyAcc/FamilyTable.jsx b/src/components/FamilyAcc/FamilyTable.jsx index 2d88b6b..0626588 100644 --- a/src/components/FamilyAcc/FamilyTable.jsx +++ b/src/components/FamilyAcc/FamilyTable.jsx @@ -18,10 +18,10 @@ export default function FamilyTable({ className, familyList }) { Name Last Login No of Tasks - Status + {familyList?.length > 0 && - familyList?.map(({firstname, lastname, age}, idx) => ( + familyList?.map(({firstname, lastname, age,added}, idx) => (
@@ -37,7 +37,7 @@ export default function FamilyTable({ className, familyList }) { {`${firstname} ${lastname} (${age})`} - Added 10-10-2029 + Added {` ${added}`}
diff --git a/src/components/Partials/RightSideBar.jsx b/src/components/Partials/RightSideBar.jsx index 6f75a81..174b611 100644 --- a/src/components/Partials/RightSideBar.jsx +++ b/src/components/Partials/RightSideBar.jsx @@ -13,7 +13,7 @@ import LtcIco from "../Helpers/Icons/LtcIco"; import Usdt from "../Helpers/Icons/Usdt"; import SelectBox from "../Helpers/SelectBox"; import { NavLink } from "react-router-dom"; -import SideStatistics from "./SideStatistics"; +//import SideStatistics from "./SideStatistics"; export default function RightSideBar() { const filterDatas = ["Last 15 days", "Last Month", "Last 6 month"]; @@ -201,7 +201,7 @@ export default function RightSideBar() { - + {/**/} ); From 211276cccb74748075141017b311afc3528500be Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Wed, 10 May 2023 13:20:47 +0100 Subject: [PATCH 8/8] start job posting API consumed --- src/components/MyJobs/StartJob.jsx | 50 ++++++++++++++++++++++++++++-- src/services/UsersService.js | 11 +++++++ 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/src/components/MyJobs/StartJob.jsx b/src/components/MyJobs/StartJob.jsx index 5aec5ef..58f22a9 100644 --- a/src/components/MyJobs/StartJob.jsx +++ b/src/components/MyJobs/StartJob.jsx @@ -1,17 +1,42 @@ import React, { useState } from "react"; -import { Link } from "react-router-dom"; +import { Link, useNavigate } from "react-router-dom"; import Layout from "../Partials/Layout"; import MyJobTable from "./MyJobTable"; import CommonHead from "../UserHeader/CommonHead"; import SelectBox from "../Helpers/SelectBox"; import dataImage2 from "../../assets/images/data-table-user-2.png"; +import LoadingSpinner from "../Spinners/LoadingSpinner"; + +import usersService from "../../services/UsersService"; + export default function StartJob(props) { + const apiCall = new usersService() // instantiating API CALL + const navigate = useNavigate() + + let [request, setRequest] = useState({loading: false, status: false, message: ''}) const [selectTab, setValue] = useState("today"); const filterHandler = (value) => { setValue(value); }; - console.log("AMEYE LOC1", props.MyJobList); + + const handleOnclick = () => { + setRequest({loading: true, status: false, message: ''}) + apiCall.jobManagerAgree().then((res)=>{ + if(res.status != 200 || res.data.internal_return < 1){ + setRequest({loading: false, status: false, message: 'Could not complete request, Try Again'}) + return + } + setRequest({loading: false, status: true, message: 'Request completed successfully'}) + setTimeout(()=>{ + navigate('/', {replace: true}) + window.location.reload() + }, 2000) + }).catch(error => { + setRequest({loading: false, status: false, message: 'Opps! An Error Occured. Try Again'}) + console.log(error) + }) + } return ( {/**/} @@ -78,8 +103,27 @@ export default function StartJob(props) {

Why does WrencBoard have this policy?

Buyers and sellers enter a contract when they complete transactions, so it's necessary to have precise details on what the transaction entails to guarantee satisfaction. This policy also helps sellers meet our performance standards.

+ + {/* error or success display */} + {request.message && !request.status ? +
+ {request.message} +
+ : + request.message && request.status && + (
+ {request.message} +
+ ) + } + {/* End of error or success display */} +
- + {request.loading ? + + : + + }
diff --git a/src/services/UsersService.js b/src/services/UsersService.js index 6b86125..60bd7fb 100644 --- a/src/services/UsersService.js +++ b/src/services/UsersService.js @@ -415,6 +415,17 @@ class usersService { return this.postAuxEnd("/accounttypes", postData); } + // END POINT TO ACCEPT TERMS AND AGREEMENT + jobManagerAgree() { + var postData = { + uid: localStorage.getItem("uid"), + member_id: localStorage.getItem("member_id"), + sessionid: localStorage.getItem("session_token"), + action: 13002 + }; + return this.postAuxEnd("/jobmanageragree", postData); + } + verifyEmail(code) { const reqData = { verify_link: code,