From d5e66618aa676905fb0bc217c360a66cb32ab60e Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Mon, 18 Sep 2023 20:46:17 +0100 Subject: [PATCH 1/2] added limit to card and account adding --- .../MyWallet/Popup/AddFundDollars.jsx | 456 ++++++++------- .../MyWallet/Popup/NairaWithdraw.jsx | 545 +++++++++--------- 2 files changed, 510 insertions(+), 491 deletions(-) diff --git a/src/components/MyWallet/Popup/AddFundDollars.jsx b/src/components/MyWallet/Popup/AddFundDollars.jsx index f3c2ded..7b0d0a4 100644 --- a/src/components/MyWallet/Popup/AddFundDollars.jsx +++ b/src/components/MyWallet/Popup/AddFundDollars.jsx @@ -64,6 +64,8 @@ const initialValues = { }; 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(); let countryWallet = props.walletItem.country; const [tab, setTab] = useState("previous"); @@ -240,7 +242,7 @@ function AddFundDollars(props) { @@ -314,245 +316,253 @@ function AddFundDollars(props) { {tab === "new" && (
-
- - {(props) => { - return ( -
-
-
-
- {/* Inputs */} - {/* Name */} -
- -

{`${firstname} ${lastname}`}

-
- -
- {/* Card Number */} -
- + {payListCards.loading ? +
+ +
+ :payListCards.data.length < MaxNoOfCards ? +
+ + {(props) => { + return ( + +
+
+
+ {/* Inputs */} + {/* Name */} +
+ +

{`${firstname} ${lastname}`}

- {/* Expire Year, Year */} -
-
-
-
- -
-
- -
-
+
+ {/* Card Number */} +
+
-
-
-
-
-
- {/* Address and CVV */} -
-
- + {/* Address and CVV */} +
+
+ +
+
+ +
-
- -
-
- {/* Postal Code and State */} -
-
- -
-
- + {/* Postal Code and State */} +
+
+ +
+
+ +
-
-
- - -
- - ); - }} - -
+
+ + +
+ + ); + }} + +
+ : + null + }
)}
diff --git a/src/components/MyWallet/Popup/NairaWithdraw.jsx b/src/components/MyWallet/Popup/NairaWithdraw.jsx index 3200600..9f1589b 100644 --- a/src/components/MyWallet/Popup/NairaWithdraw.jsx +++ b/src/components/MyWallet/Popup/NairaWithdraw.jsx @@ -12,6 +12,8 @@ function NairaWithdraw({ state, 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 [tab, setTab] = useState("previous"); let [requestStatus, setRequestStatus] = useState(false); @@ -422,7 +424,7 @@ function NairaWithdraw({
@@ -522,273 +524,280 @@ function NairaWithdraw({ )} {tab == "new" && ( -
-
-
- {/* country */} -
- - - {/* {props.errors.country && - props.touched.country && ( -

- {props.errors.country} -

- )} */} -
- - {/* bank name */} -
- - - {/* {props.errors.bank && props.touched.bank && ( -

- {props.errors.bank} -

- )} */} -
-
- -
- {/* ACCOUNT NUMBER */} -
- - - {/* {props.errors.accountNumber && - props.touched.accountNumber && ( -

- {props.errors.accountNumber} -

- )} */} -
- - {/* Account Type */} -
- - - {/* {props.errors.accountType && - props.touched.accountType && ( -

- {props.errors.accountType} -

- )} */} -
-
- -
- {/* state */} -
- - - {/* {props.errors.state && props.touched.state && ( -

- {props.errors.state} -

- )} */} -
- - {/* city */} -
- - - {/* {props.errors.city && props.touched.city && ( -

- {props.errors.city} -

- )} */} -
-
- - {/* end of inputs for new accounts */} + recipients.loading ? +
+
-
+ :recipients.data.length < MaxNoOfBanks ? +
+
+
+ {/* country */} +
+ + + {/* {props.errors.country && + props.touched.country && ( +

+ {props.errors.country} +

+ )} */} +
+ + {/* bank name */} +
+ + + {/* {props.errors.bank && props.touched.bank && ( +

+ {props.errors.bank} +

+ )} */} +
+
+ +
+ {/* ACCOUNT NUMBER */} +
+ + + {/* {props.errors.accountNumber && + props.touched.accountNumber && ( +

+ {props.errors.accountNumber} +

+ )} */} +
+ + {/* Account Type */} +
+ + + {/* {props.errors.accountType && + props.touched.accountType && ( +

+ {props.errors.accountType} +

+ )} */} +
+
+ +
+ {/* state */} +
+ + + {/* {props.errors.state && props.touched.state && ( +

+ {props.errors.state} +

+ )} */} +
+ + {/* city */} +
+ + + {/* {props.errors.city && props.touched.city && ( +

+ {props.errors.city} +

+ )} */} +
+
+ + {/* end of inputs for new accounts */} +
+
+ : +
)}
From 11b96e56daf14e27cd191a278ed9592b8261b631 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Tue, 19 Sep 2023 06:03:12 +0100 Subject: [PATCH 2/2] reduced the height of each activity and image removed --- src/components/Home/HomeActivities.jsx | 28 +++++++++++++++----------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/components/Home/HomeActivities.jsx b/src/components/Home/HomeActivities.jsx index 77d4ab6..7741a16 100644 --- a/src/components/Home/HomeActivities.jsx +++ b/src/components/Home/HomeActivities.jsx @@ -58,8 +58,8 @@ export default function HomeActivities({ className }) { }`} >
-
-

+
+

Recent Activities

@@ -79,28 +79,32 @@ export default function HomeActivities({ className }) { {/**/} {recentActivitiesData.loading ? ( -
- -
+ + +
+ +
+ + ) : recentActivitiesData.data ? ( recentActivitiesData.data?.map((item) => { let addedDate = item?.added?.split(" ")[0]; return ( - +
-
+ {/*
data -
+
*/}
-

+

{item.title ? item.title : "Title"}

@@ -110,8 +114,8 @@ export default function HomeActivities({ className }) {
- -
+ +
{item.added ? addedDate : ""}