From f8e14fe6a047e51752931280ff0e036b637390f1 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Thu, 4 Apr 2024 14:09:53 +0100 Subject: [PATCH 1/2] initial commit --- .../MyWallet/Popup/ConfirmAddFund.jsx | 10 ++-- .../MyWallet/Popup/ConfirmNairaWithdraw.jsx | 59 +++++++++---------- src/components/MyWallet/Popup/CreditPopup.jsx | 7 ++- .../MyWallet/Popup/NairaWithdraw.jsx | 32 +++++----- src/components/MyWallet/WalletAction.jsx | 4 +- src/components/MyWallet/WalletItemCard.jsx | 2 +- 6 files changed, 59 insertions(+), 55 deletions(-) diff --git a/src/components/MyWallet/Popup/ConfirmAddFund.jsx b/src/components/MyWallet/Popup/ConfirmAddFund.jsx index 37f414a..046f02f 100644 --- a/src/components/MyWallet/Popup/ConfirmAddFund.jsx +++ b/src/components/MyWallet/Popup/ConfirmAddFund.jsx @@ -49,11 +49,11 @@ function AmountSection({ currency, amount, country }) { const gapClassName = country === "US" ? "gap-14" : "gap-4"; return ( -
+

Amount({currency})

- + {formattedAmount}
@@ -69,11 +69,11 @@ function TransactionFeeSection({ currency, fee, country }) { const gapClass = country === "US" ? "gap-[2.7rem]" : "gap-4"; return ( -
+

Transaction Fee

- + {formattedFee}
@@ -96,7 +96,7 @@ function TotalSection({ currency, amount, fee, country }) {

Total

- + {formattedTotal}
diff --git a/src/components/MyWallet/Popup/ConfirmNairaWithdraw.jsx b/src/components/MyWallet/Popup/ConfirmNairaWithdraw.jsx index 59dd6ea..b68567b 100644 --- a/src/components/MyWallet/Popup/ConfirmNairaWithdraw.jsx +++ b/src/components/MyWallet/Popup/ConfirmNairaWithdraw.jsx @@ -58,13 +58,12 @@ function ConfirmNairaWithdraw({ .sendMoney(reqData) .then((res) => { if (res.data.internal_return < 0) { - // if (res.data?.status_message?.toLowerCase().includes("limit")) { - // setRequestStatus({ - // message: , - // loading: false, - // status: false, - // }); - // } + setRequestStatus({ + message: 'Unable to complete, try again', + loading: false, + status: false, + }); + return setTimeout(() => { setRequestStatus({ message: "", @@ -79,19 +78,19 @@ function ConfirmNairaWithdraw({ }, 5000); } + setRequestStatus({ + message: "Withdrawal sucessful", + loading: false, + status: true, + }); + setShowCompleteNairaWithdraw({ + show: true, + load: false, + state: res.data, + }); setTimeout(() => { - setRequestStatus({ - message: "", - loading: false, - status: false, - }); - setShowCompleteNairaWithdraw({ - show: true, - load: false, - state: res.data, - }); + dispatch(tableReload({ type: "WALLETTABLE" })); }, 5000); - dispatch(tableReload({ type: "WALLETTABLE" })); return; }) .catch((error) => { @@ -381,23 +380,23 @@ function ConfirmNairaWithdraw({ {!completeNairaWithdraw.load && ( <>

{requestStatus.message && requestStatus.message}

- {!completeNairaWithdraw.show && ( - - )} + + +
@@ -133,14 +133,14 @@ function PastDueJobAction({jobDetails}) { {popUp && ( -
-
-

+
+
+

Past Due Task

-
+
{setChecked(prev => !prev)}} className='w-6 h-6 text-sky-blue bg-gray-100 focus:ring-sky-blue' /> -

I am ready to cancel this task

+

I am ready to cancel this task

-
+
{reqStatus.loading && action=='cancel'? : - }
{/* EXTEND TIMELINE SECTION */} -
+
-

Extend the timeline by:

+

Extend the timeline by: