Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9eaf7123d4 | |||
| 096da29149 | |||
| 84968b4435 | |||
| 98f11a3d80 | |||
| 98d734e869 | |||
| 47004fec8c | |||
| 48ce89489e | |||
| 1ce05a3be3 | |||
| 28ab1116e9 | |||
| 994060d929 | |||
| a5c62564b7 | |||
| 22e61d2b41 | |||
| 6ab5eae0c0 |
@@ -56,6 +56,8 @@ export default function Routers() {
|
|||||||
<Routes>
|
<Routes>
|
||||||
{/* guest routes */}
|
{/* guest routes */}
|
||||||
<Route exact path="/login" element={<LoginPage />} />
|
<Route exact path="/login" element={<LoginPage />} />
|
||||||
|
<Route exact path="/eoffer" element={<LoginPage />} />
|
||||||
|
|
||||||
<Route exact path="/signup" element={<SignupPage />} />
|
<Route exact path="/signup" element={<SignupPage />} />
|
||||||
<Route exact path="/login/auth" element={<AuthRedirect />} />
|
<Route exact path="/login/auth" element={<AuthRedirect />} />
|
||||||
<Route exact path="/login/auth/flogin" element={<FacebookRedirect />} />
|
<Route exact path="/login/auth/flogin" element={<FacebookRedirect />} />
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default function OfferCard({ datas, hidden = false, setOfferPopout }) {
|
|||||||
className="thumbnail w-full h-full rounded-xl overflow-hidden px-4 pt-4"
|
className="thumbnail w-full h-full rounded-xl overflow-hidden px-4 pt-4"
|
||||||
style={{
|
style={{
|
||||||
background: `url(${localImgLoad(
|
background: `url(${localImgLoad(
|
||||||
`images/taskbanners/${datas.banner}`
|
`images/taskbanners/${datas?.banner || "default.jpg"}`
|
||||||
)}) center / contain no-repeat`,
|
)}) center / contain no-repeat`,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export default function MyPendingJobTable({ MyJobList, className }) {
|
|||||||
<div className="flex space-x-2 items-center w-full">
|
<div className="flex space-x-2 items-center w-full">
|
||||||
<div className="w-[60px] h-[60px] p-2 bg-alice-blue rounded-full overflow-hidden flex justify-center items-center">
|
<div className="w-[60px] h-[60px] p-2 bg-alice-blue rounded-full overflow-hidden flex justify-center items-center">
|
||||||
<img
|
<img
|
||||||
src={localImgLoad(`images/taskbanners/${value.banner}`)}
|
src={localImgLoad(`images/taskbanners/${value.banner || "default.jpg"}`)}
|
||||||
alt="data"
|
alt="data"
|
||||||
className="w-full h-full rounded-full"
|
className="w-full h-full rounded-full"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export default function MyPendingJobs(props) {
|
|||||||
const filterHandler = (value) => {
|
const filterHandler = (value) => {
|
||||||
setValue(value);
|
setValue(value);
|
||||||
};
|
};
|
||||||
console.log("AMEYE LOC1", props.MyJobList);
|
// console.log("AMEYE LOC1", props.MyJobList);
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<CommonHead
|
<CommonHead
|
||||||
|
|||||||
@@ -136,6 +136,12 @@ function AddFundDollars(props) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Number(props.input) * 100 > Number(props.walletItem?.transfer_limit)) {
|
||||||
|
props.setInputError("Credit limit has been exceeded");
|
||||||
|
setTimeout(() => props.setInputError(""), 5000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (tab === "previous") {
|
if (tab === "previous") {
|
||||||
// To check if card is empty
|
// To check if card is empty
|
||||||
if (Object.keys(prevCardDetails).length === 0) {
|
if (Object.keys(prevCardDetails).length === 0) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
import usersService from "../../../services/UsersService";
|
import usersService from "../../../services/UsersService";
|
||||||
import Icons from "../../Helpers/Icons";
|
import Icons from "../../Helpers/Icons";
|
||||||
import InputCom from "../../Helpers/Inputs/InputCom";
|
import InputCom from "../../Helpers/Inputs/InputCom";
|
||||||
@@ -15,10 +14,9 @@ function AddFundPop({
|
|||||||
setConfirmCredit,
|
setConfirmCredit,
|
||||||
walletItem,
|
walletItem,
|
||||||
}) {
|
}) {
|
||||||
const navigate = useNavigate();
|
|
||||||
const apiCall = new usersService();
|
const apiCall = new usersService();
|
||||||
let countryWallet = walletItem?.country;
|
let countryWallet = walletItem?.country;
|
||||||
const { payment, currency } = _payment;
|
const { currency } = _payment;
|
||||||
|
|
||||||
const [inputError, setInputError] = useState("");
|
const [inputError, setInputError] = useState("");
|
||||||
let __awaitComponent = confirmCredit.show.awaitConfirm;
|
let __awaitComponent = confirmCredit.show.awaitConfirm;
|
||||||
@@ -44,6 +42,12 @@ function AddFundPop({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Number(input) * 100 > Number(walletItem?.transfer_limit)) {
|
||||||
|
setInputError("Credit limit has been exceeded");
|
||||||
|
setTimeout(() => setInputError(""), 5000);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (isNaN(input)) {
|
if (isNaN(input)) {
|
||||||
setConfirmCredit((prev) => ({
|
setConfirmCredit((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
@@ -113,7 +117,7 @@ function AddFundPop({
|
|||||||
value={input}
|
value={input}
|
||||||
inputHandler={handleChange}
|
inputHandler={handleChange}
|
||||||
/>
|
/>
|
||||||
<p className="text-base text-red-500 h-5">
|
<p className="text-base text-red-500 italic h-5">
|
||||||
{inputError && inputError}
|
{inputError && inputError}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
||||||
const { data } = confirmCredit;
|
const { data } = confirmCredit
|
||||||
|
|
||||||
const backToWallet = () => {
|
|
||||||
onClose();
|
|
||||||
window.location.reload(true);
|
|
||||||
};
|
|
||||||
return (
|
return (
|
||||||
<div className="logout-modal-body w-full flex flex-col items-center">
|
<div className="logout-modal-body w-full flex flex-col items-center">
|
||||||
<div className="content-wrapper w-full h-[32rem]">
|
<div className="content-wrapper w-full h-[32rem]">
|
||||||
@@ -104,7 +99,7 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
|||||||
<div className="md:p-8 p-4 add-fund-btn flex justify-end items-center py-4 gap-4">
|
<div className="md:p-8 p-4 add-fund-btn flex justify-end items-center py-4 gap-4">
|
||||||
<button
|
<button
|
||||||
className="px-4 h-11 flex justify-center items-center btn-gradient text-white text-base rounded-full w-[100px]"
|
className="px-4 h-11 flex justify-center items-center btn-gradient text-white text-base rounded-full w-[100px]"
|
||||||
onClick={backToWallet}
|
onClick={onClose}
|
||||||
>
|
>
|
||||||
Ok
|
Ok
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -124,8 +124,8 @@ function ConfirmAddFund({
|
|||||||
},
|
},
|
||||||
customizations: {
|
customizations: {
|
||||||
title: "WrenchBoard",
|
title: "WrenchBoard",
|
||||||
description: "Topup Payment",
|
description: "Add Credit Payment",
|
||||||
logo: "https://st2.depositphotos.com/4403291/7418/v/450/depositphotos_74189661-stock-illustration-online-shop-log.jpg",
|
logo: "https://www.wrenchboard.com/assets/images/wrench-500-500-icon.png",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ function ConfirmAddFund({
|
|||||||
const onSuccessPayment = () => {
|
const onSuccessPayment = () => {
|
||||||
setRequestStatus({ message: "", loading: true, status: false });
|
setRequestStatus({ message: "", loading: true, status: false });
|
||||||
const reqData = { amount: Number(__confirmData?.amount), currency: "NGN" };
|
const reqData = { amount: Number(__confirmData?.amount), currency: "NGN" };
|
||||||
|
console.log("**** onSuccessPayment **** THIS WAS REACHED");
|
||||||
apiURL
|
apiURL
|
||||||
.startTopUp(reqData)
|
.startTopUp(reqData)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useNavigate } from "react-router-dom";
|
|
||||||
import usersService from "../../../services/UsersService";
|
import usersService from "../../../services/UsersService";
|
||||||
import InputCom from "../../Helpers/Inputs/InputCom";
|
import InputCom from "../../Helpers/Inputs/InputCom";
|
||||||
import ModalCom from "../../Helpers/ModalCom";
|
import ModalCom from "../../Helpers/ModalCom";
|
||||||
import LoadingSpinner from "../../Spinners/LoadingSpinner";
|
import LoadingSpinner from "../../Spinners/LoadingSpinner";
|
||||||
|
import { useDispatch } from "react-redux";
|
||||||
|
import { tableReload } from "../../../store/TableReloads";
|
||||||
|
|
||||||
function ConfirmNairaWithdraw({
|
function ConfirmNairaWithdraw({
|
||||||
payment,
|
payment,
|
||||||
@@ -14,7 +15,7 @@ function ConfirmNairaWithdraw({
|
|||||||
setShowNairaWithdraw,
|
setShowNairaWithdraw,
|
||||||
}) {
|
}) {
|
||||||
const apiURL = new usersService();
|
const apiURL = new usersService();
|
||||||
const navigate = useNavigate();
|
const dispatch = useDispatch();
|
||||||
|
|
||||||
let [requestStatus, setRequestStatus] = useState({
|
let [requestStatus, setRequestStatus] = useState({
|
||||||
message: "",
|
message: "",
|
||||||
@@ -90,6 +91,7 @@ function ConfirmNairaWithdraw({
|
|||||||
state: res.data,
|
state: res.data,
|
||||||
});
|
});
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
dispatch(tableReload({ type: "WALLETTABLE" }));
|
||||||
return;
|
return;
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@@ -101,19 +103,6 @@ function ConfirmNairaWithdraw({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const getBack = () => {
|
|
||||||
action();
|
|
||||||
setShowNairaWithdraw({
|
|
||||||
show: true,
|
|
||||||
data: {},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const completeWithdrawal = () => {
|
|
||||||
action();
|
|
||||||
window.location.reload(true);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ModalCom action={action} situation={situation} className="edit-popup">
|
<ModalCom action={action} situation={situation} className="edit-popup">
|
||||||
<div className="logout-modal-wrapper lw-[90%] md:w-[768px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
|
<div className="logout-modal-wrapper lw-[90%] md:w-[768px] h-full lg:h-auto bg-white dark:bg-dark-white lg:rounded-2xl">
|
||||||
@@ -263,6 +252,10 @@ function ConfirmNairaWithdraw({
|
|||||||
?.toLowerCase()
|
?.toLowerCase()
|
||||||
.includes("limit")
|
.includes("limit")
|
||||||
? "Transfer limit Error"
|
? "Transfer limit Error"
|
||||||
|
: completeNairaWithdraw.state?.bad_param
|
||||||
|
?.toLowerCase()
|
||||||
|
.includes("balance")
|
||||||
|
? "Insufficient Balance"
|
||||||
: "An Error Occurred"}{" "}
|
: "An Error Occurred"}{" "}
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
@@ -283,6 +276,10 @@ function ConfirmNairaWithdraw({
|
|||||||
?.toLowerCase()
|
?.toLowerCase()
|
||||||
.includes("limit")
|
.includes("limit")
|
||||||
? "The transfer limit has been exceeded"
|
? "The transfer limit has been exceeded"
|
||||||
|
: completeNairaWithdraw.state?.bad_param
|
||||||
|
?.toLowerCase()
|
||||||
|
.includes("balance")
|
||||||
|
? "Insufficient Balance for Transaction"
|
||||||
: "Could not perform transaction"}
|
: "Could not perform transaction"}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -405,7 +402,7 @@ function ConfirmNairaWithdraw({
|
|||||||
<button
|
<button
|
||||||
onClick={
|
onClick={
|
||||||
completeNairaWithdraw.show
|
completeNairaWithdraw.show
|
||||||
? completeWithdrawal
|
? action
|
||||||
: completeNairaWithdraw?.state?.internal_return < 0
|
: completeNairaWithdraw?.state?.internal_return < 0
|
||||||
? action
|
? action
|
||||||
: handleSubmit
|
: handleSubmit
|
||||||
|
|||||||
@@ -171,8 +171,8 @@ function NairaWithdraw({
|
|||||||
setErrorMsgs({ amount: "amount required" });
|
setErrorMsgs({ amount: "amount required" });
|
||||||
setTimeout(() => setErrorMsgs({ amount: "" }), 3000);
|
setTimeout(() => setErrorMsgs({ amount: "" }), 3000);
|
||||||
return;
|
return;
|
||||||
} else if (Number(values.amount) > Number(wallet?.transfer_limit)) {
|
}else if (Number(values.amount * 100) > Number(wallet?.transfer_limit)) {
|
||||||
setErrorMsgs({ amount: "transfer limit exceeded" });
|
setErrorMsgs({ amount: "Withdraw limit has been exceeded" });
|
||||||
setTimeout(() => setErrorMsgs({ amount: "" }), 3000);
|
setTimeout(() => setErrorMsgs({ amount: "" }), 3000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -326,8 +326,8 @@ function NairaWithdraw({
|
|||||||
<InputCom
|
<InputCom
|
||||||
fieldClass="px-4 text-end"
|
fieldClass="px-4 text-end"
|
||||||
parentClass="flex items-center gap-1 justify-between"
|
parentClass="flex items-center gap-1 justify-between"
|
||||||
labelClass="flex-[0.3] mb-0"
|
labelClass="flex-[0.4] mb-0"
|
||||||
inputClass="flex-[0.7] max-w-[12rem]"
|
inputClass="flex-[0.6] max-w-[12rem]"
|
||||||
label="Amount:"
|
label="Amount:"
|
||||||
type="number"
|
type="number"
|
||||||
name="amount"
|
name="amount"
|
||||||
|
|||||||
@@ -67,9 +67,6 @@ const WalletRoutes = () => {
|
|||||||
getPaymentHistory()
|
getPaymentHistory()
|
||||||
}, [walletTable]);
|
}, [walletTable]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log('TESTING',walletTable);
|
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<Suspense fallback={<LoadingSpinner size="16" color="sky-blue" />}>
|
<Suspense fallback={<LoadingSpinner size="16" color="sky-blue" />}>
|
||||||
|
|||||||
@@ -8,30 +8,12 @@ function WalletAction({ walletItem, payment, openPopUp }) {
|
|||||||
show: false,
|
show: false,
|
||||||
state: {},
|
state: {},
|
||||||
}); // DETERMINES WHEN NAIRA WITHDRAWAL POPS UP
|
}); // DETERMINES WHEN NAIRA WITHDRAWAL POPS UP
|
||||||
const [countries, setCountries] = useState([]);
|
|
||||||
const [showConfirmNairaWithdraw, setShowConfirmNairaWithdraw] = useState({
|
const [showConfirmNairaWithdraw, setShowConfirmNairaWithdraw] = useState({
|
||||||
show: false,
|
show: false,
|
||||||
state: {},
|
state: {},
|
||||||
}); // DETERMINES WHEN CONFIRM NAIRA WITHDRAWAL POPS UP
|
}); // DETERMINES WHEN CONFIRM NAIRA WITHDRAWAL POPS UP
|
||||||
|
|
||||||
const userApi = new usersService();
|
|
||||||
|
|
||||||
// Get Country Api
|
|
||||||
const getCountryList = useCallback(async () => {
|
|
||||||
const res = await userApi.getSignupCountryData();
|
|
||||||
|
|
||||||
try {
|
|
||||||
if (res.status === 200) {
|
|
||||||
const { signup_country } = await res.data;
|
|
||||||
setCountries(signup_country);
|
|
||||||
} else if (res.data.result !== 100) {
|
|
||||||
setCountries("Nothing see here!");
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
throw new Error(error);
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="counters w-full flex justify-between gap-2">
|
<div className="counters w-full flex justify-between gap-2">
|
||||||
<div className="w-1/2 flex justify-center items-center">
|
<div className="w-1/2 flex justify-center items-center">
|
||||||
|
|||||||
@@ -586,6 +586,7 @@ class usersService {
|
|||||||
action: 11062,
|
action: 11062,
|
||||||
...post,
|
...post,
|
||||||
};
|
};
|
||||||
|
console.log("starttopup",postData);
|
||||||
return this.postAuxEnd("/starttopup", postData);
|
return this.postAuxEnd("/starttopup", postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user