Compare commits

...

20 Commits

Author SHA1 Message Date
Victor b6908b84af fixed some build bug issues 2024-11-20 19:24:19 +01:00
CHIEFSOFT\ameye f5eef3f679 make production only 2024-11-20 11:59:08 -05:00
CHIEFSOFT\ameye 339a0063ce temporary 2024-11-20 11:52:40 -05:00
CHIEFSOFT\ameye e1ffca88af Return vack 2024-11-20 11:41:18 -05:00
CHIEFSOFT\ameye 96f3e3ed18 temporary use 2024-11-20 11:35:40 -05:00
ameye 49b10cc57b Merge branch 'more_log_removal' of WrenchBoard/Users-Wrench into master 2024-11-20 15:11:36 +00:00
Victor 83d9b80cb0 removed more logs from the browser 2024-11-20 16:03:41 +01:00
ameye 90a2c2fa5b Merge branch 'error-log-removal' of WrenchBoard/Users-Wrench into master 2024-11-20 09:12:07 +00:00
Victor 503552bcd0 removed unwanted logs 2024-11-18 20:28:12 +01:00
ameye b0b36c53d0 Merge branch 'login_modal_style_updated' of WrenchBoard/Users-Wrench into master 2024-11-14 12:39:38 +00:00
Victor 387d30b011 modal style updated 2024-11-14 08:04:02 +01:00
ameye be31d80013 Merge branch 'first-tme-login-modal' of WrenchBoard/Users-Wrench into master 2024-11-12 14:39:33 +00:00
Victor f306856ffd added modal on kids login page 2024-11-12 05:54:44 +01:00
ameye 779e39e7c9 Merge branch 'family-virtual-wellet' of WrenchBoard/Users-Wrench into master 2024-11-09 00:03:21 +00:00
victorAnumudu d65522ee64 displays kid virtual card 2024-11-09 00:45:45 +01:00
ameye f8f5fbc3af Merge branch 'auth-font-match' of WrenchBoard/Users-Wrench into master 2024-11-07 19:08:18 +00:00
victorAnumudu ae494b3e48 auth fonts adjusted 2024-11-07 19:52:53 +01:00
ameye d2de4e8d56 Merge branch 'auth-loyout-adjust' of WrenchBoard/Users-Wrench into master 2024-11-07 13:46:19 +00:00
victorAnumudu cdd6b1beb5 adjustments added 2024-11-07 14:41:26 +01:00
ameye 96cb474288 Merge branch 'auth-layout-change' of WrenchBoard/Users-Wrench into master 2024-11-06 19:37:05 +00:00
42 changed files with 397 additions and 274 deletions
+16 -10
View File
@@ -9,15 +9,15 @@ REACT_APP_APPSITE="https://myfitapp.mermsemr.com"
# REACT_APP_AUX_ENDPOINT="http://10.20.30.32:9083/svs/user"
# REACT_APP_USERS_ENDPOINT="http://10.20.30.32:9083/svs/user"
# REACT_APP_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user"
# REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user"
#REACT_APP_AUX_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/svs/user"
#REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/svs/user"
REACT_APP_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1"
REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1"
REACT_APP_AUX_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/en/wrench/api/v1"
REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/en/wrench/api/v1"
REACT_APP_ENDPOINT_KEY="WRENCH-BOARD-2024"
#SOCKETS ENDS
REACT_APP_PRIMARY_SOCKET="https://socket-dev.wrenchboard.com"
REACT_APP_PRIMARY_SOCKET="https://socket.wrenchboard.com"
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
@@ -35,13 +35,20 @@ REACT_APP_RESET_START_ERROR_TIMEOUT=3000
#NUMBER OF ITEMS PER PAGE
REACT_APP_ITEM_PER_PAGE=5
#apigate.lotus.g1.wrenchboard.com:76.209.103.227
#apigate.orion.g1.wrenchboard.com:76.209.103.227
#apigate.orion.g1.wrenchboard.com:76.209.103.227
REACT_APP_GOOGLE_CLIENT_ID=817021856543-ad9nsjgdpsu2s2jrl63j3ihrv7lbf6ma.apps.googleusercontent.com
REACT_APP_GOOGLE_CLIENT_SECRET=aozK_2G8UjaCmLgPPkv9abIm
REACT_APP_GOOGLE_CLIENT_SCOPE="https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"
REACT_APP_GOOGLE_REDIRECT_URL=http://localhost:9082/login/auth/
REACT_APP_GOOGLE_REDIRECT_URL=https://users.wrenchboard.com/login/auth/
REACT_APP_FACEBOOK_CLIENT_ID2=390204307987009
REACT_APP_FACEBOOK_CLIENT_SECRET2=19f778e312f2ab96d147bacb612910c2
REACT_APP_FACEBOOK_CLIENT_SCOPE="email,public_profile"
REACT_APP_FACEBOOK_REDIRECT_URL="https://users.wrenchboard.com/login/auth/flogin"
DISABLE_ESLINT_PLUGIN=true
#File Handling
REACT_APP_MAX_FILE_SIZE=1048576
@@ -49,7 +56,6 @@ REACT_APP_MAX_VIDEO_FILE_SIZE=31457280
REACT_APP_TOTAL_NUM_FILE=4
REACT_APP_LOGOUT_TEXT="Sign Out"
REACT_APP_APPLE_SOCIAL_LOGIN=0
REACT_APP_LINKEDIN_SOCIAL_LOGIN=0
@@ -88,7 +94,7 @@ REACT_APP_SHOW_ACCOUNT_DASH=1
REACT_APP_SHOW_SLIDER_BANNERS=0
# FOR MEDIA LINK
REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com'
REACT_APP_MEDIA_LINK='https://media.wrenchboard.com'
# FOR FAMILY GAME LINK
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
@@ -97,4 +103,4 @@ REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
REACT_APP_CUSTOMTIMER=90
#SHOW OR HIDE MY PAGE LINK ROUTE
REACT_APP_SHOW_USER_PAGE=1
REACT_APP_SHOW_USER_PAGE=0
+2 -2
View File
@@ -30,13 +30,13 @@
"react-to-print": "^2.14.12",
"react-toastify": "^9.0.1",
"redux": "^4.2.0",
"socket.io-client": "^4.4.1",
"slick-carousel": "^1.8.1",
"socket.io-client": "^4.4.1",
"web-vitals": "^1.0.1",
"yup": "^1.1.1"
},
"scripts": {
"start": "react-scripts start -e .env.development",
"start": "react-scripts start -e .env.production",
"build": "react-scripts build -e .env.production",
"test": "react-scripts test",
"eject": "react-scripts eject"
+2 -1
View File
@@ -13,7 +13,8 @@ else
# build the app and serve it via nginx
echo "Production build"
npm install --legacy-peer-deps
npm run build
#npm run build
npm start
nginx -g 'daemon off;' -c /usr/src/app/nginx.conf
nginx -c /usr/src/app/nginx.conf
fi
Binary file not shown.

After

Width:  |  Height:  |  Size: 503 KiB

+41 -40
View File
@@ -14,7 +14,7 @@ export default function LoginLayout({ slogan, children }) {
return (
<div
className={`min-h-screen overflow-y-auto bg-cover bg-center flex flex-col justify-between items-center`}
className={`relative min-h-screen overflow-y-auto bg-cover bg-center flex flex-col items-center`}
style={{
backgroundImage: `url(${countryMode == "NG" ? bgImgNig : bgImgCom})`,
}}
@@ -28,59 +28,60 @@ export default function LoginLayout({ slogan, children }) {
/>
</Link>
</div>
<div className={`h-full w-full grid grid-cols-1 place-content-center`}>
<div className={`h-full w-full mb-5 grid grid-cols-1 place-content-center`}>
{/* <div
className={`auth-bg hidden xl:block bg-blue-50 relative bg-cover bg-no-repeat border-0 after:content-[''] after:absolute after:inset-0`}
style={{backgroundImage: `url(${bgImg})`}}
>
</div> */}
<div className="p-5 sm:p-7 flex place-content-center">
<div className="pt-8 pb-5 w-full sm:w-11/12 max-w-[550px] shadow-md bg-slate-50 dark:bg-dark-white rounded-[0.475rem]">
<div className="pt-5 pb-5 w-full sm:w-11/12 max-w-[550px] shadow-md bg-slate-50 dark:bg-dark-white rounded-[0.475rem]">
<div className="w-full flex justify-center items-center">
{children && children}
</div>
</div>
</div>
</div>
<div className='w-full shadow-md bg-slate-50 dark:bg-dark-white'>
<div className="w-full flex flex-col md:flex-row justify-center items-center px-10 py-2">
<div className="flex justify-center items-center">
<div className="flex items-center">
<a
href="https://www.wrenchboard.com/about-us"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
About
</a>
<a
href="https://www.wrenchboard.com/service"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
Services
</a>
<a
href="https://www.wrenchboard.com/contact"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
Contact Us
</a>
<div className='absolute left-0 right-0 bottom-0'>
<div className='w-full shadow-md bg-slate-50 dark:bg-dark-white'>
<div className="w-full flex flex-col md:flex-row justify-center items-center px-10 py-2">
<div className="flex justify-center items-center">
<div className="flex items-center">
<a
href="https://www.wrenchboard.com/about-us"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
About
</a>
<a
href="https://www.wrenchboard.com/service"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
Services
</a>
<a
href="https://www.wrenchboard.com/contact"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank"
rel="noreferrer"
>
Contact Us
</a>
</div>
</div>
<p className="text-black text-[15px] px-2 font-medium flex items-center gap-1">
<span className="dark:text-white">
&copy; {new Date().getFullYear()} -
</span>
<Link to="/" className="text-[#009ef7] ml-1">
WrenchBoard
</Link>{" "}
</p>
</div>
<p className="text-black text-[15px] px-2 font-medium flex items-center gap-1">
<span className="dark:text-white">
&copy; {new Date().getFullYear()} -
</span>
<Link to="/" className="text-[#009ef7] ml-1">
WrenchBoard
</Link>{" "}
</p>
</div>
</div>
+15 -13
View File
@@ -16,11 +16,12 @@ import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function LoginLanding() {
const dispatch = useDispatch();
const location = useLocation();
const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const navigate = useNavigate();
const userApi = new usersService();
@@ -42,11 +43,11 @@ export default function LoginLanding() {
{/* <div className="content-wrapper login shadow-md w-10/12 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="flex place-content-center">
<div className="w-10/12">
<div className='grid grid-cols-1 sm:grid-cols-3 gap-3'>
<div className='grid grid-cols-1 sm:grid-cols-5 gap-3'>
{/* APP DOWNLOAD STORE */}
<div className="col-span-1 order-2 sm:col-span-1 sm:order-1 w-full">
<div className="sm:border-r-2 border-slate-400 w-full h-full flex sm:flex-col justify-center gap-4">
<div className="w-28 lg:w-32">
<div className="col-span-1 order-2 sm:col-span-2 sm:order-1 w-full">
<div className="relative w-full h-full flex sm:flex-col justify-center gap-4">
<div className="w-28 sm:w-36">
<a
target="_blank"
rel="noreferrer"
@@ -55,7 +56,7 @@ export default function LoginLanding() {
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
</a>
</div>
<div className="w-28 lg:w-32">
<div className="w-28 sm:w-36">
<a
target="_blank"
rel="noreferrer"
@@ -64,15 +65,16 @@ export default function LoginLanding() {
<img src={GoogleDownload} className='w-full h-auto' alt='IOS Download' />
</a>
</div>
<div className='hidden sm:block absolute top-0 bottom-0 right-0 w-1 rounded-full bg-[linear-gradient(180deg,_#94a3b8,_#0f172a,_#94a3b8)]'></div>
</div>
</div>
<div className="col-span-1 order-1 sm:col-span-2 sm:order-2 title-area flex flex-col gap-5 justify-center items-center relative text-center mb-5">
<h1 className="text-[#181c32] font-medium dark:text-white leading-6 text-2xl tracking-wide">
<span className='font-semibold'>Log in</span> as a:
<div className="col-span-1 order-1 sm:col-span-3 sm:order-2 title-area flex flex-col gap-5 justify-center items-center relative text-center mb-5">
<h1 className="text-gray-400 font-medium text-[16.25px] leading-[24.375px]">
<span className='font-semibold text-[#4687ba] hover:text-[#009ef7] transition'>Log in</span> as a:
</h1>
<div className='w-full flex flex-col gap-4'>
<button name='full' onClick={()=>navigate('/login/parent', {state:{loginType:'full'}})} className='w-full mx-auto flex justify-between items-center p-4 md:p-8 rounded-lg bg-[#e0f7eb] text-emerald-800 cursor-pointer'>
<button name='full' onClick={()=>navigate('/login/parent', {state:{loginType:'full'}})} className='w-full mx-auto flex justify-between items-center p-4 md:p-8 rounded-lg bg-[#d5ebf8] text-[#009ef7] cursor-pointer'>
<div className='flex items-center gap-4'>
<img className='w-12 h-auto' src={ParentIcon} alt='login key' />
<p className='text-lg font-semibold'>Adult or Parent</p>
@@ -91,11 +93,11 @@ export default function LoginLanding() {
</button>
</div>
<div className="text-gray-400 font-medium text-xl leading-[24.375px]">
<div className="text-gray-400 font-medium text-[16.25px] leading-[24.375px]">
Don't have an account?{" "}
<Link
to="/signup"
className="font-semibold text-emerald-800 hover:text-emerald-600 transition"
className="font-semibold text-[#4687ba] hover:text-[#009ef7] transition"
>
Sign Up
</Link>
+4 -3
View File
@@ -17,12 +17,13 @@ import { updateUserDetails } from "../../../store/UserDetails";
import ReCAPTCHA from "react-google-recaptcha";
export default function Login() {
const dispatch = useDispatch();
const location = useLocation();
// eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const [sessionExpired, setSessionExpired] = useState(queryParams.get("sessionExpired"))
@@ -220,7 +221,7 @@ export default function Login() {
let loginValue = readCookie("loginType");
setLoginType(loginValue);
if (state?.error) {
if (location?.state?.error) {
//check if the login path has an error state indicating any social handle login with error
setMsgError("Unexpected Error, Please try again soon.");
setTimeout(() => {
+6 -4
View File
@@ -20,12 +20,13 @@ import GoogleDownload from '../../../assets/images/download/andriod.jpg'
import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function Login() {
const dispatch = useDispatch();
const location = useLocation();
// eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const [sessionExpired, setSessionExpired] = useState(
queryParams.get("sessionExpired")
@@ -200,8 +201,8 @@ export default function Login() {
// }, []);
useEffect(()=>{
if(state && state.loginType){
setLoginType(state.loginType)
if(location?.state && location?.state.loginType){
setLoginType(location?.state.loginType)
}else{
navigate('/login', {replace: true})
}
@@ -327,6 +328,7 @@ export default function Login() {
{/* END of switch login component */}
{/* for login component */}
<h1 className='pb-2 text-center font-medium text-2xl leading-[24.375px]'>{loginType == 'full' ? 'Login' : 'Kids and Teens'}</h1>
{
loginType == "full" ? (
//user login component
+3 -2
View File
@@ -6,12 +6,13 @@ import InputCom from "../../Helpers/Inputs/InputCom";
import AuthLayout from "../AuthLayout";
export default function SignUp() {
const location = useLocation()
// eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search);
const country = queryParams.get("cnt")?.toUpperCase();
const {pathname} = useLocation()
const currentPath = country ? `${pathname}?cnt=${country.toLowerCase()}`:pathname // Determines the new pathname is country query params exist
const currentPath = country ? `${location?.pathname}?cnt=${country.toLowerCase()}`:location?.pathname // Determines the new pathname is country query params exist
const [signUpLoading, setSignUpLoading] = useState(false);
const [checked, setValue] = useState(false);
+6 -5
View File
@@ -9,14 +9,15 @@ import GoogleDownload from '../../../assets/images/download/andriod.jpg'
import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function SignUp() {
const location = useLocation();
// eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search);
const country = queryParams.get("cnt")?.toUpperCase();
const { pathname } = useLocation();
const currentPath = country
? `${pathname}?cnt=${country.toLowerCase()}`
: pathname; // Determines the new pathname is country query params exist
? `${location?.pathname}?cnt=${country.toLowerCase()}`
: location?.pathname; // Determines the new pathname is country query params exist
const [signUpLoading, setSignUpLoading] = useState(false);
const [checked, setValue] = useState(false);
@@ -271,12 +272,12 @@ export default function SignUp() {
</button>
<span
onClick={rememberMe}
className="cursor-default text-dark-gray dark:text-white text-[15px] group-checked:text-white transition-all duration-200 group-checked:cursor-default"
className="cursor-default text-gray-400 font-medium text-[16.25px] leading-[24.375px] group-checked:text-white transition-all duration-200 group-checked:cursor-default"
>
I agree with all
<Link
href="#"
className="text-base text-[#4687ba] hover:text-[#009ef7] mx-1 inline-block"
className="font-semibold text-[#4687ba] hover:text-[#009ef7] transition mx-1 inline-block"
>
terms and condition
</Link>
@@ -84,7 +84,7 @@ export default function VerifyLink() {
const verifyRes = await userApi.verifyEmail(code);
if (verifyRes.status === 200) {
let { data } = verifyRes;
console.log("TESTING VERIFY", data);
// console.log("TESTING VERIFY", data);
if (
data &&
data.internal_return >= 0 &&
@@ -92,7 +92,7 @@ export default function VerifyLink() {
const verifyRes = await userApi.verifyEmail(code);
if (verifyRes.status === 200) {
let { data } = verifyRes;
console.log("TESTING VERIFY", data);
// console.log("TESTING VERIFY", data);
if (
data &&
data.internal_return >= 0 &&
+6 -4
View File
@@ -1,14 +1,16 @@
import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
import { useSelector } from "react-redux";
import { useNavigate, useLocation } from "react-router-dom";
import usersService from "../../services/UsersService";
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
import Layout from "../Partials/Layout";
import LoadingSpinner from "../Spinners/LoadingSpinner";
import CommonHead from "../UserHeader/CommonHead";
import { useSelector } from "react-redux";
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
export default function BlogItem(props) {
const location = useLocation()
const {
userDetails: { account_type },
} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details account type
@@ -26,7 +28,7 @@ export default function BlogItem(props) {
const queryParams = new URLSearchParams(location?.search);
const blog_id = queryParams.get("blog_id");
// console.log('MUMU', 'meta_value', blogdata, blogdata.data.image_url)
// ('MUMU', 'meta_value', blogdata, blogdata.data.image_url)
useEffect(()=>{
if(!blog_id){
+1 -1
View File
@@ -83,7 +83,7 @@ export default function SocketIOContextProvider({children}) {
if(message.action == "REFRESH_OFFERS" && message.audience == "MERCHANT" && message.market_uid == user_uid){ // for refreshing job owner offer interest list when any worker sends interest
dispatch(tableReload({type:'OFFERINTERESTLISTRELOAD'}))
}
console.log('data', data)
// console.log('data', data)
});
// dispatch(tableReload({ type: "HOMEBANNERS" })); // RELOADS HOME BANNERS
@@ -93,7 +93,7 @@ const AssignTaskPopout = ({
const [formState, setFormState] = useState({
// Initialize form state with desired fields
banner: details?.banner || "default.jpg",
country: details?.country ? details?.country : walletDetails.data.length == 1 ? walletDetails.data[0].country : '',
country: details?.country ? details?.country : walletDetails?.data?.length == 1 ? walletDetails?.data[0].country : '',
price: details?.price || "",
title: details?.title || "",
description: details?.description || "",
@@ -115,7 +115,7 @@ const AssignTaskPopout = ({
let reqData = {};
if (taskType == "select" && assignType == 'task') {
// RUNS HERE IF TASK TYPE IS SELECT
if (!Object.keys(activeTask.data).length) {
if (!Object.keys(activeTask.data)?.length) {
setRequestStatus({
loading: false,
status: false,
@@ -105,7 +105,7 @@ const RelativePopout = ({
const isChecked = relativeSettings?.data?.filter(value => value?.family_uid == item?.family_uid)
const image = localStorage.getItem("session_token") ? `${familyList?.imageServer}${localStorage.getItem("session_token")}/family/${item?.family_uid}` : "";
return (
<div key={item.family_uid || index} className="flex items-center border-b dark:border-[#5356fb29] hover:bg-gray-50">
<div key={item.family_uid} className="flex items-center border-b dark:border-[#5356fb29] hover:bg-gray-50">
<div className='p-2 flex justify-center items-center'>
{relativeEditKids.loading && relativeEditKids.family_uid == item.family_uid?
<LoadingSpinner size='4' color='bg-sky-500' />
@@ -122,7 +122,7 @@ const RelativePopout = ({
<div className="flex space-x-2 items-center w-full">
<div className="min-w-[30px] min-h-[30px] max-w-[30px] max-h-[30px] rounded-full overflow-hidden flex justify-center items-center">
<img
src={image || localImgLoad(`images/icons/${banner}`)}
src={image || localImgLoad(`images/icons/family.svg`)}
alt={`Avatar`}
className="w-full h-full"
/>
+1 -1
View File
@@ -18,7 +18,7 @@ export default function FamilyTableNew() {
const { jobListTable, pendingListTable, parentFamilyTaskList } = useSelector((state) => state.tableReload); // TABLE RELOAD TRIGGERS
let { pathname } = useLocation();
let location = useLocation();
const queryParams = new URLSearchParams(location?.search);
const preSelectedTab = queryParams.get("tab");
@@ -43,7 +43,7 @@ const FamilyNewWaitlist = ({
setContinueTaskPopup({ show: false, data: {} });
};
console.log("Check this >>",continueTaskPopup)
// console.log("Check this >>",continueTaskPopup)
return (
<div
@@ -148,18 +148,18 @@ const FamilyWaitlist = memo(
)}
{popUp.show && (
<SuggestTask
details={popUp.data}
details={popUp?.data}
onClose={closePopUp}
continuePopupData={openContinueTaskPopup}
situation={popUp.show}
situation={popUp?.show}
/>
)}
{continueTaskPopup.show && (
<AssignTaskPopout
details={continueTaskPopup.data}
details={continueTaskPopup?.data}
action={closeContinueTaskPopup}
situation={continueTaskPopup.show}
situation={continueTaskPopup?.show}
setUpdatePage={setUpdatePage}
jobList={jobList}
setActiveTask={setActiveTask}
@@ -6,7 +6,7 @@ import VirtualAddCardFamilyPopout from './VirtualAddCardFamilyPopout'
function Wallet({wallet, familyData, setFamilyWalletReload}) {
const [addFundPopout, setAddFundPopout] = useState({ show: false, data: {} })
console.log('WALLET', wallet.brand)
// console.log('WALLET', wallet.brand)
// virtual add card popout
const [virtualPopup, setVirtualPopup] = useState({ show: false, data: {} });
@@ -91,7 +91,7 @@ function Wallet({wallet, familyData, setFamilyWalletReload}) {
action == 'ADD_VIRTUAL_CARD' ?
openVirtualPopUp({wallet})
:
null
()=>{}
}}
className={`w-[150px] h-[48px] rounded-full text-base text-white bg-[#4687ba] hover:bg-[#009ef7]`}
>
+95 -83
View File
@@ -6,11 +6,14 @@ import FamilyActiveLSlde from "./FamilyActiveLSlde";
import { useDispatch, useSelector } from "react-redux";
import { tableReload } from "../../store/TableReloads";
import LoadingSpinner from "../Spinners/LoadingSpinner";
import HomeModal from "./HomeModal";
export default function FamilyDash({ MyActiveJobList=[], serverImg }) {
// console.log("PROPS IN FAMILY DASH->", familyOffers?.result_list);
const dispatch = useDispatch();
const [firstTimeModal, setFirstTimeModal] = useState(true)
const userApi = new usersService();
@@ -39,104 +42,113 @@ export default function FamilyDash({ MyActiveJobList=[], serverImg }) {
},[reloadBanner])
return (
<div>
<div className="home-page-wrapper">
{/* Header */}
<div className="text-white mb-4 min-h-[3rem] px-2 w-full flex justify-between items-center rounded-xl bg-family-header-bg">
<div className="w-full">
<div className="w-full flex flex-wrap gap-x-4 ">
<p className="text-lg font-normal leading-5">Welcome</p>
<div className="">
<h1 className="text-lg font-normal leading-5">{`${userDetails?.firstname} ${userDetails?.lastname}`}</h1>
<>
<div>
<div className="home-page-wrapper">
{/* Header */}
<div className="text-white mb-4 min-h-[3rem] px-2 w-full flex justify-between items-center rounded-xl bg-family-header-bg">
<div className="w-full">
<div className="w-full flex flex-wrap gap-x-4 ">
<p className="text-lg font-normal leading-5">Welcome</p>
<div className="">
<h1 className="text-lg font-normal leading-5">{`${userDetails?.firstname} ${userDetails?.lastname}`}</h1>
</div>
</div>
</div>
<div className="py-1 w-full text-sm text-right self-end">
<p className="leading-4">Last Login: {`${userDetails?.last_login.split(' ')[0]}`}</p>
</div>
</div>
<div className="py-1 w-full text-sm text-right self-end">
<p className="leading-4">Last Login: {`${userDetails?.last_login.split(' ')[0]}`}</p>
</div>
</div>
{process.env.REACT_APP_SHOW_NEW_FAMILY_DASH == '1' &&
<>
{familyBannersList?.loading ?
<div className="w-full bg-white rounded-2xl">
<LoadingSpinner size='10' color='sky-blue' height='h-[20rem]' />
</div>
:
familyBannersList?.result_list && Object.keys(familyBannersList?.result_list).length > 0 ?
// Loop for Family Banners
<div className="w-full mb-4 grid grid-cols-2 md:grid-cols-3 gap-2 md:gap-4">
{Object.keys(familyBannersList?.result_list).map((item, index) => {
let content = familyBannersList?.result_list[item]
// let action = item == 'recommend' ? 'familymarket' : 'mytask'
return (
<Link key={item} to={`/${content.banner.action}`} className={`rounded-xl bg-white dark:bg-dark-white shadow-md flex justify-center items-center transition-all duration-300 hover:shadow-sm`}>
<div className="h-full w-full">
<img className="w-full h-[10rem] object-cover rounded-t-xl" src={content.banner.image} alt='banner image' />
<div className="flex flex-col justify-between">
<div className="px-2 py-2 border-b border-transparent min-h-[4rem] flex flex-col gap-1">
<h1 className="text-lg text-[#083e21] dark:text-white font-bold tracking-wide">{content.banner.text}</h1>
<p className="text-sm text-black dark:text-white">{content.banner.description}</p>
</div>
</div>
</div>
</Link>
)
})}
{process.env.REACT_APP_SHOW_NEW_FAMILY_DASH == '1' &&
<>
{familyBannersList?.loading ?
<div className="w-full bg-white rounded-2xl">
<LoadingSpinner size='10' color='sky-blue' height='h-[20rem]' />
</div>
:
null
}
{tab_categories?.data &&
<div className="mb-4">
<h1 className="my-4 text-26 font-bold text-dark-gray dark:text-white tracking-wide">Resources</h1>
<div className="w-full grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-4">
{tab_categories.data.map((item) => {
// if(item.enabled){
// }
return (
<Link key={item.uid} to={`/${item?.action}`} className={`group rounded-xl bg-white dark:bg-dark-white shadow-md flex justify-center items-center transition-all duration-300 hover:shadow-sm`}>
<div className="h-full w-full">
<div className="w-full h-[8rem] rounded-t-xl overflow-hidden">
<img className="w-full h-full group-hover:scale-110 object-cover transition-all duration-300" src={item?.banner} alt='banner image' />
</div>
<div className="flex flex-col justify-between">
<div className="px-2 py-1 border-b border-transparent min-h-[2rem] flex justify-between items-center gap-1">
<h1 className="text-lg text-[#083e21] dark:text-white font-bold tracking-wide">{item?.content}</h1>
<div className="flex justify-center gap-1">
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
familyBannersList?.result_list && Object.keys(familyBannersList?.result_list).length > 0 ?
// Loop for Family Banners
<div className="w-full mb-4 grid grid-cols-2 md:grid-cols-3 gap-2 md:gap-4">
{Object.keys(familyBannersList?.result_list).map((item, index) => {
let content = familyBannersList?.result_list[item]
// let action = item == 'recommend' ? 'familymarket' : 'mytask'
return (
<Link key={item} to={`/${content.banner.action}`} className={`rounded-xl bg-white dark:bg-dark-white shadow-md flex justify-center items-center transition-all duration-300 hover:shadow-sm`}>
<div className="h-full w-full">
<img className="w-full h-[10rem] object-cover rounded-t-xl" src={content.banner.image} alt='banner image' />
<div className="flex flex-col justify-between">
<div className="px-2 py-2 border-b border-transparent min-h-[4rem] flex flex-col gap-1">
<h1 className="text-lg text-[#083e21] dark:text-white font-bold tracking-wide">{content.banner.text}</h1>
<p className="text-sm text-black dark:text-white">{content.banner.description}</p>
</div>
</div>
</div>
</div>
</Link>
</Link>
)
})}
</div>
:
null
}
{tab_categories?.data &&
<div className="mb-4">
<h1 className="my-4 text-26 font-bold text-dark-gray dark:text-white tracking-wide">Resources</h1>
<div className="w-full grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-4">
{tab_categories.data.map((item) => {
// if(item.enabled){
// }
return (
<Link key={item.uid} to={`/${item?.action}`} className={`group rounded-xl bg-white dark:bg-dark-white shadow-md flex justify-center items-center transition-all duration-300 hover:shadow-sm`}>
<div className="h-full w-full">
<div className="w-full h-[8rem] rounded-t-xl overflow-hidden">
<img className="w-full h-full group-hover:scale-110 object-cover transition-all duration-300" src={item?.banner} alt='banner image' />
</div>
<div className="flex flex-col justify-between">
<div className="px-2 py-1 border-b border-transparent min-h-[2rem] flex justify-between items-center gap-1">
<h1 className="text-lg text-[#083e21] dark:text-white font-bold tracking-wide">{item?.content}</h1>
<div className="flex justify-center gap-1">
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
<div className="w-1 h-1 bg-slate-400 rounded-full"></div>
</div>
</div>
</div>
</div>
</Link>
)
})}
</div>
</div>
</div>
}
</>
}
</>
}
{/* {familyOffers?.result_list && familyOffers?.result_list.length > 0 && (
<MyOffersFamilyTable
familyOffers={familyOffers?.result_list}
image_server={familyOffers?.session_image_server}
className="mb-10"
/>
)} */}
{/* {familyOffers?.result_list && familyOffers?.result_list.length > 0 && (
<MyOffersFamilyTable
familyOffers={familyOffers?.result_list}
image_server={familyOffers?.session_image_server}
className="mb-10"
/>
)} */}
{/* {trending && trending.length > 0 && (
<FamilyActiveLSlde
trending={trending}
className="mb-10"
image_server={serverImg}
/>
)} */}
{/* {trending && trending.length > 0 && (
<FamilyActiveLSlde
trending={trending}
className="mb-10"
image_server={serverImg}
/>
)} */}
</div>
</div>
</div>
{/* last_login */}
{(!familyBannersList?.loading && firstTimeModal) &&
<HomeModal userDetails={userDetails} action={()=>setFirstTimeModal(prev => !prev)} situation={firstTimeModal} />
}
</>
);
}
+1 -1
View File
@@ -49,7 +49,7 @@ export default function HomeActivities({ className }) {
getRecentActivities();
}, []);
console.log(recentActivitiesData);
// console.log(recentActivitiesData);
return (
<div
+71
View File
@@ -0,0 +1,71 @@
import React from 'react'
import ModalCom from '../Helpers/ModalCom'
import ModalBG from '../../assets/images/modalbg.png'
export default function HomeModal({userDetails, action, situation}) {
const {firstname, lastname} = userDetails
const options = [
'Suggest Task to Parent', 'Suggest Task to Parent'
]
const onSelectOption = () => {
action()
}
return (
<>
<div className=''>
<div className='fixed top-0 left-0 bottom-0 w-full bg-black bg-opacity-40 backdrop-filter backdrop-blur-sm z-50'></div>
<div className='fixed h-full z-[99999999999999] w-full lg:w-auto inset-0 flex flex-col justify-center items-center overflow-y-auto'>
<div className="relative w-11/12 md:w-[600px] lg:w-[992px] rounded-2xl overflow-hidden">
<div className='relative p-4 bg-sky-blue flex items-center'>
<img className='block w-2/3 max-w-lg mx-auto' src={ModalBG} alt='modal image' />
<div className='absolute text-white top-5 right-5'>
<button
type="button"
className="text-white"
onClick={onSelectOption}
>
<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>
</button>
</div>
</div>
<div className='p-4 bg-slate-100'>
<div className='w-2/3 max-w-5xl mx-auto flex flex-col gap-4 tracking-wider'>
{/* <h1 className='text-3xl'>Welcome to <span className='font-semibold'>WrenchBoard</span></h1> */}
<h1 className='text-3xl'>Welcome <span className='font-semibold'>{firstname} {lastname}</span></h1>
<p className='text-2xl'>
Here's where you can explore informative vidoes that provide valuable insight
into <span className='font-semibold'>how you can connect with siblings and family and explore more on personal development</span>
</p>
<div className='self-end'>
<button onClick={onSelectOption} className='bg-sky-blue px-4 py-2 text-xl text-white rounded-lg'>Done</button>
</div>
</div>
</div>
</div>
</div>
</div>
</>
)
}
+1 -1
View File
@@ -41,7 +41,7 @@ export default function LockJob({
apiCall
.getVerifyCompletedTask({ offer_depend_uid: details?.offer_depend_uid })
.then((res) => {
console.log("RES", res.data);
// console.log("RES", res.data);
setCompletedTask({ loading: false, data: res?.data?.result_list });
})
.catch((err) => {
@@ -10,13 +10,14 @@ import ActiveJobMessageMedia from "./ActiveJobMessageMedia";
import IndexJobActions from "./JobActions/IndexJobActions";
import MediaLayout from "../Partials/MediaLayout";
const VideoElement = lazy(() => import("../VideoCom/VideoElement"));
import usersService from "../../services/UsersService";
import { PriceFormatter } from "../Helpers/PriceFormatter";
import { SocketValues } from "../Contexts/SocketIOContext";
import TabButton from "../customTabs/TabButton";
const VideoElement = lazy(() => import("../VideoCom/VideoElement"));
function ActiveJobsMedia(props) {
let {sendMessage, joinRoom} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET
+1 -1
View File
@@ -9,7 +9,7 @@ export default function MyActiveJobs(props) {
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
// console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
+1 -1
View File
@@ -41,7 +41,7 @@ export default function MyOffersTable({ className, MyActiveOffersList }) {
],
};
console.log("YES WE SEE OFFERS", MyActiveOffersList);
// console.log("YES WE SEE OFFERS", MyActiveOffersList);
const sellSlider = useRef(null);
//const buySlider = useRef(null);
const prevHandler = (value) => {
+1 -1
View File
@@ -26,7 +26,7 @@ export default function MyTasks({
let accountType = userDetails?.account_type == "FULL"
console.log("Active something >>", MyActiveOffersList)
// console.log("Active something >>", MyActiveOffersList)
return (
<Layout>
+1 -1
View File
@@ -9,7 +9,7 @@ export default function MyWaitingJobs(props) {
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
// console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead
+7 -1
View File
@@ -51,7 +51,7 @@ export default function FamilyWalletBox({ wallet, payment }) {
height="min-h-[240px]"
/>
</div>
) : wallet?.data.length > 0 ? (
) : wallet?.data?.length > 0 ? (
<>
{wallet?.data?.length > 1 && (
<div className="wal-selection px-5 py-2 text-black dark:text-white flex items-center gap-2">
@@ -87,6 +87,11 @@ export default function FamilyWalletBox({ wallet, payment }) {
<p className="text-base sm:text-lg text-white tracking-wide my-3 text-center">
Current Balance
</p>
{selectedWallet?.brand && selectedWallet?.card_last4 ? // FOR VIRTUAL CARD NUMBER ELSE WALLET BALANCE DISPLAY
<p className="text-2xl font-bold text-white dark:text-white leading-10">
{selectedWallet.brand} <span> **** **** ***** </span> {selectedWallet?.card_last4}
</p>
:
<p className="text-[44px] lg:text-[62px] font-bold text-white tracking-wide leading-10">
{PriceFormatter(
selectedWallet?.amount / 100,
@@ -95,6 +100,7 @@ export default function FamilyWalletBox({ wallet, payment }) {
"text-[2rem]"
)}
</p>
}
</div>
</div>
</>
+1 -1
View File
@@ -52,7 +52,7 @@ function WalletAction({ walletItem, payment, openPopUp }) {
: action == 'ADD_VIRTUAL_CARD' ?
openVirtualPopUp({walletItem})
:
null
()=>{}
}}
className={`${
walletItem?.code != "NAIRA" && ""
@@ -399,7 +399,8 @@ export default function ManageInterestOffer(props) {
<div className='mb-4 border-b-2 flex flex-col xxs:flex-row md:flex-col justify-center items-center gap-4'>
<div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'>
<p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Wallet:</p>
<span className="font-medium text-dark-gray dark:text-white">{ walletDetails?.loading ? 'loading...' : PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency)}</span>
{/* <span className="font-medium text-dark-gray dark:text-white">{ walletDetails?.loading ? 'loading...' : PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency)}</span> */}
<span className="font-medium text-dark-gray dark:text-white">{ walletBal.length > 0 ? PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency) : 'loading...'}</span>
</div>
<div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'>
<p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Reward:</p>
+3
View File
@@ -1,8 +1,11 @@
import React, { useEffect, useState } from "react";
import {useLocation} from 'react-router-dom'
import DarkModeContext from "../Contexts/DarkModeContext";
import axios from 'axios'
function Default({ children }) {
const location = useLocation()
// dark mode setup
const [theme, setTheme] = useState(null);
+2 -2
View File
@@ -35,8 +35,8 @@ export default function Resources(props) {
const CreatedBits = __resources?.productdata?.datas;
const blogItems = __resources?.blogdata?.payload;
console.log(__resources);
console.log("Blog data >> ", blogItems);
// console.log(__resources);
// console.log("Blog data >> ", blogItems);
// My Items Data
const [uploadedFiles, setUploadedFiles] = useState({
@@ -42,7 +42,7 @@ export default function QuestionsTab({ className, products }) {
question: ''
}
apiCall.askResourcesResult().then(res => {
console.log(res.data.choices[0].text)
// console.log(res.data.choices[0].text)
if(!res.data || res.data?.choices?.length < 1){
setRequestStatus({loading: false, status: false, message: 'No result found!'})
}
@@ -44,7 +44,7 @@ export default function FamAIQuestion() {
question: ''
}
apiCall.askResourcesResult().then(res => {
console.log(res.data.choices[0].text)
// console.log(res.data.choices[0].text)
if(!res.data || res.data?.choices?.length < 1){
setRequestStatus({loading: false, status: false, message: 'No result found!'})
}
+9 -9
View File
@@ -11,7 +11,7 @@ import { useReactToPrint } from 'react-to-print'
const Iframe = lazy(() => import("../Iframe/Iframe"));
export default function FamGames() {
export default function FamGames(props) {
const ApiCall = new usersService();
const navigate = useNavigate();
@@ -40,7 +40,7 @@ export default function FamGames() {
// FUNCTION TO HANDLE POPOUT
const popUpHandler = () => {
setPopUp((prev) => !prev);
// setPopUp((prev) => !prev);
};
// FUNCTION TO HANDLE MESSAGE CHANGE
@@ -136,7 +136,7 @@ export default function FamGames() {
message: "Message Sent Successfully",
});
// function to trigger socket to emit 'send_message'
sendMessage(messageToSend, `${props.details.contract}-${props.details.contract_uid}`)
// sendMessage(messageToSend, `${props.details.contract}-${props.details.contract_uid}`)
props.reloadActiveJobList((prev) => !prev); // MAKES ACTIVE JOB MESSAGE LIST TO RELOAD
setMessageToSend(""); // SENDS MESSAGE TO SEND BACK TO EMPTY STRINGS
@@ -176,12 +176,12 @@ export default function FamGames() {
const fileToBase64 = async () => {
// Converts file data to base64 string
try {
const base64String = await convertFileToBase64(filesToSend[i]);
return base64String;
} catch (error) {
return false;
}
// try {
// const base64String = await convertFileToBase64(filesToSend[i]);
// return base64String;
// } catch (error) {
// return false;
// }
};
// if(await !fileToBase64()){
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
import LoadingSpinner from '../Spinners/LoadingSpinner'
export default function InfiniteScroll({
allData=data,
allData=[],
addItemBy=12,
intialItemsToShow=39,
children
+15 -15
View File
@@ -93,7 +93,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall
.loadProfile()
.then((res) => {
if (res.data.internal_return < 0) {
if (res?.data?.internal_return < 0) {
setIsLogin({ loading: false, status: false });
return;
}
@@ -119,13 +119,13 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall
.getHeroJBanners()
.then((res) => {
if (res.data?.internal_return < 0) {
if (res?.data?.internal_return < 0) {
return;
}
dispatch(commonHeadBanner(res.data));
})
.catch((error) => {
console.log("ERROR ", error);
// console.log("ERROR ", error);
});
}, [isLogin.status, homeBanners]);
@@ -136,7 +136,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall
.getMyNotifications()
.then((res) => {
if (res.data.internal_return < 0) {
if (res?.data?.internal_return < 0) {
dispatch(updateNotifications({ loading: false, data: null }));
return;
}
@@ -201,11 +201,11 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
const res = await apiCall.getMyJobList();
// setMyJobList({loading: false, data:res.data})
// setMyJobList(res.data);
dispatch(updateUserJobList({ loading: false, data: res.data }));
dispatch(updateUserJobList({ loading: false, data: res?.data }));
} catch (error) {
dispatch(updateUserJobList({ loading: false, data: [] }));
// setMyJobList({loading: false, data:[]})
console.log("Error getting mode");
// console.log("Error getting mode");
}
};
getMyJobList();
@@ -220,13 +220,13 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
dispatch(updateWalletDetails({ loading: true, data: [] }));
try {
const res = await apiCall.getUserWallets();
console.log("wallet - >", res.data);
// console.log("wallet - >", res.data);
dispatch(
updateWalletDetails({ loading: false, data: res.data?.result_list })
updateWalletDetails({ loading: false, data: res?.data?.result_list })
);
} catch (error) {
dispatch(updateWalletDetails({ loading: false, data: [] }));
console.log("Error getting mode");
// console.log("Error getting mode");
}
};
getMyWalletList();
@@ -246,7 +246,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
dispatch(updateJobs({loading: false, ...res.data}));
} catch (error) {
dispatch(updateJobs({loading: false}));
console.log("Error getting mode");
// console.log("Error getting mode");
}
};
getMarketActiveJobList();
@@ -281,10 +281,10 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
// setFamilyBannersList({loading:true, result:[]});
try {
const res = await apiCall.getFamilyBannersList();
dispatch(familyBannersList({...res.data, loading:false}))
dispatch(familyBannersList({...res?.data, loading:false}))
} catch (error) {
dispatch(familyBannersList({loading:false}))
console.log("Error getting tasks");
// console.log("Error getting tasks");
}
};
getFamilyBanners()
@@ -301,7 +301,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
dispatch(familyResources(res?.data?.result_list))
// console.log('RESPONSE', res?.data?.result_list)
} catch (error) {
console.log("Error getting tasks");
// console.log("Error getting tasks");
}
};
getFamilyResourcesList()
@@ -318,7 +318,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall.getFamilyWalletRedeemOptions().then((res)=>{
dispatch(familyWalletRedeemOptList({loading: false, image: res?.data?.session_image_server, data:res?.data?.result_list}))
}).catch((err)=>{
console.log(err)
// console.log(err)
dispatch(familyWalletRedeemOptList({loading: false, image: '', data:{}}))
})
};
@@ -332,7 +332,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
useEffect(()=>{ // sends an event to the socket to enable user join a room to be able to receive update for parent child job assign
if(loggedIn || isLogin.status){
joinRoom(`FAMILY-${account_type == 'FULL' ? uid : sessionStorage.getItem('parent_uid')}`)
console.log(`Room joined for parent child task assign as ${account_type} with ${account_type == 'FULL' ? uid : sessionStorage.getItem('parent_uid')}}`)
// console.log(`Room joined for parent child task assign as ${account_type} with ${account_type == 'FULL' ? uid : sessionStorage.getItem('parent_uid')}}`)
}
},[isLogin.status])
+60 -51
View File
@@ -3,7 +3,7 @@ import { apiConst } from "../lib/apiConst";
class usersService {
constructor() {
console.log("WRB Service Entry");
// console.log("WRB Service Entry");
}
MyPageIntro(reqData) {
@@ -1644,19 +1644,22 @@ class usersService {
},
})
.then((response) => {
console.log("~~~~~~~ Toks2 GET ~~~~~~~~");
// console.log("~~~~~~~ Toks2 GET ~~~~~~~~");
return response;
})
.catch((error) => {
if (error.response) {
//response status is an error code
console.log(error.response.status);
// console.log(error.response.status);
return
} else if (error.request) {
//response not received though the request was sent
console.log(error.request);
// console.log(error.request);
return
} else {
//an error occurred when setting up the request
console.log(error.message);
// console.log(error.message);
return
}
});
}
@@ -1685,8 +1688,8 @@ class usersService {
}
return Axios.post(endPoint, reqData)
.then((response) => {
console.log(response);
console.log("~~~~~~~ WrenchBoard::POST ~~~~~~~~");
// console.log(response);
// console.log("~~~~~~~ WrenchBoard::POST ~~~~~~~~");
if (response.data.internal_return == "-9999") {
localStorage.clear();
window.location.href = `/login?sessionExpired=true`;
@@ -1696,31 +1699,34 @@ class usersService {
.catch((error) => {
if (error.response) {
//response status is an error code
console.log(
"ERROR-------------------------------------------------------"
);
console.log(error.response.status);
console.log(
"ERROR-------------------------------------------------------"
);
// console.log(
// "ERROR-------------------------------------------------------"
// );
// console.log(error.response.status);
// console.log(
// "ERROR-------------------------------------------------------"
// );
return
} else if (error.request) {
//response not received though the request was sent
console.log(
"ERROR2-------------------------------------------------------"
);
console.log(error?.request);
console.log(
"ERROR2-------------------------------------------------------"
);
// console.log(
// "ERROR2-------------------------------------------------------"
// );
// console.log(error?.request);
// console.log(
// "ERROR2-------------------------------------------------------"
// );
return
} else {
//an error occurred when setting up the request
console.log(
"ERROR3-------------------------------------------------------"
);
console.log(error);
console.log(
"ERROR3-------------------------------------------------------"
);
// console.log(
// "ERROR3-------------------------------------------------------"
// );
// console.log(error);
// console.log(
// "ERROR3-------------------------------------------------------"
// );
return
}
});
}
@@ -1751,9 +1757,9 @@ class usersService {
// Axios.defaults.headers['X-API-KEY'] = endPointKey;
return Axios.post(endPoint, reqData)
.then((response) => {
console.log(response);
// console.log(response);
// res = response;
console.log("~~~~~~~ Toks2 POST ~~~~~~~~");
// console.log("~~~~~~~ Toks2 POST ~~~~~~~~");
if (response.data.internal_return == "-9999") {
localStorage.clear();
window.location.href = `/login?sessionExpired=true`;
@@ -1763,31 +1769,34 @@ class usersService {
.catch((error) => {
if (error.response) {
//response status is an error code
console.log(
"ERROR-------------------------------------------------------"
);
console.log(error.response.status);
console.log(
"ERROR-------------------------------------------------------"
);
// console.log(
// "ERROR-------------------------------------------------------"
// );
// console.log(error.response.status);
// console.log(
// "ERROR-------------------------------------------------------"
// );
return
} else if (error.request) {
//response not received though the request was sent
console.log(
"ERROR2-------------------------------------------------------"
);
console.log(error?.request);
console.log(
"ERROR2-------------------------------------------------------"
);
// console.log(
// "ERROR2-------------------------------------------------------"
// );
// console.log(error?.request);
// console.log(
// "ERROR2-------------------------------------------------------"
// );
return
} else {
//an error occurred when setting up the request
console.log(
"ERROR3-------------------------------------------------------"
);
console.log(error);
console.log(
"ERROR3-------------------------------------------------------"
);
// console.log(
// "ERROR3-------------------------------------------------------"
// );
// console.log(error);
// console.log(
// "ERROR3-------------------------------------------------------"
// );
return
}
});
}
+1 -1
View File
@@ -12,7 +12,7 @@ export default function MyPastDueTasksPage() {
const getMyJobList = async () => {
try {
const res = await api.getMyPastDueJobList();
console.log("DATA", res.data);
// console.log("DATA", res.data);
setMyJobList({loading:false, data:res.data})
} catch (error) {
setMyJobList({loading:false, data:[]})
+3
View File
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from "react";
import MyTasks from "../components/MyTasks";
import {useLocation} from 'react-router-dom'
// import UsersService from "../services/UsersService";
import usersService from "../services/UsersService";
@@ -7,6 +8,8 @@ import { useSelector } from "react-redux";
import RecentlyPastDue from "../components/MyTasks/RecentlyPastDue";
export default function MyTaskPage() {
const location = useLocation()
const api = new usersService();
const queryParams = new URLSearchParams(location?.search);
const tab = queryParams.get("tab")?.toLowerCase();