Compare commits

...

16 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
victorAnumudu 2d565c5572 family login implemented 2023-05-21 22:00:24 +01:00
ameye e026122dea Merge branch 'manage-family-page' of WrenchBoard/Users-Wrench into master 2023-05-21 19:16:47 +00:00
Ebube 87d1bbafef first part 2023-05-21 18:49:34 +01:00
Ebube 5345ec08e2 Merge branch 'master' of https://gitlab.chiefsoft.net/WrenchBoard/Users-Wrench into manage-family-page 2023-05-21 18:22:43 +01:00
Ebube 3b877aafd0 nothing serious 2023-05-21 18:22:16 +01:00
ameye 99464e5e57 Merge branch 'family-login-component' of WrenchBoard/Users-Wrench into master 2023-05-21 11:31:45 +00:00
victorAnumudu e651c0ae5f family login component added 2023-05-21 09:40:32 +01:00
Ebube fe270b7431 first stage of layout 2023-05-20 22:24:38 +01:00
21 changed files with 1329 additions and 1087 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 />} />
+253 -127
View File
@@ -16,6 +16,8 @@ import { updateUserDetails } from "../../../store/UserDetails";
export default function Login() {
const dispatch = useDispatch();
let [loginCom, setLoginCom] = useState({ user: true, family: false });
const [checked, setValue] = useState(false);
const [loginLoading, setLoginLoading] = useState(false);
@@ -28,6 +30,15 @@ export default function Login() {
setValue(!checked);
};
//FUNCTION TO DETERMINE/CHANGE LOGIN COMPONENT
const handleLoginCom = ({ target: { name } }) => {
if (name == "user") {
setLoginCom({ [name]: true, family: false });
} else {
setLoginCom({ [name]: false, family: true });
}
};
// email
const [email, setMail] = useState("");
const handleEmail = (e) => {
@@ -41,49 +52,64 @@ export default function Login() {
const navigate = useNavigate();
const userApi = new usersService();
const doLogin = async () => {
try {
if (email !== "" && password !== "") {
var postData = {
username: email,
password: password,
sessionid: "STARTING",
};
const loginResult = await userApi.logInUser(postData); // just for a test
//debugger;
// if (email === "support@mermsemr.com") {
if (
loginResult.data.status > 0 &&
loginResult.data.internal_return == 100 &&
loginResult.data.session != ""
) {
// just for a start
localStorage.setItem("member_id", `${loginResult.data.member_id}`);
localStorage.setItem("uid", `${loginResult.data.uid}`);
localStorage.setItem("session_token", `${loginResult.data.session}`);
localStorage.setItem("session", `${loginResult.data.session}`);
setLoginLoading(true);
// userApi.getUserReminders(); //testing
dispatch(updateUserDetails(loginResult.data));
setTimeout(() => {
navigate("/", { replace: true });
setLoginLoading(false);
}, 2000);
} else {
// toast.error("Invalid Credential");
setLoginError(true);
}
} else {
setMsgError("Please fill in the fields");
}
} catch (error) {
setMsgError("An error occurred");
} finally {
setTimeout(() => {
setLoginError(false);
setMsgError(null);
}, Number(process.env.REACT_APP_LOGIN_ERROR_TIMEOUT));
// FUNCTION TO HANDLE USER LOGIN
const doLogin = ({ target: { name } }) => {
setLoginLoading(true);
let postData = {}; // Post Data for API
if (!email || !password) {
setLoginLoading(false);
setMsgError("Please fill in the fields");
return;
}
if (name == "userlogin") {
// Post Data Info for normal Login
postData = {
username: email,
password: password,
sessionid: "STARTING",
};
} else {
postData = {
// Post Data Info for family Login
username: email,
pin: password,
sessionid: "20067A92714",
login_mode: 1105,
action: 11025,
};
}
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);
})
.finally(() => {
setTimeout(() => {
setLoginError(false);
setMsgError(null);
setLoginLoading(false);
}, Number(process.env.REACT_APP_LOGIN_ERROR_TIMEOUT));
});
};
return (
@@ -102,9 +128,9 @@ export default function Login() {
<div className="content-wrapper login shadow-md w-full lg:max-w-[500px] mx-auto flex justify-center items-center xl:bg-white dark:bg-dark-white 2xl:w-[828px] rounded-[0.475rem] sm:p-7 p-5">
<div className="w-full">
<div className="title-area flex flex-col justify-center items-center relative text-center mb-7">
<h1 className="text-[#181c32] font-semibold dark:text-white mb-3 leading-[27.3px] text-[22.75px]">
{/* <h1 className="text-[#181c32] font-semibold dark:text-white mb-3 leading-[27.3px] text-[22.75px]">
Sign In to WrenchBoard
</h1>
</h1> */}
<span className="text-gray-400 font-medium text-[16.25px] leading-[24.375px]">
New Here?{" "}
<Link
@@ -115,80 +141,181 @@ export default function Login() {
</Link>
</span>
</div>
<div className="input-area">
<div className="input-item mb-5">
<InputCom
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
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>
{/* 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]"
}`}
onClick={handleLoginCom}
>
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]"
}`}
onClick={handleLoginCom}
>
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>
<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>
)}
{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>
)}
{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}
) : (
// 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]">
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>
</div>
</div>
)}
<div className="signin-area mb-3.5">
<div className="flex justify-center">
<button
onClick={doLogin}
type="button"
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="signup-area flex justify-center">
<p className="sm:text-lg text-sm text-thin-light-gray font-normal">
Don't have an account ?
<a href="/signup" className="ml-2 text-dark-gray dark:text-white">
Sign up free
</a>
</p>
</div> */}
<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.
</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.
</div>
</div>
</div>
@@ -199,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),
@@ -211,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)" />
+76 -259
View File
@@ -5,281 +5,98 @@ import FamilyTable from "./FamilyTable";
import SiteService from "../../services/SiteService";
import ModalCom from "../Helpers/ModalCom";
import FamilyManageTabs from "./FamilyManageTabs";
import { useLocation } from "react-router-dom";
export default function FamilyManage() {
const [selectTab, setValue] = useState("today");
const [selectedAge, setSelectedAge] = useState(undefined);
const [familyList, setFamilyList] = useState([]);
const [loader, setLoader] = useState(false);
const [popUp, setPopUp] = useState(false);
const [listReload, setListReload] = useState(false);
const [msgErr, setMsgErr] = useState("");
const [formData, setFormData] = useState({
first_name: "",
last_name: "",
});
const [selectTab, setValue] = useState("today");
const [selectedAge, setSelectedAge] = useState(undefined);
const [familyList, setFamilyList] = useState([]);
const [loader, setLoader] = useState(false);
const [popUp, setPopUp] = useState(false);
const [listReload, setListReload] = useState(false);
const [msgErr, setMsgErr] = useState("");
const [formData, setFormData] = useState({
first_name: "",
last_name: "",
});
const apiCall = useMemo(() => new SiteService(), []);
let location = useLocation();
let accountDetails = location?.state
// This is to make sure it's called once and used everywhere
let memberId = localStorage.getItem("member_id");
let uid = localStorage.getItem("uid");
let sessionId = localStorage.getItem("session_token");
const apiCall = useMemo(() => new SiteService(), []);
const popUpHandler = () => {
setPopUp((prev) => !prev);
};
// This is to make sure it's called once and used everywhere
let memberId = localStorage.getItem("member_id");
let uid = localStorage.getItem("uid");
let sessionId = localStorage.getItem("session_token");
// tab handler
const filterHandler = (value) => {
setValue(value);
};
const popUpHandler = () => {
setPopUp((prev) => !prev);
};
// For the age drop down
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 },
(_, index) => startAge + index
);
// age handler
const handleAgeSelect = (event) => {
setSelectedAge(parseInt(event.target.value));
};
// Input handler
const handleInputChange = (event) => {
const { name, value } = event?.target;
setFormData({ ...formData, [name]: value });
};
// tab handler
const filterHandler = (value) => {
setValue(value);
};
// Add member
const addMember = async () => {
const { first_name, last_name } = formData;
setLoader(true);
try {
if (first_name !== "" && last_name !== "") {
let reqData = {
member_id: memberId,
uid: uid,
session_id: sessionId,
firstname: first_name,
lastname: last_name,
age: selectedAge,
};
// member listing
const memberList = useCallback(async () => {
setLoader(true);
try {
let reqData = {
member_id: memberId,
uid: uid,
session_id: sessionId,
limit: 20,
offset: 0,
action: 22010,
};
let res = await apiCall.addFamily(reqData);
const { data } = res;
let res = await apiCall.familyListings(reqData);
const { data } = res;
if (data?.internal_return >= 0 && data?.status == "OK") {
let { result_list } = data;
setFamilyList(result_list);
setLoader(false);
} else return;
} catch (error) {
setLoader(false);
throw new Error(error);
}
}, [apiCall, memberId, sessionId, uid]);
if (data?.internal_return > 0 && data?.status == "OK") {
setLoader(false);
setListReload((prev) => !prev);
} else {
setLoader(false);
setMsgErr("Sorry, something went wrong");
}
} else {
setLoader(false);
setMsgErr("Please fill in the fields");
}
} catch (error) {
setLoader(false);
setMsgErr("An error occurred");
throw new Error(error);
} finally {
setTimeout(() => {
setMsgErr(null);
}, Number(process.env.REACT_APP_LOGIN_ERROR_TIMEOUT));
setFormData({
first_name: "",
last_name: "",
});
}
};
useEffect(() => {
memberList();
}, [listReload, memberList]);
// member listing
const memberList = useCallback(async () => {
setLoader(true);
try {
let reqData = {
member_id: memberId,
uid: uid,
session_id: sessionId,
limit: 20,
offset: 0,
action: 22010,
};
console.log('Ebueb', familyList)
let res = await apiCall.familyListings(reqData);
const { data } = res;
if (data?.internal_return >= 0 && data?.status == "OK") {
let { result_list } = data;
setFamilyList(result_list);
setLoader(false);
} else return;
} catch (error) {
setLoader(false);
throw new Error(error);
}
}, [apiCall, memberId, sessionId, uid]);
useEffect(() => {
memberList();
}, [listReload, memberList]);
return (
<Layout>
{/*<CommonHead />*/}
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
<div className="sm:flex justify-between items-center mb-6">
<div className="mb-5 sm:mb-0">
<h1 className="text-26 font-bold inline-flex gap-3 text-dark-gray dark:text-white items-center">
return (
<Layout>
{/*<CommonHead />*/}
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
<div className="sm:flex justify-between items-center mb-6">
<div className="mb-5 sm:mb-0">
<h1 className="text-26 font-bold inline-flex gap-3 text-dark-gray dark:text-white items-center">
<span
className={`${selectTab === "today" ? "block" : "hidden"}`}
className={`${selectTab === "today" ? "block" : "hidden"}`}
>
Manage Family
</span>
</h1>
</div>
<div className="slider-btns flex space-x-4">
<div
onClick={() => filterHandler("today")}
className="relative"
></div>
</div>
</div>
<FamilyManageTabs familyList={familyList} loader={loader} />
</div>
</h1>
</div>
</Layout>
);
}
const FamilyForm = ({
value: { first_name, last_name },
ageValue,
inputHandler,
ageHandler,
ageRange,
msgErr,
loader,
onClick,
popUpHandler,
}) => {
return (
<div className="logout-modal-wrapper lg:w-[460px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
<div className="logout-modal-header w-full flex items-center justify-between lg:px-10 lg:py-8 px-[30px] py-[23px] border-b dark:border-[#5356fb29] border-light-purple dark:border-[#5356fb29] ">
<h1 className="text-26 font-bold text-dark-gray dark:text-white tracking-wide">
Add Members
</h1>
<button
type="button"
className="text-[#374557] dark:text-red-500"
onClick={popUpHandler}
>
<CloseIcon />
</button>
<div className="slider-btns flex space-x-4">
<div
onClick={() => filterHandler("today")}
className="relative"
></div>
</div>
<form className="logout-modal-body w-full flex flex-col items-center px-10 py-8 gap-4">
<InputCom
placeholder="Firstname"
label="First Name:"
name="first_name"
type="text"
parentClass="flex items-center gap-1 w-full"
labelClass="flex-[0.2] mb-0"
inputClass="flex-[0.8] input-curve lg border border-[#dce4e9]"
fieldClass="px-2"
value={first_name}
inputHandler={inputHandler}
/>
<InputCom
placeholder="Lastname"
label="Last Name:"
name="last_name"
type="text"
parentClass="flex items-center gap-1 w-full"
labelClass="flex-[0.2] mb-0"
inputClass="flex-[0.8] input-curve lg border border-[#dce4e9]"
fieldClass="px-2"
value={last_name}
inputHandler={inputHandler}
/>
<div className="input-com mb-7 flex gap-1 items-center w-full justify-between">
{/* Age dropdown */}
<div className="flex items-center justify-between flex-[0.3]">
<label
className="input-label text-[#181c32] dark:text-white text-[15px] font-semibold"
htmlFor="age-selection"
>
Select your age:
</label>
</div>
<div className=" flex-[0.7] max-w-[150px]">
<select
name="age-selection"
id="age-selection"
className="input-wrapper border border-[#f5f8fa] dark:border-[#5e6278] w-full rounded-[35px] 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 focus-visible:border-transparent focus-visible:outline-0 focus-visible:ring-transparent px-4"
onChange={ageHandler}
value={ageValue}
>
<option value={""}>Select age</option>
{ageRange?.length > 0 &&
ageRange?.map((age) => (
<option value={age} key={age}>
{age}
</option>
))}
</select>
</div>
</div>
{msgErr && (
<div className="relative p-4 text-[#912741] bg-[#fcd9e2] border-[#fbc6d3] mb-4 rounded-[0.475rem] text-xs font-light leading-[19.5px]">
{msgErr}
</div>
)}
<div className="signin-area w-full">
<div className="flex justify-center">
<button
type="button"
onClick={onClick}
// className={`rounded-[0.475rem] text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center h-[42px] py-[0.8875rem] px-[1.81rem] text-[14.95px] btn-login`}
className="text-white btn-gradient text-lg tracking-wide px-6 py-2 rounded-full"
>
{loader ? (
<div className="signup btn-loader"></div>
) : (
<span>Add</span>
)}
</button>
</div>
</div>
</form>
</div>
<FamilyManageTabs accountDetails={accountDetails} loader={loader} />
</div>
);
};
const CloseIcon = () => (
<svg
width="36"
height="36"
viewBox="0 0 36 36"
fill="none"
className="fill-current"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M36 16.16C36 17.4399 36 18.7199 36 20.0001C35.7911 20.0709 35.8636 20.2554 35.8385 20.4001C34.5321 27.9453 30.246 32.9248 22.9603 35.2822C21.9006 35.6251 20.7753 35.7657 19.6802 35.9997C18.4003 35.9997 17.1204 35.9997 15.8401 35.9997C15.5896 35.7086 15.2189 35.7732 14.9034 35.7093C7.77231 34.2621 3.08728 30.0725 0.769671 23.187C0.435002 22.1926 0.445997 21.1199 0 20.1599C0 18.7198 0 17.2798 0 15.8398C0.291376 15.6195 0.214408 15.2656 0.270759 14.9808C1.71321 7.69774 6.02611 2.99691 13.0428 0.700951C14.0118 0.383805 15.0509 0.386897 15.9999 0C17.2265 0 18.4532 0 19.6799 0C19.7156 0.124041 19.8125 0.136067 19.9225 0.146719C27.3 0.868973 33.5322 6.21922 35.3801 13.427C35.6121 14.3313 35.7945 15.2484 36 16.16ZM33.011 18.0787C33.0433 9.77105 26.3423 3.00309 18.077 2.9945C9.78479 2.98626 3.00344 9.658 2.98523 17.8426C2.96667 26.1633 9.58859 32.9601 17.7602 33.0079C26.197 33.0577 32.9787 26.4186 33.011 18.0787Z"
fill=""
fillOpacity="0.6"
/>
<path
d="M15.9309 18.023C13.9329 16.037 12.007 14.1207 10.0787 12.2072C9.60071 11.733 9.26398 11.2162 9.51996 10.506C9.945 9.32677 11.1954 9.0811 12.1437 10.0174C13.9067 11.7585 15.6766 13.494 17.385 15.2879C17.9108 15.8401 18.1633 15.7487 18.6375 15.258C20.3586 13.4761 22.1199 11.7327 23.8822 9.99096C24.8175 9.06632 26.1095 9.33639 26.4967 10.517C26.7286 11.2241 26.3919 11.7413 25.9133 12.2178C24.1757 13.9472 22.4477 15.6855 20.7104 17.4148C20.5228 17.6018 20.2964 17.7495 20.0466 17.9485C22.0831 19.974 24.0372 21.8992 25.9689 23.8468C26.9262 24.8119 26.6489 26.1101 25.4336 26.4987C24.712 26.7292 24.2131 26.3441 23.7455 25.8757C21.9945 24.1227 20.2232 22.3892 18.5045 20.6049C18.0698 20.1534 17.8716 20.2269 17.4802 20.6282C15.732 22.4215 13.9493 24.1807 12.1777 25.951C11.7022 26.4262 11.193 26.7471 10.4738 26.4537C9.31345 25.9798 9.06881 24.8398 9.98589 23.8952C11.285 22.5576 12.6138 21.2484 13.9387 19.9355C14.5792 19.3005 15.2399 18.6852 15.9309 18.023Z"
fill="#"
fillOpacity="0.6"
/>
</svg>
);
</div>
</Layout>
);
}
+230 -19
View File
@@ -1,24 +1,235 @@
import React, { 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, familyList, loader }) {
return (
<div
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-y-auto rounded-2xl section-shadow min-h-[520px] max-h-[600px] ${
className || ""
}`}
>
<div className="relative w-full overflow-x-auto sm:rounded-lg">
{loader ? (
<div className="h-full min-h-[500px] w-full overflow-hidden flex justify-center items-center">
<LoadingSpinner size="16" color="sky-blue" />
</div>
) : (
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 relative">
export default function FamilyManageTabs({
className,
accountDetails,
loader,
}) {
const [familyDetails, setFamilyDetails] = useState(null);
const [errMsg, setErrMsg] = useState("");
// List of tabs
const tabs = [
{
id: 1,
name: "Tasks",
},
{
id: 2,
name: "Account",
},
{
id: 3,
name: "Profile",
},
];
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);
const browseProfileImg = () => {
profileImgInput.current.click();
};
const profileImgChangHandler = (e) => {
if (e.target.value !== "") {
const imgReader = new FileReader();
imgReader.onload = (event) => {
setProfileImg(event.target.result);
};
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]);
</table>
)}
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] ${
className || ""
}`}
>
<div className="relative w-full overflow-x-auto sm:rounded-lg">
{loader ? (
<div className="h-full min-h-[500px] w-full overflow-hidden flex justify-center items-center">
<LoadingSpinner size="16" color="sky-blue" />
</div>
) : (
<div className="w-full h-full text-sm text-left text-gray-500 dark:text-gray-400 relative grid grid-cols-4 min-h-[520px]">
<div className="border-r border-[#E3E4FE] dark:border-[#a7a9b533] p-6 h-full">
<ProfileInfo
profileImg={profileImg}
profileImgInput={profileImgInput}
profileImgChangHandler={profileImgChangHandler}
browseProfileImg={browseProfileImg}
accountDetails={accountDetails}
/>
</div>
</div>
);
<div className="col-span-3 p-6 h-full w-full">
<div className="flex flex-col w-full">
<ul className="flex-[0.1] flex gap-2 items-center border-b border-b-[#FAFAF] w-full">
{tabs.map(({ name, id }) => (
<li
onClick={() => tabHandler(name)}
className={`p-4 flex hover:text-purple transition-all ease-in-out items-center cursor-pointer overflow-hidden text-xl ${
tab === name
? "text-purple border-r"
: " text-thin-light-gray"
}`}
key={id}
>
<h1>{name}</h1>
</li>
))}
</ul>
<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>
)}
</div>
</div>
);
}
function ProfileInfo({
profileImg,
profileImgInput,
profileImgChangHandler,
browseProfileImg,
accountDetails,
}) {
let { firstname, lastname, age } = accountDetails;
return (
<div className="flex flex-col items-center gap-6">
<div className="flex justify-center">
<div className="w-full relative">
<img
src={profileImg}
alt=""
className="sm:w-[198px] sm:h-[198px] w-[120px] h-[120px] rounded-full overflow-hidden object-cover"
/>
<input
ref={profileImgInput}
onChange={(e) => profileImgChangHandler(e)}
type="file"
className="hidden"
/>
<div
onClick={browseProfileImg}
className="w-[32px] h-[32px] absolute bottom-7 sm:right-2 right-[105px] hover:bg-pink bg-dark-gray rounded-full cursor-pointer"
>
<svg
width="32"
height="32"
viewBox="0 0 32 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M16.5147 11.5C17.7284 12.7137 18.9234 13.9087 20.1296 15.115C19.9798 15.2611 19.8187 15.4109 19.6651 15.5683C17.4699 17.7635 15.271 19.9587 13.0758 22.1539C12.9334 22.2962 12.7948 22.4386 12.6524 22.5735C12.6187 22.6034 12.5663 22.6296 12.5213 22.6296C11.3788 22.6334 10.2362 22.6297 9.09365 22.6334C9.01498 22.6334 9 22.6034 9 22.536C9 21.4009 9 20.2621 9.00375 19.1271C9.00375 19.0746 9.02997 19.0109 9.06368 18.9772C10.4123 17.6249 11.7609 16.2763 13.1095 14.9277C14.2295 13.8076 15.3459 12.6913 16.466 11.5712C16.4884 11.5487 16.4997 11.5187 16.5147 11.5Z"
fill="white"
/>
<path
d="M20.9499 14.2904C19.7436 13.0842 18.5449 11.8854 17.3499 10.6904C17.5634 10.4694 17.7844 10.2446 18.0054 10.0199C18.2639 9.76139 18.5261 9.50291 18.7884 9.24443C19.118 8.91852 19.5713 8.91852 19.8972 9.24443C20.7251 10.0611 21.5492 10.8815 22.3771 11.6981C22.6993 12.0165 22.7105 12.4698 22.3996 12.792C21.9238 13.2865 21.4443 13.7772 20.9686 14.2717C20.9648 14.2792 20.9536 14.2867 20.9499 14.2904Z"
fill="white"
/>
</svg>
</div>
</div>
</div>
<div className="flex flex-col justify-center gap-3 items-center">
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
{firstname}
</h1>
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
{lastname}
</h1>
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
{age}
</h1>
</div>
</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</>;
}
+68 -60
View File
@@ -1,12 +1,13 @@
import React, { useState } from "react";
import dataImage1 from "../../assets/images/data-table-user-1.png";
import LoadingSpinner from "../Spinners/LoadingSpinner";
import { useNavigate, useLocation } from "react-router-dom";
import { useNavigate, useLocation, Link } from "react-router-dom";
export default function FamilyTable({ className, familyList, loader }) {
const filterCategories = ["All Categories", "Explore", "Featured"];
const [selectedCategory, setCategory] = useState(filterCategories[0]);
const navigate = useNavigate();
// let location = useLocation();
return (
<div
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-y-auto rounded-2xl section-shadow min-h-[520px] max-h-[600px] ${
@@ -32,68 +33,75 @@ export default function FamilyTable({ className, familyList, loader }) {
<tbody className="overflow-y-scroll h-auto">
<>
{familyList?.length > 0 ? (
familyList?.map(
(
{ firstname, lastname, age, added, last_login },
idx
) => {
let addedDate = added?.split(" ")[0];
return (
<tr
className="bg-white dark:bg-dark-white border-b dark:border-[#5356fb29] hover:bg-gray-50"
key={idx}
>
<td className=" py-4">
<div className="flex space-x-2 items-center w-full">
<div className="w-full h-[60px] rounded-full overflow-hidden flex justify-center items-center flex-[0.1] max-w-[60px]">
<img
src={dataImage1}
alt="data"
className="w-full h-full"
/>
</div>
<div className="flex flex-col flex-[0.9]">
<h1 className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
{`${firstname} ${lastname} (${age})`}
</h1>
<span className="text-sm text-thin-light-gray">
Added:{" "}
<span className="text-purple ml-1">
{addedDate}
</span>
familyList?.map((props, idx) => {
let {
firstname,
lastname,
age,
added,
last_login,
task_count,
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={family_uid}
>
<td className=" py-4">
<div className="flex space-x-2 items-center w-full">
<div className="w-full h-[60px] rounded-full overflow-hidden flex justify-center items-center flex-[0.1] max-w-[60px]">
<img
src={dataImage1}
alt="data"
className="w-full h-full"
/>
</div>
<div className="flex flex-col flex-[0.9]">
<h1 className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
{`${firstname} ${lastname} (${age})`}
</h1>
<span className="text-sm text-thin-light-gray">
Added:{" "}
<span className="text-purple ml-1">
{addedDate}
</span>
</div>
</div>
</td>
<td className="text-center py-4 px-2">
<div className="flex space-x-1 items-center justify-center">
<span className="text-base text-dark-gray dark:text-white font-medium whitespace-nowrap">
{last_login}
</span>
</div>
</td>
<td className="text-center py-4 px-2">
<div className="flex space-x-1 items-center justify-center">
<span className="text-base text-dark-gray dark:text-white font-medium whitespace-nowrap">
100
</span>
</div>
</td>
<td className="text-right py-4 px-2 flex items-center justify-center">
<button
onClick={() => {
navigate("/manage-family");
}}
type="button"
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
Manage
</button>
</td>
</tr>
);
}
)
</div>
</td>
<td className="text-center py-4 px-2">
<div className="flex space-x-1 items-center justify-center">
<span className="text-base text-dark-gray dark:text-white font-medium whitespace-nowrap">
{LoginDate}
</span>
</div>
</td>
<td className="text-center py-4 px-2">
<div className="flex space-x-1 items-center justify-center">
<span className="text-base text-dark-gray dark:text-white font-medium whitespace-nowrap">
{task_count}
</span>
</div>
</td>
<td className="text-right py-4 px-2 flex items-center justify-center">
<button
onClick={() => {
navigate("/manage-family", {
state: { ...props },
});
}}
type="button"
className="w-20 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
>
Manage
</button>
</td>
</tr>
);
})
) : (
<tr className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
<td className="p-2" colSpan="4">
+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>
+30 -28
View File
@@ -5,37 +5,39 @@ import CommonHead from "../UserHeader/CommonHead";
import MyPendingJobTable from "./MyPendingJobTable";
export default function MyPendingJobs(props) {
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead />
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
<div className="sm:flex justify-between items-center mb-6">
<div className="mb-5 sm:mb-0">
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
const [selectTab, setValue] = useState("today");
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead
commonHeadData={props.commonHeadData}
/>
<div className="notification-page w-full mb-10">
<div className="notification-wrapper w-full">
{/* heading */}
<div className="sm:flex justify-between items-center mb-6">
<div className="mb-5 sm:mb-0">
<h1 className="text-26 font-bold text-dark-gray dark:text-white">
<span
className={`${selectTab === "today" ? "block" : "hidden"}`}
className={`${selectTab === "today" ? "block" : "hidden"}`}
>
Pending Job(s)
</span>
</h1>
</div>
<div className="slider-btns flex space-x-4">
<div onClick={() => filterHandler("today")} className="relative">
</div>
</div>
</div>
<MyPendingJobTable MyJobList={props.MyJobList} />
</div>
</h1>
</div>
</Layout>
);
<div className="slider-btns flex space-x-4">
<div
onClick={() => filterHandler("today")}
className="relative"
></div>
</div>
</div>
<MyPendingJobTable MyJobList={props.MyJobList} />
</div>
</div>
</Layout>
);
}
+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">
+4 -2
View File
@@ -22,8 +22,10 @@ export default function Layout({ children }) {
};
const navigate = useNavigate();
const logOut = () => {
localStorage.removeItem("email");
localStorage.clear();
localStorage.removeItem("session_token");
localStorage.removeItem("member_id");
localStorage.removeItem("uid");
// localStorage.clear();
// toast.success("Come Back Soon", {
// icon: `🙂`,
// });
+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}/>
</>
);
}