Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 39b3218545 | |||
| e26330af9a | |||
| ccc43bb55d | |||
| 2b0d344dfa | |||
| 53b9db85a5 | |||
| ecdd8f9180 | |||
| 25dcfecfaf | |||
| ed638f5c0f | |||
| 033d87fdf6 | |||
| babed484b2 | |||
| e2b4aaa105 | |||
| ce01b2637b | |||
| d91241dad9 | |||
| 1ad3b74610 | |||
| d94ff616a9 | |||
| f87dbcbe5e | |||
| 4df1589222 | |||
| 886b73ffa3 | |||
| 6cb0871d34 | |||
| 3ed764e8f4 | |||
| c87fc4f32d |
+3
-3
@@ -22,7 +22,7 @@ import UpdatePasswordPages from "./views/UpdatePasswordPages";
|
|||||||
import UploadProductPage from "./views/UploadProductPage";
|
import UploadProductPage from "./views/UploadProductPage";
|
||||||
import UserProfilePage from "./views/UserProfilePage";
|
import UserProfilePage from "./views/UserProfilePage";
|
||||||
import VerifyYouPages from "./views/VerifyYouPages";
|
import VerifyYouPages from "./views/VerifyYouPages";
|
||||||
import VerifyLinkPages from "./views/VerifyLinkPages";
|
|
||||||
import RemindersPage from './views/RemindersPage';
|
import RemindersPage from './views/RemindersPage';
|
||||||
import TrackingPage from "./views/TrackingPage";
|
import TrackingPage from "./views/TrackingPage";
|
||||||
import CalendarPage from "./views/CalendarPage";
|
import CalendarPage from "./views/CalendarPage";
|
||||||
@@ -30,6 +30,7 @@ import ResourcePage from "./views/ResourcePage";
|
|||||||
import MyTaskPage from "./views/MyTaskPage";
|
import MyTaskPage from "./views/MyTaskPage";
|
||||||
import MyJobsPage from "./views/MyJobsPage";
|
import MyJobsPage from "./views/MyJobsPage";
|
||||||
import ReferralPage from "./views/ReferralPage";
|
import ReferralPage from "./views/ReferralPage";
|
||||||
|
import VerifyLinkPages from "./views/VerifyLinkPages";
|
||||||
|
|
||||||
export default function Routers() {
|
export default function Routers() {
|
||||||
return (
|
return (
|
||||||
@@ -48,9 +49,8 @@ export default function Routers() {
|
|||||||
path="/update-password"
|
path="/update-password"
|
||||||
element={<UpdatePasswordPages />}
|
element={<UpdatePasswordPages />}
|
||||||
/>
|
/>
|
||||||
|
<Route path="/vemail" element={<VerifyLinkPages />} />
|
||||||
<Route exact path="/verify-you" element={<VerifyYouPages />} />
|
<Route exact path="/verify-you" element={<VerifyYouPages />} />
|
||||||
<Route exact path="/verify-link" element={<VerifyLinkPages />} />
|
|
||||||
<Route path={`/vemail?`} element={<VerifyLinkPages />} />
|
|
||||||
|
|
||||||
{/* private route */}
|
{/* private route */}
|
||||||
<Route element={<AuthRoute />}>
|
<Route element={<AuthRoute />}>
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ export default function Login() {
|
|||||||
setLoginLoading(true);
|
setLoginLoading(true);
|
||||||
// userApi.getUserReminders(); //testing
|
// userApi.getUserReminders(); //testing
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.success("Login Successfully");
|
|
||||||
navigate("/", { replace: true });
|
navigate("/", { replace: true });
|
||||||
setLoginLoading(false);
|
setLoginLoading(false);
|
||||||
}, 2000);
|
}, 2000);
|
||||||
@@ -97,7 +96,7 @@ export default function Login() {
|
|||||||
<img src={WrenchBoard} alt="wrenchboard" className="h-10 mx-auto" />
|
<img src={WrenchBoard} alt="wrenchboard" className="h-10 mx-auto" />
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</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="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="w-full">
|
<div className="w-full">
|
||||||
<div className="title-area flex flex-col justify-center items-center relative text-center mb-7">
|
<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={{
|
<h1 className="text-[#181c32] font-semibold dark:text-white mb-3" style={{
|
||||||
@@ -119,6 +118,8 @@ export default function Login() {
|
|||||||
iconName="message"
|
iconName="message"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<input type="text" placeholder="boyce" />
|
||||||
|
|
||||||
<div className="input-item mb-5">
|
<div className="input-item mb-5">
|
||||||
<InputCom
|
<InputCom
|
||||||
value={password}
|
value={password}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default function SignUp() {
|
|||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
const { signup_country } = await res.data
|
const { signup_country } = await res.data
|
||||||
setCountries(signup_country)
|
setCountries(signup_country)
|
||||||
} else if (res.data.result != 100) {
|
} else if (res.data.result !== 100) {
|
||||||
setCountries('Nothing see here!')
|
setCountries('Nothing see here!')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -57,7 +57,7 @@ export default function SignUp() {
|
|||||||
const handleSignUp = async () => {
|
const handleSignUp = async () => {
|
||||||
let { country, first_name, last_name, email, password } = formData
|
let { country, first_name, last_name, email, password } = formData
|
||||||
|
|
||||||
if (email == '' && password == '' && first_name == '') {
|
if (email === '' && password === '' && first_name === '') {
|
||||||
setMsgError('Please fill in fields')
|
setMsgError('Please fill in fields')
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,37 +79,43 @@ export default function SignUp() {
|
|||||||
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
const { data } = res
|
const { data } = res
|
||||||
if (data.status == -1 && data.acc == 'DULPICATE') {
|
if (data.status === -1 && data.acc === 'DULPICATE') {
|
||||||
setMsgError('This account has been already created')
|
setMsgError('This account has been already created')
|
||||||
setSignUpLoading(false)
|
setSignUpLoading(false)
|
||||||
}
|
}
|
||||||
if (data && data.status == 1) {
|
if (data && data.status === '1') {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
navigate("/verify-you", { replace: true });
|
navigate("/verify-you", { replace: true });
|
||||||
setSignUpLoading(false)
|
setSignUpLoading(false)
|
||||||
}, 2000)
|
}, 2000)
|
||||||
} else {
|
} else {
|
||||||
setSignUpLoading(false)
|
setSignUpLoading(false)
|
||||||
|
setMsgError('This account does not exist')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setMsgError('This account does not exist')
|
|
||||||
setSignUpLoading(false)
|
setSignUpLoading(false)
|
||||||
|
setMsgError('An error occurred')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(error)
|
throw new Error(error)
|
||||||
setMsgError('An error occurred')
|
|
||||||
} finally {
|
} finally {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setMsgError(null)
|
setMsgError(null)
|
||||||
}, process.env.REACT_APP_SIGNUP_ERROR_TIMEOUT)
|
}, process.env.REACT_APP_SIGNUP_ERROR_TIMEOUT)
|
||||||
|
setFormData({
|
||||||
|
first_name: '',
|
||||||
|
last_name: '',
|
||||||
|
email: '',
|
||||||
|
country: '',
|
||||||
|
password: ''
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getCountryList()
|
getCountryList()
|
||||||
}, [])
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -239,7 +245,8 @@ export default function SignUp() {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={handleSignUp}
|
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]`}
|
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" : ""
|
||||||
|
}`}
|
||||||
>
|
>
|
||||||
{signUpLoading ? (
|
{signUpLoading ? (
|
||||||
<div className="signup btn-loader"></div>
|
<div className="signup btn-loader"></div>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useEffect, useState, useCallback } from "react";
|
import { useState, useLayoutEffect, useCallback } from "react";
|
||||||
import { useLocation, Link, useNavigate } from "react-router-dom";
|
import { useLocation, Link, useNavigate } from "react-router-dom";
|
||||||
import AuthLayout from "../AuthLayout";
|
import AuthLayout from "../AuthLayout";
|
||||||
import InputCom from "../../Helpers/Inputs/InputCom";
|
import InputCom from "../../Helpers/Inputs/InputCom";
|
||||||
@@ -20,30 +20,29 @@ export default function VerifyLink() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const verifyRes = await userApi.verifyEmail(code)
|
const verifyRes = await userApi.verifyEmail(code)
|
||||||
console.log(verifyRes)
|
|
||||||
if (verifyRes.status === 200) {
|
if (verifyRes.status === 200) {
|
||||||
let { data } = verifyRes
|
let { data } = verifyRes
|
||||||
|
|
||||||
if (data && data.internal_return === 0 && data.status_text == 'Link Verfied') {
|
if (data && data.internal_return === 0 && data.status_text === 'Link Verfied') {
|
||||||
setPageLoader(false)
|
setPageLoader(false)
|
||||||
setLinkSuccess(true)
|
setLinkSuccess(true)
|
||||||
} else {
|
} else {
|
||||||
setPageLoader(false)
|
setPageLoader(false)
|
||||||
setLinkError(true)
|
setLinkError(true)
|
||||||
}
|
}
|
||||||
|
console.log(data)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
|
||||||
setPageLoader(false)
|
setPageLoader(false)
|
||||||
setLinkError(true)
|
setLinkError(true)
|
||||||
throw new Error(error)
|
throw new Error(error)
|
||||||
}
|
}
|
||||||
}, [linkSuccess, linkError]
|
}, []
|
||||||
)
|
)
|
||||||
|
|
||||||
useEffect(() => {
|
useLayoutEffect(() => {
|
||||||
verifyEmail(token)
|
verifyEmail(token)
|
||||||
}, [])
|
})
|
||||||
|
|
||||||
console.log(token)
|
console.log(token)
|
||||||
|
|
||||||
@@ -130,6 +129,7 @@ const ErrorComponent = ({ onClick }) => (
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div className="signin-area flex justify-center mb-3.5">
|
<div className="signin-area flex justify-center mb-3.5">
|
||||||
<button
|
<button
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import AuthLayout from "../AuthLayout";
|
import AuthLayout from "../AuthLayout";
|
||||||
import InputCom from "../../Helpers/Inputs/InputCom";
|
|
||||||
|
|
||||||
export default function VerifyYou() {
|
export default function VerifyYou() {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
|
import localImgLoad from "../../lib/localImgLoad";
|
||||||
|
|
||||||
|
export default function HomeBannerOffersCard(props) {
|
||||||
|
return (
|
||||||
|
<Link
|
||||||
|
to="/my-collection/collection-item"
|
||||||
|
className="item w-full block group banner-630-340"
|
||||||
|
>
|
||||||
|
<div className="flex flex-col justify-between h-full">
|
||||||
|
<div className="content flex justify-between items-center mb-5">
|
||||||
|
<div>
|
||||||
|
<h1 className="text-xl font-bold text-dark-gray dark:text-white tracking-wide">
|
||||||
|
<>Ab hshsh jsjsj hshdhhdjjd</>
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
{/*<SelectBox datas={filterDatas} action={dataSetHandler} />*/}
|
||||||
|
</div>
|
||||||
|
<div className="h-[233px]">
|
||||||
|
BEST IMAGE IN THE WORLLD
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -15,68 +15,68 @@ export default function InputCom({
|
|||||||
onClick,
|
onClick,
|
||||||
disable,
|
disable,
|
||||||
blurHandler,
|
blurHandler,
|
||||||
|
onMouseEnter,
|
||||||
|
onMouseLeave
|
||||||
}) {
|
}) {
|
||||||
const inputRef = useRef(null)
|
const inputRef = useRef(null)
|
||||||
// Entry Validation
|
// Entry Validation
|
||||||
// for Min Length:
|
// for Min Length:
|
||||||
const minLengthValidation = () => {
|
const minLengthValidation = () => {
|
||||||
if (inputRef && inputRef?.current && inputRef?.current?.name == 'email') {
|
if (inputRef && inputRef?.current && inputRef?.current?.name === 'email') {
|
||||||
return 7
|
return 7
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'first_name') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'first_name') {
|
||||||
return 3
|
return 3
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'last_name') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'last_name') {
|
||||||
return 3
|
return 3
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'address') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'address') {
|
||||||
return 5
|
return 5
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'password') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'password') {
|
||||||
return 8
|
return 8
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'state') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'state') {
|
||||||
return 3
|
return 3
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'province') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'province') {
|
||||||
return 3
|
return 3
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'city') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'city') {
|
||||||
return 3
|
return 3
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'amount') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'amount') {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// for MaxLength
|
// for MaxLength
|
||||||
const maxLengthValidation = () => {
|
const maxLengthValidation = () => {
|
||||||
if (inputRef && inputRef?.current && inputRef?.current?.name == 'email') {
|
if (inputRef && inputRef?.current && inputRef?.current?.name === 'email') {
|
||||||
return 35
|
return 35
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'first_name') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'first_name') {
|
||||||
return 25
|
return 25
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'last_name') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'last_name') {
|
||||||
return 25
|
return 25
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'address') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'address') {
|
||||||
return 49
|
return 49
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'password') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'password') {
|
||||||
return 15
|
return 15
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'state') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'state') {
|
||||||
return 25
|
return 25
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'province') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'province') {
|
||||||
return 25
|
return 25
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'city') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'city') {
|
||||||
return 25
|
return 25
|
||||||
} else if (inputRef && inputRef?.current && inputRef?.current?.name == 'amount') {
|
} else if (inputRef && inputRef?.current && inputRef?.current?.name === 'amount') {
|
||||||
return 9
|
return 9
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(inputRef.current?.name, inputRef.current?.minLength)
|
|
||||||
return (
|
return (
|
||||||
<div className="input-com">
|
<div className="input-com">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
{label && (
|
{label && (
|
||||||
<label
|
<label
|
||||||
className="input-label text-[#181c32] dark:text-white text-base font-semibold block mb-2.5"
|
className="input-label text-[#181c32] dark:text-white text-base font-semibold block mb-2.5"
|
||||||
htmlFor={name}
|
htmlFor={name}
|
||||||
>
|
>
|
||||||
{label}
|
{label}
|
||||||
</label>
|
</label>
|
||||||
)}
|
)}
|
||||||
{forgotPassword && <Link to="/forgot-password" className="text-base text-[#4687ba] hover:text-[#009ef7]">Forgot Password?</Link>}
|
{forgotPassword && <Link to="/forgot-password" className="text-base text-[#4687ba] hover:text-[#009ef7]">Forgot Password?</Link>}
|
||||||
</div>
|
</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 ">
|
<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
|
<input
|
||||||
@@ -87,11 +87,13 @@ export default function InputCom({
|
|||||||
type={type}
|
type={type}
|
||||||
id={name}
|
id={name}
|
||||||
name={name}
|
name={name}
|
||||||
readOnly={disable}
|
|
||||||
minLength={minLengthValidation()}
|
minLength={minLengthValidation()}
|
||||||
maxLength={maxLengthValidation()}
|
maxLength={maxLengthValidation()}
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
|
readOnly={disable}
|
||||||
onBlur={blurHandler}
|
onBlur={blurHandler}
|
||||||
|
onMouseEnter={onMouseEnter}
|
||||||
|
onMouseLeave={onMouseLeave}
|
||||||
/>
|
/>
|
||||||
{iconName && (
|
{iconName && (
|
||||||
<div className="absolute right-6 bottom-[10px] z-10">
|
<div className="absolute right-6 bottom-[10px] z-10">
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import SliderCom from "../Helpers/SliderCom";
|
|||||||
import slider1 from "../../assets/images/slider-1.jpg";
|
import slider1 from "../../assets/images/slider-1.jpg";
|
||||||
import slider2 from "../../assets/images/slider-2.jpg";
|
import slider2 from "../../assets/images/slider-2.jpg";
|
||||||
import slider3 from "../../assets/images/slider-3.jpg";
|
import slider3 from "../../assets/images/slider-3.jpg";
|
||||||
|
import HomeBannerOffersCard from "../Cards/HomeBannerOffersCard";
|
||||||
|
|
||||||
|
|
||||||
export default function HomeSliders(props) {
|
export default function HomeSliders(props) {
|
||||||
@@ -20,8 +21,8 @@ export default function HomeSliders(props) {
|
|||||||
<div className="item w-full h-full bg-white dark:bg-dark-white rounded-2xl overflow-hidden">
|
<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" />
|
<img src={slider3} alt="slider" className="w-full h-full" />
|
||||||
</div>
|
</div>
|
||||||
<div className="item w-full h-full bg-red dark:bg-dark-white rounded-2xl overflow-hidden">
|
<div className="item w-full h-full bg-white dark:bg-dark-white rounded-2xl overflow-hidden">
|
||||||
Olusesan Ameye Data
|
<HomeBannerOffersCard />
|
||||||
</div>
|
</div>
|
||||||
</SliderCom>
|
</SliderCom>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4,11 +4,12 @@ import Layout from "../Partials/Layout";
|
|||||||
import MyJobTable from "./MyJobTable";
|
import MyJobTable from "./MyJobTable";
|
||||||
import CommonHead from "../UserHeader/CommonHead";
|
import CommonHead from "../UserHeader/CommonHead";
|
||||||
|
|
||||||
export default function MyJobs() {
|
export default function MyJobs(props) {
|
||||||
const [selectTab, setValue] = useState("today");
|
const [selectTab, setValue] = useState("today");
|
||||||
const filterHandler = (value) => {
|
const filterHandler = (value) => {
|
||||||
setValue(value);
|
setValue(value);
|
||||||
};
|
};
|
||||||
|
console.log("AMEYE LOC1", props.MyJobList);
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<CommonHead />
|
<CommonHead />
|
||||||
@@ -32,7 +33,7 @@ export default function MyJobs() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<MyJobTable />
|
<MyJobTable MyJobList={props.MyJobList} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|||||||
@@ -1,13 +1,76 @@
|
|||||||
import React, {useEffect, useState} from 'react'
|
import React, {useEffect, useState} from 'react'
|
||||||
import { Link } from 'react-router-dom'
|
import { Link, useNavigate } from 'react-router-dom'
|
||||||
import Icons from '../Helpers/Icons'
|
import Icons from '../Helpers/Icons'
|
||||||
import usersService from '../../services/UsersService'
|
import usersService from '../../services/UsersService'
|
||||||
|
import InputCom from '../Helpers/Inputs/InputCom'
|
||||||
|
|
||||||
|
import LoadingSpinner from '../Spinners/LoadingSpinner'
|
||||||
|
import {toast} from 'react-toastify'
|
||||||
|
|
||||||
|
import {Formik, Form} from 'formik'
|
||||||
|
import * as Yup from 'yup'
|
||||||
|
|
||||||
|
|
||||||
|
const validationSchema = Yup.object().shape({
|
||||||
|
firstname: Yup.string()
|
||||||
|
.min(3, 'Minimum 3 characters')
|
||||||
|
.max(25, 'Maximum 25 characters')
|
||||||
|
.required('Firstname is required'),
|
||||||
|
lastname: Yup.string()
|
||||||
|
.min(3, 'Minimum 3 characters')
|
||||||
|
.max(25, 'Maximum 25 characters')
|
||||||
|
.required('Lastname is required'),
|
||||||
|
country: Yup.string()
|
||||||
|
.min(1, 'Minimum 3 characters')
|
||||||
|
.max(25, 'Maximum 25 characters')
|
||||||
|
.required('Country is required'),
|
||||||
|
bank: Yup.string()
|
||||||
|
.min(3, 'Minimum 3 characters')
|
||||||
|
.max(25, 'Maximum 25 characters')
|
||||||
|
.required('Bank name is required'),
|
||||||
|
accountNumber: Yup.string()
|
||||||
|
.matches(/\d/, "must be a number")
|
||||||
|
.min(3, 'Minimum 3 characters')
|
||||||
|
.max(25, 'Maximum 25 characters')
|
||||||
|
.required('Account Number is required'),
|
||||||
|
repeatAccountNumber: Yup.string()
|
||||||
|
.required('Repeat Account Number is required')
|
||||||
|
.oneOf([Yup.ref('accountNumber'), null], 'Must match Account Number'),
|
||||||
|
accountType: Yup.string()
|
||||||
|
.min(1, 'Minimum 3 characters')
|
||||||
|
.max(25, 'Maximum 25 characters')
|
||||||
|
.required('Account Type is required'),
|
||||||
|
city: Yup.string()
|
||||||
|
.min(3, 'Minimum 3 characters')
|
||||||
|
.max(25, 'Maximum 25 characters')
|
||||||
|
.required('City is required'),
|
||||||
|
state: Yup.string()
|
||||||
|
.min(3, 'Minimum 3 characters')
|
||||||
|
.max(25, 'Maximum 25 characters')
|
||||||
|
.required('State is required'),
|
||||||
|
})
|
||||||
|
|
||||||
|
const initialValues = {
|
||||||
|
firstname: '',
|
||||||
|
lastname: '',
|
||||||
|
country: '',
|
||||||
|
bank: '',
|
||||||
|
accountNumber: '',
|
||||||
|
repeatAccountNumber: '',
|
||||||
|
accountType: '',
|
||||||
|
state: '',
|
||||||
|
city: ''
|
||||||
|
}
|
||||||
|
|
||||||
function AddRecipient() {
|
function AddRecipient() {
|
||||||
|
|
||||||
const apiURL = new usersService()
|
const apiURL = new usersService()
|
||||||
|
|
||||||
let [countries, setCountries] = useState({ // STATE TO HOLD LIST OF COUNTRIES
|
const navigate = useNavigate()
|
||||||
|
|
||||||
|
let [requestStatus, setRequestStatus] = useState({message: '', loading: false, status: false})
|
||||||
|
|
||||||
|
let [allCountries, setAllCountries] = useState({ // STATE TO HOLD LIST OF COUNTRIES
|
||||||
loading: true,
|
loading: true,
|
||||||
data: []
|
data: []
|
||||||
})
|
})
|
||||||
@@ -17,60 +80,51 @@ function AddRecipient() {
|
|||||||
data: []
|
data: []
|
||||||
})
|
})
|
||||||
|
|
||||||
let [accountType, setAccountType] = useState({ // STATE TO HOLD LIST ACCOUNT TYPE
|
let [accType, setAccType] = useState({ // STATE TO HOLD LIST ACCOUNT TYPE
|
||||||
loading: true,
|
loading: true,
|
||||||
data: []
|
data: []
|
||||||
})
|
})
|
||||||
|
|
||||||
//STATE FOR CONTROLLED INPUTS
|
//FUNCTION TO HANDLE ADD RECIPIENT SUBMIT
|
||||||
let [inputs, setInputs] = useState({
|
const handleSubmit = (values, helpers) => {
|
||||||
firstname: '',
|
setRequestStatus({message: '', loading: true, status: false})
|
||||||
lastname: '',
|
|
||||||
country: '',
|
|
||||||
'bank-name': '',
|
|
||||||
'account-number': '',
|
|
||||||
'repeat-account-number': '',
|
|
||||||
'account-type': '',
|
|
||||||
state: '',
|
|
||||||
city: ''
|
|
||||||
})
|
|
||||||
|
|
||||||
// FUNCTION TO HANDLE INPUT CHANGE
|
let reqData = { //REQUEST DATA FOR API CALL
|
||||||
const handleChange = ({target:{name, value}}) => {
|
firstname: values.firstname,
|
||||||
setInputs(prev => ({...prev, [name]:value}))
|
lastname: values.lastname,
|
||||||
}
|
bank_code: values.bank,
|
||||||
|
account_no: values.accountNumber,
|
||||||
|
account_type: values.accountType,
|
||||||
|
country: values.country,
|
||||||
|
state: values.state,
|
||||||
|
city: values.city
|
||||||
|
}
|
||||||
|
|
||||||
//FUNCTION TO HANDLE SUBMIT
|
//CALL TO ADD RECIPIENT API
|
||||||
const handleSubmit = (e) => {
|
apiURL.addRecipient(reqData).then((res)=>{
|
||||||
e.preventDefault();
|
if(res.data.internal_return < 0){
|
||||||
|
setRequestStatus({message: 'could not add recipient, try again!', loading: false, status: true})
|
||||||
//valid inputs before submitting. Just for texting remove later
|
return
|
||||||
|
}
|
||||||
|
// setRequestStatus({message: 'Recipient Added Successfully!', loading: false, status: true})
|
||||||
// RETURN INPUTS TO EMPTY STRING
|
toast.success("Recipient Added Successfully!");
|
||||||
setInputs({
|
setTimeout(()=>{navigate('../transfer-fund',{replace:true})},1000)
|
||||||
firstname: '',
|
}).catch((error)=>{
|
||||||
lastname: '',
|
setRequestStatus({message: 'Opps! an error occured! Try again later', loading: false, status: false})
|
||||||
country: '',
|
|
||||||
'bank-name': '',
|
|
||||||
'account-number': '',
|
|
||||||
'repeat-account-number': '',
|
|
||||||
'account-type': '',
|
|
||||||
state: '',
|
|
||||||
city: ''
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// FUNCTION TO GET COUNTRIES
|
// FUNCTION TO GET COUNTRIES
|
||||||
const getCountry = ()=> {
|
const getCountry = ()=> {
|
||||||
apiURL.getSignupCountryData().then((res)=>{
|
apiURL.getSignupCountryData().then((res)=>{
|
||||||
if(res.data.internal_return < 0){
|
if(res.data.internal_return < 0){
|
||||||
setCountries(prev => ({loading: false, data: []}))
|
setAllCountries(prev => ({loading: false, data: []}))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
setCountries(prev => ({loading: false, data:res.data.signup_country}))
|
setAllCountries(prev => ({loading: false, data:res.data.signup_country}))
|
||||||
}).catch((error)=>{
|
}).catch((error)=>{
|
||||||
setCountries(prev => ({loading: false, data: []}))
|
setAllCountries(prev => ({loading: false, data: []}))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// END OF FUNCTION TO GET COUNTRIES
|
// END OF FUNCTION TO GET COUNTRIES
|
||||||
@@ -93,12 +147,12 @@ function AddRecipient() {
|
|||||||
const getAccountTypes = ()=> {
|
const getAccountTypes = ()=> {
|
||||||
apiURL.getAccountTypes().then((res)=>{
|
apiURL.getAccountTypes().then((res)=>{
|
||||||
if(res.data.internal_return < 0){
|
if(res.data.internal_return < 0){
|
||||||
setAccountType(prev => ({loading: false, data: []}))
|
setAccType(prev => ({loading: false, data: []}))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
setAccountType(prev => ({loading: false, data:res.data.result_list}))
|
setAccType(prev => ({loading: false, data:res.data.result_list}))
|
||||||
}).catch((error)=>{
|
}).catch((error)=>{
|
||||||
setAccountType(prev => ({loading: false, data: []}))
|
setAccType(prev => ({loading: false, data: []}))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// END OF FUNCTION TO GET ACCOUNT TYPES
|
// END OF FUNCTION TO GET ACCOUNT TYPES
|
||||||
@@ -113,148 +167,199 @@ function AddRecipient() {
|
|||||||
<div className="content-wrapper w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin">
|
<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">
|
<div className="w-full mb-10 lg:mb-0">
|
||||||
<div className="w-full md:p-8 p-4 bg-white dark:bg-dark-white rounded-2xl shadow">
|
<div className="w-full md:p-8 p-4 bg-white dark:bg-dark-white rounded-2xl shadow">
|
||||||
<h2 className='my-4 text-slate-900 dark:text-white text-xl lg:text-2xl font-semibold'>ADD BANK ACCOUNT</h2>
|
<h2 className='my-4 text-slate-900 dark:text-white text-xl lg:text-2xl font-semibold'>ADD BANK ACCOUNT</h2>
|
||||||
<form className='add-recipient-info px-1 md:px-[50px] lg:px-[100px]' onSubmit={handleSubmit}>
|
<Formik initialValues={initialValues} validationSchema={validationSchema} onSubmit={handleSubmit}>
|
||||||
|
{(props)=>(
|
||||||
|
<Form className='add-recipient-info px-1 md:px-[50px] lg:px-[100px]'>
|
||||||
|
|
||||||
{/* inputs starts here */}
|
{/* inputs starts here */}
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
{/* firstname */}
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>First Name <span className='text-red-500'>*</span></label>
|
<div className="xl:flex xl:space-x-7 mb-6">
|
||||||
<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'
|
<div className="field w-full mb-6 xl:mb-0">
|
||||||
value={inputs.firstname}
|
<InputCom
|
||||||
name='firstname'
|
label="Firstname"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder='Account Firstname'
|
name="firstname"
|
||||||
required
|
placeholder="Account Firstname"
|
||||||
onChange={handleChange}
|
value={props.values.firstname}
|
||||||
/>
|
inputHandler={props.handleChange}
|
||||||
</div>
|
blurHandler={props.handleBlur}
|
||||||
|
/>
|
||||||
|
{(props.errors.firstname && props.touched.firstname) && <p className="text-sm text-red-500">{props.errors.firstname}</p>}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
{/* lastname */}
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Last Name <span className='text-red-500'>*</span></label>
|
<div className="field w-full">
|
||||||
<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'
|
<InputCom
|
||||||
value={inputs.lastname}
|
label="Lastname"
|
||||||
name='lastname'
|
type="text"
|
||||||
type="text"
|
name="lastname"
|
||||||
placeholder='Account Lastname'
|
placeholder="Account Lastname"
|
||||||
required
|
value={props.values.lastname}
|
||||||
onChange={handleChange}
|
inputHandler={props.handleChange}
|
||||||
/>
|
blurHandler={props.handleBlur}
|
||||||
</div>
|
/>
|
||||||
|
{(props.errors.lastname && props.touched.lastname) && <p className="text-sm text-red-500">{props.errors.lastname}</p>}
|
||||||
|
</div>
|
||||||
|
</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'>Country <span className='text-red-500'>*</span></label>
|
|
||||||
<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'>
|
<div className="xl:flex xl:space-x-7 mb-6">
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Bank Name <span className='text-red-500'>*</span></label>
|
{/* country */}
|
||||||
<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}>
|
<div className='add-recipient w-full mb-6 xl:mb-0'>
|
||||||
{bankName.loading ?
|
<label className='input-label text-[#181c32] dark:text-white text-base font-semibold block mb-2.5'>Country <span className='text-red-500'>*</span></label>
|
||||||
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
<select className='w-full text-base p-2 text-dark-gray dark:text-white rounded-md border border-slate-300 outline-0' name='country'
|
||||||
:
|
value={props.values.country}
|
||||||
bankName.data.length ?
|
onChange={props.handleChange}
|
||||||
<>
|
onBlur={props.handleBlur}
|
||||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
>
|
||||||
{bankName.data.map((item, index)=>(
|
{allCountries.loading ?
|
||||||
<option key={index} className='text-slate-500 text-lg' value={item.name}>{item.name}</option>
|
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
||||||
))}
|
:
|
||||||
</>
|
allCountries.data.length ?
|
||||||
:
|
<>
|
||||||
<option className='text-slate-500 text-lg' value="">No Options Found! Try Again</option>
|
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||||
}
|
{allCountries.data.map((item, index)=>(
|
||||||
</select>
|
<option key={index} className='text-slate-500 text-lg' value={item[0]}>{item[1]}</option>
|
||||||
</div>
|
))}
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<option className='text-slate-500 text-lg' value="">No Options Found! Try Again</option>
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
{(props.errors.country && props.touched.country) && <p className="text-sm text-red-500">{props.errors.country}</p>}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
{/* bank name */}
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Account Number <span className='text-red-500'>*</span></label>
|
<div className='add-recipient w-full'>
|
||||||
<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'
|
<label className='input-label text-[#181c32] dark:text-white text-base font-semibold block mb-2.5'>Bank Name <span className='text-red-500'>*</span></label>
|
||||||
value={inputs['account-number']}
|
<select className='w-full text-base p-2 text-dark-gray dark:text-white rounded-md border border-slate-300 outline-0' name='bank'
|
||||||
name='account-number'
|
value={props.values.bank}
|
||||||
type="text"
|
onChange={props.handleChange}
|
||||||
placeholder='Account No'
|
onBlur={props.handleBlur}
|
||||||
required
|
>
|
||||||
onChange={handleChange}
|
{bankName.loading ?
|
||||||
/>
|
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
||||||
</div>
|
:
|
||||||
|
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.code}>{item.name}</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<option className='text-slate-500 text-lg' value="">No Options Found! Try Again</option>
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
{(props.errors.bank && props.touched.bank) && <p className="text-sm text-red-500">{props.errors.bank}</p>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
{/* ACCOUNT NUMBER */}
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Repeat Account Number <span className='text-red-500'>*</span></label>
|
<div className="xl:flex xl:space-x-7 mb-6">
|
||||||
<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'
|
<div className="field w-full mb-6 xl:mb-0">
|
||||||
value={inputs['repeat-account-number']}
|
<InputCom
|
||||||
name='repeat-account-number'
|
label="Account Number"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder='Repeat Account No'
|
name="accountNumber"
|
||||||
required
|
placeholder="Account No"
|
||||||
onChange={handleChange}
|
value={props.values.accountNumber}
|
||||||
/>
|
inputHandler={props.handleChange}
|
||||||
</div>
|
blurHandler={props.handleBlur}
|
||||||
|
/>
|
||||||
|
{(props.errors.accountNumber && props.touched.accountNumber) && <p className="text-sm text-red-500">{props.errors.accountNumber}</p>}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
{/* REPEAT ACCT. NUMBER */}
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>Account type <span className='text-red-500'>*</span></label>
|
<div className="field w-full">
|
||||||
<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}>
|
<InputCom
|
||||||
{accountType.loading ?
|
label="Repeat Account Number"
|
||||||
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
type="text"
|
||||||
:
|
name="repeatAccountNumber"
|
||||||
accountType.data.length ?
|
placeholder="Repeat Account Number"
|
||||||
<>
|
value={props.values.repeatAccountNumber}
|
||||||
<option className='text-slate-500 text-lg' value="">Select...</option>
|
inputHandler={props.handleChange}
|
||||||
{accountType.data.map((item, index)=>(
|
blurHandler={props.handleBlur}
|
||||||
<option key={index} className='text-slate-500 text-lg' value={item.name}>{item.name}</option>
|
/>
|
||||||
))}
|
{(props.errors.repeatAccountNumber && props.touched.repeatAccountNumber) && <p className="text-sm text-red-500">{props.errors.repeatAccountNumber}</p>}
|
||||||
</>
|
</div>
|
||||||
:
|
</div>
|
||||||
<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'>
|
<div className="xl:flex xl:space-x-7 mb-6">
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>State/Province <span className='text-red-500'>*</span></label>
|
{/* Account Type */}
|
||||||
<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'
|
<div className='add-recipient w-full'>
|
||||||
value={inputs.state}
|
<label className='input-label text-[#181c32] dark:text-white text-base font-semibold block mb-2.5'>Account Type <span className='text-red-500'>*</span></label>
|
||||||
name='state'
|
<select className='w-full text-base p-2 text-dark-gray dark:text-white rounded-md border border-slate-300 outline-0' name='accountType'
|
||||||
type="text"
|
value={props.values.accountType}
|
||||||
placeholder='State'
|
onChange={props.handleChange}
|
||||||
required
|
onBlur={props.handleBlur}
|
||||||
onChange={handleChange}
|
>
|
||||||
/>
|
{accType.loading ?
|
||||||
</div>
|
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
||||||
|
:
|
||||||
|
accType.data.length ?
|
||||||
|
<>
|
||||||
|
<option className='text-slate-500 text-lg' value="">Select...</option>
|
||||||
|
{accType.data.map((item, index)=>(
|
||||||
|
<option key={index} className='text-slate-500 text-lg' value={item.value}>{item.name}</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<option className='text-slate-500 text-lg' value="">No Options Found! Try Again</option>
|
||||||
|
}
|
||||||
|
</select>
|
||||||
|
{(props.errors.accountType && props.touched.accountType) && <p className="text-sm text-red-500">{props.errors.accountType}</p>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className='add-recipient my-3 md:flex items-center justify-between'>
|
{/* state */}
|
||||||
<label className='w-full md:w-1/4 text-slate-600 text-lg'>City <span className='text-red-500'>*</span></label>
|
<div className="xl:flex xl:space-x-7 mb-6">
|
||||||
<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'
|
<div className="field w-full mb-6 xl:mb-0">
|
||||||
value={inputs.city}
|
<InputCom
|
||||||
name='city'
|
label="State"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder='City'
|
name="state"
|
||||||
required
|
placeholder="State/Province"
|
||||||
onChange={handleChange}
|
value={props.values.state}
|
||||||
/>
|
inputHandler={props.handleChange}
|
||||||
</div>
|
blurHandler={props.handleBlur}
|
||||||
|
/>
|
||||||
|
{(props.errors.state && props.touched.state) && <p className="text-sm text-red-500">{props.errors.state}</p>}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* end of inputs starts here */}
|
{/* city */}
|
||||||
|
<div className="field w-full">
|
||||||
|
<InputCom
|
||||||
|
label="City"
|
||||||
|
type="text"
|
||||||
|
name="city"
|
||||||
|
placeholder="City"
|
||||||
|
value={props.values.city}
|
||||||
|
inputHandler={props.handleChange}
|
||||||
|
blurHandler={props.handleBlur}
|
||||||
|
/>
|
||||||
|
{(props.errors.city && props.touched.city) && <p className="text-sm text-red-500">{props.errors.city}</p>}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/* end of inputs starts here */}
|
||||||
|
|
||||||
<div className='add-recipient-btn flex justify-end items-center py-4'>
|
{/* REQUEST ERROR DISPLAY */}
|
||||||
<button className='text-lg text-white bg-sky-blue px-4 py-2 hover:opacity-90 rounded-md flex items-center space-x-1'>
|
{requestStatus.message && <p className='text-sm text-red-500'>{requestStatus.message}</p>}
|
||||||
<span className='pr-2'>ADD RECIPIENT</span>
|
|
||||||
<Icons name="arrows" />
|
<div className='add-recipient-btn flex justify-end items-center py-4'>
|
||||||
</button>
|
{requestStatus.loading ?
|
||||||
</div>
|
<LoadingSpinner size={6} color='sky-blue' />
|
||||||
</form>
|
:
|
||||||
|
<button type='submit' className='text-lg text-white bg-sky-blue px-4 py-2 hover:opacity-90 rounded-md flex items-center space-x-1'>
|
||||||
|
<span className='pr-2'>ADD RECIPIENT</span>
|
||||||
|
<Icons name="arrows" />
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</Form>
|
||||||
|
)}
|
||||||
|
</Formik>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import React, {useEffect, useState} from 'react'
|
|||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
import RecentActivityTable from './WalletComponent/RecentActivityTable'
|
import RecentActivityTable from './WalletComponent/RecentActivityTable'
|
||||||
import LoadingSpinner from '../Spinners/LoadingSpinner'
|
import LoadingSpinner from '../Spinners/LoadingSpinner'
|
||||||
|
import InputCom from '../Helpers/Inputs/InputCom'
|
||||||
|
|
||||||
import usersService from '../../services/UsersService'
|
import usersService from '../../services/UsersService'
|
||||||
|
|
||||||
@@ -97,57 +98,53 @@ function TransferFund({payment, wallet}) {
|
|||||||
:
|
:
|
||||||
<h2 className='my-4 py-2 text-slate-900 dark:text-white text-xl lg:text-2xl font-medium'>No Wallet Information Found!</h2>
|
<h2 className='my-4 py-2 text-slate-900 dark:text-white text-xl lg:text-2xl font-medium'>No Wallet Information Found!</h2>
|
||||||
}
|
}
|
||||||
<div className='my-3 md:flex items-center justify-between space-x-2'>
|
<div className="xl:flex xl:space-x-7 mb-6">
|
||||||
<div className='transfer-input w-full md:w-1/2'>
|
|
||||||
<label className='w-full text-slate-600 text-lg'>Amount <span className='text-red-500'>*</span></label>
|
<div className="field w-full mb-6 xl:mb-0">
|
||||||
<input className='w-full p-3 text-lg text-right bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
<InputCom
|
||||||
value={inputs.amount}
|
label="Amount"
|
||||||
name='amount'
|
|
||||||
type="text"
|
type="text"
|
||||||
placeholder='Amount'
|
name="amount"
|
||||||
required
|
value={inputs.amount}
|
||||||
onChange={handleChange}
|
inputHandler={handleChange}
|
||||||
onMouseEnter={()=>{setNewFee(false)}}
|
onMouseEnter={()=>{setNewFee(false)}}
|
||||||
onMouseLeave={()=>{setNewFee(true)}}
|
onMouseLeave={()=>{setNewFee(true)}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='transfer-input w-full md:w-1/2'>
|
|
||||||
<label className='w-full text-slate-600 text-lg'>Fee <span className='text-red-500'>*</span></label>
|
<div className="field w-full">
|
||||||
<input className='w-full p-3 text-lg text-right bg-slate-100 opacity-50 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
<InputCom
|
||||||
value={sendMoneyFee.fee}
|
label="Fee"
|
||||||
name='fee'
|
|
||||||
type="text"
|
type="text"
|
||||||
placeholder='Fee'
|
name="fee"
|
||||||
required
|
value={sendMoneyFee.fee}
|
||||||
disabled
|
disable={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='my-3 md:flex items-center justify-end space-x-2'>
|
<div className='md:flex items-center justify-end'>
|
||||||
<div className='transfer-input w-full md:w-1/2'>
|
<div className="field w-full lg:w-1/2 mb-6">
|
||||||
<label className='w-full text-slate-600 text-lg'>Total <span className='text-red-500'>*</span></label>
|
<InputCom
|
||||||
<input className='w-full p-3 text-lg text-right bg-slate-100 opacity-50 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
label="Total"
|
||||||
value={sendMoneyFee.total}
|
|
||||||
name='total'
|
|
||||||
type="text"
|
type="text"
|
||||||
placeholder='Total'
|
name="total"
|
||||||
required
|
value={sendMoneyFee.total}
|
||||||
disabled
|
disable={true}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='relative my-3 md:flex items-center'>
|
<div className='relative my-3 md:flex items-center'>
|
||||||
<div className='transfer-input w-full'>
|
<div className='transfer-input w-full'>
|
||||||
<div className='flex items-center justify-start'>
|
<div className='flex items-center justify-start py-2'>
|
||||||
<label className='text-slate-600 text-lg'>Recipient
|
<label className='text-[#181c32] dark:text-white text-base font-semibold block mb-2.5'>Recipient
|
||||||
<span className='text-red-500 mx-2'>*</span>
|
<span className='text-red-500 mx-2'>*</span>
|
||||||
<span title='Transfer Recipient' className={`text-white text-sm bg-slate-500 w-1 h-1 rounded-full px-3 py-1 cursor-pointer`}>!</span>
|
<span title='Transfer Recipient' className={`text-white text-sm bg-slate-500 w-1 h-1 rounded-full px-3 py-1 cursor-pointer`}>!</span>
|
||||||
</label>
|
</label>
|
||||||
<Link to='add-recipient' className='mx-1 text-base text-white p-3 bg-[orange] rounded-md hover:opacity-80'>Add New</Link>
|
<Link to='add-recipient' className='mx-1 text-base text-white p-2 bg-[orange] rounded-md hover:opacity-80'>Add New</Link>
|
||||||
</div>
|
</div>
|
||||||
<select className='mt-2 w-full p-3 text-lg bg-white rounded-md border border-slate-300 outline-0' value={inputs.recipient} name='recipient' onChange={handleChange}>
|
<select className='w-full text-base p-2 text-dark-gray dark:text-white rounded-md border border-slate-300 outline-0' value={inputs.recipient} name='recipient' onChange={handleChange}>
|
||||||
{recepients.loading ?
|
{recepients.loading ?
|
||||||
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
<option className='text-slate-500 text-lg' value="">Loading...</option>
|
||||||
:
|
:
|
||||||
@@ -168,18 +165,23 @@ function TransferFund({payment, wallet}) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='my-3 md:flex items-center'>
|
<div className="field w-full mb-6">
|
||||||
<div className='transfer-input w-full'>
|
{/* <InputCom
|
||||||
<label className='w-full text-slate-600 text-lg'>Comment <span className='text-red-500'>*</span></label>
|
label="Comment"
|
||||||
<input className='w-full p-3 text-lg bg-slate-100 rounded-md outline-0 placeholder:text-slate-500 placeholder:text-lg'
|
type="text"
|
||||||
value={inputs.comment}
|
name="comment"
|
||||||
name='comment'
|
value={inputs.comment}
|
||||||
type="text"
|
inputHandler={handleChange}
|
||||||
placeholder='Comment'
|
/> */}
|
||||||
required
|
<label className='text-[#181c32] dark:text-white text-base font-semibold block mb-2.5'>Comment</label>
|
||||||
onChange={handleChange}
|
<textarea style={{resize: 'none'}}
|
||||||
/>
|
className='text-base px-6 text-dark-gray dark:text-white w-full bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none'
|
||||||
</div>
|
name="comment"
|
||||||
|
value={inputs.comment}
|
||||||
|
onChange={handleChange}
|
||||||
|
cols="30"
|
||||||
|
rows="2"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='transfer-fund-btn flex justify-end items-center py-4'>
|
<div className='transfer-fund-btn flex justify-end items-center py-4'>
|
||||||
|
|||||||
@@ -10,6 +10,12 @@
|
|||||||
src: url("./assets/fonts/Product Sans Bold.ttf");
|
src: url("./assets/fonts/Product Sans Bold.ttf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.banner-630-340{
|
||||||
|
width: 630px;
|
||||||
|
height: 340px;
|
||||||
|
background-color: aliceblue;
|
||||||
|
}
|
||||||
|
|
||||||
/* Bold italic Weight */
|
/* Bold italic Weight */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "Product Sans";
|
font-family: "Product Sans";
|
||||||
|
|||||||
+107
-97
@@ -6,12 +6,12 @@ class usersService {
|
|||||||
console.log("WRB Service Entry");
|
console.log("WRB Service Entry");
|
||||||
}
|
}
|
||||||
|
|
||||||
CreateUser(reqData) {
|
CreateUser(reqData){
|
||||||
localStorage.setItem("session_token", ``);
|
localStorage.setItem("session_token", ``);
|
||||||
return this.postAuxEnd("/createuser", reqData);
|
return this.postAuxEnd("/createuser", reqData);
|
||||||
}
|
}
|
||||||
|
|
||||||
getHomeDate() {
|
getHomeDate(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uuid"),
|
uuid: localStorage.getItem("uuid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
@@ -31,8 +31,8 @@ class usersService {
|
|||||||
};
|
};
|
||||||
return this.postAuxEnd("/getjobsdata", postData);
|
return this.postAuxEnd("/getjobsdata", postData);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
getUserBankList(reqData) {
|
getUserBankList(reqData){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uuid"),
|
uuid: localStorage.getItem("uuid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
@@ -40,7 +40,7 @@ class usersService {
|
|||||||
};
|
};
|
||||||
return this.postAuxEnd("/mybanklist", postData);
|
return this.postAuxEnd("/mybanklist", postData);
|
||||||
}
|
}
|
||||||
getUserWallets(reqData) {
|
getUserWallets(reqData){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uuid"),
|
uuid: localStorage.getItem("uuid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
@@ -48,51 +48,50 @@ class usersService {
|
|||||||
};
|
};
|
||||||
return this.postAuxEnd("/getwallets", postData);
|
return this.postAuxEnd("/getwallets", postData);
|
||||||
}
|
}
|
||||||
getApiGate() {
|
getApiGate(){
|
||||||
// localStorage.setItem("session_token", ``);
|
// localStorage.setItem("session_token", ``);
|
||||||
return this.postAuxEnd("/apigate", null);
|
return this.postAuxEnd("/apigate", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
getLoadProfile() {
|
getLoadProfile(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 0,
|
page:0,
|
||||||
limit: 100
|
limit :100
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/loadprofile", null);
|
return this.postAuxEnd("/loadprofile", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
getOffersList() {
|
getOffersList(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 0,
|
page:0,
|
||||||
limit: 100
|
limit :100
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/offerslist", null);
|
return this.postAuxEnd("/offerslist", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
getPendingJob() {
|
getPendingJob(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 0,
|
page:0,
|
||||||
limit: 100
|
limit :100};
|
||||||
};
|
|
||||||
return this.postAuxEnd("/pendingjob", postData);
|
return this.postAuxEnd("/pendingjob", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
getActiveJobList() {
|
getActiveJobList(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 0,
|
page:0,
|
||||||
limit: 100
|
limit :100
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/getjobsdata", postData);
|
return this.postAuxEnd("/getjobsdata", postData);
|
||||||
}
|
}
|
||||||
@@ -113,60 +112,72 @@ class usersService {
|
|||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 0,
|
page:0,
|
||||||
limit: 100
|
offset:0,
|
||||||
|
limit :100
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/myjobs", postData);
|
return this.postAuxEnd("/jobmanagerlist", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
getGetPendingJobs() {
|
getGetPendingJobs(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 0,
|
page:0,
|
||||||
limit: 100
|
limit :100
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/getpendingjobs", postData);
|
return this.postAuxEnd("/getpendingjobs", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
getUsersCards() {
|
getUsersCards(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 0,
|
page:0,
|
||||||
limit: 100
|
limit :100
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/userscards", postData);
|
return this.postAuxEnd("/userscards", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCouponPending() {
|
getCouponPending(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 0,
|
page:0,
|
||||||
limit: 100
|
limit :100
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/couponpending", postData);
|
return this.postAuxEnd("/couponpending", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// API FUNCTION TO GET COUPON HISTORY
|
// API FUNCTION TO GET COUPON HISTORY
|
||||||
getRecipient() {
|
getRecipient(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 1,
|
page:1,
|
||||||
limit: 20,
|
limit :20,
|
||||||
action: 11175
|
action: 11175
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/recipients", postData);
|
return this.postAuxEnd("/recipients", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//END POINT CALL FOR UPDATE PROFILE
|
||||||
|
addRecipient(data){
|
||||||
|
var postData = {
|
||||||
|
uid: localStorage.getItem("uid"),
|
||||||
|
member_id: localStorage.getItem("member_id"),
|
||||||
|
sessionid: localStorage.getItem("session_token"),
|
||||||
|
...data
|
||||||
|
};
|
||||||
|
return this.postAuxEnd("/addrecipient", postData);
|
||||||
|
}
|
||||||
|
|
||||||
// API FUNCTION TO GET SEND MONEY FEE
|
// API FUNCTION TO GET SEND MONEY FEE
|
||||||
getSendMoneyFee(amount) {
|
getSendMoneyFee(amount){
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
@@ -178,95 +189,95 @@ class usersService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// API FUNCTION TO GET COUPON HISTORY
|
// API FUNCTION TO GET COUPON HISTORY
|
||||||
getCouponHx() {
|
getCouponHx(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 1,
|
page:1,
|
||||||
limit: 20,
|
limit :20,
|
||||||
action: 85025
|
action: 85025
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/couponhx", postData);
|
return this.postAuxEnd("/couponhx", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
getPurchaseHx() {
|
getPurchaseHx(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 1,
|
page:1,
|
||||||
limit: 20,
|
limit :20,
|
||||||
action: 15049
|
action: 15049
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/purchasehx", postData);
|
return this.postAuxEnd("/purchasehx", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
// API FUNCTION TO GET PAYMENT HISTORY
|
// API FUNCTION TO GET PAYMENT HISTORY
|
||||||
getPaymentHx() {
|
getPaymentHx(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 1,
|
page:1,
|
||||||
limit: 20,
|
limit :20,
|
||||||
action: 15046
|
action: 15046
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/paymenthx", postData);
|
return this.postAuxEnd("/paymenthx", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
//END POINT CALL FOR REFERRAL HISTORY
|
//END POINT CALL FOR REFERRAL HISTORY
|
||||||
getReferralHx() {
|
getReferralHx(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
offset: 1,
|
offset: 1,
|
||||||
limit: 100,
|
limit :100,
|
||||||
action: 11064
|
action: 11064
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/refferhx", postData);
|
return this.postAuxEnd("/refferhx", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
//END POINT CALL FOR UPDATE PROFILE
|
//END POINT CALL FOR UPDATE PROFILE
|
||||||
updateProfile(post) {
|
updateProfile(post){
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 5031,
|
action: 5031,
|
||||||
...post
|
...post
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/updateprofile", postData);
|
return this.postAuxEnd("/updateprofile", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
//END POINT CALL FOR GETTING USER PROFILE
|
//END POINT CALL FOR GETTING USER PROFILE
|
||||||
loadProfile(post) {
|
loadProfile(post){
|
||||||
var postData = {
|
var postData = {
|
||||||
uid: localStorage.getItem("uid"),
|
uid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/loadprofile", postData);
|
return this.postAuxEnd("/loadprofile", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
//END POINT CALL FOR SENDING REFERRAL MESSAGE
|
//END POINT CALL FOR SENDING REFERRAL MESSAGE
|
||||||
sendReferralMsg(postData) {
|
sendReferralMsg(postData){
|
||||||
return this.postAuxEnd("/sendreferral", postData);
|
return this.postAuxEnd("/sendreferral", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
StartResetPassword(reqData) {
|
StartResetPassword(reqData){
|
||||||
return this.postAuxEnd("/startresetpasword", reqData)
|
return this.postAuxEnd("/startresetpasword", reqData)
|
||||||
}
|
}
|
||||||
|
|
||||||
getCouponRedeem() {
|
getCouponRedeem(){
|
||||||
var postData = {
|
var postData = {
|
||||||
uuid: localStorage.getItem("uid"),
|
uuid: localStorage.getItem("uid"),
|
||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
page: 0,
|
page:0,
|
||||||
limit: 100
|
limit :100
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/couponredeem", postData);
|
return this.postAuxEnd("/couponredeem", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -298,6 +309,14 @@ class usersService {
|
|||||||
return this.postAuxEnd("/accounttypes", postData);
|
return this.postAuxEnd("/accounttypes", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
verifyEmail(code) {
|
||||||
|
const reqData = {
|
||||||
|
verify_link: code,
|
||||||
|
action: 11015
|
||||||
|
}
|
||||||
|
return this.postAuxEnd("/verifysignuplink", reqData);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(username)
|
||||||
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
- 20:27:30.118 FLOG_MAX [757411]: REQ_STRING(password)
|
||||||
@@ -345,17 +364,9 @@ class usersService {
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
getUserReminders() {
|
getUserReminders(){
|
||||||
return this.getAuxEnd("/reminders", null);
|
return this.getAuxEnd("/reminders", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
verifyEmail(code) {
|
|
||||||
const reqData = {
|
|
||||||
verify_link: code,
|
|
||||||
action: 11015
|
|
||||||
}
|
|
||||||
return this.postAuxEnd("/verifysignuplink", reqData);
|
|
||||||
}
|
|
||||||
//---------------------------------------- -----
|
//---------------------------------------- -----
|
||||||
//---------------------------------------- -----
|
//---------------------------------------- -----
|
||||||
// Unified call below
|
// Unified call below
|
||||||
@@ -371,11 +382,10 @@ class usersService {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
|
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
|
||||||
return Axios.get(endPoint, {
|
return Axios.get(endPoint,{
|
||||||
params: {
|
params: {
|
||||||
reqData
|
reqData
|
||||||
}
|
}})
|
||||||
})
|
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log("~~~~~~~ Toks2 GET ~~~~~~~~");
|
console.log("~~~~~~~ Toks2 GET ~~~~~~~~");
|
||||||
return response;
|
return response;
|
||||||
@@ -398,22 +408,22 @@ class usersService {
|
|||||||
postAuxEnd(uri, reqData) {
|
postAuxEnd(uri, reqData) {
|
||||||
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
|
const endPoint = process.env.REACT_APP_USERS_ENDPOINT + uri;
|
||||||
const session_token = localStorage.getItem("session_token");
|
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 : ''}`,
|
// 'Authorization': `Basic ${(session_token !=null) ?session_token : ''}`,
|
||||||
let axiosConfig = {
|
let axiosConfig = {
|
||||||
headers: {
|
headers: {
|
||||||
'Accept': 'application/json',
|
'Accept': 'application/json',
|
||||||
'Access-Control-Allow-Origin': '*',
|
'Access-Control-Allow-Origin': '*',
|
||||||
'Access-Control-Expose-Headers': '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',
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Axios.defaults.headers.post['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.headers.post['Access-Control-Allow-Origin'] = '*'; //,axiosConfig
|
||||||
// Axios.defaults.withCredentials = true;
|
// Axios.defaults.withCredentials = true;
|
||||||
//debugger;
|
//debugger;
|
||||||
return Axios.post(endPoint, reqData)
|
return Axios.post(endPoint, reqData)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ export default function MyJobsPage() {
|
|||||||
getMyJobList();
|
getMyJobList();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
debugger;
|
// debugger;
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<MyJobs />
|
<MyJobs MyJobList={MyJobList} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import React from "react";
|
|||||||
import SignUp from "../components/AuthPages/SignUp";
|
import SignUp from "../components/AuthPages/SignUp";
|
||||||
|
|
||||||
function SignupPage() {
|
function SignupPage() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SignUp />
|
<SignUp />
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import React from "react";
|
|
||||||
import VerifyLink from "../components/AuthPages/VerifyLink";
|
import VerifyLink from "../components/AuthPages/VerifyLink";
|
||||||
|
|
||||||
export default function VerifyYouPages() {
|
export default function VerifyLinkPages() {
|
||||||
|
|
||||||
return <VerifyLink />;
|
return <VerifyLink />;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4810,11 +4810,6 @@ fs.realpath@^1.0.0:
|
|||||||
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
|
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
|
||||||
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
||||||
|
|
||||||
fsevents@^2.3.2, fsevents@~2.3.2:
|
|
||||||
version "2.3.2"
|
|
||||||
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz"
|
|
||||||
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
|
|
||||||
|
|
||||||
function-bind@^1.1.1:
|
function-bind@^1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
|
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
|
||||||
|
|||||||
Reference in New Issue
Block a user