Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4876ba80c1 | |||
| 71f799d157 | |||
| 77c538ca79 | |||
| 6aa11793a5 | |||
| 4f8edc3998 | |||
| 7dd805b804 | |||
| 2aa1219ea9 |
@@ -487,7 +487,7 @@ function AddFundDollars(props) {
|
|||||||
|
|
||||||
{/* Postal Code and State */}
|
{/* Postal Code and State */}
|
||||||
<div className="sm:grid gap-5 grid-cols-3 my-2">
|
<div className="sm:grid gap-5 grid-cols-3 my-2">
|
||||||
<div className="field w-full mb-6 xl:mb-0 col-span-1">
|
<div className="field w-full xl:mb-0 col-span-1">
|
||||||
<InputCom
|
<InputCom
|
||||||
fieldClass="px-6"
|
fieldClass="px-6"
|
||||||
spanTag="*"
|
spanTag="*"
|
||||||
@@ -521,7 +521,7 @@ function AddFundDollars(props) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="md:px-8 md:pt-4 px-4 pt-2 add-fund-btn flex justify-end items-center gap-3">
|
<div className="md:px-8 add-fund-btn flex justify-end items-center gap-3">
|
||||||
<button
|
<button
|
||||||
className="px-4 py-1 h-11 max-w-[100px] w-full flex justify-center items-center border-gradient text-base rounded-full"
|
className="px-4 py-1 h-11 max-w-[100px] w-full flex justify-center items-center border-gradient text-base rounded-full"
|
||||||
onClick={handleClose}
|
onClick={handleClose}
|
||||||
|
|||||||
@@ -2,6 +2,11 @@ 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]">
|
||||||
@@ -99,7 +104,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={onClose}
|
onClick={backToWallet}
|
||||||
>
|
>
|
||||||
Ok
|
Ok
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -291,6 +291,17 @@ function ConfirmAddFund({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getBack = () => {
|
||||||
|
setConfirmCredit((prev) => ({
|
||||||
|
...prev,
|
||||||
|
show: {
|
||||||
|
awaitConfirm: { loader: false, state: false },
|
||||||
|
acceptConfirm: { loader: false, state: false },
|
||||||
|
},
|
||||||
|
data: {},
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="content-wrapper w-full h-[32rem]">
|
<div className="content-wrapper w-full h-[32rem]">
|
||||||
<div className="w-full mb-10">
|
<div className="w-full mb-10">
|
||||||
@@ -359,9 +370,9 @@ function ConfirmAddFund({
|
|||||||
<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 border-gradient text-base rounded-full"
|
className="px-4 h-11 flex justify-center items-center border-gradient text-base rounded-full"
|
||||||
onClick={onClose}
|
onClick={getBack}
|
||||||
>
|
>
|
||||||
Cancel
|
Back
|
||||||
</button>
|
</button>
|
||||||
{__confirmCountry === "US" && (
|
{__confirmCountry === "US" && (
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ function ConfirmNairaWithdraw({
|
|||||||
loading: false,
|
loading: false,
|
||||||
status: false,
|
status: false,
|
||||||
});
|
});
|
||||||
let [pageLoading, setPageLoading] = useState(true);
|
|
||||||
|
|
||||||
//FUNCTION TO HANDLE SUBMIT
|
//FUNCTION TO HANDLE SUBMIT
|
||||||
const handleSubmit = () => {
|
const handleSubmit = () => {
|
||||||
@@ -35,15 +34,17 @@ function ConfirmNairaWithdraw({
|
|||||||
|
|
||||||
if (state?.choice === "prev") {
|
if (state?.choice === "prev") {
|
||||||
reqData.recipient_uid = state.details?.recipient_uid;
|
reqData.recipient_uid = state.details?.recipient_uid;
|
||||||
|
reqData.mode = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state?.choice === "new") {
|
if (state?.choice === "new") {
|
||||||
reqData.account_no = state?.accountNumber;
|
reqData.account_no = state?.details?.accountNumber;
|
||||||
reqData.account_type = state?.accountType;
|
reqData.account_type = Number(state?.details?.accountType);
|
||||||
reqData.bank_uid = state?.bank_uid;
|
reqData.bank_uid = state?.details?.bank_uid;
|
||||||
reqData.country = state?.country;
|
reqData.country = state?.details?.country;
|
||||||
reqData.state = state?.state;
|
reqData.state = state?.details?.state;
|
||||||
reqData.city = state?.city;
|
reqData.city = state?.details?.city;
|
||||||
|
reqData.mode = 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
apiURL
|
apiURL
|
||||||
@@ -64,6 +65,16 @@ function ConfirmNairaWithdraw({
|
|||||||
loading: false,
|
loading: false,
|
||||||
status: false,
|
status: false,
|
||||||
});
|
});
|
||||||
|
} else if (
|
||||||
|
res.data?.status_message
|
||||||
|
?.toLowerCase()
|
||||||
|
.includes("recipient_add_error")
|
||||||
|
) {
|
||||||
|
setRequestStatus({
|
||||||
|
message: res.data?.error,
|
||||||
|
loading: false,
|
||||||
|
status: false,
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
setRequestStatus({
|
setRequestStatus({
|
||||||
message: "Could not perform transaction",
|
message: "Could not perform transaction",
|
||||||
@@ -78,11 +89,11 @@ function ConfirmNairaWithdraw({
|
|||||||
loading: false,
|
loading: false,
|
||||||
status: false,
|
status: false,
|
||||||
}),
|
}),
|
||||||
1500
|
5000
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
setRequestStatus({
|
setRequestStatus({
|
||||||
message: "transfer successful",
|
message: "Transfer Successful!",
|
||||||
loading: false,
|
loading: false,
|
||||||
status: true,
|
status: true,
|
||||||
});
|
});
|
||||||
@@ -105,7 +116,7 @@ function ConfirmNairaWithdraw({
|
|||||||
action();
|
action();
|
||||||
setShowNairaWithdraw({
|
setShowNairaWithdraw({
|
||||||
show: true,
|
show: true,
|
||||||
data: state,
|
data: {},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -249,7 +260,9 @@ function ConfirmNairaWithdraw({
|
|||||||
onClick={state?.choice === "prev" ? getBack : action}
|
onClick={state?.choice === "prev" ? getBack : action}
|
||||||
className="border-gradient text-base tracking-wide px-4 py-2 rounded-full"
|
className="border-gradient text-base tracking-wide px-4 py-2 rounded-full"
|
||||||
>
|
>
|
||||||
<span className="text-gradient">{state?.choice === "prev" ? "Back" : "Cancel"}</span>
|
<span className="text-gradient">
|
||||||
|
{state?.choice === "prev" ? "Back" : "Cancel"}
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
|
|||||||
@@ -60,14 +60,6 @@ function ConfirmTransfer({ payment, wallet }) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
// what happens if not state redirect user
|
|
||||||
if (!state) {
|
|
||||||
navigate("/my-wallet/transfer-fund", { replace: true });
|
|
||||||
} else {
|
|
||||||
setPageLoading(false);
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
return (
|
return (
|
||||||
<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">
|
||||||
{pageLoading ? (
|
{pageLoading ? (
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Form, Formik } from "formik";
|
import { Form, Formik } from "formik";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, 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";
|
||||||
@@ -243,8 +242,6 @@ function NairaWithdraw({
|
|||||||
(item) => item.bank_uid === bank
|
(item) => item.bank_uid === bank
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log(bankDetails);
|
|
||||||
|
|
||||||
// Ensure bankDetails is not empty
|
// Ensure bankDetails is not empty
|
||||||
if (!bankDetails || bankDetails.length === 0) {
|
if (!bankDetails || bankDetails.length === 0) {
|
||||||
// Handle the case when bankDetails is empty or undefined
|
// Handle the case when bankDetails is empty or undefined
|
||||||
@@ -632,7 +629,9 @@ function NairaWithdraw({
|
|||||||
className="text-slate-500 text-lg"
|
className="text-slate-500 text-lg"
|
||||||
value=""
|
value=""
|
||||||
>
|
>
|
||||||
No Options Found!
|
{allCountries.data?.length
|
||||||
|
? "Select..."
|
||||||
|
: "No Options Found!"}
|
||||||
</option>
|
</option>
|
||||||
)}
|
)}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -480,7 +480,6 @@ class usersService {
|
|||||||
member_id: localStorage.getItem("member_id"),
|
member_id: localStorage.getItem("member_id"),
|
||||||
sessionid: localStorage.getItem("session_token"),
|
sessionid: localStorage.getItem("session_token"),
|
||||||
action: 33020,
|
action: 33020,
|
||||||
mode: 100,
|
|
||||||
...reqData,
|
...reqData,
|
||||||
};
|
};
|
||||||
return this.postAuxEnd("/sendmoney", postData);
|
return this.postAuxEnd("/sendmoney", postData);
|
||||||
|
|||||||
Reference in New Issue
Block a user