Compare commits

..

1 Commits

Author SHA1 Message Date
victorAnumudu 97bfcd68b5 default height added to box tables 2023-06-12 14:00:45 +01:00
6 changed files with 77 additions and 12 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ export default function FamilyTable({ className, familyList, loader, popUpHandle
return (
<div
className={`update-table w-full h-full p-8 bg-white dark:bg-dark-white overflow-y-auto rounded-2xl section-shadow ${
className={`update-table w-full h-full p-8 bg-white dark:bg-dark-white overflow-y-auto rounded-2xl section-shadow min-h-[520px] ${
className || ""
}`}
>
@@ -28,7 +28,7 @@ export default function MyActiveJobTable({ MyJobList, className }) {
return (
<div
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow ${
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow min-h-[520px] ${
className || ""
}`}
>
@@ -45,7 +45,7 @@ export default function MyActiveJobTable({ MyJobList, className }) {
<>
{MyJobList &&
MyJobList?.result_list &&
MyJobList.result_list.length > 0 &&
MyJobList.result_list.length > 0 ?
currentActiveJobList.map((value, index) => (
<tr
key={index}
@@ -112,7 +112,14 @@ export default function MyActiveJobTable({ MyJobList, className }) {
</div>
</td>
</tr>
))}
))
:
<tr className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
<td className="p-2">
No Active Task!
</td>
</tr>
}
</>
}
</tbody>
+10 -3
View File
@@ -70,7 +70,7 @@ export default function MyJobTable({ MyJobList, reloadJobList, className }) {
return (
<div
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow ${
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow min-h-[520px] ${
className || ""
}`}
>
@@ -102,7 +102,7 @@ export default function MyJobTable({ MyJobList, reloadJobList, className }) {
<>
{MyJobList &&
MyJobList?.data?.result_list &&
MyJobList.data?.result_list.length > 0 &&
MyJobList.data?.result_list.length > 0 ?
currentJobList.map((value, index) => (
<tr
key={index}
@@ -181,7 +181,14 @@ export default function MyJobTable({ MyJobList, reloadJobList, className }) {
</button>
</td>
</tr>
))}
))
:
<tr className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
<td className="p-2">
No Jobs Avaliable!
</td>
</tr>
}
</>
) : selectedCategory === "Explore" ? (
<></>
@@ -25,7 +25,7 @@ export default function MyPendingJobTable({ MyJobList, className }) {
return (
<div
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow ${
className={`update-table w-full p-8 bg-white dark:bg-dark-white overflow-hidden rounded-2xl section-shadow min-h-[520px] ${
className || ""
}`}
>
@@ -42,7 +42,7 @@ export default function MyPendingJobTable({ MyJobList, className }) {
<>
{MyJobList &&
MyJobList?.result_list &&
MyJobList.result_list.length > 0 &&
MyJobList.result_list.length > 0 ?
currentActiveJobList.map((value, index) => (
<tr
key={index}
@@ -105,7 +105,14 @@ export default function MyPendingJobTable({ MyJobList, className }) {
</button>
</td>
</tr>
))}
))
:
<tr className="font-bold text-xl text-dark-gray dark:text-white whitespace-nowrap">
<td className="p-2">
No Pending Task!
</td>
</tr>
}
</>
}
</tbody>
+1 -1
View File
@@ -22,7 +22,7 @@ function Balance({wallet, coupon}) {
<div className='w-full lg:flex xl:space-x-8 lg:space-x-4 bottomMargin'>
{/* WALLET SECTION */}
<div className="lg:w-4/4 w-full mb-10 lg:mb-0">
<div className="wallet w-full md:p-8 p-4 h-full bg-white dark:bg-dark-white rounded-2xl shadow">
<div className="wallet w-full md:p-8 p-4 h-full bg-white dark:bg-dark-white rounded-2xl shadow min-h-[520px]">
<div className='flex items-baseline justify-between'>
{/*<h2 className='text-slate-900 dark:text-white text-xl lg:text-2xl font-medium'>Wallet</h2>*/}
{/*<p className='text-base text-slate-500 dark:text-white'>Add New Wallet</p>*/}
+45 -1
View File
@@ -20,6 +20,9 @@ function Wallet() {
}
const WalletRoutes = () => {
const apiCall = new usersService()
@@ -35,6 +38,18 @@ const WalletRoutes = () => {
error: false
})
let [purchaseHistory, setPurchaseHistory] = useState({ // FOR PURCHASE HISTORY
loading: true,
data: [],
error: false
})
let [couponHistory, setCouponHistory] = useState({ // FOR COUPON HISTORY
loading: true,
data: [],
error: false
})
//FUNCTION TO GET WALLET LIST
const getWalletList = ()=>{
apiCall.getUserWallets(null).then((res)=>{
@@ -61,9 +76,38 @@ const WalletRoutes = () => {
})
}
//FUNCTION TO GET PURCHASE HISTORY
const getPurchaseHistory = ()=>{
apiCall.getPurchaseHx().then((res)=>{
if(res.data.internal_return < 0){ // success but no data
setPurchaseHistory(prev => ({...prev, loading: false}))
return
}
// console.log('purchase',res.data)
setPurchaseHistory(prev => ({...prev, loading: false, data: res.data.result_list}))
}).catch((error)=>{
setPurchaseHistory(prev => ({...prev, loading: false, error: true}))
})
}
//FUNCTION TO GET COUPON HISTORY
const getCouponHistory = ()=>{
apiCall.getCouponHx().then((res)=>{
if(res.data.internal_return < 0){ // success but no data
setCouponHistory(prev => ({...prev, loading: false}))
return
}
setCouponHistory(prev => ({...prev, loading: false, data: res.data.result_list}))
}).catch((error)=>{
setCouponHistory(prev => ({...prev, loading: false, error: true}))
})
}
useEffect(()=>{
getWalletList()
getPaymentHistory()
getPurchaseHistory()
getCouponHistory()
}, [])
return (
<Routes>
@@ -71,7 +115,7 @@ const WalletRoutes = () => {
<Route path='add-fund' element={<AddFund payment={paymentHistory} />} />
<Route path='add-fund/confirm-add-fund' element={<ConfirmAddFund payment={paymentHistory} />} />
<Route path='transfer-fund' element={<TransferFund payment={paymentHistory} wallet={walletList} />} />
<Route index element={<Balance wallet={walletList} />} />
<Route index element={<Balance coupon={couponHistory} wallet={walletList} />} />
<Route path='transfer-fund/add-recipient' element={<AddRecipient />} />
<Route path='transfer-fund/confirm-transfer' element={<ConfirmTransfer payment={paymentHistory} wallet={walletList} />} />
<Route path='*' element={<Navigate to='/' />} />