Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b589277678 | |||
| 00a70f3574 | |||
| 7859cffd49 | |||
| 3a574d1fd0 | |||
| 7c6a2316a8 | |||
| ef99a8f1f7 | |||
| ba0aac126c |
@@ -124,4 +124,7 @@ REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com'
|
|||||||
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
||||||
|
|
||||||
# REACT APP CUSTOMTIMER
|
# REACT APP CUSTOMTIMER
|
||||||
REACT_APP_CUSTOMTIMER=90
|
REACT_APP_CUSTOMTIMER=90
|
||||||
|
|
||||||
|
#SHOW OR HIDE MY PAGE LINK ROUTE
|
||||||
|
REACT_APP_SHOW_USER_PAGE=1
|
||||||
+4
-1
@@ -92,4 +92,7 @@ REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com'
|
|||||||
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
||||||
|
|
||||||
# REACT APP CUSTOMTIMER
|
# REACT APP CUSTOMTIMER
|
||||||
REACT_APP_CUSTOMTIMER=90
|
REACT_APP_CUSTOMTIMER=90
|
||||||
|
|
||||||
|
#SHOW OR HIDE MY PAGE LINK ROUTE
|
||||||
|
REACT_APP_SHOW_USER_PAGE=1
|
||||||
+4
-1
@@ -98,4 +98,7 @@ REACT_APP_MEDIA_LINK='https://media.wrenchboard.com'
|
|||||||
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
|
||||||
|
|
||||||
# REACT APP CUSTOMTIMER
|
# REACT APP CUSTOMTIMER
|
||||||
REACT_APP_CUSTOMTIMER=90
|
REACT_APP_CUSTOMTIMER=90
|
||||||
|
|
||||||
|
#SHOW OR HIDE MY PAGE LINK ROUTE
|
||||||
|
REACT_APP_SHOW_USER_PAGE=0
|
||||||
@@ -145,6 +145,7 @@ export default function Login() {
|
|||||||
localStorage.setItem("member_id", `${res.data.member_id}`);
|
localStorage.setItem("member_id", `${res.data.member_id}`);
|
||||||
localStorage.setItem("uid", `${res.data.uid}`);
|
localStorage.setItem("uid", `${res.data.uid}`);
|
||||||
localStorage.setItem("session_token", `${res.data.session}`);
|
localStorage.setItem("session_token", `${res.data.session}`);
|
||||||
|
localStorage.setItem("wallet_available_status", `${res.data.wallet_available_status}`);
|
||||||
if (res.data?.account_type == "FAMILY") {
|
if (res.data?.account_type == "FAMILY") {
|
||||||
sessionStorage.setItem("family_uid", res.data?.family_uid);
|
sessionStorage.setItem("family_uid", res.data?.family_uid);
|
||||||
sessionStorage.setItem("parent_uid", res.data?.parent_uid);
|
sessionStorage.setItem("parent_uid", res.data?.parent_uid);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export default function AvailableJobsCard({
|
|||||||
<>
|
<>
|
||||||
{contentDisplay == "grid" ? (
|
{contentDisplay == "grid" ? (
|
||||||
<div
|
<div
|
||||||
className={`card-style-two w-full h-[426px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
|
className={`card-style-two w-full h-[326px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
|
||||||
className || ""
|
className || ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export default function MainSection({
|
|||||||
);
|
);
|
||||||
const [tab, setTab] = useState(Object.keys(marketCategories)[0]);
|
const [tab, setTab] = useState(Object.keys(marketCategories)[0]);
|
||||||
|
|
||||||
let [contentDisplay, setContentDisplay] = useState("list"); // STATE TO HOLD LIST VIEW STYLE
|
let [contentDisplay, setContentDisplay] = useState("grid"); // STATE TO HOLD LIST VIEW STYLE
|
||||||
|
|
||||||
// Convert to array in order to map
|
// Convert to array in order to map
|
||||||
const mappedArray = Object.entries(marketCategories).map(([key, value]) => {
|
const mappedArray = Object.entries(marketCategories).map(([key, value]) => {
|
||||||
|
|||||||
@@ -60,13 +60,6 @@ const WalletRoutes = () => {
|
|||||||
getPaymentHistory();
|
getPaymentHistory();
|
||||||
}, [walletTable]);
|
}, [walletTable]);
|
||||||
|
|
||||||
console.log(
|
|
||||||
"Testing all country: ",
|
|
||||||
allCountries,
|
|
||||||
"Testing wallet: ",
|
|
||||||
walletDetails
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<Suspense fallback={<LoadingSpinner size="16" color="sky-blue" />}>
|
<Suspense fallback={<LoadingSpinner size="16" color="sky-blue" />}>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { useSelector } from "react-redux";
|
|||||||
|
|
||||||
export default function WalletHeader(props) {
|
export default function WalletHeader(props) {
|
||||||
|
|
||||||
const {userDetails: { account_type }} = useSelector((state) => state?.userDetails);
|
const {userDetails: { account_type, wallet_available_status }} = useSelector((state) => state?.userDetails);
|
||||||
// debugger;
|
// debugger;
|
||||||
//props.myWalletList.result_list
|
//props.myWalletList.result_list
|
||||||
let { pathname } = useLocation();
|
let { pathname } = useLocation();
|
||||||
@@ -22,6 +22,7 @@ export default function WalletHeader(props) {
|
|||||||
props.setBalanceDropdown.toggle();
|
props.setBalanceDropdown.toggle();
|
||||||
else navigate("/my-wallet", { replace: true });
|
else navigate("/my-wallet", { replace: true });
|
||||||
}
|
}
|
||||||
|
// console.log('props.myWalletList', wallet_available_status)
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{account_type == 'FULL' ?
|
{account_type == 'FULL' ?
|
||||||
@@ -49,6 +50,8 @@ export default function WalletHeader(props) {
|
|||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div className="content px-7 pb-7">
|
<div className="content px-7 pb-7">
|
||||||
|
{/* wallet_available_status == 'WALLET_AVAILABLE' */}
|
||||||
|
{(wallet_available_status == 'WALLET_AVAILABLE' || localStorage.getItem('wallet_available_status')== 'WALLET_AVAILABLE') ?
|
||||||
<ul>
|
<ul>
|
||||||
{props.myWalletList &&
|
{props.myWalletList &&
|
||||||
props.myWalletList?.length > 0 &&
|
props.myWalletList?.length > 0 &&
|
||||||
@@ -176,17 +179,25 @@ export default function WalletHeader(props) {
|
|||||||
{/* </div>*/}
|
{/* </div>*/}
|
||||||
{/*</li>*/}
|
{/*</li>*/}
|
||||||
</ul>
|
</ul>
|
||||||
|
:
|
||||||
|
<div className='p-2 w-full flex gap-4 items-center'>
|
||||||
|
<img className='w-[100px!important] h-auto' src={localImgLoad('images/icons/wallet.svg')} alt='Wallet Icon' />
|
||||||
|
<p className='text-lg text-red-500'>We do not currently support wallets in your area. We are diligently working on it. </p>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
{(wallet_available_status == 'WALLET_AVAILABLE' || localStorage.getItem('wallet_available_status')== 'WALLET_AVAILABLE') &&
|
||||||
<div className="add-money-btn flex justify-center items-center mt-3">
|
<div className="add-money-btn flex justify-center items-center mt-3">
|
||||||
{/* <button
|
{/* <button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if(pathname == '/my-wallet') props.setBalanceDropdown.toggle()
|
if(pathname == '/my-wallet') props.setBalanceDropdown.toggle()
|
||||||
else navigate('/my-wallet', {replace: true})
|
else navigate('/my-wallet', {replace: true})
|
||||||
}}
|
}}
|
||||||
type="button"
|
type="button"
|
||||||
className="w-[122px] h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
className="w-[122px] h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white"
|
||||||
>
|
>
|
||||||
Manage
|
Manage
|
||||||
</button> */}
|
</button> */}
|
||||||
<Link
|
<Link
|
||||||
to="/my-wallet"
|
to="/my-wallet"
|
||||||
onClick={onWalletClick}
|
onClick={onWalletClick}
|
||||||
@@ -195,6 +206,7 @@ export default function WalletHeader(props) {
|
|||||||
Manage
|
Manage
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ export default function MobileSidebar({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{userDetails?.account_type !== "FAMILY" && (
|
{(userDetails?.account_type !== "FAMILY" && userDetails?.wallet_status) && (
|
||||||
<>
|
<>
|
||||||
{!userDetails?.post_jobs ? (
|
{!userDetails?.post_jobs ? (
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -129,25 +129,27 @@ export default function RightSideBar({ myJobList }) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="item flex space-x-3 items-center">
|
{ Number(process.env.REACT_APP_SHOW_USER_PAGE) == 1 &&
|
||||||
{/* image */}
|
<div className="item flex space-x-3 items-center">
|
||||||
<div className="w-8 h-8 rounded-full bg-sky-500/50 p-1 flex justify-center items-center">
|
{/* image */}
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 50" id="Page">
|
<div className="w-8 h-8 rounded-full bg-sky-500/50 p-1 flex justify-center items-center">
|
||||||
<path
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 50" id="Page">
|
||||||
fillRule="evenodd"
|
<path
|
||||||
d="M0 13V2a2 2 0 0 1 2-2h64a2 2 0 0 1 2 2v11H0Zm0 4v31a2 2 0 0 0 2 2h20V17H0Zm26 33h40a2 2 0 0 0 2-2V17H26v33Z"
|
fillRule="evenodd"
|
||||||
fill="#ffffff"
|
d="M0 13V2a2 2 0 0 1 2-2h64a2 2 0 0 1 2 2v11H0Zm0 4v31a2 2 0 0 0 2 2h20V17H0Zm26 33h40a2 2 0 0 0 2-2V17H26v33Z"
|
||||||
className="color000000 svgShape"
|
fill="#ffffff"
|
||||||
></path>
|
className="color000000 svgShape"
|
||||||
</svg>
|
></path>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
{/* name */}
|
||||||
|
<div>
|
||||||
|
<p className="text-thin-light-gray text-base font-medium">
|
||||||
|
<NavLink to="/yourpage">My Page</NavLink>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* name */}
|
}
|
||||||
<div>
|
|
||||||
<p className="text-thin-light-gray text-base font-medium">
|
|
||||||
<NavLink to="/yourpage">My Page</NavLink>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -278,7 +280,7 @@ export default function RightSideBar({ myJobList }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/*JOB LINKS*/}
|
{/*JOB LINKS*/}
|
||||||
{userDetails?.account_type !== "FAMILY" &&
|
{(userDetails?.account_type !== "FAMILY" && userDetails?.wallet_status) &&
|
||||||
myJobList?.data?.result_list?.length > 0 && (
|
myJobList?.data?.result_list?.length > 0 && (
|
||||||
<div className="top-platform mt-6 bg-white dark:bg-dark-white rounded-2xl py-8 w-full 2xl:mb-10 2xl:border-none border ">
|
<div className="top-platform mt-6 bg-white dark:bg-dark-white rounded-2xl py-8 w-full 2xl:mb-10 2xl:border-none border ">
|
||||||
{/* heading */}
|
{/* heading */}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ export default function Sidebar({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{userDetails?.account_type !== "FAMILY" && (
|
{(userDetails?.account_type !== "FAMILY" && userDetails?.wallet_status) && (
|
||||||
<>
|
<>
|
||||||
{!userDetails?.post_jobs ? (
|
{!userDetails?.post_jobs ? (
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -1,5 +1,19 @@
|
|||||||
|
import {useEffect} from 'react'
|
||||||
import WalletRoutes from "../components/MyWallet/Wallet";
|
import WalletRoutes from "../components/MyWallet/Wallet";
|
||||||
|
import { useSelector } from "react-redux";
|
||||||
|
import {useNavigate} from 'react-router-dom'
|
||||||
|
|
||||||
export default function MyWalletPage() {
|
export default function MyWalletPage() {
|
||||||
|
const {userDetails: { account_type, wallet_available_status }} = useSelector((state) => state?.userDetails);
|
||||||
|
const navigate = useNavigate()
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
let walletExist = wallet_available_status || localStorage.getItem('wallet_available_status')
|
||||||
|
console.log(walletExist)
|
||||||
|
if(account_type == 'FULL' && walletExist != 'WALLET_AVAILABLE'){
|
||||||
|
navigate('/', {replace: true})
|
||||||
|
}
|
||||||
|
},[])
|
||||||
|
|
||||||
return <WalletRoutes />;
|
return <WalletRoutes />;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user