Compare commits

...

2 Commits

Author SHA1 Message Date
victorAnumudu b589277678 market box reduction 2024-06-24 11:32:57 +01:00
ameye 00a70f3574 Merge branch 'no-wallet-view' of WrenchBoard/Users-Wrench into master 2024-06-20 17:02:36 +00:00
6 changed files with 22 additions and 14 deletions
+1 -1
View File
@@ -145,7 +145,7 @@ export default function Login() {
localStorage.setItem("member_id", `${res.data.member_id}`);
localStorage.setItem("uid", `${res.data.uid}`);
localStorage.setItem("session_token", `${res.data.session}`);
localStorage.setItem("wallet_status", `${res.data.wallet_status}`);
localStorage.setItem("wallet_available_status", `${res.data.wallet_available_status}`);
if (res.data?.account_type == "FAMILY") {
sessionStorage.setItem("family_uid", res.data?.family_uid);
sessionStorage.setItem("parent_uid", res.data?.parent_uid);
+1 -1
View File
@@ -34,7 +34,7 @@ export default function AvailableJobsCard({
<>
{contentDisplay == "grid" ? (
<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 || ""
}`}
>
+1 -1
View File
@@ -20,7 +20,7 @@ export default function MainSection({
);
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
const mappedArray = Object.entries(marketCategories).map(([key, value]) => {
-7
View File
@@ -60,13 +60,6 @@ const WalletRoutes = () => {
getPaymentHistory();
}, [walletTable]);
console.log(
"Testing all country: ",
allCountries,
"Testing wallet: ",
walletDetails
);
return (
<Layout>
<Suspense fallback={<LoadingSpinner size="16" color="sky-blue" />}>
+5 -4
View File
@@ -11,7 +11,7 @@ import { useSelector } from "react-redux";
export default function WalletHeader(props) {
const {userDetails: { account_type, wallet_status }} = useSelector((state) => state?.userDetails);
const {userDetails: { account_type, wallet_available_status }} = useSelector((state) => state?.userDetails);
// debugger;
//props.myWalletList.result_list
let { pathname } = useLocation();
@@ -22,7 +22,7 @@ export default function WalletHeader(props) {
props.setBalanceDropdown.toggle();
else navigate("/my-wallet", { replace: true });
}
console.log('props.myWalletList', wallet_status)
// console.log('props.myWalletList', wallet_available_status)
return (
<>
{account_type == 'FULL' ?
@@ -50,7 +50,8 @@ export default function WalletHeader(props) {
</h3>
</div>
<div className="content px-7 pb-7">
{(wallet_status == '1' || localStorage.getItem('wallet_status')== '1') ?
{/* wallet_available_status == 'WALLET_AVAILABLE' */}
{(wallet_available_status == 'WALLET_AVAILABLE' || localStorage.getItem('wallet_available_status')== 'WALLET_AVAILABLE') ?
<ul>
{props.myWalletList &&
props.myWalletList?.length > 0 &&
@@ -185,7 +186,7 @@ export default function WalletHeader(props) {
</div>
}
{(wallet_status == '1' || localStorage.getItem('wallet_status')== '1') &&
{(wallet_available_status == 'WALLET_AVAILABLE' || localStorage.getItem('wallet_available_status')== 'WALLET_AVAILABLE') &&
<div className="add-money-btn flex justify-center items-center mt-3">
{/* <button
onClick={() => {
+14
View File
@@ -1,5 +1,19 @@
import {useEffect} from 'react'
import WalletRoutes from "../components/MyWallet/Wallet";
import { useSelector } from "react-redux";
import {useNavigate} from 'react-router-dom'
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 />;
}