Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 70ada36c00 | |||
| e6e41de965 | |||
| 0fbbf38d6c | |||
| 040c79e2e5 | |||
| 78b973e3d4 | |||
| 48df81e697 | |||
| 6ef31e5dbe | |||
| 530dbc9c6c | |||
| 28832fdab0 | |||
| 70c205ffca | |||
| fad38331db | |||
| 9e15c51c31 | |||
| b2bffb3b83 | |||
| dd1a2953da |
@@ -23,17 +23,19 @@ export default function ProductCardStyleTwo({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`card-style-two w-full h-[336px] p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
|
className={`card-style-two w-full p-[20px] bg-white dark:bg-dark-white rounded-2xl section-shadow ${
|
||||||
className || ""
|
className || ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div className="flex flex-col justify-between w-full h-full">
|
<div className="flex flex-col justify-between w-full h-full">
|
||||||
<div className="thumbnail-area w-full">
|
<div className="thumbnail-area w-full">
|
||||||
<div
|
<div
|
||||||
className="w-full h-[236px] p-6 rounded-xl overflow-hidden"
|
className="w-full h-[140px] p-6 rounded-lg overflow-hidden"
|
||||||
style={{
|
style={{
|
||||||
// background: `url(${`https://blog.wrenchboard.com/wp-content/uploads/${datas.meta_value}`}) 0% 0% / cover no-repeat`,
|
// background: `url(${`https://blog.wrenchboard.com/wp-content/uploads/${datas.meta_value}`}) 0% 0% / cover no-repeat`,
|
||||||
background: `url(${`${bg}${datas.meta_value}`}) 0% 0% / cover no-repeat`,
|
// background: `url(${`${bg}${datas.meta_value}`}) 0% 0% / cover no-repeat`,
|
||||||
|
background: `url(${`${bg}${datas.meta_value}`}) no-repeat`,
|
||||||
|
backgroundSize: '100%',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="product-two-options flex justify-between mb-5 relative">
|
<div className="product-two-options flex justify-between mb-5 relative">
|
||||||
@@ -50,7 +52,7 @@ export default function ProductCardStyleTwo({
|
|||||||
</div>
|
</div>
|
||||||
<div className="details-area">
|
<div className="details-area">
|
||||||
{/* title */}
|
{/* title */}
|
||||||
<Link to={`/blog-page?blog_id=${datas.ID}`} className="mb-2.5" rel="noreferrer">
|
<Link to={`/blog-page?blog_id=${datas.ID}`} className="py-2 mb-2.5" rel="noreferrer">
|
||||||
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
|
<h1 className="font-bold text-xl tracking-wide line-clamp-1 text-dark-gray dark:text-white capitalize">
|
||||||
{datas.post_title || "dummy title..."}
|
{datas.post_title || "dummy title..."}
|
||||||
</h1>
|
</h1>
|
||||||
|
|||||||
@@ -1,15 +1,27 @@
|
|||||||
import { useSelector } from "react-redux";
|
import {useEffect} from 'react'
|
||||||
|
import { useSelector, useDispatch} from "react-redux";
|
||||||
import Layout from "../Partials/Layout";
|
import Layout from "../Partials/Layout";
|
||||||
import CommonHead from "../UserHeader/CommonHead";
|
import CommonHead from "../UserHeader/CommonHead";
|
||||||
import MainSection from "./MainSection";
|
import MainSection from "./MainSection";
|
||||||
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
|
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
|
||||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||||
|
import { tableReload } from '../../store/TableReloads';
|
||||||
|
|
||||||
export default function MarketPlace({ commonHeadData }) {
|
export default function MarketPlace({ commonHeadData }) {
|
||||||
|
|
||||||
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
let { jobLists } = useSelector((state) => state.jobLists);
|
let { jobLists } = useSelector((state) => state.jobLists);
|
||||||
const marketData = jobLists?.result_list;
|
const marketData = jobLists?.result_list;
|
||||||
const categories = jobLists?.categories;
|
const categories = jobLists?.categories;
|
||||||
const image_server = jobLists?.session_image_server;
|
const image_server = jobLists?.session_image_server;
|
||||||
|
console.log('Lenth', marketData?.length )
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
if(!jobLists.loading && (marketData?.length < 1 || !marketData)){
|
||||||
|
dispatch(tableReload({ type: "MARKETTABLELIST" })); // reloads market page
|
||||||
|
}
|
||||||
|
},[])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector, useDispatch } from "react-redux";
|
||||||
import usersService from "../../services/UsersService";
|
import usersService from "../../services/UsersService";
|
||||||
import Layout from "../Partials/Layout";
|
import Layout from "../Partials/Layout";
|
||||||
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../Spinners/LoadingSpinner";
|
||||||
import WalletBox from "./WalletBox";
|
import WalletBox from "./WalletBox";
|
||||||
|
import { tableReload } from '../../store/TableReloads';
|
||||||
|
|
||||||
const WalletRoutes = () => {
|
const WalletRoutes = () => {
|
||||||
|
const dispatch = useDispatch()
|
||||||
|
|
||||||
const apiCall = new usersService();
|
const apiCall = new usersService();
|
||||||
const { walletDetails } = useSelector((state) => state?.walletDetails); // WALLET STORE
|
const { walletDetails } = useSelector((state) => state?.walletDetails); // WALLET STORE
|
||||||
const { walletTable } = useSelector((state) => state.tableReload);
|
const { walletTable } = useSelector((state) => state.tableReload);
|
||||||
@@ -60,6 +63,12 @@ const WalletRoutes = () => {
|
|||||||
getPaymentHistory();
|
getPaymentHistory();
|
||||||
}, [walletTable]);
|
}, [walletTable]);
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
if(!walletDetails.loading && walletDetails?.data?.length < 1){
|
||||||
|
dispatch(tableReload({ type: "WALLETTABLE" })); // reloads wallet page
|
||||||
|
}
|
||||||
|
},[])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<WalletBox
|
<WalletBox
|
||||||
|
|||||||
@@ -2,8 +2,28 @@ import React, { useEffect, useState } from "react";
|
|||||||
import usersService from "../../services/UsersService";
|
import usersService from "../../services/UsersService";
|
||||||
import ConfirmNairaWithdraw from "./Popup/ConfirmNairaWithdraw";
|
import ConfirmNairaWithdraw from "./Popup/ConfirmNairaWithdraw";
|
||||||
import NairaWithdraw from "./Popup/NairaWithdraw";
|
import NairaWithdraw from "./Popup/NairaWithdraw";
|
||||||
|
import VirtualAddCardPopout from "./walletvirtual/VirtualAddCardPopout";
|
||||||
|
import WalletExtraActionBtn from "./WalletExtraActionBtn";
|
||||||
|
|
||||||
function WalletAction({ walletItem, payment, openPopUp }) {
|
function WalletAction({ walletItem, payment, openPopUp }) {
|
||||||
|
|
||||||
|
// virtual add card popout
|
||||||
|
const [virtualPopup, setVirtualPopup] = useState({ show: false, data: {} });
|
||||||
|
|
||||||
|
/*OPENS the virtual add card popout*/
|
||||||
|
const openVirtualPopUp = (value) => {
|
||||||
|
setVirtualPopup({
|
||||||
|
show: true,
|
||||||
|
data: { ...value },
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/*Closes the virtual add card popout*/
|
||||||
|
const closeVirtualPopUp = () => {
|
||||||
|
setVirtualPopup({ show: false, data: {} });
|
||||||
|
// dispatch(tableReload({ type: "WALLETTABLE" }));
|
||||||
|
};
|
||||||
|
|
||||||
const [showNairaWithdraw, setShowNairaWithdraw] = useState({
|
const [showNairaWithdraw, setShowNairaWithdraw] = useState({
|
||||||
show: false,
|
show: false,
|
||||||
state: {},
|
state: {},
|
||||||
@@ -19,14 +39,27 @@ function WalletAction({ walletItem, payment, openPopUp }) {
|
|||||||
<div className="w-1/2 flex justify-start items-center">
|
<div className="w-1/2 flex justify-start items-center">
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setShowNairaWithdraw((prev) => ({ ...prev, show: true }));
|
walletItem?.code == 'NAIRA' ?
|
||||||
|
setShowNairaWithdraw((prev) => ({ ...prev, show: true }))
|
||||||
|
: walletItem?.code == 'USD' ?
|
||||||
|
openVirtualPopUp({walletItem})
|
||||||
|
:
|
||||||
|
()=>{}
|
||||||
}}
|
}}
|
||||||
className={`${
|
className={`${
|
||||||
walletItem.code != "NAIRA" && "invisible"
|
walletItem?.code != "NAIRA" && ""
|
||||||
} logout-btn btn-gradient text-white`}
|
} logout-btn btn-gradient text-white`}
|
||||||
>
|
>
|
||||||
Spend
|
{/* Spend */}
|
||||||
|
{walletItem?.code == 'NAIRA' ?
|
||||||
|
walletItem?.extra_actions?.SPEND_FROM_BALANCE[0]?.text
|
||||||
|
: walletItem?.code == 'USD' ?
|
||||||
|
walletItem?.extra_actions?.ADD_VIRTUAL_CARD[0]?.text
|
||||||
|
:
|
||||||
|
'View'
|
||||||
|
}
|
||||||
</button>
|
</button>
|
||||||
|
{/* <WalletExtraActionBtn /> // TO BE USED lATER */}
|
||||||
</div>
|
</div>
|
||||||
<div className="w-1/2 flex justify-end items-center">
|
<div className="w-1/2 flex justify-end items-center">
|
||||||
<button
|
<button
|
||||||
@@ -71,6 +104,17 @@ function WalletAction({ walletItem, payment, openPopUp }) {
|
|||||||
situation={showConfirmNairaWithdraw.show}
|
situation={showConfirmNairaWithdraw.show}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* VIRTUAL CARD POPOUT */}
|
||||||
|
{virtualPopup.show && (
|
||||||
|
<VirtualAddCardPopout
|
||||||
|
details={virtualPopup.data}
|
||||||
|
walletItem={walletItem}
|
||||||
|
onClose={closeVirtualPopUp}
|
||||||
|
situation={virtualPopup.show}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ import WalletItemCardVirtual from './walletvirtual/WalletItemCardVirtual'
|
|||||||
export default function WalletBox({ wallet, payment, countries }) {
|
export default function WalletBox({ wallet, payment, countries }) {
|
||||||
const { loading, data } = wallet;
|
const { loading, data } = wallet;
|
||||||
|
|
||||||
|
// console.log('LOG', data[0]?.extra_actions?.SPEND_FROM_BALANCE[0])
|
||||||
|
|
||||||
// const { userDetails } = useSelector((state) => state.userDetails);
|
// const { userDetails } = useSelector((state) => state.userDetails);
|
||||||
// const accountType = userDetails?.account_type === "FAMILY";
|
// const accountType = userDetails?.account_type === "FAMILY";
|
||||||
|
|
||||||
// console.log('mumu', data)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="my-wallet-wrapper w-full mb-10">
|
<div className="my-wallet-wrapper w-full mb-10">
|
||||||
<div className="main-wrapper w-full">
|
<div className="main-wrapper w-full">
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import React from 'react'
|
||||||
|
|
||||||
|
export default function WalletExtraActionBtn() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{/* <button
|
||||||
|
onClick={() => {
|
||||||
|
walletItem?.code == 'NAIRA' ? setShowNairaWithdraw((prev) => ({ ...prev, show: true })) : openVirtualPopUp({walletItem})
|
||||||
|
}}
|
||||||
|
className={`${
|
||||||
|
walletItem?.code != "NAIRA" && ""
|
||||||
|
} logout-btn btn-gradient text-white`}
|
||||||
|
>
|
||||||
|
{walletItem?.code == 'NAIRA' ? walletItem?.extra_actions?.SPEND_FROM_BALANCE[0]?.text : walletItem?.extra_actions?.ADD_VIRTUAL_CARD[0]?.text}
|
||||||
|
</button> */}
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -58,12 +58,27 @@ export default function WalletHeader(props) {
|
|||||||
props.myWalletList.map((value, index) =>
|
props.myWalletList.map((value, index) =>
|
||||||
{
|
{
|
||||||
let image = value.code ? `${value.code.toLocaleLowerCase()}.svg` : 'default.png'
|
let image = value.code ? `${value.code.toLocaleLowerCase()}.svg` : 'default.png'
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<li
|
<li
|
||||||
key={index}
|
key={value?.wallet_uid || index}
|
||||||
className="content-item py-4 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple dark:hover:border-purple"
|
className="content-item py-4 border-b dark:border-[#5356fb29] border-light-purple hover:border-purple dark:hover:border-purple"
|
||||||
onClick={onWalletClick}
|
onClick={onWalletClick}
|
||||||
>
|
>
|
||||||
|
{value?.brand && value?.card_last4 ? // FOR VIRTUAL CARD NUMBER ELSE WALLET BALANCE DISPLAY
|
||||||
|
<div className="w-full">
|
||||||
|
<div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">
|
||||||
|
<div className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">
|
||||||
|
<img src={value.icon} className="w-14 h-14" alt="currency icon" />
|
||||||
|
</div>
|
||||||
|
<div className="name">
|
||||||
|
<p className="text-2xl font-bold text-dark-gray dark:text-white">
|
||||||
|
{value.brand} <span> **** **** ***** </span> {value?.card_last4}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
:
|
||||||
<div className="sm:flex justify-between items-center">
|
<div className="sm:flex justify-between items-center">
|
||||||
<div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">
|
<div className="account-name flex space-x-4 items-center mb-2 sm:mb-0">
|
||||||
<div className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">
|
<div className="icon w-14 h-14 transition duration-300 ease-in-out rounded-full flex justify-center items-center bg-light-purple dark:bg-dark-light-purple ">
|
||||||
@@ -81,6 +96,7 @@ export default function WalletHeader(props) {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ const validationSchema = Yup.object().shape({
|
|||||||
country: Yup.string()
|
country: Yup.string()
|
||||||
.required("Required"),
|
.required("Required"),
|
||||||
phone_number: Yup.string()
|
phone_number: Yup.string()
|
||||||
.min(9, "Min 9 characters")
|
.min(9, "Invalid")
|
||||||
.max(11, "Max 11 characters")
|
.max(11, "Invalid")
|
||||||
.required("Required"),
|
.required("Required"),
|
||||||
// birthYear: Yup.string()
|
// birthYear: Yup.string()
|
||||||
// .required("Required"),
|
// .required("Required"),
|
||||||
@@ -45,7 +45,7 @@ const VirtualAddCardPopout = ({ details, onClose, situation, walletItem }) => {
|
|||||||
|
|
||||||
const { userDetails } = useSelector((state) => state.userDetails);
|
const { userDetails } = useSelector((state) => state.userDetails);
|
||||||
|
|
||||||
const countryCode = userDetails?.country
|
const countryCode = walletItem?.country
|
||||||
|
|
||||||
const userApi = new usersService()
|
const userApi = new usersService()
|
||||||
|
|
||||||
@@ -177,8 +177,8 @@ const VirtualAddCardPopout = ({ details, onClose, situation, walletItem }) => {
|
|||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
>
|
>
|
||||||
{(props) => (
|
{(props) => (
|
||||||
<Form className="w-full overflow-y-auto">
|
<div className="logout-modal-wrapper mx-auto w-[90%] md:w-[768px] h-auto bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
|
||||||
<div className="logout-modal-wrapper mx-auto w-[90%] lg:w-[900px] h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
|
<Form className="w-full">
|
||||||
<div className="modal-header-con">
|
<div className="modal-header-con">
|
||||||
<h1 className="modal-title">
|
<h1 className="modal-title">
|
||||||
{walletItem?.description}
|
{walletItem?.description}
|
||||||
@@ -209,320 +209,329 @@ const VirtualAddCardPopout = ({ details, onClose, situation, walletItem }) => {
|
|||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="p-4 w-full grid lg:grid-cols-2 gap-4">
|
<div className='p-4 w-full flex flex-col h-auto md:h-[28rem]'>
|
||||||
{/* left part */}
|
<div className='pb-4'>
|
||||||
<div className='w-full flex flex-col gap-4'>
|
|
||||||
<h1 className='text-lg md:text-xl flex gap-1'><span className='font-bold'>Name:</span>{userDetails.lastname} {userDetails.firstname}</h1>
|
<h1 className='text-lg md:text-xl flex gap-1'><span className='font-bold'>Name:</span>{userDetails.lastname} {userDetails.firstname}</h1>
|
||||||
<div className="field w-full grid md:grid-cols-3 gap-4">
|
</div>
|
||||||
<div className="md:col-span-1 field w-full">
|
<div className="grid md:grid-cols-2 gap-4">
|
||||||
|
{/* left part */}
|
||||||
|
<div className='w-full flex flex-col gap-4'>
|
||||||
|
<div className="field w-full grid md:grid-cols-5 gap-4">
|
||||||
|
<div className="md:col-span-2 field w-full">
|
||||||
|
<label
|
||||||
|
htmlFor="country"
|
||||||
|
className="job-label job-label-flex"
|
||||||
|
>
|
||||||
|
<span>Country</span>
|
||||||
|
{props.errors.country && props.touched.country && (
|
||||||
|
<span className="text-[12px] text-red-500">
|
||||||
|
{props.errors.country}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
<select
|
||||||
|
id="country"
|
||||||
|
name="country"
|
||||||
|
value={props.values.country}
|
||||||
|
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
||||||
|
onChange={props.handleChange}
|
||||||
|
disabled={countryCode ? true : false}
|
||||||
|
>
|
||||||
|
{allCountries.loading ?
|
||||||
|
<option className="text-slate-500 text-lg" value="">
|
||||||
|
Loading...
|
||||||
|
</option>
|
||||||
|
: allCountries.data?.length > 0 ?
|
||||||
|
<>
|
||||||
|
<option className="text-slate-500 text-lg" value="">
|
||||||
|
Select Country
|
||||||
|
</option>
|
||||||
|
{allCountries.data?.map(item => (
|
||||||
|
<option key={item.uid} className="text-slate-500 text-lg" value={item.code}>
|
||||||
|
{item.country}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<option className="text-slate-500 text-lg" value="">
|
||||||
|
Not Found
|
||||||
|
</option>
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div className='md:col-span-3'>
|
||||||
|
<InputCom
|
||||||
|
fieldClass="px-6"
|
||||||
|
label="Phone Number"
|
||||||
|
labelClass="tracking-wide"
|
||||||
|
inputBg="bg-slate-100"
|
||||||
|
inputClass="w-full input-curve lg border border-light-purple"
|
||||||
|
type="text"
|
||||||
|
name="phone_number"
|
||||||
|
value={props.values.phone_number}
|
||||||
|
inputHandler={props.handleChange}
|
||||||
|
error={(props.errors.phone_number && props.touched.phone_number) && props.errors.phone_number}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<InputCom
|
||||||
|
disable={true}
|
||||||
|
fieldClass="px-6"
|
||||||
|
label="Email"
|
||||||
|
labelClass="tracking-wide"
|
||||||
|
inputBg="bg-slate-100"
|
||||||
|
inputClass="input-curve lg border border-light-purple"
|
||||||
|
type="text"
|
||||||
|
name="email"
|
||||||
|
value={props.values.email}
|
||||||
|
inputHandler={props.handleChange}
|
||||||
|
error={(props.errors.email && props.touched.email) && props.errors.email}
|
||||||
|
/>
|
||||||
|
<div className="hidden field w-full md:grid-cols-2 gap-4">
|
||||||
|
<InputCom
|
||||||
|
disable={true}
|
||||||
|
fieldClass="px-6"
|
||||||
|
label="Firstname"
|
||||||
|
labelClass="tracking-wide"
|
||||||
|
inputBg="bg-slate-100"
|
||||||
|
inputClass="input-curve lg border border-light-purple"
|
||||||
|
type="text"
|
||||||
|
name="firstname"
|
||||||
|
value={props.values.firstname}
|
||||||
|
inputHandler={props.handleChange}
|
||||||
|
error={(props.errors.firstname && props.touched.firstname) && props.errors.firstname}
|
||||||
|
/>
|
||||||
|
<InputCom
|
||||||
|
disable={true}
|
||||||
|
fieldClass="px-6"
|
||||||
|
label="Lastname"
|
||||||
|
labelClass="tracking-wide"
|
||||||
|
inputBg="bg-slate-100"
|
||||||
|
inputClass="input-curve lg border border-light-purple"
|
||||||
|
type="text"
|
||||||
|
name="lastname"
|
||||||
|
value={props.values.lastname}
|
||||||
|
inputHandler={props.handleChange}
|
||||||
|
error={(props.errors.lastname && props.touched.lastname) && props.errors.lastname}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* hidden section */}
|
||||||
|
<div className="hidden field w-full flex-col gap-4">
|
||||||
|
<p className='job-label'>Date of Birth</p>
|
||||||
|
<div className='xxs:grid-cols-3 gap-4'>
|
||||||
|
<div className="field w-full">
|
||||||
|
<label
|
||||||
|
htmlFor="birthDay"
|
||||||
|
className="job-label job-label-flex"
|
||||||
|
>
|
||||||
|
<span>Day</span>
|
||||||
|
{props.errors.birthDay && props.touched.birthDay && (
|
||||||
|
<span className="text-[12px] text-red-500">
|
||||||
|
{props.errors.birthDay}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
<select
|
||||||
|
id="birthDay"
|
||||||
|
name="birthDay"
|
||||||
|
value={props.values.birthDay}
|
||||||
|
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
||||||
|
onChange={props.handleChange}
|
||||||
|
>
|
||||||
|
<>
|
||||||
|
<option className="text-slate-500 text-lg" value=''>
|
||||||
|
select
|
||||||
|
</option>
|
||||||
|
{day.map(item => (
|
||||||
|
<option key={item} className="text-slate-500 text-lg" value={item}>
|
||||||
|
{item}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div className="field w-full">
|
||||||
|
<label
|
||||||
|
htmlFor="birthMonth"
|
||||||
|
className="job-label job-label-flex"
|
||||||
|
>
|
||||||
|
<span>Month</span>
|
||||||
|
{props.errors.birthMonth && props.touched.birthMonth && (
|
||||||
|
<span className="text-[12px] text-red-500">
|
||||||
|
{props.errors.birthMonth}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
<select
|
||||||
|
id="birthMonth"
|
||||||
|
name="birthMonth"
|
||||||
|
value={props.values.birthMonth}
|
||||||
|
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
||||||
|
onChange={props.handleChange}
|
||||||
|
>
|
||||||
|
<>
|
||||||
|
<option className="text-slate-500 text-lg" value=''>
|
||||||
|
select
|
||||||
|
</option>
|
||||||
|
{month.map(item => (
|
||||||
|
<option key={item.value} className="text-slate-500 text-lg" value={item.value}>
|
||||||
|
{item.name}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div className="field w-full">
|
||||||
|
<label
|
||||||
|
htmlFor="birthYear"
|
||||||
|
className="job-label job-label-flex"
|
||||||
|
>
|
||||||
|
<span>Year</span>
|
||||||
|
{props.errors.birthYear && props.touched.birthYear && (
|
||||||
|
<span className="text-[12px] text-red-500">
|
||||||
|
{props.errors.birthYear}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</label>
|
||||||
|
<select
|
||||||
|
id="birthYear"
|
||||||
|
name="birthYear"
|
||||||
|
value={props.values.birthYear}
|
||||||
|
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
||||||
|
onChange={props.handleChange}
|
||||||
|
>
|
||||||
|
<>
|
||||||
|
<option className="text-slate-500 text-lg" value=''>
|
||||||
|
select
|
||||||
|
</option>
|
||||||
|
{year.map(item => (
|
||||||
|
<option key={item} className="text-slate-500 text-lg" value={item}>
|
||||||
|
{item}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="field w-full grid md:grid-cols-3 gap-4">
|
||||||
|
<p className='hidden md:flex w-full md:col-span-1 job-label items-center'>Date of Birth</p>
|
||||||
|
<div className='w-full md:col-span-2 '>
|
||||||
|
<InputCom
|
||||||
|
fieldClass="px-6"
|
||||||
|
label="Date of Birth"
|
||||||
|
labelClass="md:hidden tracking-wide"
|
||||||
|
inputBg="bg-slate-100"
|
||||||
|
inputClass="input-curve lg border border-light-purple"
|
||||||
|
type="date"
|
||||||
|
name="dob"
|
||||||
|
value={props.values.dob}
|
||||||
|
inputHandler={props.handleChange}
|
||||||
|
error={(props.errors.dob && props.touched.dob) && props.errors.dob}
|
||||||
|
maxDate={year[0] + '-12-31'}
|
||||||
|
minDate={year[year?.length - 1] + '-01-01'}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* right part */}
|
||||||
|
<div className='w-full p-4 flex flex-col gap-4 bg-blue-200 dark:bg-slate-900 rounded-2xl'>
|
||||||
|
<InputCom
|
||||||
|
fieldClass="px-6"
|
||||||
|
label="Address"
|
||||||
|
labelClass="tracking-wide"
|
||||||
|
inputBg="bg-slate-100"
|
||||||
|
inputClass="input-curve lg border border-light-purple"
|
||||||
|
type="text"
|
||||||
|
name="address"
|
||||||
|
value={props.values.address}
|
||||||
|
inputHandler={props.handleChange}
|
||||||
|
error={(props.errors.address && props.touched.address) && props.errors.address}
|
||||||
|
/>
|
||||||
|
<InputCom
|
||||||
|
fieldClass="px-6"
|
||||||
|
label="City"
|
||||||
|
labelClass="tracking-wide"
|
||||||
|
inputBg="bg-slate-100"
|
||||||
|
inputClass="input-curve lg border border-light-purple"
|
||||||
|
type="text"
|
||||||
|
name="city"
|
||||||
|
value={props.values.city}
|
||||||
|
inputHandler={props.handleChange}
|
||||||
|
error={(props.errors.city && props.touched.city) && props.errors.city}
|
||||||
|
/>
|
||||||
|
{/* <InputCom
|
||||||
|
fieldClass="px-6"
|
||||||
|
label="State/Province"
|
||||||
|
labelClass="tracking-wide"
|
||||||
|
inputBg="bg-slate-100"
|
||||||
|
inputClass="input-curve lg border border-light-purple"
|
||||||
|
type="text"
|
||||||
|
name="state"
|
||||||
|
value={props.values.state}
|
||||||
|
inputHandler={props.handleChange}
|
||||||
|
error={(props.errors.state && props.touched.state) && props.errors.state}
|
||||||
|
/> */}
|
||||||
|
|
||||||
|
<div className="field w-full grid md:grid-cols-2 gap-4">
|
||||||
|
<div className="field w-full">
|
||||||
<label
|
<label
|
||||||
htmlFor="country"
|
htmlFor="state"
|
||||||
className="job-label job-label-flex"
|
className="job-label job-label-flex"
|
||||||
>
|
>
|
||||||
<span>Country</span>
|
<span>State/Province</span>
|
||||||
{props.errors.country && props.touched.country && (
|
{props.errors.state && props.touched.state && (
|
||||||
<span className="text-[12px] text-red-500">
|
<span className="text-[12px] text-red-500">
|
||||||
{props.errors.country}
|
{props.errors.state}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</label>
|
</label>
|
||||||
<select
|
<select
|
||||||
id="country"
|
id="state"
|
||||||
name="country"
|
name="state"
|
||||||
value={props.values.country}
|
value={props.values.state}
|
||||||
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
||||||
onChange={props.handleChange}
|
onChange={props.handleChange}
|
||||||
disabled={countryCode ? true : false}
|
|
||||||
>
|
>
|
||||||
{allCountries.loading ?
|
{state.loading ?
|
||||||
<option className="text-slate-500 text-lg" value="">
|
<option className="text-slate-500 text-lg" value="">
|
||||||
Loading...
|
Loading...
|
||||||
</option>
|
|
||||||
: allCountries.data?.length > 0 ?
|
|
||||||
<>
|
|
||||||
<option className="text-slate-500 text-lg" value="">
|
|
||||||
Select Country
|
|
||||||
</option>
|
|
||||||
{allCountries.data?.map(item => (
|
|
||||||
<option key={item.uid} className="text-slate-500 text-lg" value={item.code}>
|
|
||||||
{item.country}
|
|
||||||
</option>
|
</option>
|
||||||
))}
|
: Object.keys(state.data)?.length > 0 ?
|
||||||
</>
|
<>
|
||||||
:
|
<option className="text-slate-500 text-lg" value="">
|
||||||
<option className="text-slate-500 text-lg" value="">
|
Select State
|
||||||
Not Found
|
</option>
|
||||||
</option>
|
{Object.keys(state.data)?.map((item, index) => (
|
||||||
}
|
<option key={index} className="text-slate-500 text-lg" value={item}>
|
||||||
|
{state?.data[item]}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<option className="text-slate-500 text-lg" value="">
|
||||||
|
Not Found
|
||||||
|
</option>
|
||||||
|
}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div className='md:col-span-2'>
|
|
||||||
<InputCom
|
|
||||||
fieldClass="px-6"
|
|
||||||
label="Phone Number"
|
|
||||||
labelClass="tracking-wide"
|
|
||||||
inputBg="bg-slate-100"
|
|
||||||
inputClass="w-full input-curve lg border border-light-purple"
|
|
||||||
type="text"
|
|
||||||
name="phone_number"
|
|
||||||
value={props.values.phone_number}
|
|
||||||
inputHandler={props.handleChange}
|
|
||||||
error={(props.errors.phone_number && props.touched.phone_number) && props.errors.phone_number}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<InputCom
|
|
||||||
disable={true}
|
|
||||||
fieldClass="px-6"
|
|
||||||
label="Email"
|
|
||||||
labelClass="tracking-wide"
|
|
||||||
inputBg="bg-slate-100"
|
|
||||||
inputClass="input-curve lg border border-light-purple"
|
|
||||||
type="text"
|
|
||||||
name="email"
|
|
||||||
value={props.values.email}
|
|
||||||
inputHandler={props.handleChange}
|
|
||||||
error={(props.errors.email && props.touched.email) && props.errors.email}
|
|
||||||
/>
|
|
||||||
<div className="hidden field w-full md:grid-cols-2 gap-4">
|
|
||||||
<InputCom
|
|
||||||
disable={true}
|
|
||||||
fieldClass="px-6"
|
|
||||||
label="Firstname"
|
|
||||||
labelClass="tracking-wide"
|
|
||||||
inputBg="bg-slate-100"
|
|
||||||
inputClass="input-curve lg border border-light-purple"
|
|
||||||
type="text"
|
|
||||||
name="firstname"
|
|
||||||
value={props.values.firstname}
|
|
||||||
inputHandler={props.handleChange}
|
|
||||||
error={(props.errors.firstname && props.touched.firstname) && props.errors.firstname}
|
|
||||||
/>
|
|
||||||
<InputCom
|
|
||||||
disable={true}
|
|
||||||
fieldClass="px-6"
|
|
||||||
label="Lastname"
|
|
||||||
labelClass="tracking-wide"
|
|
||||||
inputBg="bg-slate-100"
|
|
||||||
inputClass="input-curve lg border border-light-purple"
|
|
||||||
type="text"
|
|
||||||
name="lastname"
|
|
||||||
value={props.values.lastname}
|
|
||||||
inputHandler={props.handleChange}
|
|
||||||
error={(props.errors.lastname && props.touched.lastname) && props.errors.lastname}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="field w-full flex flex-col gap-4">
|
|
||||||
<p className='hidden job-label'>Date of Birth</p>
|
|
||||||
<div className='hidden xxs:grid-cols-3 gap-4'>
|
|
||||||
<div className="field w-full">
|
|
||||||
<label
|
|
||||||
htmlFor="birthDay"
|
|
||||||
className="job-label job-label-flex"
|
|
||||||
>
|
|
||||||
<span>Day</span>
|
|
||||||
{props.errors.birthDay && props.touched.birthDay && (
|
|
||||||
<span className="text-[12px] text-red-500">
|
|
||||||
{props.errors.birthDay}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</label>
|
|
||||||
<select
|
|
||||||
id="birthDay"
|
|
||||||
name="birthDay"
|
|
||||||
value={props.values.birthDay}
|
|
||||||
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
|
||||||
onChange={props.handleChange}
|
|
||||||
>
|
|
||||||
<>
|
|
||||||
<option className="text-slate-500 text-lg" value=''>
|
|
||||||
select
|
|
||||||
</option>
|
|
||||||
{day.map(item => (
|
|
||||||
<option key={item} className="text-slate-500 text-lg" value={item}>
|
|
||||||
{item}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div className="field w-full">
|
|
||||||
<label
|
|
||||||
htmlFor="birthMonth"
|
|
||||||
className="job-label job-label-flex"
|
|
||||||
>
|
|
||||||
<span>Month</span>
|
|
||||||
{props.errors.birthMonth && props.touched.birthMonth && (
|
|
||||||
<span className="text-[12px] text-red-500">
|
|
||||||
{props.errors.birthMonth}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</label>
|
|
||||||
<select
|
|
||||||
id="birthMonth"
|
|
||||||
name="birthMonth"
|
|
||||||
value={props.values.birthMonth}
|
|
||||||
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
|
||||||
onChange={props.handleChange}
|
|
||||||
>
|
|
||||||
<>
|
|
||||||
<option className="text-slate-500 text-lg" value=''>
|
|
||||||
select
|
|
||||||
</option>
|
|
||||||
{month.map(item => (
|
|
||||||
<option key={item.value} className="text-slate-500 text-lg" value={item.value}>
|
|
||||||
{item.name}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div className="field w-full">
|
|
||||||
<label
|
|
||||||
htmlFor="birthYear"
|
|
||||||
className="job-label job-label-flex"
|
|
||||||
>
|
|
||||||
<span>Year</span>
|
|
||||||
{props.errors.birthYear && props.touched.birthYear && (
|
|
||||||
<span className="text-[12px] text-red-500">
|
|
||||||
{props.errors.birthYear}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</label>
|
|
||||||
<select
|
|
||||||
id="birthYear"
|
|
||||||
name="birthYear"
|
|
||||||
value={props.values.birthYear}
|
|
||||||
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
|
||||||
onChange={props.handleChange}
|
|
||||||
>
|
|
||||||
<>
|
|
||||||
<option className="text-slate-500 text-lg" value=''>
|
|
||||||
select
|
|
||||||
</option>
|
|
||||||
{year.map(item => (
|
|
||||||
<option key={item} className="text-slate-500 text-lg" value={item}>
|
|
||||||
{item}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div className=''>
|
|
||||||
<InputCom
|
<InputCom
|
||||||
fieldClass="px-6"
|
fieldClass="px-6"
|
||||||
label="Date of Birth"
|
label="Zip Code"
|
||||||
labelClass="tracking-wide"
|
labelClass="tracking-wide"
|
||||||
inputBg="bg-slate-100"
|
inputBg="bg-slate-100"
|
||||||
inputClass="input-curve lg border border-light-purple"
|
inputClass="input-curve lg border border-light-purple"
|
||||||
type="date"
|
type="text"
|
||||||
name="dob"
|
name="zipCode"
|
||||||
value={props.values.dob}
|
value={props.values.zipCode}
|
||||||
inputHandler={props.handleChange}
|
inputHandler={props.handleChange}
|
||||||
error={(props.errors.dob && props.touched.dob) && props.errors.dob}
|
error={(props.errors.zipCode && props.touched.zipCode) && props.errors.zipCode}
|
||||||
maxDate={year[0] + '-12-31'}
|
|
||||||
minDate={year[year?.length - 1] + '-01-01'}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* right part */}
|
|
||||||
<div className='p-4 w-full flex flex-col gap-4 bg-blue-200 dark:bg-slate-900 rounded-2xl'>
|
|
||||||
<InputCom
|
|
||||||
fieldClass="px-6"
|
|
||||||
label="Address"
|
|
||||||
labelClass="tracking-wide"
|
|
||||||
inputBg="bg-slate-100"
|
|
||||||
inputClass="input-curve lg border border-light-purple"
|
|
||||||
type="text"
|
|
||||||
name="address"
|
|
||||||
value={props.values.address}
|
|
||||||
inputHandler={props.handleChange}
|
|
||||||
error={(props.errors.address && props.touched.address) && props.errors.address}
|
|
||||||
/>
|
|
||||||
<InputCom
|
|
||||||
fieldClass="px-6"
|
|
||||||
label="City"
|
|
||||||
labelClass="tracking-wide"
|
|
||||||
inputBg="bg-slate-100"
|
|
||||||
inputClass="input-curve lg border border-light-purple"
|
|
||||||
type="text"
|
|
||||||
name="city"
|
|
||||||
value={props.values.city}
|
|
||||||
inputHandler={props.handleChange}
|
|
||||||
error={(props.errors.city && props.touched.city) && props.errors.city}
|
|
||||||
/>
|
|
||||||
{/* <InputCom
|
|
||||||
fieldClass="px-6"
|
|
||||||
label="State/Province"
|
|
||||||
labelClass="tracking-wide"
|
|
||||||
inputBg="bg-slate-100"
|
|
||||||
inputClass="input-curve lg border border-light-purple"
|
|
||||||
type="text"
|
|
||||||
name="state"
|
|
||||||
value={props.values.state}
|
|
||||||
inputHandler={props.handleChange}
|
|
||||||
error={(props.errors.state && props.touched.state) && props.errors.state}
|
|
||||||
/> */}
|
|
||||||
|
|
||||||
<div className="field w-full grid md:grid-cols-2 gap-4">
|
|
||||||
<div className="field w-full">
|
|
||||||
<label
|
|
||||||
htmlFor="state"
|
|
||||||
className="job-label job-label-flex"
|
|
||||||
>
|
|
||||||
<span>State/Province</span>
|
|
||||||
{props.errors.state && props.touched.state && (
|
|
||||||
<span className="text-[12px] text-red-500">
|
|
||||||
{props.errors.state}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</label>
|
|
||||||
<select
|
|
||||||
id="state"
|
|
||||||
name="state"
|
|
||||||
value={props.values.state}
|
|
||||||
className={`input-field p-2 mt-3 rounded-full placeholder:text-base text-dark-gray w-full h-[42px] bg-slate-100 focus:ring-0 focus:outline-none border`}
|
|
||||||
onChange={props.handleChange}
|
|
||||||
>
|
|
||||||
{state.loading ?
|
|
||||||
<option className="text-slate-500 text-lg" value="">
|
|
||||||
Loading...
|
|
||||||
</option>
|
|
||||||
: Object.keys(state.data)?.length > 0 ?
|
|
||||||
<>
|
|
||||||
<option className="text-slate-500 text-lg" value="">
|
|
||||||
Select State
|
|
||||||
</option>
|
|
||||||
{Object.keys(state.data)?.map((item, index) => (
|
|
||||||
<option key={index} className="text-slate-500 text-lg" value={item}>
|
|
||||||
{state?.data[item]}
|
|
||||||
</option>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
:
|
|
||||||
<option className="text-slate-500 text-lg" value="">
|
|
||||||
Not Found
|
|
||||||
</option>
|
|
||||||
}
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<InputCom
|
|
||||||
fieldClass="px-6"
|
|
||||||
label="Zip Code"
|
|
||||||
labelClass="tracking-wide"
|
|
||||||
inputBg="bg-slate-100"
|
|
||||||
inputClass="input-curve lg border border-light-purple"
|
|
||||||
type="text"
|
|
||||||
name="zipCode"
|
|
||||||
value={props.values.zipCode}
|
|
||||||
inputHandler={props.handleChange}
|
|
||||||
error={(props.errors.zipCode && props.touched.zipCode) && props.errors.zipCode}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -556,8 +565,8 @@ const VirtualAddCardPopout = ({ details, onClose, situation, walletItem }) => {
|
|||||||
</>
|
</>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Form>
|
||||||
</Form>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Formik>
|
</Formik>
|
||||||
</ModalCom>
|
</ModalCom>
|
||||||
|
|||||||
@@ -24,10 +24,12 @@ export default function Resources(props) {
|
|||||||
const ownProducts = products.datas;
|
const ownProducts = products.datas;
|
||||||
// Resource Props
|
// Resource Props
|
||||||
const __resources = props.MyResourceData;
|
const __resources = props.MyResourceData;
|
||||||
|
|
||||||
//debugger;
|
//debugger;
|
||||||
// Collection Items
|
// Collection Items
|
||||||
const CreatedSell = __resources?.marketdata?.data;
|
const CreatedSell = __resources?.marketdata?.data;
|
||||||
const tab_categories = __resources?.tab_categories?.data;
|
// const tab_categories = __resources?.tab_categories?.data?.sort((a, b) => b.name.localeCompare(a.name)) // SORT REMOVED
|
||||||
|
const tab_categories = __resources?.tab_categories?.data
|
||||||
const collectionProducts = __resources?.collectiondata?.data;
|
const collectionProducts = __resources?.collectiondata?.data;
|
||||||
const onSaleProducts = __resources?.marketdata?.data;
|
const onSaleProducts = __resources?.marketdata?.data;
|
||||||
const CreatedBits = __resources?.productdata?.datas;
|
const CreatedBits = __resources?.productdata?.datas;
|
||||||
@@ -77,23 +79,22 @@ export default function Resources(props) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
getUploadedFiles();
|
|
||||||
}, [uploadsTable]);
|
|
||||||
|
|
||||||
// const [tab, setTab] = useState(tab_categories ? tab_categories[0]?.name : "");
|
// const [tab, setTab] = useState(tab_categories ? tab_categories[0]?.name : "");
|
||||||
const [tab, setTab] = useState(
|
const [tab, setTab] = useState(
|
||||||
props.activeTab
|
props.activeTab
|
||||||
? props.activeTab
|
? props.activeTab
|
||||||
: tab_categories
|
: "onsale"
|
||||||
? tab_categories[0]?.name
|
|
||||||
: ""
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const tabHandler = (value) => {
|
const tabHandler = (value) => {
|
||||||
setTab(value);
|
setTab(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getUploadedFiles();
|
||||||
|
}, [uploadsTable]);
|
||||||
|
|
||||||
|
|
||||||
// Category Components
|
// Category Components
|
||||||
const tabComponents = {
|
const tabComponents = {
|
||||||
blog: <BlogTab blogdata={blogItems} />,
|
blog: <BlogTab blogdata={blogItems} />,
|
||||||
|
|||||||
@@ -211,6 +211,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
getMyJobList();
|
getMyJobList();
|
||||||
}, [jobListTable, isLogin.status]);
|
}, [jobListTable, isLogin.status]);
|
||||||
|
|
||||||
|
//FUNCTION TO GET FULL USER WALLETS
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||||
return
|
return
|
||||||
@@ -231,6 +232,8 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
|||||||
getMyWalletList();
|
getMyWalletList();
|
||||||
}, [walletTable, isLogin.status]);
|
}, [walletTable, isLogin.status]);
|
||||||
|
|
||||||
|
|
||||||
|
// FUNCTION TO GET MARKET JOB LIST
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user