Compare commits

...

10 Commits

Author SHA1 Message Date
Victor b6908b84af fixed some build bug issues 2024-11-20 19:24:19 +01:00
CHIEFSOFT\ameye f5eef3f679 make production only 2024-11-20 11:59:08 -05:00
CHIEFSOFT\ameye 339a0063ce temporary 2024-11-20 11:52:40 -05:00
CHIEFSOFT\ameye e1ffca88af Return vack 2024-11-20 11:41:18 -05:00
CHIEFSOFT\ameye 96f3e3ed18 temporary use 2024-11-20 11:35:40 -05:00
ameye 49b10cc57b Merge branch 'more_log_removal' of WrenchBoard/Users-Wrench into master 2024-11-20 15:11:36 +00:00
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
37 changed files with 168 additions and 137 deletions
+16 -10
View File
@@ -9,15 +9,15 @@ REACT_APP_APPSITE="https://myfitapp.mermsemr.com"
# REACT_APP_AUX_ENDPOINT="http://10.20.30.32:9083/svs/user" # REACT_APP_AUX_ENDPOINT="http://10.20.30.32:9083/svs/user"
# REACT_APP_USERS_ENDPOINT="http://10.20.30.32:9083/svs/user" # REACT_APP_USERS_ENDPOINT="http://10.20.30.32:9083/svs/user"
# REACT_APP_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user" #REACT_APP_AUX_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/svs/user"
# REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user" #REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/svs/user"
REACT_APP_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1" REACT_APP_AUX_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/en/wrench/api/v1"
REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1" REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/en/wrench/api/v1"
REACT_APP_ENDPOINT_KEY="WRENCH-BOARD-2024" REACT_APP_ENDPOINT_KEY="WRENCH-BOARD-2024"
#SOCKETS ENDS #SOCKETS ENDS
REACT_APP_PRIMARY_SOCKET="https://socket-dev.wrenchboard.com" REACT_APP_PRIMARY_SOCKET="https://socket.wrenchboard.com"
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser" #"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
@@ -35,13 +35,20 @@ REACT_APP_RESET_START_ERROR_TIMEOUT=3000
#NUMBER OF ITEMS PER PAGE #NUMBER OF ITEMS PER PAGE
REACT_APP_ITEM_PER_PAGE=5 REACT_APP_ITEM_PER_PAGE=5
#apigate.lotus.g1.wrenchboard.com:76.209.103.227 #apigate.orion.g1.wrenchboard.com:76.209.103.227
#apigate.orion.g1.wrenchboard.com:76.209.103.227 #apigate.orion.g1.wrenchboard.com:76.209.103.227
REACT_APP_GOOGLE_CLIENT_ID=817021856543-ad9nsjgdpsu2s2jrl63j3ihrv7lbf6ma.apps.googleusercontent.com REACT_APP_GOOGLE_CLIENT_ID=817021856543-ad9nsjgdpsu2s2jrl63j3ihrv7lbf6ma.apps.googleusercontent.com
REACT_APP_GOOGLE_CLIENT_SECRET=aozK_2G8UjaCmLgPPkv9abIm REACT_APP_GOOGLE_CLIENT_SECRET=aozK_2G8UjaCmLgPPkv9abIm
REACT_APP_GOOGLE_CLIENT_SCOPE="https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile" REACT_APP_GOOGLE_CLIENT_SCOPE="https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile"
REACT_APP_GOOGLE_REDIRECT_URL=http://localhost:9082/login/auth/ REACT_APP_GOOGLE_REDIRECT_URL=https://users.wrenchboard.com/login/auth/
REACT_APP_FACEBOOK_CLIENT_ID2=390204307987009
REACT_APP_FACEBOOK_CLIENT_SECRET2=19f778e312f2ab96d147bacb612910c2
REACT_APP_FACEBOOK_CLIENT_SCOPE="email,public_profile"
REACT_APP_FACEBOOK_REDIRECT_URL="https://users.wrenchboard.com/login/auth/flogin"
DISABLE_ESLINT_PLUGIN=true
#File Handling #File Handling
REACT_APP_MAX_FILE_SIZE=1048576 REACT_APP_MAX_FILE_SIZE=1048576
@@ -49,7 +56,6 @@ REACT_APP_MAX_VIDEO_FILE_SIZE=31457280
REACT_APP_TOTAL_NUM_FILE=4 REACT_APP_TOTAL_NUM_FILE=4
REACT_APP_LOGOUT_TEXT="Sign Out" REACT_APP_LOGOUT_TEXT="Sign Out"
REACT_APP_APPLE_SOCIAL_LOGIN=0 REACT_APP_APPLE_SOCIAL_LOGIN=0
REACT_APP_LINKEDIN_SOCIAL_LOGIN=0 REACT_APP_LINKEDIN_SOCIAL_LOGIN=0
@@ -88,7 +94,7 @@ REACT_APP_SHOW_ACCOUNT_DASH=1
REACT_APP_SHOW_SLIDER_BANNERS=0 REACT_APP_SHOW_SLIDER_BANNERS=0
# FOR MEDIA LINK # FOR MEDIA LINK
REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com' REACT_APP_MEDIA_LINK='https://media.wrenchboard.com'
# FOR FAMILY GAME LINK # FOR FAMILY GAME LINK
REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com' REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
@@ -97,4 +103,4 @@ REACT_APP_FAM_GAME_LINK='https://games.wrenchboard.com'
REACT_APP_CUSTOMTIMER=90 REACT_APP_CUSTOMTIMER=90
#SHOW OR HIDE MY PAGE LINK ROUTE #SHOW OR HIDE MY PAGE LINK ROUTE
REACT_APP_SHOW_USER_PAGE=1 REACT_APP_SHOW_USER_PAGE=0
+2 -2
View File
@@ -30,13 +30,13 @@
"react-to-print": "^2.14.12", "react-to-print": "^2.14.12",
"react-toastify": "^9.0.1", "react-toastify": "^9.0.1",
"redux": "^4.2.0", "redux": "^4.2.0",
"socket.io-client": "^4.4.1",
"slick-carousel": "^1.8.1", "slick-carousel": "^1.8.1",
"socket.io-client": "^4.4.1",
"web-vitals": "^1.0.1", "web-vitals": "^1.0.1",
"yup": "^1.1.1" "yup": "^1.1.1"
}, },
"scripts": { "scripts": {
"start": "react-scripts start -e .env.development", "start": "react-scripts start -e .env.production",
"build": "react-scripts build -e .env.production", "build": "react-scripts build -e .env.production",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject" "eject": "react-scripts eject"
+2 -1
View File
@@ -13,7 +13,8 @@ else
# build the app and serve it via nginx # build the app and serve it via nginx
echo "Production build" echo "Production build"
npm install --legacy-peer-deps npm install --legacy-peer-deps
npm run build #npm run build
npm start
nginx -g 'daemon off;' -c /usr/src/app/nginx.conf nginx -g 'daemon off;' -c /usr/src/app/nginx.conf
nginx -c /usr/src/app/nginx.conf nginx -c /usr/src/app/nginx.conf
fi fi
@@ -16,11 +16,12 @@ import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function LoginLanding() { export default function LoginLanding() {
const dispatch = useDispatch();
const location = useLocation();
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired"); // const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const navigate = useNavigate(); const navigate = useNavigate();
const userApi = new usersService(); const userApi = new usersService();
+4 -3
View File
@@ -17,12 +17,13 @@ import { updateUserDetails } from "../../../store/UserDetails";
import ReCAPTCHA from "react-google-recaptcha"; import ReCAPTCHA from "react-google-recaptcha";
export default function Login() { export default function Login() {
const dispatch = useDispatch();
const location = useLocation();
// 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);
// const sessionExpired = queryParams.get("sessionExpired"); // const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const [sessionExpired, setSessionExpired] = useState(queryParams.get("sessionExpired")) const [sessionExpired, setSessionExpired] = useState(queryParams.get("sessionExpired"))
@@ -220,7 +221,7 @@ export default function Login() {
let loginValue = readCookie("loginType"); let loginValue = readCookie("loginType");
setLoginType(loginValue); setLoginType(loginValue);
if (state?.error) { if (location?.state?.error) {
//check if the login path has an error state indicating any social handle login with error //check if the login path has an error state indicating any social handle login with error
setMsgError("Unexpected Error, Please try again soon."); setMsgError("Unexpected Error, Please try again soon.");
setTimeout(() => { setTimeout(() => {
+5 -4
View File
@@ -20,12 +20,13 @@ import GoogleDownload from '../../../assets/images/download/andriod.jpg'
import IOSDownload from '../../../assets/images/download/apple.jpg' import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function Login() { export default function Login() {
const dispatch = useDispatch();
const location = useLocation();
// 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);
// const sessionExpired = queryParams.get("sessionExpired"); // const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const [sessionExpired, setSessionExpired] = useState( const [sessionExpired, setSessionExpired] = useState(
queryParams.get("sessionExpired") queryParams.get("sessionExpired")
@@ -200,8 +201,8 @@ export default function Login() {
// }, []); // }, []);
useEffect(()=>{ useEffect(()=>{
if(state && state.loginType){ if(location?.state && location?.state.loginType){
setLoginType(state.loginType) setLoginType(location?.state.loginType)
}else{ }else{
navigate('/login', {replace: true}) navigate('/login', {replace: true})
} }
+3 -2
View File
@@ -6,12 +6,13 @@ import InputCom from "../../Helpers/Inputs/InputCom";
import AuthLayout from "../AuthLayout"; import AuthLayout from "../AuthLayout";
export default function SignUp() { export default function SignUp() {
const location = useLocation()
// 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);
const country = queryParams.get("cnt")?.toUpperCase(); const country = queryParams.get("cnt")?.toUpperCase();
const {pathname} = useLocation() const currentPath = country ? `${location?.pathname}?cnt=${country.toLowerCase()}`:location?.pathname // Determines the new pathname is country query params exist
const currentPath = country ? `${pathname}?cnt=${country.toLowerCase()}`:pathname // Determines the new pathname is country query params exist
const [signUpLoading, setSignUpLoading] = useState(false); const [signUpLoading, setSignUpLoading] = useState(false);
const [checked, setValue] = useState(false); const [checked, setValue] = useState(false);
+4 -3
View File
@@ -9,14 +9,15 @@ import GoogleDownload from '../../../assets/images/download/andriod.jpg'
import IOSDownload from '../../../assets/images/download/apple.jpg' import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function SignUp() { export default function SignUp() {
const location = useLocation();
// 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);
const country = queryParams.get("cnt")?.toUpperCase(); const country = queryParams.get("cnt")?.toUpperCase();
const { pathname } = useLocation();
const currentPath = country const currentPath = country
? `${pathname}?cnt=${country.toLowerCase()}` ? `${location?.pathname}?cnt=${country.toLowerCase()}`
: pathname; // Determines the new pathname is country query params exist : location?.pathname; // Determines the new pathname is country query params exist
const [signUpLoading, setSignUpLoading] = useState(false); const [signUpLoading, setSignUpLoading] = useState(false);
const [checked, setValue] = useState(false); const [checked, setValue] = useState(false);
@@ -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 &&
@@ -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 &&
+6 -4
View File
@@ -1,14 +1,16 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom"; import { useSelector } from "react-redux";
import { useNavigate, useLocation } 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) {
const location = useLocation()
const { const {
userDetails: { account_type }, userDetails: { account_type },
} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details account type } = useSelector((state) => state?.userDetails); // CHECKS IF USER Details account type
@@ -26,7 +28,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,
@@ -105,7 +105,7 @@ const RelativePopout = ({
const isChecked = relativeSettings?.data?.filter(value => value?.family_uid == item?.family_uid) const isChecked = relativeSettings?.data?.filter(value => value?.family_uid == item?.family_uid)
const image = localStorage.getItem("session_token") ? `${familyList?.imageServer}${localStorage.getItem("session_token")}/family/${item?.family_uid}` : ""; const image = localStorage.getItem("session_token") ? `${familyList?.imageServer}${localStorage.getItem("session_token")}/family/${item?.family_uid}` : "";
return ( return (
<div key={item.family_uid || index} className="flex items-center border-b dark:border-[#5356fb29] hover:bg-gray-50"> <div key={item.family_uid} className="flex items-center border-b dark:border-[#5356fb29] hover:bg-gray-50">
<div className='p-2 flex justify-center items-center'> <div className='p-2 flex justify-center items-center'>
{relativeEditKids.loading && relativeEditKids.family_uid == item.family_uid? {relativeEditKids.loading && relativeEditKids.family_uid == item.family_uid?
<LoadingSpinner size='4' color='bg-sky-500' /> <LoadingSpinner size='4' color='bg-sky-500' />
@@ -122,7 +122,7 @@ const RelativePopout = ({
<div className="flex space-x-2 items-center w-full"> <div className="flex space-x-2 items-center w-full">
<div className="min-w-[30px] min-h-[30px] max-w-[30px] max-h-[30px] rounded-full overflow-hidden flex justify-center items-center"> <div className="min-w-[30px] min-h-[30px] max-w-[30px] max-h-[30px] rounded-full overflow-hidden flex justify-center items-center">
<img <img
src={image || localImgLoad(`images/icons/${banner}`)} src={image || localImgLoad(`images/icons/family.svg`)}
alt={`Avatar`} alt={`Avatar`}
className="w-full h-full" className="w-full h-full"
/> />
+1 -1
View File
@@ -18,7 +18,7 @@ export default function FamilyTableNew() {
const { jobListTable, pendingListTable, parentFamilyTaskList } = useSelector((state) => state.tableReload); // TABLE RELOAD TRIGGERS const { jobListTable, pendingListTable, parentFamilyTaskList } = useSelector((state) => state.tableReload); // TABLE RELOAD TRIGGERS
let { pathname } = useLocation(); let location = useLocation();
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
const preSelectedTab = queryParams.get("tab"); const preSelectedTab = queryParams.get("tab");
@@ -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: {} });
@@ -91,7 +91,7 @@ function Wallet({wallet, familyData, setFamilyWalletReload}) {
action == 'ADD_VIRTUAL_CARD' ? action == 'ADD_VIRTUAL_CARD' ?
openVirtualPopUp({wallet}) openVirtualPopUp({wallet})
: :
null ()=>{}
}} }}
className={`w-[150px] h-[48px] rounded-full text-base text-white bg-[#4687ba] hover:bg-[#009ef7]`} className={`w-[150px] h-[48px] rounded-full text-base text-white bg-[#4687ba] hover:bg-[#009ef7]`}
> >
+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
+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) => {
@@ -10,13 +10,14 @@ import ActiveJobMessageMedia from "./ActiveJobMessageMedia";
import IndexJobActions from "./JobActions/IndexJobActions"; import IndexJobActions from "./JobActions/IndexJobActions";
import MediaLayout from "../Partials/MediaLayout"; import MediaLayout from "../Partials/MediaLayout";
const VideoElement = lazy(() => import("../VideoCom/VideoElement"));
import usersService from "../../services/UsersService"; import usersService from "../../services/UsersService";
import { PriceFormatter } from "../Helpers/PriceFormatter"; import { PriceFormatter } from "../Helpers/PriceFormatter";
import { SocketValues } from "../Contexts/SocketIOContext"; import { SocketValues } from "../Contexts/SocketIOContext";
import TabButton from "../customTabs/TabButton"; import TabButton from "../customTabs/TabButton";
const VideoElement = lazy(() => import("../VideoCom/VideoElement"));
function ActiveJobsMedia(props) { function ActiveJobsMedia(props) {
let {sendMessage, joinRoom} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET let {sendMessage, joinRoom} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET
+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
+1 -1
View File
@@ -52,7 +52,7 @@ function WalletAction({ walletItem, payment, openPopUp }) {
: action == 'ADD_VIRTUAL_CARD' ? : action == 'ADD_VIRTUAL_CARD' ?
openVirtualPopUp({walletItem}) openVirtualPopUp({walletItem})
: :
null ()=>{}
}} }}
className={`${ className={`${
walletItem?.code != "NAIRA" && "" walletItem?.code != "NAIRA" && ""
@@ -399,7 +399,8 @@ export default function ManageInterestOffer(props) {
<div className='mb-4 border-b-2 flex flex-col xxs:flex-row md:flex-col justify-center items-center gap-4'> <div className='mb-4 border-b-2 flex flex-col xxs:flex-row md:flex-col justify-center items-center gap-4'>
<div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'> <div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'>
<p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Wallet:</p> <p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Wallet:</p>
<span className="font-medium text-dark-gray dark:text-white">{ walletDetails?.loading ? 'loading...' : PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency)}</span> {/* <span className="font-medium text-dark-gray dark:text-white">{ walletDetails?.loading ? 'loading...' : PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency)}</span> */}
<span className="font-medium text-dark-gray dark:text-white">{ walletBal.length > 0 ? PriceFormatter(walletBal[0]?.amount * 0.01,props?.offerDetails?.currency_code,props?.offerDetails?.currency) : 'loading...'}</span>
</div> </div>
<div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'> <div className='w-full flex flex-col lg:flex-row justify-center items-center gap-2'>
<p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Reward:</p> <p className="text-lg font-bold text-dark-gray dark:text-white tracking-wide">Reward:</p>
+3
View File
@@ -1,8 +1,11 @@
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import {useLocation} from 'react-router-dom'
import DarkModeContext from "../Contexts/DarkModeContext"; import DarkModeContext from "../Contexts/DarkModeContext";
import axios from 'axios' import axios from 'axios'
function Default({ children }) { function Default({ children }) {
const location = useLocation()
// dark mode setup // dark mode setup
const [theme, setTheme] = useState(null); const [theme, setTheme] = useState(null);
+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!'})
} }
+9 -9
View File
@@ -11,7 +11,7 @@ import { useReactToPrint } from 'react-to-print'
const Iframe = lazy(() => import("../Iframe/Iframe")); const Iframe = lazy(() => import("../Iframe/Iframe"));
export default function FamGames() { export default function FamGames(props) {
const ApiCall = new usersService(); const ApiCall = new usersService();
const navigate = useNavigate(); const navigate = useNavigate();
@@ -40,7 +40,7 @@ export default function FamGames() {
// FUNCTION TO HANDLE POPOUT // FUNCTION TO HANDLE POPOUT
const popUpHandler = () => { const popUpHandler = () => {
setPopUp((prev) => !prev); // setPopUp((prev) => !prev);
}; };
// FUNCTION TO HANDLE MESSAGE CHANGE // FUNCTION TO HANDLE MESSAGE CHANGE
@@ -136,7 +136,7 @@ export default function FamGames() {
message: "Message Sent Successfully", message: "Message Sent Successfully",
}); });
// function to trigger socket to emit 'send_message' // function to trigger socket to emit 'send_message'
sendMessage(messageToSend, `${props.details.contract}-${props.details.contract_uid}`) // sendMessage(messageToSend, `${props.details.contract}-${props.details.contract_uid}`)
props.reloadActiveJobList((prev) => !prev); // MAKES ACTIVE JOB MESSAGE LIST TO RELOAD props.reloadActiveJobList((prev) => !prev); // MAKES ACTIVE JOB MESSAGE LIST TO RELOAD
setMessageToSend(""); // SENDS MESSAGE TO SEND BACK TO EMPTY STRINGS setMessageToSend(""); // SENDS MESSAGE TO SEND BACK TO EMPTY STRINGS
@@ -176,12 +176,12 @@ export default function FamGames() {
const fileToBase64 = async () => { const fileToBase64 = async () => {
// Converts file data to base64 string // Converts file data to base64 string
try { // try {
const base64String = await convertFileToBase64(filesToSend[i]); // const base64String = await convertFileToBase64(filesToSend[i]);
return base64String; // return base64String;
} catch (error) { // } catch (error) {
return false; // return false;
} // }
}; };
// if(await !fileToBase64()){ // if(await !fileToBase64()){
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
import LoadingSpinner from '../Spinners/LoadingSpinner' import LoadingSpinner from '../Spinners/LoadingSpinner'
export default function InfiniteScroll({ export default function InfiniteScroll({
allData=data, allData=[],
addItemBy=12, addItemBy=12,
intialItemsToShow=39, intialItemsToShow=39,
children children
+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:[]})
+3
View File
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from "react"; import React, { useState, useEffect } from "react";
import MyTasks from "../components/MyTasks"; import MyTasks from "../components/MyTasks";
import {useLocation} from 'react-router-dom'
// import UsersService from "../services/UsersService"; // import UsersService from "../services/UsersService";
import usersService from "../services/UsersService"; import usersService from "../services/UsersService";
@@ -7,6 +8,8 @@ import { useSelector } from "react-redux";
import RecentlyPastDue from "../components/MyTasks/RecentlyPastDue"; import RecentlyPastDue from "../components/MyTasks/RecentlyPastDue";
export default function MyTaskPage() { export default function MyTaskPage() {
const location = useLocation()
const api = new usersService(); const api = new usersService();
const queryParams = new URLSearchParams(location?.search); const queryParams = new URLSearchParams(location?.search);
const tab = queryParams.get("tab")?.toLowerCase(); const tab = queryParams.get("tab")?.toLowerCase();