Compare commits

...

4 Commits

20 changed files with 100 additions and 91 deletions
@@ -84,7 +84,7 @@ export default function VerifyLink() {
const verifyRes = await userApi.verifyEmail(code);
if (verifyRes.status === 200) {
let { data } = verifyRes;
console.log("TESTING VERIFY", data);
// console.log("TESTING VERIFY", data);
if (
data &&
data.internal_return >= 0 &&
@@ -92,7 +92,7 @@ export default function VerifyLink() {
const verifyRes = await userApi.verifyEmail(code);
if (verifyRes.status === 200) {
let { data } = verifyRes;
console.log("TESTING VERIFY", data);
// console.log("TESTING VERIFY", data);
if (
data &&
data.internal_return >= 0 &&
+3 -3
View File
@@ -1,11 +1,11 @@
import React, { useEffect, useState } from "react";
import { useSelector } from "react-redux";
import { useNavigate } from "react-router-dom";
import usersService from "../../services/UsersService";
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
import Layout from "../Partials/Layout";
import LoadingSpinner from "../Spinners/LoadingSpinner";
import CommonHead from "../UserHeader/CommonHead";
import { useSelector } from "react-redux";
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
export default function BlogItem(props) {
@@ -26,7 +26,7 @@ export default function BlogItem(props) {
const queryParams = new URLSearchParams(location?.search);
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(()=>{
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
dispatch(tableReload({type:'OFFERINTERESTLISTRELOAD'}))
}
console.log('data', data)
// console.log('data', data)
});
// dispatch(tableReload({ type: "HOMEBANNERS" })); // RELOADS HOME BANNERS
@@ -93,7 +93,7 @@ const AssignTaskPopout = ({
const [formState, setFormState] = useState({
// Initialize form state with desired fields
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 || "",
title: details?.title || "",
description: details?.description || "",
@@ -115,7 +115,7 @@ const AssignTaskPopout = ({
let reqData = {};
if (taskType == "select" && assignType == 'task') {
// RUNS HERE IF TASK TYPE IS SELECT
if (!Object.keys(activeTask.data).length) {
if (!Object.keys(activeTask.data)?.length) {
setRequestStatus({
loading: false,
status: false,
@@ -43,7 +43,7 @@ const FamilyNewWaitlist = ({
setContinueTaskPopup({ show: false, data: {} });
};
console.log("Check this >>",continueTaskPopup)
// console.log("Check this >>",continueTaskPopup)
return (
<div
@@ -148,18 +148,18 @@ const FamilyWaitlist = memo(
)}
{popUp.show && (
<SuggestTask
details={popUp.data}
details={popUp?.data}
onClose={closePopUp}
continuePopupData={openContinueTaskPopup}
situation={popUp.show}
situation={popUp?.show}
/>
)}
{continueTaskPopup.show && (
<AssignTaskPopout
details={continueTaskPopup.data}
details={continueTaskPopup?.data}
action={closeContinueTaskPopup}
situation={continueTaskPopup.show}
situation={continueTaskPopup?.show}
setUpdatePage={setUpdatePage}
jobList={jobList}
setActiveTask={setActiveTask}
@@ -6,7 +6,7 @@ import VirtualAddCardFamilyPopout from './VirtualAddCardFamilyPopout'
function Wallet({wallet, familyData, setFamilyWalletReload}) {
const [addFundPopout, setAddFundPopout] = useState({ show: false, data: {} })
console.log('WALLET', wallet.brand)
// console.log('WALLET', wallet.brand)
// virtual add card popout
const [virtualPopup, setVirtualPopup] = useState({ show: false, data: {} });
+1 -1
View File
@@ -49,7 +49,7 @@ export default function HomeActivities({ className }) {
getRecentActivities();
}, []);
console.log(recentActivitiesData);
// console.log(recentActivitiesData);
return (
<div
+1 -1
View File
@@ -41,7 +41,7 @@ export default function LockJob({
apiCall
.getVerifyCompletedTask({ offer_depend_uid: details?.offer_depend_uid })
.then((res) => {
console.log("RES", res.data);
// console.log("RES", res.data);
setCompletedTask({ loading: false, data: res?.data?.result_list });
})
.catch((err) => {
+1 -1
View File
@@ -9,7 +9,7 @@ export default function MyActiveJobs(props) {
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
// console.log("AMEYE LOC1", props.MyJobList);
return (
<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 buySlider = useRef(null);
const prevHandler = (value) => {
+1 -1
View File
@@ -26,7 +26,7 @@ export default function MyTasks({
let accountType = userDetails?.account_type == "FULL"
console.log("Active something >>", MyActiveOffersList)
// console.log("Active something >>", MyActiveOffersList)
return (
<Layout>
+1 -1
View File
@@ -9,7 +9,7 @@ export default function MyWaitingJobs(props) {
const filterHandler = (value) => {
setValue(value);
};
console.log("AMEYE LOC1", props.MyJobList);
// console.log("AMEYE LOC1", props.MyJobList);
return (
<Layout>
<CommonHead
+2 -2
View File
@@ -35,8 +35,8 @@ export default function Resources(props) {
const CreatedBits = __resources?.productdata?.datas;
const blogItems = __resources?.blogdata?.payload;
console.log(__resources);
console.log("Blog data >> ", blogItems);
// console.log(__resources);
// console.log("Blog data >> ", blogItems);
// My Items Data
const [uploadedFiles, setUploadedFiles] = useState({
@@ -42,7 +42,7 @@ export default function QuestionsTab({ className, products }) {
question: ''
}
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){
setRequestStatus({loading: false, status: false, message: 'No result found!'})
}
@@ -44,7 +44,7 @@ export default function FamAIQuestion() {
question: ''
}
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){
setRequestStatus({loading: false, status: false, message: 'No result found!'})
}
+15 -15
View File
@@ -93,7 +93,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall
.loadProfile()
.then((res) => {
if (res.data.internal_return < 0) {
if (res?.data?.internal_return < 0) {
setIsLogin({ loading: false, status: false });
return;
}
@@ -119,13 +119,13 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall
.getHeroJBanners()
.then((res) => {
if (res.data?.internal_return < 0) {
if (res?.data?.internal_return < 0) {
return;
}
dispatch(commonHeadBanner(res.data));
})
.catch((error) => {
console.log("ERROR ", error);
// console.log("ERROR ", error);
});
}, [isLogin.status, homeBanners]);
@@ -136,7 +136,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall
.getMyNotifications()
.then((res) => {
if (res.data.internal_return < 0) {
if (res?.data?.internal_return < 0) {
dispatch(updateNotifications({ loading: false, data: null }));
return;
}
@@ -201,11 +201,11 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
const res = await apiCall.getMyJobList();
// setMyJobList({loading: false, data:res.data})
// setMyJobList(res.data);
dispatch(updateUserJobList({ loading: false, data: res.data }));
dispatch(updateUserJobList({ loading: false, data: res?.data }));
} catch (error) {
dispatch(updateUserJobList({ loading: false, data: [] }));
// setMyJobList({loading: false, data:[]})
console.log("Error getting mode");
// console.log("Error getting mode");
}
};
getMyJobList();
@@ -220,13 +220,13 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
dispatch(updateWalletDetails({ loading: true, data: [] }));
try {
const res = await apiCall.getUserWallets();
console.log("wallet - >", res.data);
// console.log("wallet - >", res.data);
dispatch(
updateWalletDetails({ loading: false, data: res.data?.result_list })
updateWalletDetails({ loading: false, data: res?.data?.result_list })
);
} catch (error) {
dispatch(updateWalletDetails({ loading: false, data: [] }));
console.log("Error getting mode");
// console.log("Error getting mode");
}
};
getMyWalletList();
@@ -246,7 +246,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
dispatch(updateJobs({loading: false, ...res.data}));
} catch (error) {
dispatch(updateJobs({loading: false}));
console.log("Error getting mode");
// console.log("Error getting mode");
}
};
getMarketActiveJobList();
@@ -281,10 +281,10 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
// setFamilyBannersList({loading:true, result:[]});
try {
const res = await apiCall.getFamilyBannersList();
dispatch(familyBannersList({...res.data, loading:false}))
dispatch(familyBannersList({...res?.data, loading:false}))
} catch (error) {
dispatch(familyBannersList({loading:false}))
console.log("Error getting tasks");
// console.log("Error getting tasks");
}
};
getFamilyBanners()
@@ -301,7 +301,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
dispatch(familyResources(res?.data?.result_list))
// console.log('RESPONSE', res?.data?.result_list)
} catch (error) {
console.log("Error getting tasks");
// console.log("Error getting tasks");
}
};
getFamilyResourcesList()
@@ -318,7 +318,7 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
apiCall.getFamilyWalletRedeemOptions().then((res)=>{
dispatch(familyWalletRedeemOptList({loading: false, image: res?.data?.session_image_server, data:res?.data?.result_list}))
}).catch((err)=>{
console.log(err)
// console.log(err)
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
if(loggedIn || isLogin.status){
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])
+60 -51
View File
@@ -3,7 +3,7 @@ import { apiConst } from "../lib/apiConst";
class usersService {
constructor() {
console.log("WRB Service Entry");
// console.log("WRB Service Entry");
}
MyPageIntro(reqData) {
@@ -1644,19 +1644,22 @@ class usersService {
},
})
.then((response) => {
console.log("~~~~~~~ Toks2 GET ~~~~~~~~");
// console.log("~~~~~~~ Toks2 GET ~~~~~~~~");
return response;
})
.catch((error) => {
if (error.response) {
//response status is an error code
console.log(error.response.status);
// console.log(error.response.status);
return
} else if (error.request) {
//response not received though the request was sent
console.log(error.request);
// console.log(error.request);
return
} else {
//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)
.then((response) => {
console.log(response);
console.log("~~~~~~~ WrenchBoard::POST ~~~~~~~~");
// console.log(response);
// console.log("~~~~~~~ WrenchBoard::POST ~~~~~~~~");
if (response.data.internal_return == "-9999") {
localStorage.clear();
window.location.href = `/login?sessionExpired=true`;
@@ -1696,31 +1699,34 @@ class usersService {
.catch((error) => {
if (error.response) {
//response status is an error code
console.log(
"ERROR-------------------------------------------------------"
);
console.log(error.response.status);
console.log(
"ERROR-------------------------------------------------------"
);
// console.log(
// "ERROR-------------------------------------------------------"
// );
// console.log(error.response.status);
// console.log(
// "ERROR-------------------------------------------------------"
// );
return
} else if (error.request) {
//response not received though the request was sent
console.log(
"ERROR2-------------------------------------------------------"
);
console.log(error?.request);
console.log(
"ERROR2-------------------------------------------------------"
);
// console.log(
// "ERROR2-------------------------------------------------------"
// );
// console.log(error?.request);
// console.log(
// "ERROR2-------------------------------------------------------"
// );
return
} else {
//an error occurred when setting up the request
console.log(
"ERROR3-------------------------------------------------------"
);
console.log(error);
console.log(
"ERROR3-------------------------------------------------------"
);
// console.log(
// "ERROR3-------------------------------------------------------"
// );
// console.log(error);
// console.log(
// "ERROR3-------------------------------------------------------"
// );
return
}
});
}
@@ -1751,9 +1757,9 @@ class usersService {
// Axios.defaults.headers['X-API-KEY'] = endPointKey;
return Axios.post(endPoint, reqData)
.then((response) => {
console.log(response);
// console.log(response);
// res = response;
console.log("~~~~~~~ Toks2 POST ~~~~~~~~");
// console.log("~~~~~~~ Toks2 POST ~~~~~~~~");
if (response.data.internal_return == "-9999") {
localStorage.clear();
window.location.href = `/login?sessionExpired=true`;
@@ -1763,31 +1769,34 @@ class usersService {
.catch((error) => {
if (error.response) {
//response status is an error code
console.log(
"ERROR-------------------------------------------------------"
);
console.log(error.response.status);
console.log(
"ERROR-------------------------------------------------------"
);
// console.log(
// "ERROR-------------------------------------------------------"
// );
// console.log(error.response.status);
// console.log(
// "ERROR-------------------------------------------------------"
// );
return
} else if (error.request) {
//response not received though the request was sent
console.log(
"ERROR2-------------------------------------------------------"
);
console.log(error?.request);
console.log(
"ERROR2-------------------------------------------------------"
);
// console.log(
// "ERROR2-------------------------------------------------------"
// );
// console.log(error?.request);
// console.log(
// "ERROR2-------------------------------------------------------"
// );
return
} else {
//an error occurred when setting up the request
console.log(
"ERROR3-------------------------------------------------------"
);
console.log(error);
console.log(
"ERROR3-------------------------------------------------------"
);
// console.log(
// "ERROR3-------------------------------------------------------"
// );
// console.log(error);
// console.log(
// "ERROR3-------------------------------------------------------"
// );
return
}
});
}
+1 -1
View File
@@ -12,7 +12,7 @@ export default function MyPastDueTasksPage() {
const getMyJobList = async () => {
try {
const res = await api.getMyPastDueJobList();
console.log("DATA", res.data);
// console.log("DATA", res.data);
setMyJobList({loading:false, data:res.data})
} catch (error) {
setMyJobList({loading:false, data:[]})