Compare commits

...

16 Commits

Author SHA1 Message Date
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
victorAnumudu 897864b330 auth layout page changed 2024-11-06 19:42:55 +01:00
ameye 6396ab33d0 Merge branch 'text-fix' of WrenchBoard/Users-Wrench into master 2024-11-05 17:46:15 +00:00
33 changed files with 378 additions and 370 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 503 KiB

+52 -42
View File
@@ -1,6 +1,7 @@
import React, { useContext } from "react"; import React, { useContext } from "react";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { localImgLoad } from "../../lib"; import { localImgLoad } from "../../lib";
import WrenchBoard from "../../assets/images/wrenchboard-logo-text.png";
import DarkModeContext from "../Contexts/DarkModeContext"; import DarkModeContext from "../Contexts/DarkModeContext";
@@ -13,65 +14,74 @@ export default function LoginLayout({ slogan, children }) {
return ( return (
<div <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={{ style={{
backgroundImage: `url(${countryMode == "NG" ? bgImgNig : bgImgCom})`, backgroundImage: `url(${countryMode == "NG" ? bgImgNig : bgImgCom})`,
}} }}
> >
<div className="my-5">
<div className={`w-full grid grid-cols-1 xl:grid-cols-2`}> <Link to="#">
<img
src={WrenchBoard}
alt="wrenchboard"
className="h-10 mx-auto"
/>
</Link>
</div>
<div className={`h-full w-full mb-5 grid grid-cols-1 place-content-center`}>
{/* <div {/* <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`} 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})`}} style={{backgroundImage: `url(${bgImg})`}}
> >
</div> */} </div> */}
<div className="p-5 sm:p-7 flex place-content-center xl:col-start-2"> <div className="p-5 sm:p-7 flex place-content-center">
<div className="py-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"> <div className="w-full flex justify-center items-center">
{children && children} {children && children}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<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 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="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 justify-center items-center">
<div className="flex items-center"> <div className="flex items-center">
<a <a
href="https://www.wrenchboard.com/about-us" href="https://www.wrenchboard.com/about-us"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]" className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
About About
</a> </a>
<a <a
href="https://www.wrenchboard.com/service" href="https://www.wrenchboard.com/service"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]" className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
Services Services
</a> </a>
<a <a
href="https://www.wrenchboard.com/contact" href="https://www.wrenchboard.com/contact"
className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]" className="text-[#a1a5b7] text-[15px] px-2 font-medium hover:text-[#009ef7]"
target="_blank" target="_blank"
rel="noreferrer" rel="noreferrer"
> >
Contact Us Contact Us
</a> </a>
</div>
</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> </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>
</div> </div>
@@ -89,15 +89,6 @@ export default function ForgotPassword() {
<> <>
<AuthLayout slogan="Welcome to WrenchBoard"> <AuthLayout slogan="Welcome to WrenchBoard">
<div className="w-full"> <div className="w-full">
<div className="mb-12">
<Link to="#">
<img
src={WrenchBoard}
alt="wrenchboard"
className="h-10 mx-auto"
/>
</Link>
</div>
<div className="flex place-content-center"> <div className="flex place-content-center">
<div className="w-10/12"> <div className="w-10/12">
{msgSuccess == null ? {msgSuccess == null ?
@@ -11,6 +11,9 @@ import AuthLayout from "../AuthLayout2";
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
// import { updateUserDetails } from "../../../store/UserDetails"; // import { updateUserDetails } from "../../../store/UserDetails";
import GoogleDownload from '../../../assets/images/download/andriod.jpg'
import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function LoginLanding() { export default function LoginLanding() {
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
@@ -27,7 +30,7 @@ export default function LoginLanding() {
<> <>
<AuthLayout slogan="Welcome to WrenchBoard"> <AuthLayout slogan="Welcome to WrenchBoard">
<div className="w-full"> <div className="w-full">
<div className="mb-5"> {/* <div className="mb-5">
<Link to="#"> <Link to="#">
<img <img
src={WrenchBoard} src={WrenchBoard}
@@ -35,17 +38,42 @@ export default function LoginLanding() {
className="h-10 mx-auto" className="h-10 mx-auto"
/> />
</Link> </Link>
</div> </div> */}
{/* <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="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="flex place-content-center">
<div className="w-10/12"> <div className="w-10/12">
<div className="title-area flex flex-col gap-5 justify-center items-center relative text-center mb-5"> <div className='grid grid-cols-1 sm:grid-cols-5 gap-3'>
<h1 className="text-[#181c32] font-medium dark:text-white leading-6 text-2xl tracking-wide"> {/* APP DOWNLOAD STORE */}
<span className='font-semibold'>Log in</span> as a: <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"
href={process.env.REACT_APP_APPLE_APP}
>
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
</a>
</div>
<div className="w-28 sm:w-36">
<a
target="_blank"
rel="noreferrer"
href={process.env.REACT_APP_ANDROID_APP}
>
<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-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> </h1>
<div className='w-full flex flex-col gap-4'> <div className='w-full flex flex-col gap-4'>
<button name='full' onClick={()=>navigate('/login/parent', {state:{loginType:'full'}})} className='w-2/3 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'> <div className='flex items-center gap-4'>
<img className='w-12 h-auto' src={ParentIcon} alt='login key' /> <img className='w-12 h-auto' src={ParentIcon} alt='login key' />
<p className='text-lg font-semibold'>Adult or Parent</p> <p className='text-lg font-semibold'>Adult or Parent</p>
@@ -54,7 +82,7 @@ export default function LoginLanding() {
<i className="fa-solid fa-caret-right"></i> <i className="fa-solid fa-caret-right"></i>
</button> </button>
<button name='family' onClick={()=>navigate('/login/kid', {state:{loginType:'family'}})} className='w-2/3 mx-auto flex justify-between items-center p-4 md:p-8 rounded-lg bg-[#f0eef1] text-[#a94ef3] cursor-pointer'> <button name='family' onClick={()=>navigate('/login/kid', {state:{loginType:'family'}})} className='w-full mx-auto flex justify-between items-center p-4 md:p-8 rounded-lg bg-[#f0eef1] text-[#a94ef3] cursor-pointer'>
<div className='flex items-center gap-4'> <div className='flex items-center gap-4'>
<img className='w-12 h-auto' src={KidIcon} alt='login key' /> <img className='w-12 h-auto' src={KidIcon} alt='login key' />
<p className='text-lg font-semibold'>Kids or Teens</p> <p className='text-lg font-semibold'>Kids or Teens</p>
@@ -68,12 +96,13 @@ export default function LoginLanding() {
Don't have an account?{" "} Don't have an account?{" "}
<Link <Link
to="/signup" to="/signup"
className="font-semibold text-emerald-800 hover:text-emerald-600 transition" className="font-semibold text-[#4687ba] hover:text-[#009ef7] transition"
> >
Sign Up Sign Up
</Link> </Link>
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>
</div> </div>
+10 -6
View File
@@ -259,7 +259,7 @@ export default function Login() {
<> <>
<AuthLayout slogan="Welcome to WrenchBoard"> <AuthLayout slogan="Welcome to WrenchBoard">
<div className="w-full"> <div className="w-full">
<div className="mb-5"> {/* <div className="mb-5">
<Link to="#"> <Link to="#">
<img <img
src={WrenchBoard} src={WrenchBoard}
@@ -267,13 +267,13 @@ export default function Login() {
className="h-10 mx-auto" className="h-10 mx-auto"
/> />
</Link> </Link>
</div> </div> */}
{/* <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="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="flex place-content-center">
<div className="w-10/12"> <div className="w-10/12">
{/* HIDES THIS IF USER SESSION HAS EXPIRED */} {/* HIDES THIS IF USER SESSION HAS EXPIRED */}
{sessionExpired != "true" && ( {sessionExpired != "true" && (
<div className="hidden title-area flex flex-col justify-center items-center relative text-center mb-7"> <div className="hidden 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 Sign In to WrenchBoard
</h1> */} </h1> */}
@@ -327,6 +327,7 @@ export default function Login() {
{/* END of switch login component */} {/* END of switch login component */}
{/* for 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" ? ( loginType == "full" ? (
//user login component //user login component
@@ -390,7 +391,7 @@ export default function Login() {
{msgError} {msgError}
</div> </div>
)} )}
<div className="signin-area mb-3.5"> <div className="signin-area">
<div className="flex justify-center"> <div className="flex justify-center">
<button <button
name="full" name="full"
@@ -524,10 +525,13 @@ export default function Login() {
) )
// END of family login compoenent // END of family login compoenent
} }
<div className='w-full text-center'>
<Link className='text-center block font-semibold text-lg pt-3 tracking-wide' to='/login'>Return</Link>
</div>
{/* END of login component */} {/* END of login component */}
{/* APP DOWNLOAD STORE */} {/* APP DOWNLOAD STORE */}
<div className="w-full mt-4"> <div className="hidden w-full mt-4">
<div className="w-full flex justify-center items-center gap-4"> <div className="w-full flex justify-center items-center gap-4">
<div className="w-32 lg:w-48"> <div className="w-32 lg:w-48">
<a <a
@@ -568,7 +572,7 @@ export default function Login() {
{loginType == "full" && ( {loginType == "full" && (
<> <>
<div className="pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]"> <div className="hidden pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]">
This site is protected by a Captcha. <br />Our Privacy Policy and This site is protected by a Captcha. <br />Our Privacy Policy and
Terms of Service apply. Terms of Service apply.
</div> </div>
+1 -50
View File
@@ -107,15 +107,6 @@ export default function Promo() {
return ( return (
<PromoPageLayout> <PromoPageLayout>
<div className="w-full"> <div className="w-full">
<div className="mb-5">
<Link to="#">
<img
src={WrenchBoard}
alt="wrenchboard"
className="h-10 mx-auto"
/>
</Link>
</div>
{requestStatus.loading ? {requestStatus.loading ?
<div className='flex flex-col justify-center items-center'> <div className='flex flex-col justify-center items-center'>
<LoadingSpinner height='h-40' size='8' /> <LoadingSpinner height='h-40' size='8' />
@@ -178,47 +169,7 @@ export default function Promo() {
</button> </button>
</div> </div>
</div> </div>
</div>
{/* APP DOWNLOAD STORE */}
<div className="w-full mt-4">
<div className="w-full flex justify-center items-center gap-4">
<div className="w-32 lg:w-48">
<a
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
target="_blank"
rel="noreferrer"
href={process.env.REACT_APP_APPLE_APP}
>
{/* <i className="fa-brands fa-apple text-3xl"></i>
<div className="flex flex-col">
<span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base">
App Store
</span>
</div> */}
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
</a>
</div>
<div className="w-32 lg:w-48">
<a
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
target="_blank"
rel="noreferrer"
href={process.env.REACT_APP_ANDROID_APP}
>
{/* <i className="fa-brands fa-google-play text-2xl"></i>
<div className="flex flex-col">
<span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base">
Google Play
</span>
</div> */}
<img src={GoogleDownload} className='w-full h-auto' alt='IOS Download' />
</a>
</div>
</div>
</div>
</div>
</div> </div>
: :
<ErrorComponent onClick={() => navigate("/login")} /> <ErrorComponent onClick={() => navigate("/login")} />
+2 -51
View File
@@ -157,15 +157,6 @@ export default function SignUp() {
<> <>
<AuthLayout slogan="Welcome to WrenchBoard"> <AuthLayout slogan="Welcome to WrenchBoard">
<div className="w-full"> <div className="w-full">
<div className="mb-5">
<Link to={currentPath}>
<img
src={WrenchBoard}
alt="wrenchboard"
className="h-10 mx-auto"
/>
</Link>
</div>
<div className="flex place-content-center"> <div className="flex place-content-center">
<div className="w-10/12"> <div className="w-10/12">
<div className="title-area flex flex-col justify-center items-center relative text-center mb-7"> <div className="title-area flex flex-col justify-center items-center relative text-center mb-7">
@@ -280,12 +271,12 @@ export default function SignUp() {
</button> </button>
<span <span
onClick={rememberMe} 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 I agree with all
<Link <Link
href="#" 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 terms and condition
</Link> </Link>
@@ -346,46 +337,6 @@ export default function SignUp() {
</button> </button>
</div> </div>
</div> </div>
{/* APP DOWNLOAD STORE */}
<div className="w-full mt-4">
<div className="w-full flex justify-center items-center gap-4">
<div className="w-32 lg:w-48">
<a
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
target="_blank"
rel="noreferrer"
href={process.env.REACT_APP_APPLE_APP}
>
{/* <i className="fa-brands fa-apple text-3xl"></i>
<div className="flex flex-col">
<span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base">
App Store
</span>
</div> */}
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
</a>
</div>
<div className="w-32 lg:w-48">
<a
// className="px-1 py-1 lg:py-2 flex justify-center items-center gap-1 w-full rounded-md bg-black text-white hover:text-slate-500 hover:shadow-lg transition-all duration-300"
target="_blank"
rel="noreferrer"
href={process.env.REACT_APP_ANDROID_APP}
>
{/* <i className="fa-brands fa-google-play text-2xl"></i>
<div className="flex flex-col">
<span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base">
Google Play
</span>
</div> */}
<img src={GoogleDownload} className='w-full h-auto' alt='IOS Download' />
</a>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -84,7 +84,7 @@ export default function VerifyLink() {
const verifyRes = await userApi.verifyEmail(code); const verifyRes = await userApi.verifyEmail(code);
if (verifyRes.status === 200) { if (verifyRes.status === 200) {
let { data } = verifyRes; let { data } = verifyRes;
console.log("TESTING VERIFY", data); // console.log("TESTING VERIFY", data);
if ( if (
data && data &&
data.internal_return >= 0 && data.internal_return >= 0 &&
+1 -10
View File
@@ -92,7 +92,7 @@ export default function VerifyLink() {
const verifyRes = await userApi.verifyEmail(code); const verifyRes = await userApi.verifyEmail(code);
if (verifyRes.status === 200) { if (verifyRes.status === 200) {
let { data } = verifyRes; let { data } = verifyRes;
console.log("TESTING VERIFY", data); // console.log("TESTING VERIFY", data);
if ( if (
data && data &&
data.internal_return >= 0 && data.internal_return >= 0 &&
@@ -137,15 +137,6 @@ export default function VerifyLink() {
</div> </div>
) : ( ) : (
<div className="w-full"> <div className="w-full">
<div className="mb-12">
<Link to="#">
<img
src={WrenchBoard}
alt="wrenchboard"
className="h-10 mx-auto"
/>
</Link>
</div>
<div className="flex place-content-center"> <div className="flex place-content-center">
<div className="w-10/12"> <div className="w-10/12">
<div className="title-area flex flex-col justify-center items-center relative text-center mb-7"> <div className="title-area flex flex-col justify-center items-center relative text-center mb-7">
@@ -139,15 +139,6 @@ const VerifyPassword = () => {
<> <>
<AuthLayout slogan="Welcome to WrenchBoard"> <AuthLayout slogan="Welcome to WrenchBoard">
<div className="w-full"> <div className="w-full">
<div className="mb-12">
<Link to="#">
<img
src={WrenchBoard}
alt="wrenchboard"
className="h-10 mx-auto"
/>
</Link>
</div>
<div className="flex place-content-center"> <div className="flex place-content-center">
{requestStatus.loading ? ( {requestStatus.loading ? (
<LoadingSpinner color="sky-blue" size="16" height="h-300px" /> <LoadingSpinner color="sky-blue" size="16" height="h-300px" />
@@ -8,15 +8,6 @@ export default function VerifyYou() {
<> <>
<AuthLayout slogan="Welcome to WrenchBoard"> <AuthLayout slogan="Welcome to WrenchBoard">
<div className="w-full"> <div className="w-full">
<div className="mb-12">
<Link to="#">
<img
src={WrenchBoard}
alt="wrenchboard"
className="h-10 mx-auto"
/>
</Link>
</div>
<div className="flex place-content-center"> <div className="flex place-content-center">
<div className="w-10/12"> <div className="w-10/12">
<div className="title-area flex flex-col justify-center items-center relative text-center mb-7"> <div className="title-area flex flex-col justify-center items-center relative text-center mb-7">
+3 -3
View File
@@ -1,11 +1,11 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { useSelector } from "react-redux";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import usersService from "../../services/UsersService"; import usersService from "../../services/UsersService";
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
import Layout from "../Partials/Layout"; import Layout from "../Partials/Layout";
import LoadingSpinner from "../Spinners/LoadingSpinner"; import LoadingSpinner from "../Spinners/LoadingSpinner";
import CommonHead from "../UserHeader/CommonHead"; import CommonHead from "../UserHeader/CommonHead";
import { useSelector } from "react-redux";
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
export default function BlogItem(props) { export default function BlogItem(props) {
@@ -26,7 +26,7 @@ export default function BlogItem(props) {
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
const blog_id = queryParams.get("blog_id"); 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(()=>{ useEffect(()=>{
if(!blog_id){ 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 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'})) dispatch(tableReload({type:'OFFERINTERESTLISTRELOAD'}))
} }
console.log('data', data) // console.log('data', data)
}); });
// dispatch(tableReload({ type: "HOMEBANNERS" })); // RELOADS HOME BANNERS // dispatch(tableReload({ type: "HOMEBANNERS" })); // RELOADS HOME BANNERS
@@ -93,7 +93,7 @@ const AssignTaskPopout = ({
const [formState, setFormState] = useState({ const [formState, setFormState] = useState({
// Initialize form state with desired fields // Initialize form state with desired fields
banner: details?.banner || "default.jpg", 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 || "", price: details?.price || "",
title: details?.title || "", title: details?.title || "",
description: details?.description || "", description: details?.description || "",
@@ -115,7 +115,7 @@ const AssignTaskPopout = ({
let reqData = {}; let reqData = {};
if (taskType == "select" && assignType == 'task') { if (taskType == "select" && assignType == 'task') {
// RUNS HERE IF TASK TYPE IS SELECT // RUNS HERE IF TASK TYPE IS SELECT
if (!Object.keys(activeTask.data).length) { if (!Object.keys(activeTask.data)?.length) {
setRequestStatus({ setRequestStatus({
loading: false, loading: false,
status: false, status: false,
@@ -43,7 +43,7 @@ const FamilyNewWaitlist = ({
setContinueTaskPopup({ show: false, data: {} }); setContinueTaskPopup({ show: false, data: {} });
}; };
console.log("Check this >>",continueTaskPopup) // console.log("Check this >>",continueTaskPopup)
return ( return (
<div <div
@@ -148,18 +148,18 @@ const FamilyWaitlist = memo(
)} )}
{popUp.show && ( {popUp.show && (
<SuggestTask <SuggestTask
details={popUp.data} details={popUp?.data}
onClose={closePopUp} onClose={closePopUp}
continuePopupData={openContinueTaskPopup} continuePopupData={openContinueTaskPopup}
situation={popUp.show} situation={popUp?.show}
/> />
)} )}
{continueTaskPopup.show && ( {continueTaskPopup.show && (
<AssignTaskPopout <AssignTaskPopout
details={continueTaskPopup.data} details={continueTaskPopup?.data}
action={closeContinueTaskPopup} action={closeContinueTaskPopup}
situation={continueTaskPopup.show} situation={continueTaskPopup?.show}
setUpdatePage={setUpdatePage} setUpdatePage={setUpdatePage}
jobList={jobList} jobList={jobList}
setActiveTask={setActiveTask} setActiveTask={setActiveTask}
@@ -6,7 +6,7 @@ import VirtualAddCardFamilyPopout from './VirtualAddCardFamilyPopout'
function Wallet({wallet, familyData, setFamilyWalletReload}) { function Wallet({wallet, familyData, setFamilyWalletReload}) {
const [addFundPopout, setAddFundPopout] = useState({ show: false, data: {} }) const [addFundPopout, setAddFundPopout] = useState({ show: false, data: {} })
console.log('WALLET', wallet.brand) // console.log('WALLET', wallet.brand)
// virtual add card popout // virtual add card popout
const [virtualPopup, setVirtualPopup] = useState({ show: false, data: {} }); const [virtualPopup, setVirtualPopup] = useState({ show: false, data: {} });
+95 -83
View File
@@ -6,12 +6,15 @@ import FamilyActiveLSlde from "./FamilyActiveLSlde";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import { tableReload } from "../../store/TableReloads"; import { tableReload } from "../../store/TableReloads";
import LoadingSpinner from "../Spinners/LoadingSpinner"; import LoadingSpinner from "../Spinners/LoadingSpinner";
import HomeModal from "./HomeModal";
export default function FamilyDash({ MyActiveJobList=[], serverImg }) { export default function FamilyDash({ MyActiveJobList=[], serverImg }) {
// console.log("PROPS IN FAMILY DASH->", familyOffers?.result_list); // console.log("PROPS IN FAMILY DASH->", familyOffers?.result_list);
const dispatch = useDispatch(); const dispatch = useDispatch();
const [firstTimeModal, setFirstTimeModal] = useState(true)
const userApi = new usersService(); const userApi = new usersService();
// const trending = MyActiveJobList; // const trending = MyActiveJobList;
@@ -39,104 +42,113 @@ export default function FamilyDash({ MyActiveJobList=[], serverImg }) {
},[reloadBanner]) },[reloadBanner])
return ( return (
<div> <>
<div className="home-page-wrapper"> <div>
{/* Header */} <div className="home-page-wrapper">
<div className="text-white mb-4 min-h-[3rem] px-2 w-full flex justify-between items-center rounded-xl bg-family-header-bg"> {/* Header */}
<div className="w-full"> <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 flex flex-wrap gap-x-4 "> <div className="w-full">
<p className="text-lg font-normal leading-5">Welcome</p> <div className="w-full flex flex-wrap gap-x-4 ">
<div className=""> <p className="text-lg font-normal leading-5">Welcome</p>
<h1 className="text-lg font-normal leading-5">{`${userDetails?.firstname} ${userDetails?.lastname}`}</h1> <div className="">
<h1 className="text-lg font-normal leading-5">{`${userDetails?.firstname} ${userDetails?.lastname}`}</h1>
</div>
</div> </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>
<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' && {process.env.REACT_APP_SHOW_NEW_FAMILY_DASH == '1' &&
<> <>
{familyBannersList?.loading ? {familyBannersList?.loading ?
<div className="w-full bg-white rounded-2xl"> <div className="w-full bg-white rounded-2xl">
<LoadingSpinner size='10' color='sky-blue' height='h-[20rem]' /> <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>
)
})}
</div> </div>
: :
null 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">
{tab_categories?.data && {Object.keys(familyBannersList?.result_list).map((item, index) => {
<div className="mb-4"> let content = familyBannersList?.result_list[item]
<h1 className="my-4 text-26 font-bold text-dark-gray dark:text-white tracking-wide">Resources</h1> // let action = item == 'recommend' ? 'familymarket' : 'mytask'
<div className="w-full grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-4"> return (
{tab_categories.data.map((item) => { <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`}>
// if(item.enabled){ <div className="h-full w-full">
// } <img className="w-full h-[10rem] object-cover rounded-t-xl" src={content.banner.image} alt='banner image' />
return ( <div className="flex flex-col justify-between">
<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="px-2 py-2 border-b border-transparent min-h-[4rem] flex flex-col gap-1">
<div className="h-full w-full"> <h1 className="text-lg text-[#083e21] dark:text-white font-bold tracking-wide">{content.banner.text}</h1>
<div className="w-full h-[8rem] rounded-t-xl overflow-hidden"> <p className="text-sm text-black dark:text-white">{content.banner.description}</p>
<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>
</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>
</div> }
</>
} }
</>
}
{/* {familyOffers?.result_list && familyOffers?.result_list.length > 0 && ( {/* {familyOffers?.result_list && familyOffers?.result_list.length > 0 && (
<MyOffersFamilyTable <MyOffersFamilyTable
familyOffers={familyOffers?.result_list} familyOffers={familyOffers?.result_list}
image_server={familyOffers?.session_image_server} image_server={familyOffers?.session_image_server}
className="mb-10" className="mb-10"
/> />
)} */} )} */}
{/* {trending && trending.length > 0 && ( {/* {trending && trending.length > 0 && (
<FamilyActiveLSlde <FamilyActiveLSlde
trending={trending} trending={trending}
className="mb-10" className="mb-10"
image_server={serverImg} image_server={serverImg}
/> />
)} */} )} */}
</div>
</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(); getRecentActivities();
}, []); }, []);
console.log(recentActivitiesData); // console.log(recentActivitiesData);
return ( return (
<div <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 apiCall
.getVerifyCompletedTask({ offer_depend_uid: details?.offer_depend_uid }) .getVerifyCompletedTask({ offer_depend_uid: details?.offer_depend_uid })
.then((res) => { .then((res) => {
console.log("RES", res.data); // console.log("RES", res.data);
setCompletedTask({ loading: false, data: res?.data?.result_list }); setCompletedTask({ loading: false, data: res?.data?.result_list });
}) })
.catch((err) => { .catch((err) => {
+1 -1
View File
@@ -9,7 +9,7 @@ export default function MyActiveJobs(props) {
const filterHandler = (value) => { const filterHandler = (value) => {
setValue(value); setValue(value);
}; };
console.log("AMEYE LOC1", props.MyJobList); // console.log("AMEYE LOC1", props.MyJobList);
return ( return (
<Layout> <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 sellSlider = useRef(null);
//const buySlider = useRef(null); //const buySlider = useRef(null);
const prevHandler = (value) => { const prevHandler = (value) => {
+1 -1
View File
@@ -26,7 +26,7 @@ export default function MyTasks({
let accountType = userDetails?.account_type == "FULL" let accountType = userDetails?.account_type == "FULL"
console.log("Active something >>", MyActiveOffersList) // console.log("Active something >>", MyActiveOffersList)
return ( return (
<Layout> <Layout>
+1 -1
View File
@@ -9,7 +9,7 @@ export default function MyWaitingJobs(props) {
const filterHandler = (value) => { const filterHandler = (value) => {
setValue(value); setValue(value);
}; };
console.log("AMEYE LOC1", props.MyJobList); // console.log("AMEYE LOC1", props.MyJobList);
return ( return (
<Layout> <Layout>
<CommonHead <CommonHead
+7 -1
View File
@@ -51,7 +51,7 @@ export default function FamilyWalletBox({ wallet, payment }) {
height="min-h-[240px]" height="min-h-[240px]"
/> />
</div> </div>
) : wallet?.data.length > 0 ? ( ) : wallet?.data?.length > 0 ? (
<> <>
{wallet?.data?.length > 1 && ( {wallet?.data?.length > 1 && (
<div className="wal-selection px-5 py-2 text-black dark:text-white flex items-center gap-2"> <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"> <p className="text-base sm:text-lg text-white tracking-wide my-3 text-center">
Current Balance Current Balance
</p> </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"> <p className="text-[44px] lg:text-[62px] font-bold text-white tracking-wide leading-10">
{PriceFormatter( {PriceFormatter(
selectedWallet?.amount / 100, selectedWallet?.amount / 100,
@@ -95,6 +100,7 @@ export default function FamilyWalletBox({ wallet, payment }) {
"text-[2rem]" "text-[2rem]"
)} )}
</p> </p>
}
</div> </div>
</div> </div>
</> </>
+2 -1
View File
@@ -22,13 +22,14 @@ export default function Layout({ children }) {
}; };
const navigate = useNavigate(); const navigate = useNavigate();
const logOut = () => { const logOut = () => {
let loginType = userDetails?.account_type == 'FULL' ? 'parent' : 'kid'
sessionStorage.clear(); sessionStorage.clear();
localStorage.clear(); localStorage.clear();
// toast.success("Come Back Soon", { // toast.success("Come Back Soon", {
// icon: `🙂`, // icon: `🙂`,
// }); // });
navigate("/login", { replace: true }); navigate(`/login/${loginType}`, {state:{loginType:userDetails?.account_type.toLowerCase()}, replace:true});
}; };
return ( return (
+2 -2
View File
@@ -35,8 +35,8 @@ export default function Resources(props) {
const CreatedBits = __resources?.productdata?.datas; const CreatedBits = __resources?.productdata?.datas;
const blogItems = __resources?.blogdata?.payload; const blogItems = __resources?.blogdata?.payload;
console.log(__resources); // console.log(__resources);
console.log("Blog data >> ", blogItems); // console.log("Blog data >> ", blogItems);
// My Items Data // My Items Data
const [uploadedFiles, setUploadedFiles] = useState({ const [uploadedFiles, setUploadedFiles] = useState({
@@ -42,7 +42,7 @@ export default function QuestionsTab({ className, products }) {
question: '' question: ''
} }
apiCall.askResourcesResult().then(res => { 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){ if(!res.data || res.data?.choices?.length < 1){
setRequestStatus({loading: false, status: false, message: 'No result found!'}) setRequestStatus({loading: false, status: false, message: 'No result found!'})
} }
@@ -44,7 +44,7 @@ export default function FamAIQuestion() {
question: '' question: ''
} }
apiCall.askResourcesResult().then(res => { 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){ if(!res.data || res.data?.choices?.length < 1){
setRequestStatus({loading: false, status: false, message: 'No result found!'}) setRequestStatus({loading: false, status: false, message: 'No result found!'})
} }
+15 -15
View File
@@ -93,7 +93,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall apiCall
.loadProfile() .loadProfile()
.then((res) => { .then((res) => {
if (res.data.internal_return < 0) { if (res?.data?.internal_return < 0) {
setIsLogin({ loading: false, status: false }); setIsLogin({ loading: false, status: false });
return; return;
} }
@@ -119,13 +119,13 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall apiCall
.getHeroJBanners() .getHeroJBanners()
.then((res) => { .then((res) => {
if (res.data?.internal_return < 0) { if (res?.data?.internal_return < 0) {
return; return;
} }
dispatch(commonHeadBanner(res.data)); dispatch(commonHeadBanner(res.data));
}) })
.catch((error) => { .catch((error) => {
console.log("ERROR ", error); // console.log("ERROR ", error);
}); });
}, [isLogin.status, homeBanners]); }, [isLogin.status, homeBanners]);
@@ -136,7 +136,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall apiCall
.getMyNotifications() .getMyNotifications()
.then((res) => { .then((res) => {
if (res.data.internal_return < 0) { if (res?.data?.internal_return < 0) {
dispatch(updateNotifications({ loading: false, data: null })); dispatch(updateNotifications({ loading: false, data: null }));
return; return;
} }
@@ -201,11 +201,11 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
const res = await apiCall.getMyJobList(); const res = await apiCall.getMyJobList();
// setMyJobList({loading: false, data:res.data}) // setMyJobList({loading: false, data:res.data})
// setMyJobList(res.data); // setMyJobList(res.data);
dispatch(updateUserJobList({ loading: false, data: res.data })); dispatch(updateUserJobList({ loading: false, data: res?.data }));
} catch (error) { } catch (error) {
dispatch(updateUserJobList({ loading: false, data: [] })); dispatch(updateUserJobList({ loading: false, data: [] }));
// setMyJobList({loading: false, data:[]}) // setMyJobList({loading: false, data:[]})
console.log("Error getting mode"); // console.log("Error getting mode");
} }
}; };
getMyJobList(); getMyJobList();
@@ -220,13 +220,13 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
dispatch(updateWalletDetails({ loading: true, data: [] })); dispatch(updateWalletDetails({ loading: true, data: [] }));
try { try {
const res = await apiCall.getUserWallets(); const res = await apiCall.getUserWallets();
console.log("wallet - >", res.data); // console.log("wallet - >", res.data);
dispatch( dispatch(
updateWalletDetails({ loading: false, data: res.data?.result_list }) updateWalletDetails({ loading: false, data: res?.data?.result_list })
); );
} catch (error) { } catch (error) {
dispatch(updateWalletDetails({ loading: false, data: [] })); dispatch(updateWalletDetails({ loading: false, data: [] }));
console.log("Error getting mode"); // console.log("Error getting mode");
} }
}; };
getMyWalletList(); getMyWalletList();
@@ -246,7 +246,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
dispatch(updateJobs({loading: false, ...res.data})); dispatch(updateJobs({loading: false, ...res.data}));
} catch (error) { } catch (error) {
dispatch(updateJobs({loading: false})); dispatch(updateJobs({loading: false}));
console.log("Error getting mode"); // console.log("Error getting mode");
} }
}; };
getMarketActiveJobList(); getMarketActiveJobList();
@@ -281,10 +281,10 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
// setFamilyBannersList({loading:true, result:[]}); // setFamilyBannersList({loading:true, result:[]});
try { try {
const res = await apiCall.getFamilyBannersList(); const res = await apiCall.getFamilyBannersList();
dispatch(familyBannersList({...res.data, loading:false})) dispatch(familyBannersList({...res?.data, loading:false}))
} catch (error) { } catch (error) {
dispatch(familyBannersList({loading:false})) dispatch(familyBannersList({loading:false}))
console.log("Error getting tasks"); // console.log("Error getting tasks");
} }
}; };
getFamilyBanners() getFamilyBanners()
@@ -301,7 +301,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
dispatch(familyResources(res?.data?.result_list)) dispatch(familyResources(res?.data?.result_list))
// console.log('RESPONSE', res?.data?.result_list) // console.log('RESPONSE', res?.data?.result_list)
} catch (error) { } catch (error) {
console.log("Error getting tasks"); // console.log("Error getting tasks");
} }
}; };
getFamilyResourcesList() getFamilyResourcesList()
@@ -318,7 +318,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall.getFamilyWalletRedeemOptions().then((res)=>{ apiCall.getFamilyWalletRedeemOptions().then((res)=>{
dispatch(familyWalletRedeemOptList({loading: false, image: res?.data?.session_image_server, data:res?.data?.result_list})) dispatch(familyWalletRedeemOptList({loading: false, image: res?.data?.session_image_server, data:res?.data?.result_list}))
}).catch((err)=>{ }).catch((err)=>{
console.log(err) // console.log(err)
dispatch(familyWalletRedeemOptList({loading: false, image: '', data:{}})) 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 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){ if(loggedIn || isLogin.status){
joinRoom(`FAMILY-${account_type == 'FULL' ? uid : sessionStorage.getItem('parent_uid')}`) 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]) },[isLogin.status])
+60 -51
View File
@@ -3,7 +3,7 @@ import { apiConst } from "../lib/apiConst";
class usersService { class usersService {
constructor() { constructor() {
console.log("WRB Service Entry"); // console.log("WRB Service Entry");
} }
MyPageIntro(reqData) { MyPageIntro(reqData) {
@@ -1644,19 +1644,22 @@ class usersService {
}, },
}) })
.then((response) => { .then((response) => {
console.log("~~~~~~~ Toks2 GET ~~~~~~~~"); // console.log("~~~~~~~ Toks2 GET ~~~~~~~~");
return response; return response;
}) })
.catch((error) => { .catch((error) => {
if (error.response) { if (error.response) {
//response status is an error code //response status is an error code
console.log(error.response.status); // console.log(error.response.status);
return
} else if (error.request) { } else if (error.request) {
//response not received though the request was sent //response not received though the request was sent
console.log(error.request); // console.log(error.request);
return
} else { } else {
//an error occurred when setting up the request //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) return Axios.post(endPoint, reqData)
.then((response) => { .then((response) => {
console.log(response); // console.log(response);
console.log("~~~~~~~ WrenchBoard::POST ~~~~~~~~"); // console.log("~~~~~~~ WrenchBoard::POST ~~~~~~~~");
if (response.data.internal_return == "-9999") { if (response.data.internal_return == "-9999") {
localStorage.clear(); localStorage.clear();
window.location.href = `/login?sessionExpired=true`; window.location.href = `/login?sessionExpired=true`;
@@ -1696,31 +1699,34 @@ class usersService {
.catch((error) => { .catch((error) => {
if (error.response) { if (error.response) {
//response status is an error code //response status is an error code
console.log( // console.log(
"ERROR-------------------------------------------------------" // "ERROR-------------------------------------------------------"
); // );
console.log(error.response.status); // console.log(error.response.status);
console.log( // console.log(
"ERROR-------------------------------------------------------" // "ERROR-------------------------------------------------------"
); // );
return
} else if (error.request) { } else if (error.request) {
//response not received though the request was sent //response not received though the request was sent
console.log( // console.log(
"ERROR2-------------------------------------------------------" // "ERROR2-------------------------------------------------------"
); // );
console.log(error?.request); // console.log(error?.request);
console.log( // console.log(
"ERROR2-------------------------------------------------------" // "ERROR2-------------------------------------------------------"
); // );
return
} else { } else {
//an error occurred when setting up the request //an error occurred when setting up the request
console.log( // console.log(
"ERROR3-------------------------------------------------------" // "ERROR3-------------------------------------------------------"
); // );
console.log(error); // console.log(error);
console.log( // console.log(
"ERROR3-------------------------------------------------------" // "ERROR3-------------------------------------------------------"
); // );
return
} }
}); });
} }
@@ -1751,9 +1757,9 @@ class usersService {
// Axios.defaults.headers['X-API-KEY'] = endPointKey; // Axios.defaults.headers['X-API-KEY'] = endPointKey;
return Axios.post(endPoint, reqData) return Axios.post(endPoint, reqData)
.then((response) => { .then((response) => {
console.log(response); // console.log(response);
// res = response; // res = response;
console.log("~~~~~~~ Toks2 POST ~~~~~~~~"); // console.log("~~~~~~~ Toks2 POST ~~~~~~~~");
if (response.data.internal_return == "-9999") { if (response.data.internal_return == "-9999") {
localStorage.clear(); localStorage.clear();
window.location.href = `/login?sessionExpired=true`; window.location.href = `/login?sessionExpired=true`;
@@ -1763,31 +1769,34 @@ class usersService {
.catch((error) => { .catch((error) => {
if (error.response) { if (error.response) {
//response status is an error code //response status is an error code
console.log( // console.log(
"ERROR-------------------------------------------------------" // "ERROR-------------------------------------------------------"
); // );
console.log(error.response.status); // console.log(error.response.status);
console.log( // console.log(
"ERROR-------------------------------------------------------" // "ERROR-------------------------------------------------------"
); // );
return
} else if (error.request) { } else if (error.request) {
//response not received though the request was sent //response not received though the request was sent
console.log( // console.log(
"ERROR2-------------------------------------------------------" // "ERROR2-------------------------------------------------------"
); // );
console.log(error?.request); // console.log(error?.request);
console.log( // console.log(
"ERROR2-------------------------------------------------------" // "ERROR2-------------------------------------------------------"
); // );
return
} else { } else {
//an error occurred when setting up the request //an error occurred when setting up the request
console.log( // console.log(
"ERROR3-------------------------------------------------------" // "ERROR3-------------------------------------------------------"
); // );
console.log(error); // console.log(error);
console.log( // console.log(
"ERROR3-------------------------------------------------------" // "ERROR3-------------------------------------------------------"
); // );
return
} }
}); });
} }
+1 -1
View File
@@ -12,7 +12,7 @@ export default function MyPastDueTasksPage() {
const getMyJobList = async () => { const getMyJobList = async () => {
try { try {
const res = await api.getMyPastDueJobList(); const res = await api.getMyPastDueJobList();
console.log("DATA", res.data); // console.log("DATA", res.data);
setMyJobList({loading:false, data:res.data}) setMyJobList({loading:false, data:res.data})
} catch (error) { } catch (error) {
setMyJobList({loading:false, data:[]}) setMyJobList({loading:false, data:[]})