Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b257a6db6 | |||
| 1407cb9769 | |||
| 6c68c2361c | |||
| 75015e84d2 | |||
| 24a5b8e785 | |||
| 03ca576e16 | |||
| 8886544024 | |||
| cadd2aa4c4 | |||
| 104cd15f64 | |||
| 3acdbfb6e0 | |||
| f30600816b | |||
| 627774c910 | |||
| ee59990d85 | |||
| 7f4d8f3ff0 | |||
| b888e9f5df |
@@ -0,0 +1,30 @@
|
||||
SKIP_PREFLIGHT_CHECK=true
|
||||
|
||||
REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246"
|
||||
REACT_APP_TWITTER="https://twitter.com/fluxtra"
|
||||
|
||||
REACT_APP_APPSITE="https://myfitapp.mermsemr.com"
|
||||
#REACT_APP_APPSITE="http://localhost:7012"
|
||||
|
||||
|
||||
# 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.lotus.g1.wrenchboard.com/en/wrench/api/v1"
|
||||
#REACT_APP_USERS_ENDPOINT="https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1"
|
||||
|
||||
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||
|
||||
REACT_APP_SESSION_EXPIRE_MINUTES=300000
|
||||
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
||||
|
||||
REACT_APP_LOGIN_ERROR_TIMEOUT=7000
|
||||
REACT_APP_SIGNUP_ERROR_TIMEOUT=7000
|
||||
|
||||
# Had to change the error time to 3sec cause it took too long
|
||||
REACT_APP_RESET_START_ERROR_TIMEOUT=3000
|
||||
|
||||
#apigate.lotus.g1.wrenchboard.com:76.209.103.227
|
||||
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
||||
@@ -0,0 +1,30 @@
|
||||
SKIP_PREFLIGHT_CHECK=true
|
||||
|
||||
REACT_APP_FACEBOOK="https://www.facebook.com/profile.php?id=100066498622246"
|
||||
REACT_APP_TWITTER="https://twitter.com/fluxtra"
|
||||
|
||||
REACT_APP_APPSITE="https://myfitapp.mermsemr.com"
|
||||
#REACT_APP_APPSITE="http://localhost:7012"
|
||||
|
||||
|
||||
# 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.orion.g1.wrenchboard.com/svs/user"
|
||||
REACT_APP_USERS_ENDPOINT="https://apigate.orion.g1.wrenchboard.com/svs/user"
|
||||
|
||||
#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"
|
||||
|
||||
#"https://devapi.mermsemr.com/en/desktop/api/v2/myfituser"
|
||||
|
||||
REACT_APP_SESSION_EXPIRE_MINUTES=300000
|
||||
REACT_APP_SESSION_EXPIRE_CHECKER=60000
|
||||
|
||||
REACT_APP_LOGIN_ERROR_TIMEOUT=7000
|
||||
REACT_APP_SIGNUP_ERROR_TIMEOUT=7000
|
||||
|
||||
# Had to change the error time to 3sec cause it took too long
|
||||
REACT_APP_RESET_START_ERROR_TIMEOUT=3000
|
||||
|
||||
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
||||
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
||||
@@ -1,59 +0,0 @@
|
||||
{
|
||||
"extends": [
|
||||
"airbnb",
|
||||
"airbnb/hooks",
|
||||
"eslint:recommended",
|
||||
"prettier",
|
||||
"plugin:jsx-a11y/recommended"
|
||||
],
|
||||
"parser": "babel-eslint",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 8
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"es6": true,
|
||||
"jest": true
|
||||
},
|
||||
"rules": {
|
||||
"no-plusplus": 0,
|
||||
"import/no-dynamic-require": 0,
|
||||
"global-require": 0,
|
||||
"no-nested-ternary": 0,
|
||||
"react/self-closing-comp": 0,
|
||||
"react/no-unescaped-entities": 0,
|
||||
"jsx-a11y/anchor-is-valid": 0,
|
||||
"react/jsx-props-no-spreading": 0,
|
||||
"jsx-eslint/eslint-plugin-jsx-a11y": 0,
|
||||
"jsx-a11y/no-static-element-interactions": 0,
|
||||
"jsx-a11y/label-has-associated-control": 0,
|
||||
"jsx-a11y/no-noninteractive-element-interactions": 0,
|
||||
"react/react-in-jsx-scope": 0,
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"no-console": 0,
|
||||
"react/state-in-constructor": 0,
|
||||
"indent": 0,
|
||||
"linebreak-style": 0,
|
||||
"react/prop-types": 0,
|
||||
"jsx-a11y/click-events-have-key-events": 0,
|
||||
"react/jsx-filename-extension": [
|
||||
1,
|
||||
{
|
||||
"extensions": [".js", ".jsx"]
|
||||
}
|
||||
]
|
||||
// "prettier/prettier": [
|
||||
// "error",
|
||||
// {
|
||||
// "trailingComma": "es5",
|
||||
// "singleQuote": true,
|
||||
// "printWidth": 100,
|
||||
// "tabWidth": 4,
|
||||
// "semi": true,
|
||||
// "endOfLine": "auto"
|
||||
// }
|
||||
// ]
|
||||
},
|
||||
"plugins": ["prettier", "react", "react-hooks"]
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
# pull the base image
|
||||
FROM node:alpine
|
||||
|
||||
# Build args
|
||||
ARG NODE_ENV
|
||||
|
||||
# set the working direction
|
||||
#WORKDIR /app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# add `/app/node_modules/.bin` to $PATH
|
||||
# ENV PATH /app/node_modules/.bin:$PATH
|
||||
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
||||
ENV NODE_ENV=$NODE_ENV
|
||||
|
||||
# install nginx
|
||||
RUN apk update
|
||||
RUN apk add nginx
|
||||
|
||||
# install app dependencies
|
||||
COPY package.json ./
|
||||
|
||||
COPY package-lock.json ./
|
||||
|
||||
COPY nginx.conf ./
|
||||
|
||||
COPY run.sh ./
|
||||
|
||||
RUN npm install --legacy-peer-deps
|
||||
|
||||
# add app
|
||||
COPY . ./
|
||||
|
||||
# start app
|
||||
CMD /bin/sh ./run.sh
|
||||
|
||||
+6
-3
@@ -4,7 +4,9 @@ services:
|
||||
image: registry.chiefsoft.net/wrenchboard-users-wrench:latest
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- NODE_ENV=production
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 9082:3000
|
||||
@@ -13,19 +15,20 @@ services:
|
||||
working_dir: /usr/src/app
|
||||
volumes:
|
||||
- ./:/usr/src/app
|
||||
- /usr/src/app/node_modules
|
||||
- ./src/:/usr/src/app/src
|
||||
- ./vendors/:/usr/src/app/vendors
|
||||
- ./run.sh:/usr/src/app/run.sh
|
||||
extra_hosts:
|
||||
- backend.wrenchboard.api.live:10.10.33.15
|
||||
- backend.wrenchboard.api.test:10.10.33.15
|
||||
- apigate.lotus.g1.wrenchboard.com:10.10.33.15
|
||||
- apigate.orion.g1.wrenchboard.com:10.10.33.15
|
||||
# #- backend.wrenchboard.api.live:172.31.4.27
|
||||
# #- backend.wrenchboard.api.test:10.20.30.27
|
||||
- apigateway.wrenchboard.app.dev.fluxtra.net:10.20.30.19
|
||||
- apigateway.wrenchboard.app.lotus.fluxtra.net:172.31.4.19
|
||||
environment:
|
||||
- CHOKIDAR_USEPOLLING=true
|
||||
- NODE_ENV=${NODE_ENV:-production}
|
||||
# volumes:
|
||||
# - ./:/app
|
||||
# - /app/node_modules
|
||||
|
||||
+15
-1
@@ -3,7 +3,15 @@
|
||||
|
||||
FROM alpine:3.15
|
||||
|
||||
# Build args
|
||||
ARG NODE_ENV
|
||||
|
||||
ENV NODE_VERSION 14.19.0
|
||||
ENV NODE_ENV=$NODE_ENV
|
||||
|
||||
# install nginx
|
||||
RUN apk update
|
||||
RUN apk add nginx
|
||||
|
||||
RUN addgroup -g 1000 node \
|
||||
&& adduser -u 1000 -G node -s /bin/sh -D node \
|
||||
@@ -103,6 +111,10 @@ WORKDIR /usr/src/app
|
||||
# ENV PATH /app/node_modules/.bin:$PATH
|
||||
ENV PATH /usr/src/app/node_modules/.bin:$PATH
|
||||
|
||||
COPY nginx.conf ./
|
||||
|
||||
COPY run.sh ./
|
||||
|
||||
# install app dependencies
|
||||
COPY package.json ./
|
||||
RUN npm install
|
||||
@@ -114,7 +126,9 @@ RUN npm install
|
||||
COPY . ./
|
||||
|
||||
# start app
|
||||
CMD ["npm","run", "start"]
|
||||
# CMD ["npm","run", "start"]
|
||||
|
||||
# CMD ["yarn", "start"]
|
||||
|
||||
# start app
|
||||
CMD /bin/sh ./run.sh
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
worker_processes 1;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
server {
|
||||
gzip on;
|
||||
listen 3000;
|
||||
server_name localhost;
|
||||
root /usr/src/app/build;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
location /nginx_status {
|
||||
stub_status on;
|
||||
access_log off;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+10992
-6604
File diff suppressed because it is too large
Load Diff
+3
-19
@@ -30,11 +30,10 @@
|
||||
"yup": "^1.1.1"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"start": "react-scripts start -e .env.development",
|
||||
"build": "react-scripts build -e .env.production",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject",
|
||||
"lint": "yarn add -D prettier@2.4.1 && yarn add -D eslint@7.11.0 && yarn add -D babel-eslint@10.1.0 && npx install-peerdeps --dev eslint-config-airbnb@18.2.1 && yarn add -D eslint-config-prettier@8.3.0 eslint-plugin-prettier@4.0.0"
|
||||
"eject": "react-scripts eject"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
@@ -53,20 +52,5 @@
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.4.5",
|
||||
"babel-eslint": "10.1.0",
|
||||
"eslint": "7.2.0",
|
||||
"eslint-config-airbnb": "18.2.1",
|
||||
"eslint-config-prettier": "8.3.0",
|
||||
"eslint-plugin-import": "2.22.1",
|
||||
"eslint-plugin-jsx-a11y": "6.4.1",
|
||||
"eslint-plugin-prettier": "4.0.0",
|
||||
"eslint-plugin-react": "^7.29.4",
|
||||
"eslint-plugin-react-hooks": "1.7.0",
|
||||
"postcss": "^8.4.12",
|
||||
"prettier": "2.4.1",
|
||||
"tailwindcss": "^3.0.24"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
export NODE_ENV="${NODE_ENV:-development}"
|
||||
|
||||
if [ $NODE_ENV == "development" ]; then
|
||||
# this runs webpack-dev-server with hot reloading
|
||||
npm install --legacy-peer-deps
|
||||
npm start
|
||||
else
|
||||
# build the app and serve it via nginx
|
||||
npm install --legacy-peer-deps
|
||||
npm run build
|
||||
nginx -g 'daemon off;' -c /usr/src/app/nginx.conf
|
||||
nginx -c /usr/src/app/nginx.conf
|
||||
fi
|
||||
+3
-1
@@ -22,7 +22,7 @@ import UpdatePasswordPages from "./views/UpdatePasswordPages";
|
||||
import UploadProductPage from "./views/UploadProductPage";
|
||||
import UserProfilePage from "./views/UserProfilePage";
|
||||
import VerifyYouPages from "./views/VerifyYouPages";
|
||||
|
||||
import VerifyLinkPages from "./views/VerifyLinkPages";
|
||||
import RemindersPage from './views/RemindersPage';
|
||||
import TrackingPage from "./views/TrackingPage";
|
||||
import CalendarPage from "./views/CalendarPage";
|
||||
@@ -49,6 +49,8 @@ export default function Routers() {
|
||||
element={<UpdatePasswordPages />}
|
||||
/>
|
||||
<Route exact path="/verify-you" element={<VerifyYouPages />} />
|
||||
<Route exact path="/verify-link" element={<VerifyLinkPages />} />
|
||||
<Route path={`/vemail?`} element={<VerifyLinkPages />} />
|
||||
|
||||
{/* private route */}
|
||||
<Route element={<AuthRoute />}>
|
||||
|
||||
@@ -97,7 +97,7 @@ export default function Login() {
|
||||
<img src={WrenchBoard} alt="wrenchboard" className="h-10 mx-auto" />
|
||||
</Link>
|
||||
</div>
|
||||
<div className="content-wrapper login shadow-md w-full lg:max-w-[500px] mx-auto flex justify-center items-center xl:bg-white dark:bg-dark-white 2xl:w-[828px] rounded-[0.475rem] sm:p-7 p-5">
|
||||
<div className="content-wrapper login shadow-md w-full lg:max-w-[500px] mx-auto flex justify-center items-center dark:bg-dark-white 2xl:w-[828px] rounded-[0.475rem] sm:p-7 p-5">
|
||||
<div className="w-full">
|
||||
<div className="title-area flex flex-col justify-center items-center relative text-center mb-7">
|
||||
<h1 className="text-[#181c32] font-semibold dark:text-white mb-3" style={{
|
||||
|
||||
@@ -37,7 +37,7 @@ export default function SignUp() {
|
||||
|
||||
const navigate = useNavigate();
|
||||
const userApi = new usersService();
|
||||
|
||||
|
||||
// Get Country Api
|
||||
const getCountryList = async () => {
|
||||
const res = await userApi.getSignupCountryData()
|
||||
@@ -63,6 +63,7 @@ export default function SignUp() {
|
||||
|
||||
try {
|
||||
if (email !== '' && password !== '' && first_name !== '' && last_name !== '') {
|
||||
setSignUpLoading(true)
|
||||
const reqData = {
|
||||
country: country,
|
||||
firstname: first_name,
|
||||
@@ -75,7 +76,6 @@ export default function SignUp() {
|
||||
}
|
||||
|
||||
const res = await userApi.CreateUser(reqData)
|
||||
setSignUpLoading(true)
|
||||
|
||||
if (res.status === 200) {
|
||||
const { data } = res
|
||||
@@ -83,24 +83,19 @@ export default function SignUp() {
|
||||
setMsgError('This account has been already created')
|
||||
setSignUpLoading(false)
|
||||
}
|
||||
if (data.status > 0 && data.internal_return == 100 && data.session != '') {
|
||||
localStorage.setItem("email", `${data.email}`);
|
||||
localStorage.setItem("country", `${data.country}`);
|
||||
localStorage.setItem("firstname", `${data.firstname}`);
|
||||
localStorage.setItem("lastname", `${data.lastname}`);
|
||||
|
||||
if (data && data.status == 1) {
|
||||
setTimeout(() => {
|
||||
navigate("/", { replace: true });
|
||||
navigate("/verify-you", { replace: true });
|
||||
setSignUpLoading(false)
|
||||
}, 2000)
|
||||
} else {
|
||||
setMsgError(data.status)
|
||||
setSignUpLoading(false)
|
||||
|
||||
}
|
||||
} else {
|
||||
setMsgError('This account does not exist')
|
||||
setSignUpLoading(false)
|
||||
}
|
||||
} else {
|
||||
setMsgError('This account does not exist')
|
||||
setSignUpLoading(false)
|
||||
}
|
||||
} catch (error) {
|
||||
throw new Error(error)
|
||||
@@ -244,8 +239,7 @@ export default function SignUp() {
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleSignUp}
|
||||
className={`rounded-[0.475rem] mb-6 text-xl text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center h-[42px] py-[0.8875rem] px-[1.81rem] ${signUpLoading ? "active" : ""
|
||||
}`}
|
||||
className={`rounded-[0.475rem] mb-6 text-xl text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center h-[42px] py-[0.8875rem] px-[1.81rem]`}
|
||||
>
|
||||
{signUpLoading ? (
|
||||
<div className="signup btn-loader"></div>
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
import { useEffect, useState, useCallback } from "react";
|
||||
import { useLocation, Link, useNavigate } from "react-router-dom";
|
||||
import AuthLayout from "../AuthLayout";
|
||||
import InputCom from "../../Helpers/Inputs/InputCom";
|
||||
import usersService from "../../../services/UsersService";
|
||||
import WrenchBoard from "../../../assets/images/wrenchboard.png"
|
||||
|
||||
export default function VerifyLink() {
|
||||
const [pageLoader, setPageLoader] = useState(true)
|
||||
const [linkSuccess, setLinkSuccess] = useState(false)
|
||||
const [linkError, setLinkError] = useState(false)
|
||||
const navigate = useNavigate()
|
||||
const location = useLocation();
|
||||
const queryParams = new URLSearchParams(location?.search)
|
||||
const token = queryParams.get('vlink')
|
||||
|
||||
const verifyEmail = useCallback(
|
||||
async (code) => {
|
||||
const userApi = new usersService()
|
||||
|
||||
try {
|
||||
const verifyRes = await userApi.verifyEmail(code)
|
||||
console.log(verifyRes)
|
||||
if (verifyRes.status === 200) {
|
||||
let { data } = verifyRes
|
||||
|
||||
if (data && data.internal_return === 0 && data.status_text == 'Link Verfied') {
|
||||
setPageLoader(false)
|
||||
setLinkSuccess(true)
|
||||
} else {
|
||||
setPageLoader(false)
|
||||
setLinkError(true)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error)
|
||||
setPageLoader(false)
|
||||
setLinkError(true)
|
||||
throw new Error(error)
|
||||
}
|
||||
}, [linkSuccess, linkError]
|
||||
)
|
||||
|
||||
useEffect(() => {
|
||||
verifyEmail(token)
|
||||
}, [])
|
||||
|
||||
console.log(token)
|
||||
|
||||
return (
|
||||
<>
|
||||
<AuthLayout
|
||||
slogan="Welcome to WrenchBoard"
|
||||
>
|
||||
{pageLoader ? (
|
||||
<img src={WrenchBoard} alt="wrenchboard" className="h-10 mx-auto" />
|
||||
) : (
|
||||
<div className="w-full">
|
||||
<div className='mb-12'>
|
||||
<Link to='#'>
|
||||
<img src={WrenchBoard} alt="wrenchboard" className="h-10 mx-auto" />
|
||||
</Link>
|
||||
</div>
|
||||
<div className="content-wrapper login shadow-md w-full lg:max-w-[500px] mx-auto flex justify-center items-center dark:bg-dark-white 2xl:w-[828px] rounded-[0.475rem] sm:p-7 p-5">
|
||||
<div className="w-full">
|
||||
<div className="title-area flex flex-col justify-center items-center relative text-center mb-7">
|
||||
<h1 className="text-[#181c32] font-semibold dark:text-white mb-3" style={{
|
||||
fontSize: 'calc(1rem + .6vw)'
|
||||
}}>
|
||||
{linkError && 'Invalid verification link'}
|
||||
{linkSuccess && 'Sign In to WrenchBoard'}
|
||||
</h1>
|
||||
</div>
|
||||
{/* If the verification was a success */}
|
||||
{linkSuccess && <SuccessfulComponent />}
|
||||
|
||||
{/* If the verification was unsuccessful */}
|
||||
{linkError && <ErrorComponent onClick={() => navigate('/login')} />}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</AuthLayout>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
const SuccessfulComponent = ({ onClick }) => (
|
||||
<div className="input-area">
|
||||
{/* INPUT */}
|
||||
<div className="mb-5">
|
||||
<InputCom
|
||||
// value={password}
|
||||
// inputHandler={handlePassword}
|
||||
placeholder="support@mermsemr.com"
|
||||
label="Email"
|
||||
name="email"
|
||||
type="email"
|
||||
iconName="message"
|
||||
/>
|
||||
</div>
|
||||
<div className="mb-5">
|
||||
<InputCom
|
||||
// value={password}
|
||||
// inputHandler={handlePassword}
|
||||
placeholder="● ● ● ● ● ●"
|
||||
label="Password"
|
||||
name="password"
|
||||
type="password"
|
||||
iconName="password"
|
||||
/>
|
||||
</div>
|
||||
<div className="signin-area mb-3.5">
|
||||
<button
|
||||
onClick={onClick}
|
||||
type="button"
|
||||
className={`btn-login rounded-[0.475rem] mb-6 text-xl text-white flex justify-center bg-[#4687ba] hover:bg-[#009ef7] transition-all duration-300 items-center $`}
|
||||
>
|
||||
<span>Continue</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
const ErrorComponent = ({ onClick }) => (
|
||||
<div className="input-area">
|
||||
<div className="my-5">
|
||||
<p className="text-[14px] leading-[19px] text-center text-[#181c32]">
|
||||
This error occurs because you have already verified this link or the link has expired. Try login or reset password. If none worked, try to create the account from the start.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="signin-area flex justify-center mb-3.5">
|
||||
<button
|
||||
onClick={onClick}
|
||||
type="button"
|
||||
className={`rounded-[0.475rem] mb-6 text-[1.15rem] font-semibold text-[#009ef7] hover:text-white flex justify-center bg-[#f1faff] hover:bg-[#009ef7] transition-all duration-300 items-center py-[0.8875rem] px-[1.81rem]`}
|
||||
>
|
||||
<span>Return Home</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
@@ -1,7 +1,5 @@
|
||||
import React from "react";
|
||||
import titleShape from "../../../assets/images/shape/text-shape-three.svg";
|
||||
import AuthLayout from "../AuthLayout";
|
||||
import Otp from "./Otp";
|
||||
import InputCom from "../../Helpers/Inputs/InputCom";
|
||||
|
||||
export default function VerifyYou() {
|
||||
return (
|
||||
@@ -9,32 +7,24 @@ export default function VerifyYou() {
|
||||
<AuthLayout
|
||||
slogan="Welcome to WrenchBoard"
|
||||
>
|
||||
<div className="content-wrapper xl:bg-white dark:bg-dark-white w-full sm:w-auto px-5 xl:px-[70px] 2xl:px-[100px] h-[818px] rounded-xl flex flex-col justify-center">
|
||||
<div>
|
||||
<div className="title-area flex flex-col justify-center items-center relative text-center mb-8">
|
||||
<h1 className="sm:text-5xl text-4xl font-bold leading-[74px] text-dark-gray dark:text-white">
|
||||
Verification Code
|
||||
<div className="content-wrapper login dark:bg-dark-white w-full lg:max-w-[500px] 2xl:w-[828px] rounded-xl flex flex-col justify-center sm:p-7 p-5">
|
||||
<div className="w-full">
|
||||
<div className="title-area flex flex-col justify-center items-center relative text-center mb-7">
|
||||
<h1 className="text-[#181c32] font-semibold dark:text-white mb-3" style={{
|
||||
fontSize: 'calc(1rem + .6vw)'
|
||||
}}>
|
||||
Verification Sent
|
||||
</h1>
|
||||
<div className="shape sm:w-[377px] w-[270px] -mt-5 ml-5">
|
||||
<img src={titleShape} alt="shape" />
|
||||
</div>
|
||||
</div>
|
||||
<div className="input-area">
|
||||
<Otp />
|
||||
<div className="signin-area mb-3.5">
|
||||
<a
|
||||
href="/update-password"
|
||||
className="w-full rounded-[50px] h-[58px] mb-6 text-xl text-white font-bold flex justify-center bg-purple items-center"
|
||||
>
|
||||
Continue
|
||||
</a>
|
||||
<div className="mb-5">
|
||||
<p className="text-[14px] leading-[19px] text-center text-[#181c32]">
|
||||
To complete the verification process, you should check your email inbox and look for the verification email. It may take a few minutes for the email to arrive, so be patient. Once you receive the email, open it and click on the verification link provided.
|
||||
</p>
|
||||
</div>
|
||||
<div className="resend-code flex justify-center">
|
||||
<p className="text-lg text-thin-light-gray font-normal">
|
||||
Dont’t have an aceount ?
|
||||
<a href="#" className="ml-2 text-dark-gray dark:text-white font-bold">
|
||||
Please resend
|
||||
</a>
|
||||
<div className="mb-5">
|
||||
<p className="text-[14px] leading-[19px] text-center text-[#181c32]">
|
||||
If you haven't received the verification email after a reasonable amount of time, make sure to check your spam or junk mail folder. It's also possible that the email was sent to the wrong email address, so double-check that you entered your email address correctly.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React from "react";
|
||||
import React, { useRef } from "react";
|
||||
import Icons from "../../Icons";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
@@ -16,18 +16,67 @@ export default function InputCom({
|
||||
disable,
|
||||
blurHandler,
|
||||
}) {
|
||||
const inputRef = useRef(null)
|
||||
// Entry Validation
|
||||
// for Min Length:
|
||||
const minLengthValidation = () => {
|
||||
if (inputRef && inputRef?.current && inputRef?.current?.name == 'email') {
|
||||
return 7
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'first_name') {
|
||||
return 3
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'last_name') {
|
||||
return 3
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'address') {
|
||||
return 5
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'password') {
|
||||
return 8
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'state') {
|
||||
return 3
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'province') {
|
||||
return 3
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'city') {
|
||||
return 3
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'amount') {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
// for MaxLength
|
||||
const maxLengthValidation = () => {
|
||||
if (inputRef && inputRef?.current && inputRef?.current?.name == 'email') {
|
||||
return 35
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'first_name') {
|
||||
return 25
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'last_name') {
|
||||
return 25
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'address') {
|
||||
return 49
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'password') {
|
||||
return 15
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'state') {
|
||||
return 25
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'province') {
|
||||
return 25
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'city') {
|
||||
return 25
|
||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'amount') {
|
||||
return 9
|
||||
}
|
||||
}
|
||||
|
||||
console.log(inputRef.current?.name, inputRef.current?.minLength)
|
||||
return (
|
||||
<div className="input-com">
|
||||
<div className="flex items-center justify-between">
|
||||
{label && (
|
||||
<label
|
||||
className="input-label text-[#181c32] dark:text-white text-base font-semibold block mb-2.5"
|
||||
htmlFor={name}
|
||||
>
|
||||
{label}
|
||||
</label>
|
||||
)}
|
||||
{forgotPassword && <Link to="/forgot-password" className="text-base text-[#4687ba] hover:text-[#009ef7]">Forgot Password?</Link>}
|
||||
{label && (
|
||||
<label
|
||||
className="input-label text-[#181c32] dark:text-white text-base font-semibold block mb-2.5"
|
||||
htmlFor={name}
|
||||
>
|
||||
{label}
|
||||
</label>
|
||||
)}
|
||||
{forgotPassword && <Link to="/forgot-password" className="text-base text-[#4687ba] hover:text-[#009ef7]">Forgot Password?</Link>}
|
||||
</div>
|
||||
<div className="input-wrapper border border-[#f5f8fa]] dark:border-[#5e6278] w-full rounded-[0.475rem] h-[42px] overflow-hidden relative font-medium leading-6 bg-clip-padding text-[#5e6278] dark:text-gray-100 bg-[#f5f8fa] dark:bg-[#5e6278] text-base ">
|
||||
<input
|
||||
@@ -39,6 +88,9 @@ export default function InputCom({
|
||||
id={name}
|
||||
name={name}
|
||||
readOnly={disable}
|
||||
minLength={minLengthValidation()}
|
||||
maxLength={maxLengthValidation()}
|
||||
ref={inputRef}
|
||||
onBlur={blurHandler}
|
||||
/>
|
||||
{iconName && (
|
||||
|
||||
@@ -18,6 +18,7 @@ export default function Hero({ className }) {
|
||||
infinite: true,
|
||||
swipe: true,
|
||||
};
|
||||
const sildeData =null;
|
||||
const [addFavorite, setValue] = useState(false);
|
||||
const favoriteHandler = () => {
|
||||
if (!addFavorite) {
|
||||
@@ -96,7 +97,7 @@ export default function Hero({ className }) {
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
<HomeSliders settings={settings} />
|
||||
<HomeSliders settings={settings} sideData={sildeData}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,9 @@ export default function HomeSliders(props) {
|
||||
<div className="item w-full h-full bg-white dark:bg-dark-white rounded-2xl overflow-hidden">
|
||||
<img src={slider3} alt="slider" className="w-full h-full" />
|
||||
</div>
|
||||
<div className="item w-full h-full bg-red dark:bg-dark-white rounded-2xl overflow-hidden">
|
||||
Olusesan Ameye Data
|
||||
</div>
|
||||
</SliderCom>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,26 @@
|
||||
import React, {useState} from 'react'
|
||||
import React, {useEffect, useState} from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import Icons from '../Helpers/Icons'
|
||||
import usersService from '../../services/UsersService'
|
||||
|
||||
function AddRecipient() {
|
||||
|
||||
const apiURL = new usersService()
|
||||
|
||||
let [countries, setCountries] = useState({ // STATE TO HOLD LIST OF COUNTRIES
|
||||
loading: true,
|
||||
data: []
|
||||
})
|
||||
|
||||
let [bankName, setBankName] = useState({ // STATE TO HOLD LIST OF BANK NAME
|
||||
loading: true,
|
||||
data: []
|
||||
})
|
||||
|
||||
let [accountType, setAccountType] = useState({ // STATE TO HOLD LIST ACCOUNT TYPE
|
||||
loading: true,
|
||||
data: []
|
||||
})
|
||||
|
||||
//STATE FOR CONTROLLED INPUTS
|
||||
let [inputs, setInputs] = useState({
|
||||
@@ -28,11 +46,7 @@ function AddRecipient() {
|
||||
|
||||
//valid inputs before submitting. Just for texting remove later
|
||||
|
||||
// setInputs((prev)=>{
|
||||
// for(let input in prev){
|
||||
// prev[input] = ''
|
||||
// }
|
||||
// })
|
||||
|
||||
// RETURN INPUTS TO EMPTY STRING
|
||||
setInputs({
|
||||
firstname: '',
|
||||
@@ -46,6 +60,55 @@ function AddRecipient() {
|
||||
city: ''
|
||||
})
|
||||
}
|
||||
|
||||
// FUNCTION TO GET COUNTRIES
|
||||
const getCountry = ()=> {
|
||||
apiURL.getSignupCountryData().then((res)=>{
|
||||
if(res.data.internal_return < 0){
|
||||
setCountries(prev => ({loading: false, data: []}))
|
||||
return
|
||||
}
|
||||
setCountries(prev => ({loading: false, data:res.data.signup_country}))
|
||||
}).catch((error)=>{
|
||||
setCountries(prev => ({loading: false, data: []}))
|
||||
})
|
||||
}
|
||||
// END OF FUNCTION TO GET COUNTRIES
|
||||
|
||||
// FUNCTION TO GET COUNTRY BANK
|
||||
const getCountryBank = ()=> {
|
||||
apiURL.getCountryBank().then((res)=>{
|
||||
if(res.data.internal_return < 0){
|
||||
setBankName(prev => ({loading: false, data: []}))
|
||||
return
|
||||
}
|
||||
setBankName(prev => ({loading: false, data:res.data.result_list}))
|
||||
}).catch((error)=>{
|
||||
setBankName(prev => ({loading: false, data: []}))
|
||||
})
|
||||
}
|
||||
// END OF FUNCTION TO GET COUNTRY BANK
|
||||
|
||||
// FUNCTION TO GET ACCOUNT TYPES
|
||||
const getAccountTypes = ()=> {
|
||||
apiURL.getAccountTypes().then((res)=>{
|
||||
if(res.data.internal_return < 0){
|
||||
setAccountType(prev => ({loading: false, data: []}))
|
||||
return
|
||||
}
|
||||
setAccountType(prev => ({loading: false, data:res.data.result_list}))
|
||||
}).catch((error)=>{
|
||||
setAccountType(prev => ({loading: false, data: []}))
|
||||
})
|
||||
}
|
||||
// END OF FUNCTION TO GET ACCOUNT TYPES
|
||||
|
||||
useEffect(()=>{
|
||||
getCountry() // TO LOAD LIST COUNTRY
|
||||
getCountryBank() // TO LOAD LIST COUNTRY BANK
|
||||
getAccountTypes() // TO LOAD LIST ACCOUNT TYPES
|
||||
},[])
|
||||
|
||||
return (
|
||||
<div className="content-wrapper w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin">
|
||||
<div className="w-full mb-10 lg:mb-0">
|
||||
@@ -56,7 +119,7 @@ function AddRecipient() {
|
||||
{/* inputs starts here */}
|
||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>First Name <span className='text-red-500'>*</span></label>
|
||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
value={inputs.firstname}
|
||||
name='firstname'
|
||||
type="text"
|
||||
@@ -68,7 +131,7 @@ function AddRecipient() {
|
||||
|
||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Last Name <span className='text-red-500'>*</span></label>
|
||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
value={inputs.lastname}
|
||||
name='lastname'
|
||||
type="text"
|
||||
@@ -80,21 +143,45 @@ function AddRecipient() {
|
||||
|
||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Country <span className='text-red-500'>*</span></label>
|
||||
<select className='mt-2 w-full md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='country' onChange={handleChange}>
|
||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||
<select className='mt-2 w-full text-slate-500 md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='country' onChange={handleChange}>
|
||||
{countries.loading ?
|
||||
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
||||
:
|
||||
countries.data.length ?
|
||||
<>
|
||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||
{countries.data.map((item, index)=>(
|
||||
<option key={index} className='text-slate-500 text-lg' value={item[0]}>{item[1]}</option>
|
||||
))}
|
||||
</>
|
||||
:
|
||||
<option className='text-slate-500 text-lg' value="">No Options Found! Try Again</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Bank Name <span className='text-red-500'>*</span></label>
|
||||
<select className='mt-2 w-full md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='bank-name' onChange={handleChange}>
|
||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||
<select className='mt-2 w-full text-slate-500 md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='bank-name' onChange={handleChange}>
|
||||
{bankName.loading ?
|
||||
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
||||
:
|
||||
bankName.data.length ?
|
||||
<>
|
||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||
{bankName.data.map((item, index)=>(
|
||||
<option key={index} className='text-slate-500 text-lg' value={item.name}>{item.name}</option>
|
||||
))}
|
||||
</>
|
||||
:
|
||||
<option className='text-slate-500 text-lg' value="">No Options Found! Try Again</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Account Number <span className='text-red-500'>*</span></label>
|
||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
value={inputs['account-number']}
|
||||
name='account-number'
|
||||
type="text"
|
||||
@@ -106,7 +193,7 @@ function AddRecipient() {
|
||||
|
||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Repeat Account Number <span className='text-red-500'>*</span></label>
|
||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
value={inputs['repeat-account-number']}
|
||||
name='repeat-account-number'
|
||||
type="text"
|
||||
@@ -118,14 +205,26 @@ function AddRecipient() {
|
||||
|
||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Account type <span className='text-red-500'>*</span></label>
|
||||
<select className='mt-2 w-full md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='account-type' onChange={handleChange}>
|
||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||
<select className='mt-2 w-full text-slate-500 md:w-3/4 p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' name='account-type' onChange={handleChange}>
|
||||
{accountType.loading ?
|
||||
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
||||
:
|
||||
accountType.data.length ?
|
||||
<>
|
||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||
{accountType.data.map((item, index)=>(
|
||||
<option key={index} className='text-slate-500 text-lg' value={item.name}>{item.name}</option>
|
||||
))}
|
||||
</>
|
||||
:
|
||||
<option className='text-slate-500 text-lg' value="">No Options Found! Try Again</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>State/Province <span className='text-red-500'>*</span></label>
|
||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
value={inputs.state}
|
||||
name='state'
|
||||
type="text"
|
||||
@@ -137,7 +236,7 @@ function AddRecipient() {
|
||||
|
||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>City <span className='text-red-500'>*</span></label>
|
||||
<input className='w-full md:w-3/4 p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
<input className='w-full md:w-3/4 p-3 text-slate-500 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
||||
value={inputs.city}
|
||||
name='city'
|
||||
type="text"
|
||||
|
||||
+130
-86
@@ -6,12 +6,12 @@ class usersService {
|
||||
console.log("WRB Service Entry");
|
||||
}
|
||||
|
||||
CreateUser(reqData){
|
||||
CreateUser(reqData) {
|
||||
localStorage.setItem("session_token", ``);
|
||||
return this.postAuxEnd("/createuser", reqData);
|
||||
}
|
||||
|
||||
getHomeDate(){
|
||||
getHomeDate() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uuid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
@@ -31,8 +31,8 @@ class usersService {
|
||||
};
|
||||
return this.postAuxEnd("/getjobsdata", postData);
|
||||
}
|
||||
//
|
||||
getUserBankList(reqData){
|
||||
//
|
||||
getUserBankList(reqData) {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uuid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
@@ -40,7 +40,7 @@ class usersService {
|
||||
};
|
||||
return this.postAuxEnd("/mybanklist", postData);
|
||||
}
|
||||
getUserWallets(reqData){
|
||||
getUserWallets(reqData) {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uuid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
@@ -48,44 +48,56 @@ class usersService {
|
||||
};
|
||||
return this.postAuxEnd("/getwallets", postData);
|
||||
}
|
||||
getApiGate(){
|
||||
getApiGate() {
|
||||
// localStorage.setItem("session_token", ``);
|
||||
return this.postAuxEnd("/apigate", null);
|
||||
}
|
||||
|
||||
getLoadProfile(){
|
||||
getLoadProfile() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:0,
|
||||
limit :100
|
||||
page: 0,
|
||||
limit: 100
|
||||
};
|
||||
return this.postAuxEnd("/loadprofile", null);
|
||||
}
|
||||
|
||||
getOffersList(){
|
||||
getOffersList() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:0,
|
||||
limit :100
|
||||
page: 0,
|
||||
limit: 100
|
||||
};
|
||||
return this.postAuxEnd("/offerslist", null);
|
||||
}
|
||||
|
||||
getPendingJob(){
|
||||
getPendingJob() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:0,
|
||||
limit :100};
|
||||
page: 0,
|
||||
limit: 100
|
||||
};
|
||||
return this.postAuxEnd("/pendingjob", postData);
|
||||
}
|
||||
|
||||
getActiveJobList(){
|
||||
getActiveJobList() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page: 0,
|
||||
limit: 100
|
||||
};
|
||||
return this.postAuxEnd("/getjobsdata", postData);
|
||||
}
|
||||
|
||||
getHeroJBanners(){
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
@@ -93,7 +105,7 @@ class usersService {
|
||||
page:0,
|
||||
limit :100
|
||||
};
|
||||
return this.postAuxEnd("/getjobsdata", postData);
|
||||
return this.postAuxEnd("/homebanners", postData);
|
||||
}
|
||||
|
||||
getMyJobList(){
|
||||
@@ -101,60 +113,60 @@ class usersService {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:0,
|
||||
limit :100
|
||||
page: 0,
|
||||
limit: 100
|
||||
};
|
||||
return this.postAuxEnd("/myjobs", postData);
|
||||
}
|
||||
|
||||
getGetPendingJobs(){
|
||||
getGetPendingJobs() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:0,
|
||||
limit :100
|
||||
page: 0,
|
||||
limit: 100
|
||||
};
|
||||
return this.postAuxEnd("/getpendingjobs", postData);
|
||||
}
|
||||
|
||||
getUsersCards(){
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
getUsersCards() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:0,
|
||||
limit :100
|
||||
};
|
||||
page: 0,
|
||||
limit: 100
|
||||
};
|
||||
return this.postAuxEnd("/userscards", postData);
|
||||
}
|
||||
|
||||
getCouponPending(){
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:0,
|
||||
limit :100
|
||||
};
|
||||
getCouponPending() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page: 0,
|
||||
limit: 100
|
||||
};
|
||||
return this.postAuxEnd("/couponpending", postData);
|
||||
}
|
||||
|
||||
// API FUNCTION TO GET COUPON HISTORY
|
||||
getRecipient(){
|
||||
getRecipient() {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:1,
|
||||
limit :20,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
action: 11175
|
||||
};
|
||||
return this.postAuxEnd("/recipients", postData);
|
||||
}
|
||||
|
||||
// API FUNCTION TO GET SEND MONEY FEE
|
||||
getSendMoneyFee(amount){
|
||||
getSendMoneyFee(amount) {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
@@ -166,95 +178,95 @@ class usersService {
|
||||
}
|
||||
|
||||
// API FUNCTION TO GET COUPON HISTORY
|
||||
getCouponHx(){
|
||||
getCouponHx() {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:1,
|
||||
limit :20,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
action: 85025
|
||||
};
|
||||
return this.postAuxEnd("/couponhx", postData);
|
||||
}
|
||||
|
||||
getPurchaseHx(){
|
||||
getPurchaseHx() {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:1,
|
||||
limit :20,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
action: 15049
|
||||
};
|
||||
return this.postAuxEnd("/purchasehx", postData);
|
||||
}
|
||||
|
||||
// API FUNCTION TO GET PAYMENT HISTORY
|
||||
getPaymentHx(){
|
||||
getPaymentHx() {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:1,
|
||||
limit :20,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
action: 15046
|
||||
};
|
||||
return this.postAuxEnd("/paymenthx", postData);
|
||||
}
|
||||
|
||||
|
||||
//END POINT CALL FOR REFERRAL HISTORY
|
||||
getReferralHx(){
|
||||
getReferralHx() {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
offset: 1,
|
||||
limit :100,
|
||||
action: 11064
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
offset: 1,
|
||||
limit: 100,
|
||||
action: 11064
|
||||
};
|
||||
return this.postAuxEnd("/refferhx", postData);
|
||||
}
|
||||
|
||||
//END POINT CALL FOR UPDATE PROFILE
|
||||
updateProfile(post){
|
||||
updateProfile(post) {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
action: 5031,
|
||||
...post
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
action: 5031,
|
||||
...post
|
||||
};
|
||||
return this.postAuxEnd("/updateprofile", postData);
|
||||
}
|
||||
|
||||
//END POINT CALL FOR GETTING USER PROFILE
|
||||
loadProfile(post){
|
||||
loadProfile(post) {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
};
|
||||
return this.postAuxEnd("/loadprofile", postData);
|
||||
}
|
||||
|
||||
//END POINT CALL FOR SENDING REFERRAL MESSAGE
|
||||
sendReferralMsg(postData){
|
||||
sendReferralMsg(postData) {
|
||||
return this.postAuxEnd("/sendreferral", postData);
|
||||
}
|
||||
|
||||
StartResetPassword(reqData){
|
||||
StartResetPassword(reqData) {
|
||||
return this.postAuxEnd("/startresetpasword", reqData)
|
||||
}
|
||||
|
||||
getCouponRedeem(){
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page:0,
|
||||
limit :100
|
||||
};
|
||||
getCouponRedeem() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page: 0,
|
||||
limit: 100
|
||||
};
|
||||
return this.postAuxEnd("/couponredeem", postData);
|
||||
}
|
||||
|
||||
@@ -263,6 +275,29 @@ class usersService {
|
||||
return this.postAuxEnd("/signupcountry", null);
|
||||
}
|
||||
|
||||
// END POINT TO GET BANK NAME
|
||||
getCountryBank() {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
action: 11183,
|
||||
country: 'NG'
|
||||
};
|
||||
return this.postAuxEnd("/countrybanks", postData);
|
||||
}
|
||||
|
||||
// END POINT TO GET ACCOUNT TYPE
|
||||
getAccountTypes() {
|
||||
var postData = {
|
||||
uid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
action: 11177
|
||||
};
|
||||
return this.postAuxEnd("/accounttypes", postData);
|
||||
}
|
||||
|
||||
/*
|
||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
||||
@@ -310,9 +345,17 @@ class usersService {
|
||||
|
||||
*/
|
||||
|
||||
getUserReminders(){
|
||||
getUserReminders() {
|
||||
return this.getAuxEnd("/reminders", null);
|
||||
}
|
||||
|
||||
verifyEmail(code) {
|
||||
const reqData = {
|
||||
verify_link: code,
|
||||
action: 11015
|
||||
}
|
||||
return this.postAuxEnd("/verifysignuplink", reqData);
|
||||
}
|
||||
//---------------------------------------- -----
|
||||
//---------------------------------------- -----
|
||||
// Unified call below
|
||||
@@ -328,10 +371,11 @@ class usersService {
|
||||
}
|
||||
};
|
||||
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
|
||||
return Axios.get(endPoint,{
|
||||
return Axios.get(endPoint, {
|
||||
params: {
|
||||
reqData
|
||||
}})
|
||||
}
|
||||
})
|
||||
.then((response) => {
|
||||
console.log("~~~~~~~ Toks2 GET ~~~~~~~~");
|
||||
return response;
|
||||
@@ -354,22 +398,22 @@ class usersService {
|
||||
postAuxEnd(uri, reqData) {
|
||||
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
|
||||
const session_token = localStorage.getItem("session_token");
|
||||
// session_token = session_token !=null ?session_token : '';
|
||||
// session_token = session_token !=null ?session_token : '';
|
||||
// 'Authorization': `Basic ${(session_token !=null) ?session_token : ''}`,
|
||||
let axiosConfig = {
|
||||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Access-Control-Expose-Headers': 'Access-Control-Allow-Origin',
|
||||
'Access-Control-Allow-Headers':'Origin, X-API-KEY, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Access-Control-Allow-Headers, Authorization, observe, enctype, Content-Length, X-Csrf-Token',
|
||||
'Access-Control-Allow-Headers': 'Origin, X-API-KEY, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Access-Control-Allow-Headers, Authorization, observe, enctype, Content-Length, X-Csrf-Token',
|
||||
'Content-Type': 'application/json;charset=UTF-8',
|
||||
|
||||
}
|
||||
};
|
||||
// Axios.defaults.headers.post['Content-Type'] ='application/json;charset=utf-8';
|
||||
// Axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*'; //,axiosConfig
|
||||
// Axios.defaults.withCredentials = true;
|
||||
//debugger;
|
||||
// Axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*'; //,axiosConfig
|
||||
// Axios.defaults.withCredentials = true;
|
||||
//debugger;
|
||||
return Axios.post(endPoint, reqData)
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
|
||||
+18
-2
@@ -1,7 +1,23 @@
|
||||
import React from "react";
|
||||
import React, {useState, useEffect} from 'react'
|
||||
import Home from "../components/Home";
|
||||
|
||||
import usersService from "../services/UsersService";
|
||||
export default function HomePages() {
|
||||
|
||||
const [marketActiveJobList, setMarketActiveJobList] = useState([]);
|
||||
const api = new usersService();
|
||||
|
||||
const getMarketActiveJobList = async () => {
|
||||
try {
|
||||
const res = await api.getHeroJBanners();
|
||||
setMarketActiveJobList(res.data);
|
||||
} catch (error) {
|
||||
console.log("Error getting mode");
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
getMarketActiveJobList();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Home />
|
||||
|
||||
@@ -2,6 +2,7 @@ import React from "react";
|
||||
import SignUp from "../components/AuthPages/SignUp";
|
||||
|
||||
function SignupPage() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<SignUp />
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import React from "react";
|
||||
import VerifyLink from "../components/AuthPages/VerifyLink";
|
||||
|
||||
export default function VerifyYouPages() {
|
||||
|
||||
return <VerifyLink />;
|
||||
}
|
||||
Reference in New Issue
Block a user