Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d5e66618aa | |||
| 2e89f07ee2 | |||
| 9db7f5c985 |
@@ -74,3 +74,9 @@ REACT_APP_LINKEDIN_SOCIAL_LOGIN=0
|
|||||||
|
|
||||||
#apigate.lotus.g1.wrenchboard.com:76.209.103.227
|
#apigate.lotus.g1.wrenchboard.com:76.209.103.227
|
||||||
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
#apigate.orion.g1.wrenchboard.com:76.209.103.227
|
||||||
|
|
||||||
|
|
||||||
|
REACT_APP_MAX_CREDIT_CARDS=4
|
||||||
|
REACT_APP_MAX_CREDIT_BANK_ACCOUNT=4
|
||||||
|
|
||||||
|
REACT_APP_MAX_FAMILY_MEMBERS=8
|
||||||
@@ -46,3 +46,8 @@ REACT_APP_LOGOUT_TEXT="Sign Out"
|
|||||||
|
|
||||||
REACT_APP_APPLE_SOCIAL_LOGIN=0
|
REACT_APP_APPLE_SOCIAL_LOGIN=0
|
||||||
REACT_APP_LINKEDIN_SOCIAL_LOGIN=0
|
REACT_APP_LINKEDIN_SOCIAL_LOGIN=0
|
||||||
|
|
||||||
|
REACT_APP_MAX_CREDIT_CARDS=4
|
||||||
|
REACT_APP_MAX_CREDIT_BANK_ACCOUNT=4
|
||||||
|
|
||||||
|
REACT_APP_MAX_FAMILY_MEMBERS=8
|
||||||
@@ -52,3 +52,8 @@ REACT_APP_TOTAL_NUM_FILE=4
|
|||||||
REACT_APP_LOGOUT_TEXT="Sign Out"
|
REACT_APP_LOGOUT_TEXT="Sign Out"
|
||||||
REACT_APP_APPLE_SOCIAL_LOGIN=0
|
REACT_APP_APPLE_SOCIAL_LOGIN=0
|
||||||
REACT_APP_LINKEDIN_SOCIAL_LOGIN=0
|
REACT_APP_LINKEDIN_SOCIAL_LOGIN=0
|
||||||
|
|
||||||
|
REACT_APP_MAX_CREDIT_CARDS=4
|
||||||
|
REACT_APP_MAX_CREDIT_BANK_ACCOUNT=4
|
||||||
|
|
||||||
|
REACT_APP_MAX_FAMILY_MEMBERS=8
|
||||||
@@ -64,6 +64,8 @@ const initialValues = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function AddFundDollars(props) {
|
function AddFundDollars(props) {
|
||||||
|
let MaxNoOfCards = process.env.REACT_APP_MAX_CREDIT_CARDS // HOLDS THE VALUE OF THE MAX NUMBER OF CARDS USER CAN ADD
|
||||||
|
|
||||||
const apiCall = new usersService();
|
const apiCall = new usersService();
|
||||||
let countryWallet = props.walletItem.country;
|
let countryWallet = props.walletItem.country;
|
||||||
const [tab, setTab] = useState("previous");
|
const [tab, setTab] = useState("previous");
|
||||||
@@ -240,7 +242,7 @@ function AddFundDollars(props) {
|
|||||||
<label
|
<label
|
||||||
onClick={() => setTab("new")}
|
onClick={() => setTab("new")}
|
||||||
htmlFor="new"
|
htmlFor="new"
|
||||||
className="cursor-pointer flex items-center gap-1"
|
className={`cursor-pointer flex items-center gap-1 ${payListCards.data.length >= MaxNoOfCards ? 'pointer-events-none':''}`}
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
id="new"
|
id="new"
|
||||||
@@ -251,7 +253,7 @@ function AddFundDollars(props) {
|
|||||||
tab == "new" ? "" : ""
|
tab == "new" ? "" : ""
|
||||||
} tracking-wide transition duration-200`}
|
} tracking-wide transition duration-200`}
|
||||||
/>
|
/>
|
||||||
Add New Card
|
Add New Card {payListCards.data.length >= MaxNoOfCards && <span className="text-[14px] text-red-500">Max Reached</span>}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
@@ -314,6 +316,11 @@ function AddFundDollars(props) {
|
|||||||
|
|
||||||
{tab === "new" && (
|
{tab === "new" && (
|
||||||
<div className="new-details w-full max-h-[22rem]">
|
<div className="new-details w-full max-h-[22rem]">
|
||||||
|
{payListCards.loading ?
|
||||||
|
<div className="pt-10 flex w-full h-full justify-center items-center">
|
||||||
|
<LoadingSpinner size='10' color='sky-blue' />
|
||||||
|
</div>
|
||||||
|
:payListCards.data.length < MaxNoOfCards ?
|
||||||
<div className="w-full flex flex-col justify-between">
|
<div className="w-full flex flex-col justify-between">
|
||||||
<Formik
|
<Formik
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
@@ -553,6 +560,9 @@ function AddFundDollars(props) {
|
|||||||
}}
|
}}
|
||||||
</Formik>
|
</Formik>
|
||||||
</div>
|
</div>
|
||||||
|
:
|
||||||
|
null
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ function NairaWithdraw({
|
|||||||
state,
|
state,
|
||||||
setShowConfirmNairaWithdraw,
|
setShowConfirmNairaWithdraw,
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
|
let MaxNoOfBanks = process.env.REACT_APP_MAX_CREDIT_BANK_ACCOUNT // HOLDS THE VALUE OF THE MAX NUMBER OF BANKS USER CAN ADD
|
||||||
const apiCall = new usersService();
|
const apiCall = new usersService();
|
||||||
const [tab, setTab] = useState("previous");
|
const [tab, setTab] = useState("previous");
|
||||||
let [requestStatus, setRequestStatus] = useState(false);
|
let [requestStatus, setRequestStatus] = useState(false);
|
||||||
@@ -422,7 +424,7 @@ function NairaWithdraw({
|
|||||||
<label
|
<label
|
||||||
onClick={() => setTab("new")}
|
onClick={() => setTab("new")}
|
||||||
htmlFor="new"
|
htmlFor="new"
|
||||||
className="cursor-pointer flex items-center gap-1"
|
className={`cursor-pointer flex items-center gap-1 ${recipients.data.length >= MaxNoOfBanks ? 'pointer-events-none':''}`}
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
id="new"
|
id="new"
|
||||||
@@ -434,7 +436,7 @@ function NairaWithdraw({
|
|||||||
tab == "new" ? "" : ""
|
tab == "new" ? "" : ""
|
||||||
} tracking-wide transition duration-200`}
|
} tracking-wide transition duration-200`}
|
||||||
/>
|
/>
|
||||||
New Account{" "}
|
New Account{" "} {recipients.data.length >= MaxNoOfBanks && <span className="text-[14px] text-red-500">Max Reached</span>}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -522,6 +524,11 @@ function NairaWithdraw({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{tab == "new" && (
|
{tab == "new" && (
|
||||||
|
recipients.loading ?
|
||||||
|
<div className="mt-3 flex flex-col w-full h-[188px] justify-center items-center">
|
||||||
|
<LoadingSpinner size='10' color='sky-blue' />
|
||||||
|
</div>
|
||||||
|
:recipients.data.length < MaxNoOfBanks ?
|
||||||
<div className="w-full mt-3 rounded-md bg-slate-100">
|
<div className="w-full mt-3 rounded-md bg-slate-100">
|
||||||
<div className="relative fields w-full flex flex-col p-4">
|
<div className="relative fields w-full flex flex-col p-4">
|
||||||
<div className="flex flex-[2] min-h-[52px]">
|
<div className="flex flex-[2] min-h-[52px]">
|
||||||
@@ -789,6 +796,8 @@ function NairaWithdraw({
|
|||||||
{/* end of inputs for new accounts */}
|
{/* end of inputs for new accounts */}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
:
|
||||||
|
<div className="mt-3 flex w-full h-[188px] justify-center items-center"></div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user