Compare commits

...

5 Commits

Author SHA1 Message Date
victorAnumudu 99d9a468f6 clean up on unused APIs 2024-09-25 20:40:37 +01:00
ameye 2ca1c668f5 Merge branch 'appstore-link-image-update' of WrenchBoard/Users-Wrench into master 2024-09-25 15:54:09 +00:00
ameye 0bb9528690 Merge branch 'dashdata-api-removal' of WrenchBoard/Users-Wrench into master 2024-09-25 15:53:57 +00:00
victorAnumudu 78a9c4bf5f Merge with master 2024-09-25 13:24:01 +01:00
victorAnumudu 8be4ee52f1 updated app store link image 2024-09-24 19:40:50 +01:00
8 changed files with 134 additions and 108 deletions
+14 -8
View File
@@ -16,6 +16,9 @@ import { updateUserDetails } from "../../../store/UserDetails";
import ReCAPTCHA from "react-google-recaptcha"; import ReCAPTCHA from "react-google-recaptcha";
import GoogleDownload from '../../../assets/images/download/andriod.jpg'
import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function Login() { export default function Login() {
// eslint-disable-next-line no-restricted-globals // eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
@@ -526,40 +529,43 @@ export default function Login() {
{/* APP DOWNLOAD STORE */} {/* APP DOWNLOAD STORE */}
<div className="w-full mt-4"> <div className="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-28 lg:w-32"> <div className="w-32 lg:w-48">
<a <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" // 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" target="_blank"
rel="noreferrer" rel="noreferrer"
href={process.env.REACT_APP_APPLE_APP} href={process.env.REACT_APP_APPLE_APP}
> >
<i className="fa-brands fa-apple text-3xl"></i> {/* <i className="fa-brands fa-apple text-3xl"></i>
<div className="flex flex-col"> <div className="flex flex-col">
<span className="text-[11px]">Available on the</span> <span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base"> <span className="text-[12px] lg:text-base">
App Store App Store
</span> </span>
</div> </div> */}
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
</a> </a>
</div> </div>
<div className="w-28 lg:w-32"> <div className="w-32 lg:w-48">
<a <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" // 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" target="_blank"
rel="noreferrer" rel="noreferrer"
href={process.env.REACT_APP_ANDROID_APP} href={process.env.REACT_APP_ANDROID_APP}
> >
<i className="fa-brands fa-google-play text-2xl"></i> {/* <i className="fa-brands fa-google-play text-2xl"></i>
<div className="flex flex-col"> <div className="flex flex-col">
<span className="text-[11px]">Available on the</span> <span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base"> <span className="text-[12px] lg:text-base">
Google Play Google Play
</span> </span>
</div> </div> */}
<img src={GoogleDownload} className='w-full h-auto' alt='IOS Download' />
</a> </a>
</div> </div>
</div> </div>
</div> </div>
{loginType == "full" && ( {loginType == "full" && (
<> <>
<div className="pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]"> <div className="pt-5 text-[#181c32] text-center font-semibold text-[13.975px] leading-[20.9625px]">
+4 -4
View File
@@ -179,10 +179,10 @@ export default function Promo() {
</div> </div>
</div> </div>
{/* APP DOWNLOAD STORE */} {/* APP DOWNLOAD STORE */}
<div className="w-full mt-4"> <div className="w-full mt-4">
<div className="w-full flex justify-between items-center gap-10 sm:gap-32"> <div className="w-full flex justify-center items-center gap-4">
<div className="w-full"> <div className="w-32 lg:w-48">
<a <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" // 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" target="_blank"
@@ -199,7 +199,7 @@ export default function Promo() {
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' /> <img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
</a> </a>
</div> </div>
<div className="w-full"> <div className="w-32 lg:w-48">
<a <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" // 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" target="_blank"
+15 -10
View File
@@ -5,6 +5,9 @@ import usersService from "../../../services/UsersService";
import InputCom from "../../Helpers/Inputs/InputCom"; import InputCom from "../../Helpers/Inputs/InputCom";
import AuthLayout from "../AuthLayout2"; import AuthLayout from "../AuthLayout2";
import GoogleDownload from '../../../assets/images/download/andriod.jpg'
import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function SignUp() { export default function SignUp() {
// eslint-disable-next-line no-restricted-globals // eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
@@ -347,36 +350,38 @@ export default function SignUp() {
{/* APP DOWNLOAD STORE */} {/* APP DOWNLOAD STORE */}
<div className="w-full mt-4"> <div className="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-28 lg:w-32"> <div className="w-32 lg:w-48">
<a <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" // 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" target="_blank"
href={process.env.REACT_APP_APPLE_APP}
rel="noreferrer" rel="noreferrer"
href={process.env.REACT_APP_APPLE_APP}
> >
<i className="fa-brands fa-apple text-3xl"></i> {/* <i className="fa-brands fa-apple text-3xl"></i>
<div className="flex flex-col"> <div className="flex flex-col">
<span className="text-[11px]">Available on the</span> <span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base"> <span className="text-[12px] lg:text-base">
App Store App Store
</span> </span>
</div> </div> */}
<img src={IOSDownload} className='w-full h-auto' alt='IOS Download' />
</a> </a>
</div> </div>
<div className="w-28 lg:w-32"> <div className="w-32 lg:w-48">
<a <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" // 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" target="_blank"
href={process.env.REACT_APP_ANDROID_APP}
rel="noreferrer" rel="noreferrer"
href={process.env.REACT_APP_ANDROID_APP}
> >
<i className="fa-brands fa-google-play text-2xl"></i> {/* <i className="fa-brands fa-google-play text-2xl"></i>
<div className="flex flex-col"> <div className="flex flex-col">
<span className="text-[11px]">Available on the</span> <span className="text-[11px]">Available on the</span>
<span className="text-[12px] lg:text-base"> <span className="text-[12px] lg:text-base">
Google Play Google Play
</span> </span>
</div> </div> */}
<img src={GoogleDownload} className='w-full h-auto' alt='IOS Download' />
</a> </a>
</div> </div>
</div> </div>
@@ -179,11 +179,11 @@ const NewOfferCard = ({ datas, hidden = false, price, setOfferPopout, image }) =
<button <button
type="button" type="button"
onClick={() => onClick={() =>
setOfferPopout({ show: true, data: { ...datas, price, image } }) setOfferPopout({ show: true, data: { ...datas, image } })
} }
className="btn-shine w-2/3 h-[40px] text-white rounded-full text-sm bg-pink flex justify-center items-center" className="btn-shine w-2/3 h-[40px] text-white rounded-full text-sm bg-pink flex justify-center items-center"
> >
Start Task Start Now
</button> </button>
</div> </div>
</div> </div>
+9 -10
View File
@@ -61,15 +61,14 @@ export default function FullAccountDash(props) {
<AccountDashboard className="mb-4" bannerList={props.bannerList} offersList={props.offersList} imageServer={props.imageServer} /> <AccountDashboard className="mb-4" bannerList={props.bannerList} offersList={props.offersList} imageServer={props.imageServer} />
)} )}
{ {/* {props?.dashTypes !== "undefined" &&
// props?.dashTypes !== "undefined" && props.offersList?.data?.result_list?.length ? (
// props.offersList?.data?.result_list?.length ? ( <MyOffersTable
// <MyOffersTable MyActiveOffersList={props.offersList?.data}
// MyActiveOffersList={props.offersList?.data} className="mb-10"
// className="mb-10" />
// /> )
// ) :
// :
props.MyActiveJobList?.data?.length ? ( props.MyActiveJobList?.data?.length ? (
<> <>
<div className="w-full mb-5 flex justify-between items-center gap-1"> <div className="w-full mb-5 flex justify-between items-center gap-1">
@@ -83,7 +82,7 @@ export default function FullAccountDash(props) {
imageServer={props.offersList?.data?.session_image_server} imageServer={props.offersList?.data?.session_image_server}
/> />
</> </>
) : null} ) : null} */}
</div> </div>
</> </>
); );
+18 -18
View File
@@ -14,19 +14,19 @@ export default function Home(props) {
const { userDetails } = useSelector((state) => state?.userDetails); const { userDetails } = useSelector((state) => state?.userDetails);
const [MyActiveJobList, setMyActiveJobList] = useState({loading:true, data:[]}); // STATE TO HOLD ACTIVE/CURRENT TASKS // const [MyActiveJobList, setMyActiveJobList] = useState({loading:true, data:[]}); // STATE TO HOLD ACTIVE/CURRENT TASKS
const getMyActiveJobList = async () => { // FUNCTION TO POPULATE ACTIVE/CURRENT TASK LIST // const getMyActiveJobList = async () => { // FUNCTION TO POPULATE ACTIVE/CURRENT TASK LIST
try { // try {
const res = await userApi.getMyActiveTaskList(); // const res = await userApi.getMyActiveTaskList();
setMyActiveJobList({loading:false, data:res?.data?.result_list}); // setMyActiveJobList({loading:false, data:res?.data?.result_list});
// setMyActiveJobList(res?.data?.result_list); // // setMyActiveJobList(res?.data?.result_list);
} catch (error) { // } catch (error) {
setMyActiveJobList({loading:false, data:[]}); // setMyActiveJobList({loading:false, data:[]});
// setMyActiveJobList([]); // // setMyActiveJobList([]);
console.log("Error getting tasks"); // console.log("Error getting tasks");
} // }
}; // };
// FUNCTION TO GET DASH DATA TO DETERMINE CURRENT TASK DUE TIME // FUNCTION TO GET DASH DATA TO DETERMINE CURRENT TASK DUE TIME
// const getHomeDate = () => { // const getHomeDate = () => {
@@ -53,11 +53,11 @@ export default function Home(props) {
// } // }
// }; // };
useEffect(() => { // useEffect(() => {
if(userDetails?.account_type == 'FULL'){ // if(userDetails?.account_type == 'FULL'){
getMyActiveJobList(); // getMyActiveJobList();
} // }
}, []); // }, []);
return ( return (
<Layout> <Layout>
@@ -78,7 +78,7 @@ export default function Home(props) {
bannerList={props.bannerList} bannerList={props.bannerList}
dashTypes={props.dashTypes} dashTypes={props.dashTypes}
// offersList={MyOffersList} // offersList={MyOffersList}
MyActiveJobList={MyActiveJobList} // MyActiveJobList={MyActiveJobList}
offersList={props.offersList} offersList={props.offersList}
imageServer={props.imageServer} imageServer={props.imageServer}
/> />
+50 -36
View File
@@ -8,6 +8,7 @@ import LoadingSpinner from "../Spinners/LoadingSpinner";
import { tableReload } from "../../store/TableReloads"; import { tableReload } from "../../store/TableReloads";
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { PriceFormatter } from "../Helpers/PriceFormatter";
function OfferJobPopout({ details, onClose, situation }) { function OfferJobPopout({ details, onClose, situation }) {
const apiUrl = new usersService(); const apiUrl = new usersService();
@@ -21,6 +22,12 @@ function OfferJobPopout({ details, onClose, situation }) {
trigger: "", trigger: "",
}); });
let thePrice = PriceFormatter(
details?.price * 0.01,
details?.currency_code,
details?.currency
);
//FUNCTION TO HANDLE AN OFFER //FUNCTION TO HANDLE AN OFFER
const handleOffer = ({ target: { name } }) => { const handleOffer = ({ target: { name } }) => {
const reqData = { const reqData = {
@@ -135,54 +142,60 @@ function OfferJobPopout({ details, onClose, situation }) {
</div> </div>
<div className="md:flex bg-white dark:bg-dark-white rounded-lg"> <div className="md:flex bg-white dark:bg-dark-white rounded-lg">
<div className="p-4 w-full md:w-3/4 md:border-r-2"> <div className="p-4 w-full md:w-3/4 md:border-r-2">
<p className="text-lg my-5 font-semibold text-slate-900 dark:text-white tracking-wide">
{details.title}
</p>
{/* INPUT SECTION */} {/* INPUT SECTION */}
<div className="my-2 md:flex"> <div className='grid md:grid-cols-2'>
<Detail <div className="my-2 md:flex">
label="Date" <Detail
value={ label="Date"
(details.offer_added && details.offer_added?.split(" ")[0]) || value={
"default" (details.offer_added && details.offer_added?.split(" ")[0]) ||
} "default"
/> }
/>
</div>
<div className="my-2 md:flex">
<Detail
label="Offer Expire"
value={details.expire && details.expire.split(" ")[0]}
/>
</div>
</div> </div>
<div className='grid md:grid-cols-2'>
<div className="my-2 md:flex">
<Detail label="Reward" value={thePrice} />
</div>
<div className="my-2 md:flex">
<Detail
label="Duration"
value={`${details.timeline_days} day(s)`}
/>
</div>
</div>
<p className="text-lg my-5 font-semibold text-slate-900 dark:text-white tracking-wide line-clamp-1">
{details.title}
</p>
<div className="my-2 md:flex"> <div className="my-2 md:flex">
<Detail label="Description" value={details.description} /> <Detail label="Description" value={details.description} />
</div> </div>
<div className="my-2 md:flex">
<Detail
label="Offer Expire"
value={details.expire && details.expire.split(" ")[0]}
/>
</div>
<div className="my-2 md:flex"> <div className="my-2 md:flex">
<Detail label="Reward" value={details.thePrice} /> <label className='job-label w-full md:w-[150px]'>Detail</label>
</div> <p className={`p-1 w-full md:w-3/4 text-sm text-slate-900 dark:text-white min-h-[100px] max-h-[200px] overflow-y-auto border boder-2 rounded-md`}>{details.job_description || details.job_detail}</p>
<div className="my-2 md:flex">
<Detail
label="Duration"
value={`${details.timeline_days} day(s)`}
/>
</div>
<div className="my-2 md:flex">
<Detail
label="Detail"
value={details.job_description || details.description}
/>
</div> </div>
</div> </div>
{/* ACTION SECTION */} {/* ACTION SECTION */}
<div className="p-4 w-full md:w-1/4 h-full"> <div className="p-4 w-full md:w-1/4 h-full">
<div className="my-3 md:flex md:justify-center"> <div className="my-3 md:flex flex-col md:justify-center">
<h1 className='mb-2 text-base font-semibold text-slate-900 dark:text-white tracking-wide'>I understand the task</h1>
{requestStatus.loading && requestStatus.trigger == "offer" ? ( {requestStatus.loading && requestStatus.trigger == "offer" ? (
<LoadingSpinner size={8} color="sky-blue" /> <LoadingSpinner size={8} color="sky-blue" />
) : ( ) : (
@@ -190,9 +203,9 @@ function OfferJobPopout({ details, onClose, situation }) {
name="accept" name="accept"
onClick={handleOffer} onClick={handleOffer}
disabled={requestStatus.loading} disabled={requestStatus.loading}
className="px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white" className="px-2 h-28 flex justify-center items-center btn-gradient text-2xl rounded-xl text-white"
> >
Accept Offer Start Now
</button> </button>
)} )}
</div> </div>
@@ -205,9 +218,10 @@ function OfferJobPopout({ details, onClose, situation }) {
name="reject" name="reject"
onClick={handleOffer} onClick={handleOffer}
disabled={requestStatus.loading} disabled={requestStatus.loading}
className="px-2 h-11 flex justify-center items-center btn-gradient text-base rounded-full text-white" className="group relative px-2 h-11 flex justify-center items-center text-base text-black dark:text-white"
> >
Reject Offer Reject Offer
<div className='absolute bottom-1 w-full h-[1px] bg-black hidden group-hover:block'></div>
</button> </button>
)} )}
</div> </div>
+22 -20
View File
@@ -111,8 +111,8 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
} }
}, []); }, []);
useEffect(() => { useEffect(() => { // FUNCTION TO GET NOTIFICATIONS LIST
const getNotifications = () => { const notifications = () => {
// function to load user notification // function to load user notification
dispatch(updateNotifications({ loading: true })); dispatch(updateNotifications({ loading: true }));
apiCall apiCall
@@ -168,7 +168,9 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
dispatch(updateNotifications({ loading: false, data: null })); dispatch(updateNotifications({ loading: false, data: null }));
}); });
}; };
getNotifications(); // delay verify requests by 10000ms
const delay15secs = setTimeout(notifications, 15000)
return ()=> clearTimeout(delay15secs)
}, []); }, []);
useEffect(() => { useEffect(() => {
@@ -248,23 +250,23 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
}, [isLogin.status]); }, [isLogin.status]);
//FUNCTION TO GET COMMON HEAD DATA //FUNCTION TO GET COMMON HEAD DATA
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
} // }
apiCall // apiCall
.getRecentActivitiedData() // .getRecentActivitiedData()
.then((res) => { // .then((res) => {
// debugger; // // debugger;
if (res?.data?.internal_return < 0) { // if (res?.data?.internal_return < 0) {
return; // return;
} // }
dispatch(recentActivitiesData(res.data)); // dispatch(recentActivitiesData(res.data));
}) // })
.catch((error) => { // .catch((error) => {
console.log("ERROR ", error); // console.log("ERROR ", error);
}); // });
}, [isLogin.status]); // }, [isLogin.status]);
//FUNCTION TO GET FAMILY BANNERS //FUNCTION TO GET FAMILY BANNERS