Compare commits

...

8 Commits

Author SHA1 Message Date
victorAnumudu d4c6c41cbf fullname text removed 2023-05-22 09:41:54 +01:00
CHIEFSOFT\ameye e112c7776b Common head data 2023-05-21 21:26:49 -04:00
ameye 7f69233054 Merge branch 'manage-family-page' of WrenchBoard/Users-Wrench into master 2023-05-21 22:56:23 +00:00
Ebube 74c6f6526a fixed login error 2023-05-21 23:46:47 +01:00
ameye f3c07ff3b0 Merge branch 'manage-family-page' of WrenchBoard/Users-Wrench into master 2023-05-21 22:13:06 +00:00
Ebube d3c9231227 layout 2023-05-21 23:05:28 +01:00
Ebube 13bf86f370 added account details 01 2023-05-21 22:59:14 +01:00
ameye c62c7ffbba Merge branch 'family-login-api' of WrenchBoard/Users-Wrench into master 2023-05-21 21:21:26 +00:00
20 changed files with 960 additions and 782 deletions
+2
View File
@@ -38,6 +38,7 @@ import AddJobPage from "./views/AddJobPage";
import MyPendingJobsPage from "./views/MyPendingJobsPage";
import ManageActiveJobs from "./views/ManageActiveJobs";
import FamilyManagePage from "./views/FamilyManagePage";
import MyCouponPage from "./views/MyCouponPage";
export default function Routers() {
return (
@@ -74,6 +75,7 @@ export default function Routers() {
<Route exact path="/calendar" element={<CalendarPage />} />
<Route exact path="/resources" element={<ResourcePage />} />
<Route exact path="/my-wallet/*" element={<MyWalletPage />} />
<Route exact path="/my-coupon" element={<MyCouponPage />} />
<Route exact path="/notification" element={<Notification />} />
<Route exact path="/market-place" element={<MarketPlacePage />} />
<Route exact path="/market" element={<MarketPlacePage />} />
+201 -184
View File
@@ -16,7 +16,7 @@ import { updateUserDetails } from "../../../store/UserDetails";
export default function Login() {
const dispatch = useDispatch();
let [loginCom, setLoginCom] = useState({user: true, family: false})
let [loginCom, setLoginCom] = useState({ user: true, family: false });
const [checked, setValue] = useState(false);
const [loginLoading, setLoginLoading] = useState(false);
@@ -31,13 +31,13 @@ export default function Login() {
};
//FUNCTION TO DETERMINE/CHANGE LOGIN COMPONENT
const handleLoginCom = ({target:{name}}) => {
if(name == 'user'){
setLoginCom({[name]: true, family: false})
}else{
setLoginCom({[name]: false, family: true})
const handleLoginCom = ({ target: { name } }) => {
if (name == "user") {
setLoginCom({ [name]: true, family: false });
} else {
setLoginCom({ [name]: false, family: true });
}
}
};
// email
const [email, setMail] = useState("");
@@ -53,57 +53,63 @@ export default function Login() {
const userApi = new usersService();
// FUNCTION TO HANDLE USER LOGIN
const doLogin = ({target:{name}}) => {
const doLogin = ({ target: { name } }) => {
setLoginLoading(true);
let postData = {}; // Post Data for API
if(!email || !password){
if (!email || !password) {
setLoginLoading(false);
setMsgError("Please fill in the fields");
return
return;
}
if(name == 'userlogin'){ // Post Data Info for normal Login
if (name == "userlogin") {
// Post Data Info for normal Login
postData = {
username: email,
password: password,
sessionid: "STARTING",
};
}else{
postData = { // Post Data Info for family Login
} else {
postData = {
// Post Data Info for family Login
username: email,
pin: password,
sessionid: "20067A92714",
login_mode: 1105,
action: 11025
action: 11025,
};
}
userApi.logInUser(postData).then((res)=>{
if(res.status != 200 || res.data.internal_return < 0){
// setMsgError("Wrong, email/password");
setLoginError(true);
userApi
.logInUser(postData)
.then((res) => {
if (res.status != 200 || res.data.internal_return < 0) {
// setMsgError("Wrong, email/password");
setLoginError(true);
setLoginLoading(false);
return;
}
localStorage.setItem("member_id", `${res.data.member_id}`);
localStorage.setItem("uid", `${res.data.uid}`);
localStorage.setItem("session_token", `${res.data.session}`);
// localStorage.setItem("session", `${res.data.session}`);
dispatch(updateUserDetails(res.data));
setTimeout(() => {
navigate("/", { replace: true });
setLoginLoading(false);
}, 2000);
})
.catch((error) => {
setMsgError("Unable to login, try again");
setLoginLoading(false);
return
}
localStorage.setItem("member_id", `${res.data.member_id}`);
localStorage.setItem("uid", `${res.data.uid}`);
localStorage.setItem("session_token", `${res.data.session}`);
// localStorage.setItem("session", `${res.data.session}`);
dispatch(updateUserDetails(res.data));
setTimeout(() => {
navigate("/", { replace: true });
setLoginLoading(false);
}, 2000);
}).catch(error => {
setMsgError("Unable to login, try again");
setLoginLoading(false);
}).finally(()=>{
setTimeout(() => {
setLoginError(false);
setMsgError(null);
setLoginLoading(false);
}, Number(process.env.REACT_APP_LOGIN_ERROR_TIMEOUT));
})
})
.finally(() => {
setTimeout(() => {
setLoginError(false);
setMsgError(null);
setLoginLoading(false);
}, Number(process.env.REACT_APP_LOGIN_ERROR_TIMEOUT));
});
};
return (
@@ -138,166 +144,178 @@ export default function Login() {
{/* switch login component */}
<div className="flex justify-start items-end">
<button
name='user'
className={`px-2 py-1 w-[100px] text-left h-[40px] text-lg font-bold text-[#4687ba] hover:text-[#009ef7] tracking-wide transition outline-none border-2 border-b-0 border-r-0 border-[#4687ba] ${loginCom.user && 'border-r-2 h-[45px]'}`}
<button
name="user"
className={`px-2 py-1 w-[100px] text-left h-[40px] text-lg font-bold text-[#4687ba] hover:text-[#009ef7] tracking-wide transition outline-none border-2 border-b-0 border-r-0 border-[#4687ba] ${
loginCom.user && "border-r-2 h-[45px]"
}`}
onClick={handleLoginCom}
>Sign in
>
Sign in
</button>
<button
name='family'
className={`px-2 py-1 w-[100px] text-left h-[40px] text-lg font-bold text-[#4687ba] hover:text-[#009ef7] tracking-wide transition outline-none border-2 border-b-0 border-l-0 border-[#4687ba] ${loginCom.family && 'border-l-2 h-[45px]'}`}
<button
name="family"
className={`px-2 py-1 w-[100px] text-left h-[40px] text-lg font-bold text-[#4687ba] hover:text-[#009ef7] tracking-wide transition outline-none border-2 border-b-0 border-l-0 border-[#4687ba] ${
loginCom.family && "border-l-2 h-[45px]"
}`}
onClick={handleLoginCom}
>Family
>
Family
</button>
</div>
{/* END of switch login component */}
{/* for login component */}
{loginCom.user ?
//user login compoenent
<div className="p-2 input-area border-2 border-[#4687ba]">
<div className="input-item mb-5">
<InputCom
labelClass='tracking-wider'
fieldClass="px-6"
value={email}
inputHandler={handleEmail}
placeholder="support@mermsemr.com"
label="Email"
name="email"
type="email"
iconName="message"
/>
</div>
{
loginCom.user ? (
//user login compoenent
<div className="p-2 input-area border-2 border-[#4687ba]">
<div className="input-item mb-5">
<InputCom
labelClass="tracking-wider"
fieldClass="px-6"
value={email}
inputHandler={handleEmail}
placeholder="support@mermsemr.com"
label="Email"
name="email"
type="email"
iconName="message"
/>
</div>
<div className="input-item mb-5">
<InputCom
labelClass='tracking-wider'
fieldClass="px-6"
value={password}
inputHandler={handlePassword}
placeholder="● ● ● ● ● ●"
label="Password"
name="password"
type="password"
iconName="password"
forgotPassword
/>
</div>
{loginError && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-thin leading-[19.5px] text-[13px]">
Invalid username or password- Please{" "}
<Link to="/#" className="text-[#009ef7]">
reset your password
</Link>{" "}
or{" "}
<Link to="/signup" className="text-[#009ef7]">
create a new account
</Link>
<div className="input-item mb-5">
<InputCom
labelClass="tracking-wider"
fieldClass="px-6"
value={password}
inputHandler={handlePassword}
placeholder="● ● ● ● ● ●"
label="Password"
name="password"
type="password"
iconName="password"
forgotPassword
/>
</div>
)}
{msgError && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-light leading-[19.5px] text-[13px]">
{msgError}
{loginError && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-thin leading-[19.5px] text-[13px]">
Invalid username or password- Please{" "}
<Link to="/#" className="text-[#009ef7]">
reset your password
</Link>{" "}
or{" "}
<Link to="/signup" className="text-[#009ef7]">
create a new account
</Link>
</div>
)}
{msgError && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-light leading-[19.5px] text-[13px]">
{msgError}
</div>
)}
<div className="signin-area mb-3.5">
<div className="flex justify-center">
<button
name="userlogin"
onClick={doLogin}
type="button"
disabled={loginLoading}
className={`btn-login rounded-[0.475rem] mb-6 text-xl text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center text-[15px]`}
>
{loginLoading ? (
<div className="signup btn-loader"></div>
) : (
<span>Continue</span>
)}
</button>
</div>
<BrandBtn link="#" imgSrc={googleLogo} brand="Google" />
<BrandBtn
link="#"
imgSrc={facebookLogo}
brand="Facebook"
/>
<BrandBtn link="#" imgSrc={appleLogo} brand="Apple" />
</div>
)}
<div className="signin-area mb-3.5">
<div className="flex justify-center">
<button
name='userlogin'
onClick={doLogin}
type="button"
disabled={loginLoading}
className={`btn-login rounded-[0.475rem] mb-6 text-xl text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center text-[15px]`}
>
{loginLoading ? (
<div className="signup btn-loader"></div>
) : (
<span>Continue</span>
)}
</button>
</div>
) : (
// END of user login compoenent
// family login compoenent
<div className="p-2 input-area border-2 border-[#4687ba]">
<div className="input-item mb-5">
<InputCom
labelClass="tracking-wider"
fieldClass="px-6"
value={email}
inputHandler={handleEmail}
placeholder="support@mermsemr.com"
label="Username"
name="email"
type="email"
iconName="message"
/>
</div>
<BrandBtn link="#" imgSrc={googleLogo} brand="Google" />
<BrandBtn link="#" imgSrc={facebookLogo} brand="Facebook" />
<BrandBtn link="#" imgSrc={appleLogo} brand="Apple" />
</div>
</div>
// END of user login compoenent
:
// family login compoenent
<div className="p-2 input-area border-2 border-[#4687ba]">
<div className="input-item mb-5">
<InputCom
labelClass='tracking-wider'
fieldClass="px-6"
value={email}
inputHandler={handleEmail}
placeholder="support@mermsemr.com"
label="Username"
name="email"
type="email"
iconName="message"
/>
</div>
<div className="input-item mb-5">
<InputCom
labelClass='tracking-wider'
fieldClass="px-6"
value={password}
inputHandler={handlePassword}
placeholder="● ● ● ● ● ●"
label="Pin"
name="password"
type="password"
iconName="password"
// forgotPassword
/>
</div>
{loginError && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-thin leading-[19.5px] text-[13px]">
Invalid username or password{" "}
{/* <Link to="/#" className="text-[#009ef7]">
<div className="input-item mb-5">
<InputCom
labelClass="tracking-wider"
fieldClass="px-6"
value={password}
inputHandler={handlePassword}
placeholder="● ● ● ● ● ●"
label="Pin"
name="password"
type="password"
iconName="password"
// forgotPassword
/>
</div>
{loginError && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-thin leading-[19.5px] text-[13px]">
Invalid username or password{" "}
{/* <Link to="/#" className="text-[#009ef7]">
reset your password
</Link>{" "}
or{" "}
<Link to="/signup" className="text-[#009ef7]">
create a new account
</Link> */}
</div>
)}
{msgError && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-light leading-[19.5px] text-[13px]">
{msgError}
</div>
)}
<div className="signin-area mb-1.5">
<div className="flex justify-center">
<button
name='familylogin'
onClick={doLogin}
disabled={loginLoading}
type="button"
className={`btn-login rounded-[0.475rem] text-xl text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center text-[15px]`}
>
{loginLoading ? (
<div className="signup btn-loader"></div>
) : (
<span>Continue</span>
)}
</button>
</div>
)}
{msgError && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-md font-light leading-[19.5px] text-[13px]">
{msgError}
</div>
)}
<div className="signin-area mb-1.5">
<div className="flex justify-center">
<button
name="familylogin"
onClick={doLogin}
disabled={loginLoading}
type="button"
className={`btn-login rounded-[0.475rem] text-xl text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center text-[15px]`}
>
{loginLoading ? (
<div className="signup btn-loader"></div>
) : (
<span>Continue</span>
)}
</button>
</div>
</div>
</div>
</div>
)
// END of family login compoenent
}
{/* END of login component */}
<div className="pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]">
This site is protected by hCaptcha and the our Privacy Policy
and Terms of Service apply.
This site is protected by hCaptcha and the our Privacy Policy
and Terms of Service apply.
</div>
</div>
</div>
@@ -308,10 +326,9 @@ export default function Login() {
}
const BrandBtn = ({ link, imgSrc, brand }) => {
const doGoogle = async ()=>{
alert('start google');
}
const doGoogle = async () => {
alert("start google");
};
// onSuccess: (codeResponse) => setUser(codeResponse),
@@ -320,19 +337,19 @@ const BrandBtn = ({ link, imgSrc, brand }) => {
// onError: (error) => console.log('Login Failed:', error)
// });
const doApple = async ()=>{
alert('start apple');
}
const doApple = async () => {
alert("start apple");
};
const doFacebook = async ()=>{
alert('start facebook');
}
const doFacebook = async () => {
alert("start facebook");
};
return (
<div className="flex justify-center bottomMargin">
<a
// onClick={doGoogle}
href="#dd"
// onClick={doGoogle}
href="#dd"
className="w-full border border-light-purple dark:border-[#5356fb29] rounded-[0.475rem] h-[48px] flex justify-center bg-[#FAFAFA] hover:bg-[#eff2f5] hover:text-[#7e8299] transition duration-300 dark:bg-[#11131F] items-center font-medium cursor-pointer"
>
<img className="mr-3 h-6" src={imgSrc} alt="logo-icon(s)" />
+1 -1
View File
@@ -69,7 +69,7 @@ export default function FamilyManage() {
memberList();
}, [listReload, memberList]);
// console.log('Ebueb', familyList)
console.log('Ebueb', familyList)
return (
<Layout>
+85 -2
View File
@@ -1,13 +1,23 @@
import React, { useRef, useState } from "react";
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import LoadingSpinner from "../Spinners/LoadingSpinner";
import cover from "../../assets/images/profile-info-cover.png";
import profile from "../../assets/images/profile-info-profile.png";
import usersService from "../../services/UsersService";
export default function FamilyManageTabs({
className,
accountDetails,
loader,
}) {
const [familyDetails, setFamilyDetails] = useState(null);
const [errMsg, setErrMsg] = useState("");
// List of tabs
const tabs = [
{
id: 1,
@@ -23,9 +33,11 @@ export default function FamilyManageTabs({
},
];
const [tab, setTab] = useState(tabs[0].name);
const [manageLoader, setManageLoader] = useState(false);
const tabHandler = (value) => {
setTab(value);
};
// For profile uploads
const [profileImg, setProfileImg] = useState(profile);
// profile img
const profileImgInput = useRef(null);
@@ -41,6 +53,30 @@ export default function FamilyManageTabs({
imgReader.readAsDataURL(e.target.files[0]);
}
};
// Api call
const apiCall = useMemo(() => new usersService(), []);
// function for manage family
const familyManageHandler = useCallback(async () => {
setManageLoader(true);
try {
let { family_uid } = accountDetails;
let reqData = { family_uid };
let res = await apiCall.ManageFamily(reqData);
let { data } = await res;
if (data?.internal_return < 0) return;
setFamilyDetails(data);
setManageLoader(false);
} catch (error) {
setErrMsg("An error occurred");
throw new Error(error);
}
}, [apiCall, accountDetails]);
useEffect(() => {
familyManageHandler();
}, []);
console.log(familyDetails);
return (
<div
className={`update-table w-full bg-white dark:bg-dark-white overflow-y-auto rounded-2xl section-shadow min-h-[520px] max-h-[600px] ${
@@ -80,7 +116,31 @@ export default function FamilyManageTabs({
</li>
))}
</ul>
<div className="flex-[0.9]">{/* Your content here */}</div>
<div className="flex-[0.9] lg:min-h-[450px] h-full">
{/* Your content here */}
{tabs.map(({ name, id }) => {
return (
<div
className={`${
tab === name ? "block" : "hidden"
} h-full p-4 border border-[#dbd9d9]`}
key={id}
>
{manageLoader ? (
<LoadingSpinner size="8" color="sky-blue" />
) : (
<>
{name === "Tasks" && <Tasks />}
{name === "Account" && (
<Account familyDetails={familyDetails} />
)}
{name === "Profile" && <Profile />}
</>
)}
</div>
);
})}
</div>
</div>
</div>
</div>
@@ -150,3 +210,26 @@ function ProfileInfo({
</div>
);
}
function Tasks() {
return <>Tasks</>;
}
function Account({ familyDetails }) {
return (
<div className="w-full lg:min-h-[400px] h-full flex items-center justify-center">
<div className="flex flex-col">
<h2 className="font-bold text-lg tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
Username: <span className="ml-2 normal-case">{familyDetails?.username}</span>
</h2>
<h2 className="font-bold text-lg tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
Pin: <span className="ml-2 normal-case">{familyDetails?.pin}</span>
</h2>
</div>
</div>
);
}
function Profile() {
return <>Profile</>;
}
+2 -2
View File
@@ -41,14 +41,14 @@ export default function FamilyTable({ className, familyList, loader }) {
added,
last_login,
task_count,
uid,
family_uid,
} = props;
let addedDate = added?.split(" ")[0];
let LoginDate = last_login?.split(" ")[0];
return (
<tr
className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50"
key={uid}
key={family_uid}
>
<td className=" py-4">
<div className="flex space-x-2 items-center w-full">
+2 -2
View File
@@ -6,7 +6,7 @@ import MainSection from "./MainSection";
import CommonHead from "../UserHeader/CommonHead";
import { useSelector } from "react-redux";
export default function MarketPlace() {
export default function MarketPlace({commonHeadData}) {
let { jobLists } = useSelector((state) => state.jobLists);
const marketData = jobLists?.result_list;
@@ -14,7 +14,7 @@ export default function MarketPlace() {
return (
<>
<Layout>
<CommonHead />
<CommonHead commonHeadData={commonHeadData} />
<MainSection marketPlaceProduct={marketData} className="mb-10" />
</Layout>
</>
+3 -1
View File
@@ -12,7 +12,9 @@ export default function MyActiveJobs(props) {
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<CommonHead
commonHeadData={props.commonHeadData}
/>
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
+7 -2
View File
@@ -12,7 +12,9 @@ export default function MyJobs(props) {
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<CommonHead
commonHeadData={props.commonHeadData}
/>
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
@@ -40,7 +42,10 @@ export default function MyJobs(props) {
></div>
</div>
</div>
<MyJobTable MyJobList={props.MyJobList} reloadJobList={props.reloadJobList} />
<MyJobTable
MyJobList={props.MyJobList}
reloadJobList={props.reloadJobList}
/>
</div>
</div>
</Layout>
+3 -1
View File
@@ -12,7 +12,9 @@ export default function MyPendingJobs(props) {
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<CommonHead
commonHeadData={props.commonHeadData}
/>
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
+2 -2
View File
@@ -4,14 +4,14 @@ import Layout from "../Partials/Layout";
import MyJobTable from "./MyJobTable";
import CommonHead from "../UserHeader/CommonHead";
export default function MyTasks() {
export default function MyTasks({commonHeadData}) {
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
return (
<Layout>
<CommonHead />
<CommonHead commonHeadData={commonHeadData} />
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
+2 -2
View File
@@ -505,9 +505,9 @@ export default function Header({ logoutModalHandler, sidebarHandler }) {
</div>
<div className="heading border-b dark:border-[#5356fb29] border-light-purple px-7 py-2">
<h3 className="text-xl font-bold text-dark-gray dark:text-white">
Fullname
{`${firstname} ${lastname}`}
</h3>
<p className="text-base text-gray-400 dark:text-white hover:text-sky-blue cursor-pointer">{`${firstname} ${lastname}`}</p>
{/* <p className="text-base text-gray-400 dark:text-white hover:text-sky-blue cursor-pointer">{`${firstname} ${lastname}`}</p> */}
</div>
<div className="content">
<ul className="px-7">
+3 -1
View File
@@ -1,7 +1,9 @@
import React from "react";
import { Link } from "react-router-dom";
export default function CommonHead({ className }) {
export default function CommonHead({ className,commonHeadData }) {
const vvv= commonHeadData();
console.log("UUUUUUUU-",vvv);
return (
<div
className={`create-nft w-full lg:h-[140px] shadow lg:flex rounded-lg justify-between items-center md:p-9 p-4 bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] -2 border-pink mb-10 ${
File diff suppressed because it is too large Load Diff
+8 -1
View File
@@ -1,9 +1,16 @@
import MarketPlace from "../components/MarketPlace";
export default function MarketPlacePage() {
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
return (
<>
<MarketPlace />
<MarketPlace
commonHeadData={commonHeadData} />
</>
);
}
+8 -2
View File
@@ -4,7 +4,10 @@ import usersService from "../services/UsersService";
import MyActiveJobs from "../components/MyActiveJobs";
export default function MyActiveJobsPage() {
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
const [MyJobList, setMyJobList] = useState([]);
const api = new usersService();
//TARGET ENDPOINT[POST]http://10.204.5.100:9083/en/wrench/api/v1/jobmanageractive
@@ -23,7 +26,10 @@ export default function MyActiveJobsPage() {
// debugger;
return (
<>
<MyActiveJobs MyJobList={MyJobList} />
<MyActiveJobs
MyJobList={MyJobList}
commonHeadData={commonHeadData}
/>
</>
);
}
+10
View File
@@ -0,0 +1,10 @@
import React from "react";
import WalletRoutes from "../components/MyWallet/Wallet";
export default function MyCouponPage() {
return (
<>
<WalletRoutes />
</>
);
}
+8 -1
View File
@@ -8,6 +8,11 @@ import { useSelector } from "react-redux";
export default function MyJobsPage() {
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
const {jobListTable} = useSelector((state) => state.tableReload)
// const userApi = new usersService();
@@ -33,7 +38,9 @@ export default function MyJobsPage() {
// debugger;
return (
<>
<MyJobs MyJobList={MyJobList} />
<MyJobs
MyJobList={MyJobList}
commonHeadData={commonHeadData} />
</>
);
}
+8 -2
View File
@@ -5,7 +5,10 @@ import MyActiveJobs from "../components/MyActiveJobs";
import MyPendingJobs from "../components/MyPendingJobs";
export default function MyPendingJobsPage() {
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
const [MyJobList, setMyJobList] = useState([]);
const api = new usersService();
@@ -24,7 +27,10 @@ export default function MyPendingJobsPage() {
// debugger;
return (
<>
<MyPendingJobs MyJobList={MyJobList} />
<MyPendingJobs
MyJobList={MyJobList}
commonHeadData={commonHeadData}
/>
</>
);
}
+6 -2
View File
@@ -7,7 +7,10 @@ export default function MyTaskPage() {
const [MyActiveJobList, setMyActiveJobList] = useState([]);
const api = new usersService();
const commonHeadData =()=>{
console.log("COMMON HEAD DATA ----------------=====---------------------");
return 0;
}
const getMyActiveJobList = async () => {
try {
const res = await api.getMyActiveTaskList();
@@ -23,7 +26,8 @@ export default function MyTaskPage() {
//debugger;
return (
<>
<MyTasks ActiveJobList={MyActiveJobList}/>
<MyTasks ActiveJobList={MyActiveJobList}
commonHeadData={commonHeadData}/>
</>
);
}