Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ca4ba3199 | |||
| e5fa6544a5 | |||
| f55b7186b9 | |||
| 05515333ba | |||
| 7212ab6cfc | |||
| 020154d51a |
@@ -72,9 +72,21 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// For form initial values
|
||||||
|
const initialValues = {
|
||||||
|
// initial values for formik
|
||||||
|
country: walletDetails.data.length == 1 ? walletDetails.data[0].country : '',
|
||||||
|
price: "",
|
||||||
|
title: "",
|
||||||
|
description: "",
|
||||||
|
job_detail: "",
|
||||||
|
timeline_days: "",
|
||||||
|
category: [],
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Formik
|
<Formik
|
||||||
initialValues={IV}
|
initialValues={initialValues}
|
||||||
validationSchema={validationSchema}
|
validationSchema={validationSchema}
|
||||||
onSubmit={handleAddJob}
|
onSubmit={handleAddJob}
|
||||||
>
|
>
|
||||||
@@ -105,12 +117,13 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
className={`input-field p-2 mt-3 rounded-md placeholder:text-base text-dark-gray dark:text-white w-full h-10 bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none border`}
|
className={`input-field p-2 mt-3 rounded-md placeholder:text-base text-dark-gray dark:text-white w-full h-10 bg-slate-100 dark:bg-[#11131F] focus:ring-0 focus:outline-none border`}
|
||||||
onChange={props.handleChange}
|
onChange={props.handleChange}
|
||||||
onBlur={props.handleBlur}
|
onBlur={props.handleBlur}
|
||||||
|
disabled={walletDetails.data.length == 1}
|
||||||
>
|
>
|
||||||
{walletDetails?.loading ? (
|
{walletDetails?.loading ? (
|
||||||
<option className="text-slate-500 text-lg" value="">
|
<option className="text-slate-500 text-lg" value="">
|
||||||
Loading...
|
Loading...
|
||||||
</option>
|
</option>
|
||||||
) : walletDetails.data.length ? (
|
) : walletDetails.data.length > 1 ? (
|
||||||
<>
|
<>
|
||||||
<option className="text-slate-500 text-lg" value="">
|
<option className="text-slate-500 text-lg" value="">
|
||||||
Select a currency
|
Select a currency
|
||||||
@@ -125,7 +138,19 @@ function AddJob({ popUpHandler, categories }) {
|
|||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : walletDetails.data.length == 1 ?
|
||||||
|
<>
|
||||||
|
{walletDetails.data?.map((item, index) => (
|
||||||
|
<option
|
||||||
|
key={index}
|
||||||
|
className="text-slate-500 text-lg"
|
||||||
|
value={item?.country}
|
||||||
|
>
|
||||||
|
{item?.description}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
:(
|
||||||
<option className="text-slate-500 text-lg" value="">
|
<option className="text-slate-500 text-lg" value="">
|
||||||
No Options Found! Try Again
|
No Options Found! Try Again
|
||||||
</option>
|
</option>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="logout-modal-body w-full">
|
<div className="logout-modal-body w-full">
|
||||||
<div className="content-wrapper w-full h-[32rem]">
|
<div className="content-wrapper w-full h-[32rem] flex flex-col justify-center">
|
||||||
<div className="w-full mb-10">
|
<div className="w-full mb-10">
|
||||||
<div className="add-fund w-full bg-white dark:bg-dark-white rounded-2xl">
|
<div className="add-fund w-full bg-white dark:bg-dark-white rounded-2xl">
|
||||||
<div className="px-4 md:p-8 py-4 add-fund-info">
|
<div className="px-4 md:p-8 py-4 add-fund-info">
|
||||||
@@ -59,12 +59,12 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
|||||||
|
|
||||||
{data?.internal_return >= 0 &&
|
{data?.internal_return >= 0 &&
|
||||||
data?.result !== "Charge failed" && (
|
data?.result !== "Charge failed" && (
|
||||||
<div className="w-full md:w-[60%] mx-auto">
|
<div className="w-full max-w-[300px] mx-auto">
|
||||||
<div className="grid grid-cols-2 gap-8 my-2">
|
<div className="flex gap-8 my-2">
|
||||||
<h1 className="job-label">
|
<h1 className="w-full job-label">
|
||||||
Amount({data?.currency || ""})
|
Amount({data?.currency || ""})
|
||||||
</h1>
|
</h1>
|
||||||
<span className="w-full text-base text-dark-gray dark:text-white tracking-tighter flex justify-end items-end">
|
<span className="text-base text-dark-gray dark:text-white tracking-tighter flex justify-end items-end">
|
||||||
{`${data?.symbol || ""} ${
|
{`${data?.symbol || ""} ${
|
||||||
Number(data?.amount * 0.01).toFixed(2) || ""
|
Number(data?.amount * 0.01).toFixed(2) || ""
|
||||||
}`}
|
}`}
|
||||||
@@ -72,22 +72,22 @@ function CompleteConfirmCredit({ onClose, confirmCredit }) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{data?.curr_balance &&
|
{data?.curr_balance &&
|
||||||
<div className="grid grid-cols-2 gap-8 my-2">
|
<div className="flex gap-8 my-2">
|
||||||
<h1 className="job-label">
|
<h1 className="w-full job-label">
|
||||||
Wallet Balance
|
Wallet Balance
|
||||||
</h1>
|
</h1>
|
||||||
<span className="w-full text-base text-dark-gray dark:text-white tracking-tighter flex justify-end items-end">
|
<span className="text-base text-dark-gray dark:text-white tracking-tighter flex justify-end items-end">
|
||||||
{(data?.curr_balance * 0.01).toFixed(2)}
|
{(data?.curr_balance * 0.01).toFixed(2)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
{isSuccess && (
|
{isSuccess && (
|
||||||
<div className="grid grid-cols-2 gap-8 my-2">
|
<div className="flex gap-8 my-2">
|
||||||
<h1 className="job-label">
|
<h1 className="w-full job-label">
|
||||||
Confirmation Number
|
Confirmation Number
|
||||||
</h1>
|
</h1>
|
||||||
<span className="w-full text-base text-dark-gray dark:text-white tracking-tighter flex justify-end items-end">
|
<span className="text-base text-dark-gray dark:text-white tracking-tighter flex justify-end items-end">
|
||||||
{data?.confirmation}
|
{data?.confirmation}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ const CreditPopup = ({ details, onClose, situation, walletItem }) => {
|
|||||||
<ModalCom
|
<ModalCom
|
||||||
action={onClose}
|
action={onClose}
|
||||||
situation={situation}
|
situation={situation}
|
||||||
className="assign-task-popup"
|
|
||||||
>
|
>
|
||||||
<div className="logout-modal-wrapper w-[90%] md:w-[768px] h-auto bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
|
<div className="logout-modal-wrapper w-[90%] md:w-[768px] h-auto bg-white dark:bg-dark-white lg:rounded-2xl overflow-y-auto">
|
||||||
<div className="modal-header-con">
|
<div className="modal-header-con">
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function WalletAction({ walletItem, payment, openPopUp }) {
|
|||||||
|
|
||||||
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-start items-center">
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setShowNairaWithdraw((prev) => ({ ...prev, show: true }));
|
setShowNairaWithdraw((prev) => ({ ...prev, show: true }));
|
||||||
@@ -28,7 +28,7 @@ function WalletAction({ walletItem, payment, openPopUp }) {
|
|||||||
Spend
|
Spend
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-1/2 flex justify-center items-center">
|
<div className="w-1/2 flex justify-end items-center">
|
||||||
<button
|
<button
|
||||||
className="logout-btn btn-gradient text-white"
|
className="logout-btn btn-gradient text-white"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -38,7 +38,7 @@ function WalletAction({ walletItem, payment, openPopUp }) {
|
|||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span className="">Add Credit</span>
|
Add Credit
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default function WalletBox({ wallet, payment, countries }) {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
data.length > 0 && data.map((item) => (
|
data.length > 0 && data.map((item) => (
|
||||||
<div key={item.wallet_uid} className="lg:w-full h-full mb-10 lg:mb-0">
|
<div key={item.wallet_uid} className="max-w-[450px] w-full h-full mb-10 lg:mb-0">
|
||||||
<WalletItemCard walletItem={item} payment={payment} countries={countries} />
|
<WalletItemCard walletItem={item} payment={payment} countries={countries} />
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export default function WalletItemCard({ walletItem, payment, countries }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className="current-balance-widget w-full h-full rounded-2xl overflow-hidden flex flex-col items-center gap-2 p-8 justify-between"
|
className="current-balance-widget w-full h-full rounded-2xl overflow-hidden flex flex-col items-center gap-4 p-4 justify-between"
|
||||||
style={{
|
style={{
|
||||||
background: `url(${background}) 0% 0% / cover no-repeat`,
|
background: `url(${background}) 0% 0% / cover no-repeat`,
|
||||||
}}
|
}}
|
||||||
@@ -86,7 +86,7 @@ export default function WalletItemCard({ walletItem, payment, countries }) {
|
|||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div className="my-2 w-full h-[1px] bg-white"></div>
|
<div className="w-full h-[1px] bg-white"></div>
|
||||||
|
|
||||||
<WalletAction
|
<WalletAction
|
||||||
walletItem={{ ...walletItem, walletCountry: currentWalletCurrency }}
|
walletItem={{ ...walletItem, walletCountry: currentWalletCurrency }}
|
||||||
|
|||||||
+3
-3
@@ -183,7 +183,7 @@
|
|||||||
@apply px-2 min-w-[80px] h-11 flex justify-center items-center text-base rounded-full cursor-pointer
|
@apply px-2 min-w-[80px] h-11 flex justify-center items-center text-base rounded-full cursor-pointer
|
||||||
}
|
}
|
||||||
.logout-btn {
|
.logout-btn {
|
||||||
@apply px-4 min-w-[80px] h-[52px] flex justify-center items-center text-base rounded-full cursor-pointer
|
@apply px-4 min-w-[80px] h-[52px] flex justify-center items-center text-xl font-bold rounded-full cursor-pointer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1103,6 +1103,6 @@ TODO: Responsive ===========================
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.assign-task-popup {
|
/* .assign-task-popup {
|
||||||
top: 75px;
|
top: 75px;
|
||||||
}
|
} */
|
||||||
|
|||||||
Reference in New Issue
Block a user