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
ameye b0b36c53d0 Merge branch 'login_modal_style_updated' of WrenchBoard/Users-Wrench into master 2024-11-14 12:39:38 +00:00
Victor 387d30b011 modal style updated 2024-11-14 08:04:02 +01:00
24 changed files with 192 additions and 148 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_USERS_ENDPOINT="http://10.20.30.32:9083/svs/user"
# REACT_APP_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/svs/user"
# REACT_APP_USERS_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.orion.g1.wrenchboard.com/svs/user"
REACT_APP_AUX_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1"
REACT_APP_USERS_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.orion.g1.wrenchboard.com/en/wrench/api/v1"
REACT_APP_ENDPOINT_KEY="WRENCH-BOARD-2024"
#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"
@@ -35,13 +35,20 @@ REACT_APP_RESET_START_ERROR_TIMEOUT=3000
#NUMBER OF ITEMS PER PAGE
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
REACT_APP_GOOGLE_CLIENT_ID=817021856543-ad9nsjgdpsu2s2jrl63j3ihrv7lbf6ma.apps.googleusercontent.com
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_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
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_LOGOUT_TEXT="Sign Out"
REACT_APP_APPLE_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
# FOR MEDIA LINK
REACT_APP_MEDIA_LINK='https://dev-media.wrenchboard.com'
REACT_APP_MEDIA_LINK='https://media.wrenchboard.com'
# FOR FAMILY GAME LINK
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
#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-toastify": "^9.0.1",
"redux": "^4.2.0",
"socket.io-client": "^4.4.1",
"slick-carousel": "^1.8.1",
"socket.io-client": "^4.4.1",
"web-vitals": "^1.0.1",
"yup": "^1.1.1"
},
"scripts": {
"start": "react-scripts start -e .env.development",
"start": "react-scripts start -e .env.production",
"build": "react-scripts build -e .env.production",
"test": "react-scripts test",
"eject": "react-scripts eject"
+2 -1
View File
@@ -13,7 +13,8 @@ else
# build the app and serve it via nginx
echo "Production build"
npm install --legacy-peer-deps
npm run build
#npm run build
npm start
nginx -g 'daemon off;' -c /usr/src/app/nginx.conf
nginx -c /usr/src/app/nginx.conf
fi
Binary file not shown.

After

Width:  |  Height:  |  Size: 503 KiB

@@ -16,11 +16,12 @@ import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function LoginLanding() {
const dispatch = useDispatch();
const location = useLocation();
const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const navigate = useNavigate();
const userApi = new usersService();
+4 -3
View File
@@ -17,12 +17,13 @@ import { updateUserDetails } from "../../../store/UserDetails";
import ReCAPTCHA from "react-google-recaptcha";
export default function Login() {
const dispatch = useDispatch();
const location = useLocation();
// eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const [sessionExpired, setSessionExpired] = useState(queryParams.get("sessionExpired"))
@@ -220,7 +221,7 @@ export default function Login() {
let loginValue = readCookie("loginType");
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
setMsgError("Unexpected Error, Please try again soon.");
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'
export default function Login() {
const dispatch = useDispatch();
const location = useLocation();
// eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const [sessionExpired, setSessionExpired] = useState(
queryParams.get("sessionExpired")
@@ -200,8 +201,8 @@ export default function Login() {
// }, []);
useEffect(()=>{
if(state && state.loginType){
setLoginType(state.loginType)
if(location?.state && location?.state.loginType){
setLoginType(location?.state.loginType)
}else{
navigate('/login', {replace: true})
}
+3 -2
View File
@@ -6,12 +6,13 @@ import InputCom from "../../Helpers/Inputs/InputCom";
import AuthLayout from "../AuthLayout";
export default function SignUp() {
const location = useLocation()
// eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search);
const country = queryParams.get("cnt")?.toUpperCase();
const {pathname} = useLocation()
const currentPath = country ? `${pathname}?cnt=${country.toLowerCase()}`:pathname // Determines the new pathname is country query params exist
const currentPath = country ? `${location?.pathname}?cnt=${country.toLowerCase()}`:location?.pathname // Determines the new pathname is country query params exist
const [signUpLoading, setSignUpLoading] = 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'
export default function SignUp() {
const location = useLocation();
// eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search);
const country = queryParams.get("cnt")?.toUpperCase();
const { pathname } = useLocation();
const currentPath = country
? `${pathname}?cnt=${country.toLowerCase()}`
: pathname; // Determines the new pathname is country query params exist
? `${location?.pathname}?cnt=${country.toLowerCase()}`
: location?.pathname; // Determines the new pathname is country query params exist
const [signUpLoading, setSignUpLoading] = useState(false);
const [checked, setValue] = useState(false);
+3 -1
View File
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from "react";
import { useSelector } from "react-redux";
import { useNavigate } from "react-router-dom";
import { useNavigate, useLocation } from "react-router-dom";
import usersService from "../../services/UsersService";
import CustomBreadcrumb from "../Breadcrumb/CustomBreadcrumb";
import Layout from "../Partials/Layout";
@@ -9,6 +9,8 @@ import CommonHead from "../UserHeader/CommonHead";
export default function BlogItem(props) {
const location = useLocation()
const {
userDetails: { account_type },
} = useSelector((state) => state?.userDetails); // CHECKS IF USER Details account type
@@ -105,7 +105,7 @@ const RelativePopout = ({
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}` : "";
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'>
{relativeEditKids.loading && relativeEditKids.family_uid == item.family_uid?
<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="min-w-[30px] min-h-[30px] max-w-[30px] max-h-[30px] rounded-full overflow-hidden flex justify-center items-center">
<img
src={image || localImgLoad(`images/icons/${banner}`)}
src={image || localImgLoad(`images/icons/family.svg`)}
alt={`Avatar`}
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
let { pathname } = useLocation();
let location = useLocation();
const queryParams = new URLSearchParams(location?.search);
const preSelectedTab = queryParams.get("tab");
@@ -91,7 +91,7 @@ function Wallet({wallet, familyData, setFamilyWalletReload}) {
action == 'ADD_VIRTUAL_CARD' ?
openVirtualPopUp({wallet})
:
null
()=>{}
}}
className={`w-[150px] h-[48px] rounded-full text-base text-white bg-[#4687ba] hover:bg-[#009ef7]`}
>
+1 -1
View File
@@ -147,7 +147,7 @@ export default function FamilyDash({ MyActiveJobList=[], serverImg }) {
{/* last_login */}
{(!familyBannersList?.loading && firstTimeModal) &&
<HomeModal action={()=>setFirstTimeModal(prev => !prev)} situation={firstTimeModal} />
<HomeModal userDetails={userDetails} action={()=>setFirstTimeModal(prev => !prev)} situation={firstTimeModal} />
}
</>
);
+51 -38
View File
@@ -1,7 +1,11 @@
import React from 'react'
import ModalCom from '../Helpers/ModalCom'
import ModalBG from '../../assets/images/modalbg.png'
export default function HomeModal({userDetails, action, situation}) {
const {firstname, lastname} = userDetails
export default function HomeModal({action, situation}) {
const options = [
'Suggest Task to Parent', 'Suggest Task to Parent'
]
@@ -12,47 +16,56 @@ export default function HomeModal({action, situation}) {
return (
<>
<ModalCom action={action} situation={situation}>
<div className="modal-wrapper w-11/12 md:w-[600px] bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
<div className="modal-header-con">
<h1 className="modal-title">
What will you want to do?
</h1>
<button type="button" className="modal-close-btn" onClick={action}>
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" className="fill-current" xmlns="http://www.w3.org/2000/svg">
<path d="M36 16.16C36 17.4399 36 18.7199 36 20.0001C35.7911 20.0709 35.8636 20.2554 35.8385 20.4001C34.5321 27.9453 30.246 32.9248 22.9603 35.2822C21.9006 35.6251 20.7753 35.7657 19.6802 35.9997C18.4003 35.9997 17.1204 35.9997 15.8401 35.9997C15.5896 35.7086 15.2189 35.7732 14.9034 35.7093C7.77231 34.2621 3.08728 30.0725 0.769671 23.187C0.435002 22.1926 0.445997 21.1199 0 20.1599C0 18.7198 0 17.2798 0 15.8398C0.291376 15.6195 0.214408 15.2656 0.270759 14.9808C1.71321 7.69774 6.02611 2.99691 13.0428 0.700951C14.0118 0.383805 15.0509 0.386897 15.9999 0C17.2265 0 18.4532 0 19.6799 0C19.7156 0.124041 19.8125 0.136067 19.9225 0.146719C27.3 0.868973 33.5322 6.21922 35.3801 13.427C35.6121 14.3313 35.7945 15.2484 36 16.16ZM33.011 18.0787C33.0433 9.77105 26.3423 3.00309 18.077 2.9945C9.78479 2.98626 3.00344 9.658 2.98523 17.8426C2.96667 26.1633 9.58859 32.9601 17.7602 33.0079C26.197 33.0577 32.9787 26.4186 33.011 18.0787Z" fill="" fillOpacity="0.6" />
<path d="M15.9309 18.023C13.9329 16.037 12.007 14.1207 10.0787 12.2072C9.60071 11.733 9.26398 11.2162 9.51996 10.506C9.945 9.32677 11.1954 9.0811 12.1437 10.0174C13.9067 11.7585 15.6766 13.494 17.385 15.2879C17.9108 15.8401 18.1633 15.7487 18.6375 15.258C20.3586 13.4761 22.1199 11.7327 23.8822 9.99096C24.8175 9.06632 26.1095 9.33639 26.4967 10.517C26.7286 11.2241 26.3919 11.7413 25.9133 12.2178C24.1757 13.9472 22.4477 15.6855 20.7104 17.4148C20.5228 17.6018 20.2964 17.7495 20.0466 17.9485C22.0831 19.974 24.0372 21.8992 25.9689 23.8468C26.9262 24.8119 26.6489 26.1101 25.4336 26.4987C24.712 26.7292 24.2131 26.3441 23.7455 25.8757C21.9945 24.1227 20.2232 22.3892 18.5045 20.6049C18.0698 20.1534 17.8716 20.2269 17.4802 20.6282C15.732 22.4215 13.9493 24.1807 12.1777 25.951C11.7022 26.4262 11.193 26.7471 10.4738 26.4537C9.31345 25.9798 9.06881 24.8398 9.98589 23.8952C11.285 22.5576 12.6138 21.2484 13.9387 19.9355C14.5792 19.3005 15.2399 18.6852 15.9309 18.023Z" fill="#" fillOpacity="0.6" />
</svg>
</button>
</div>
<div className="logout-modal-body w-full flex flex-col gap-2 items-center p-4">
<div className="hidden what-icon cursor-pointer">
<svg width="50" height="50" viewBox="0 0 136 136" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="68" cy="68" r="68" fill="#4687ba" />
<path d="M69.8844 35.7891C71.1588 36.0357 72.4569 36.1967 73.7044 36.5423C81.5447 38.7098 87.2705 45.5378 87.9574 53.6156C88.5113 60.1147 86.3075 65.6006 81.5043 70.0195C79.8359 71.5545 78.0497 72.9604 76.3408 74.4534C76.127 74.6397 75.9654 75.0037 75.9604 75.2872C75.9284 77.2752 75.9435 79.2649 75.9435 81.2965C70.8895 81.2965 65.8758 81.2965 60.7915 81.2965C60.7915 81.0616 60.7915 80.8385 60.7915 80.6137C60.7915 76.5454 60.7999 72.4772 60.7797 68.4106C60.778 67.9392 60.9312 67.649 61.2831 67.3537C64.5643 64.5957 67.8271 61.8175 71.1033 59.0545C72.2616 58.0781 72.9215 56.8702 72.9081 55.3419C72.8878 52.916 70.8608 50.9146 68.423 50.8911C65.9701 50.8693 63.9145 52.8053 63.832 55.2328C63.8084 55.8988 63.8286 56.5665 63.8286 57.2695C58.7745 57.2695 53.7744 57.2695 48.6917 57.2695C48.6917 56.3149 48.6462 55.3385 48.6984 54.3655C49.222 44.699 56.7442 36.8745 66.4331 35.8914C66.5762 35.8763 66.7142 35.8243 66.854 35.7891C67.8641 35.7891 68.8742 35.7891 69.8844 35.7891Z" fill="white" />
<path d="M67.485 100.21C66.1617 99.9268 64.9041 99.5091 63.803 98.6787C61.3804 96.8484 60.2877 93.7699 61.0386 90.7888C61.7726 87.8747 64.2138 85.6703 67.2089 85.2157C71.273 84.6 75.2024 87.3681 75.8135 91.277C76.4937 95.6153 73.8202 99.3782 69.544 100.103C69.4429 100.12 69.3487 100.172 69.2527 100.209C68.6635 100.21 68.0742 100.21 67.485 100.21Z" fill="white" />
</svg>
</div>
<div className="w-full flex flex-col gap-2">
{options.map(item =>(
<div onClick={onSelectOption} className='w-full rounded-md p-2 cursor-pointer bg-sky-200'>
<p className="text-lg tracking-wide text-dark-gray dark:text-white">
{item}
</p>
</div>
))}
<div className=''>
<div className='fixed top-0 left-0 bottom-0 w-full bg-black bg-opacity-40 backdrop-filter backdrop-blur-sm z-50'></div>
<div className='fixed h-full z-[99999999999999] w-full lg:w-auto inset-0 flex flex-col justify-center items-center overflow-y-auto'>
<div className="relative w-11/12 md:w-[600px] lg:w-[992px] rounded-2xl overflow-hidden">
<div className='relative p-4 bg-sky-blue flex items-center'>
<img className='block w-2/3 max-w-lg mx-auto' src={ModalBG} alt='modal image' />
<div className='absolute text-white top-5 right-5'>
<button
type="button"
className="text-white"
onClick={onSelectOption}
>
<svg
width="36"
height="36"
viewBox="0 0 36 36"
fill="none"
className="fill-current"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M36 16.16C36 17.4399 36 18.7199 36 20.0001C35.7911 20.0709 35.8636 20.2554 35.8385 20.4001C34.5321 27.9453 30.246 32.9248 22.9603 35.2822C21.9006 35.6251 20.7753 35.7657 19.6802 35.9997C18.4003 35.9997 17.1204 35.9997 15.8401 35.9997C15.5896 35.7086 15.2189 35.7732 14.9034 35.7093C7.77231 34.2621 3.08728 30.0725 0.769671 23.187C0.435002 22.1926 0.445997 21.1199 0 20.1599C0 18.7198 0 17.2798 0 15.8398C0.291376 15.6195 0.214408 15.2656 0.270759 14.9808C1.71321 7.69774 6.02611 2.99691 13.0428 0.700951C14.0118 0.383805 15.0509 0.386897 15.9999 0C17.2265 0 18.4532 0 19.6799 0C19.7156 0.124041 19.8125 0.136067 19.9225 0.146719C27.3 0.868973 33.5322 6.21922 35.3801 13.427C35.6121 14.3313 35.7945 15.2484 36 16.16ZM33.011 18.0787C33.0433 9.77105 26.3423 3.00309 18.077 2.9945C9.78479 2.98626 3.00344 9.658 2.98523 17.8426C2.96667 26.1633 9.58859 32.9601 17.7602 33.0079C26.197 33.0577 32.9787 26.4186 33.011 18.0787Z"
fill=""
fillOpacity="0.6"
/>
<path
d="M15.9309 18.023C13.9329 16.037 12.007 14.1207 10.0787 12.2072C9.60071 11.733 9.26398 11.2162 9.51996 10.506C9.945 9.32677 11.1954 9.0811 12.1437 10.0174C13.9067 11.7585 15.6766 13.494 17.385 15.2879C17.9108 15.8401 18.1633 15.7487 18.6375 15.258C20.3586 13.4761 22.1199 11.7327 23.8822 9.99096C24.8175 9.06632 26.1095 9.33639 26.4967 10.517C26.7286 11.2241 26.3919 11.7413 25.9133 12.2178C24.1757 13.9472 22.4477 15.6855 20.7104 17.4148C20.5228 17.6018 20.2964 17.7495 20.0466 17.9485C22.0831 19.974 24.0372 21.8992 25.9689 23.8468C26.9262 24.8119 26.6489 26.1101 25.4336 26.4987C24.712 26.7292 24.2131 26.3441 23.7455 25.8757C21.9945 24.1227 20.2232 22.3892 18.5045 20.6049C18.0698 20.1534 17.8716 20.2269 17.4802 20.6282C15.732 22.4215 13.9493 24.1807 12.1777 25.951C11.7022 26.4262 11.193 26.7471 10.4738 26.4537C9.31345 25.9798 9.06881 24.8398 9.98589 23.8952C11.285 22.5576 12.6138 21.2484 13.9387 19.9355C14.5792 19.3005 15.2399 18.6852 15.9309 18.023Z"
fill="#"
fillOpacity="0.6"
/>
</svg>
</button>
</div>
</div>
<div className="hidden modal-footer-wrapper --flex-- justify-center items-center gap-5">
<button onClick={()=>{}} type="button" className="text-white primary-gradient text-18 tracking-wide px-4 py-3 rounded-full">
{`Yes ${process.env.REACT_APP_LOGOUT_TEXT}`}
</button>
<button onClick={action} type="button" className=" border-gradient text-18 tracking-wide px-4 py-3 rounded-full">
<span className="text-gradient">Not Now</span>
</button>
<div className='p-4 bg-slate-100'>
<div className='w-2/3 max-w-5xl mx-auto flex flex-col gap-4 tracking-wider'>
{/* <h1 className='text-3xl'>Welcome to <span className='font-semibold'>WrenchBoard</span></h1> */}
<h1 className='text-3xl'>Welcome <span className='font-semibold'>{firstname} {lastname}</span></h1>
<p className='text-2xl'>
Here's where you can explore informative vidoes that provide valuable insight
into <span className='font-semibold'>how you can connect with siblings and family and explore more on personal development</span>
</p>
<div className='self-end'>
<button onClick={onSelectOption} className='bg-sky-blue px-4 py-2 text-xl text-white rounded-lg'>Done</button>
</div>
</div>
</div>
</div>
</ModalCom>
</div>
</div>
</>
)
}
@@ -10,13 +10,14 @@ import ActiveJobMessageMedia from "./ActiveJobMessageMedia";
import IndexJobActions from "./JobActions/IndexJobActions";
import MediaLayout from "../Partials/MediaLayout";
const VideoElement = lazy(() => import("../VideoCom/VideoElement"));
import usersService from "../../services/UsersService";
import { PriceFormatter } from "../Helpers/PriceFormatter";
import { SocketValues } from "../Contexts/SocketIOContext";
import TabButton from "../customTabs/TabButton";
const VideoElement = lazy(() => import("../VideoCom/VideoElement"));
function ActiveJobsMedia(props) {
let {sendMessage, joinRoom} = SocketValues() // destructures 'SEND MESSAGE' and 'JOIN ROOM' FUNCTIONS FROM SOCKET
+1 -1
View File
@@ -52,7 +52,7 @@ function WalletAction({ walletItem, payment, openPopUp }) {
: action == 'ADD_VIRTUAL_CARD' ?
openVirtualPopUp({walletItem})
:
null
()=>{}
}}
className={`${
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='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>
<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 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>
+3
View File
@@ -1,8 +1,11 @@
import React, { useEffect, useState } from "react";
import {useLocation} from 'react-router-dom'
import DarkModeContext from "../Contexts/DarkModeContext";
import axios from 'axios'
function Default({ children }) {
const location = useLocation()
// dark mode setup
const [theme, setTheme] = useState(null);
+9 -9
View File
@@ -11,7 +11,7 @@ import { useReactToPrint } from 'react-to-print'
const Iframe = lazy(() => import("../Iframe/Iframe"));
export default function FamGames() {
export default function FamGames(props) {
const ApiCall = new usersService();
const navigate = useNavigate();
@@ -40,7 +40,7 @@ export default function FamGames() {
// FUNCTION TO HANDLE POPOUT
const popUpHandler = () => {
setPopUp((prev) => !prev);
// setPopUp((prev) => !prev);
};
// FUNCTION TO HANDLE MESSAGE CHANGE
@@ -136,7 +136,7 @@ export default function FamGames() {
message: "Message Sent Successfully",
});
// 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
setMessageToSend(""); // SENDS MESSAGE TO SEND BACK TO EMPTY STRINGS
@@ -176,12 +176,12 @@ export default function FamGames() {
const fileToBase64 = async () => {
// Converts file data to base64 string
try {
const base64String = await convertFileToBase64(filesToSend[i]);
return base64String;
} catch (error) {
return false;
}
// try {
// const base64String = await convertFileToBase64(filesToSend[i]);
// return base64String;
// } catch (error) {
// return false;
// }
};
// if(await !fileToBase64()){
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from 'react'
import LoadingSpinner from '../Spinners/LoadingSpinner'
export default function InfiniteScroll({
allData=data,
allData=[],
addItemBy=12,
intialItemsToShow=39,
children
+14 -14
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();
@@ -222,11 +222,11 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
const res = await apiCall.getUserWallets();
// 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])
+58 -49
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
}
});
}
@@ -1686,7 +1689,7 @@ class usersService {
return Axios.post(endPoint, reqData)
.then((response) => {
// console.log(response);
console.log("~~~~~~~ WrenchBoard::POST ~~~~~~~~");
// 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
}
});
}
@@ -1753,7 +1759,7 @@ class usersService {
.then((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
}
});
}
+3
View File
@@ -1,5 +1,6 @@
import React, { useState, useEffect } from "react";
import MyTasks from "../components/MyTasks";
import {useLocation} from 'react-router-dom'
// 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";
export default function MyTaskPage() {
const location = useLocation()
const api = new usersService();
const queryParams = new URLSearchParams(location?.search);
const tab = queryParams.get("tab")?.toLowerCase();