diff --git a/src/components/home/HomeCom.jsx b/src/components/home/HomeCom.jsx index c66d34d..6315724 100644 --- a/src/components/home/HomeCom.jsx +++ b/src/components/home/HomeCom.jsx @@ -1,13 +1,13 @@ import React from 'react' -import {Link} from 'react-router-dom' -import { useQuery } from "@tanstack/react-query"; +import {Link} from 'react-router-dom' +import {useQuery} from "@tanstack/react-query"; import BreadcrumbCom from '../../components/breadcrumb/BreadcrumbCom' import CustomCounter from '../../components/CustomCounter' import Icons from '../../components/Icons' import formatNumber from '../../helpers/formatNumber' import queryKeys from '../../services/queryKeys' -import { getDashData } from '../../services/siteServices' +import {getDashData} from '../../services/siteServices' import getDateFromDateString from '../../helpers/GetDateFromDateString'; import getTimeFromDateString from '../../helpers/GetTimeFromDateString'; import localImgLoader from '../../helpers/localImageLoader'; @@ -15,174 +15,186 @@ import RouteLinks from '../../RouteLinks'; export default function HomeCom() { - const {data, isFetching, isError, error} = useQuery({ - queryKey: queryKeys.dashboard, - queryFn: () => getDashData(), - }) + const {data, isFetching, isError, error} = useQuery({ + queryKey: queryKeys.dashboard, + queryFn: () => getDashData(), + }) - const dashData = data?.data // DASHBOARD DATA + const dashData = data?.data // DASHBOARD DATA - // console.log('dashData', dashData) - // loans, payments, recent_transactions [], request_summary + // console.log('dashData', dashData) + // loans, payments, recent_transactions [], request_summary - return ( -
- + return ( +
+ - {(isFetching || isError) ? -
- {isError ?

{error.message}

:

Loading...

} -
- : -
-
-
-

Loans

-
- {/*

{dashData?.loans?.currency_text}

*/} -

+ {(isFetching || isError) ? +

+ {isError ?

{error.message}

: +

Loading...

} +
+ : +
+
+
+

Loans

+
+ {/*

{dashData?.loans?.currency_text}

*/} +

{dashData?.loans?.currency_text} - -

-

{dashData?.loans?.text}

-
-
-
-

Payments

-
-

+ +

+

{dashData?.loans?.text}

+
+
+
+

Payments

+
+

{dashData?.payments?.currency_text} - -

-

{dashData?.payments?.text}

-
-
-
-

Request Summary

-
- { - Object.values(dashData?.request_summary).map((item, index) => { - return ( -
-
- + +

+

{dashData?.payments?.text}

+
+
+
+

Request Summary

+
+ { + Object.values(dashData?.request_summary).map((item, index) => { + return ( +
+
+ +
+
+

+

{Object.keys(item)[0]}

+
+
+ ) + }) + } +
+
-
-

-

{Object.keys(item)[0]}

-
-
- ) - }) - } -
-
-
-
-
-
-
-

Recent Request

- {/*

Over 500 members

*/} -
- {/*
+
+
+
+
+

Recent Request

+ {/*

Over 500 members

*/} +
+ {/*
*/} -
+
- - - - - - - - - - - {(dashData?.recent_transactions && dashData?.recent_transactions.length > 0) ? dashData?.recent_transactions?.map((item, index) => { - if(index <= 10) { - return ( - - - - - + + ) + } + } + ) + : + + + + } + <> + {dashData?.recent_transactions.length > 10 && + + + + } + + +
- Request - - Account - - Activity - - Action -
-
- Icon -
-
{item?.transaction_id}
-
{getDateFromDateString(item?.created_at)} {getTimeFromDateString(item?.created_at)}
-
-
-
-
-
{item?.account_id}
-
{item?.type}
-
-
-
-
50%
-
-
-
-
-
-
- {/*
+ + + + + + + + + + + {(dashData?.recent_transactions && dashData?.recent_transactions.length > 0) ? dashData?.recent_transactions?.map((item, index) => { + if (index <= 10) { + return ( + + + + + - - ) - } - } - ) - : - - - - } - <> - {dashData?.recent_transactions.length > 10 && - - - - } - - -
+ Request + + Account + + Channel + + Action +
+
+ Icon +
+
{item?.transaction_id}
+
{getDateFromDateString(item?.created_at)} {getTimeFromDateString(item?.created_at)}
+
+
+
+
+
{item?.account_id}
+
{item?.type}
+
+
+
+
{item?.channel}
+
+
+
+ {/*
*/} -
- - - -
- {/*
+
+ + + +
+ {/*
*/} -
-
-
- No Record Found -
-
- - More ... - -
+
+
+
+ No Record Found +
+
+ + More ... + +
-
+
+
+
+ }
-
- } -
- ) + ) } \ No newline at end of file diff --git a/src/components/layouts/rightaside/Orders.jsx b/src/components/layouts/rightaside/Orders.jsx index 2ad0e2c..420064b 100644 --- a/src/components/layouts/rightaside/Orders.jsx +++ b/src/components/layouts/rightaside/Orders.jsx @@ -5,35 +5,35 @@ import CustomCounter from '../../CustomCounter' export default function Orders() { return (
-
-

Recent Eligibility

-
-
-

- -

-

Pending

-
-
-

- -

-

Approved

-
-
-

- -

-

Rejected

-
-
-

- -

-

Created

-
-
-
+ {/*
*/} + {/*

Recent Eligibility

*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* */} + {/*

*/} + {/*

Pending

*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* */} + {/*

*/} + {/*

Approved

*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* */} + {/*

*/} + {/*

Rejected

*/} + {/*
*/} + {/*
*/} + {/*

*/} + {/* */} + {/*

*/} + {/*

Created

*/} + {/*
*/} + {/*
*/} + {/*
*/}

Recent Loans

diff --git a/src/components/layouts/rightaside/RightAsideBar.jsx b/src/components/layouts/rightaside/RightAsideBar.jsx index 73b34d2..f0b7df9 100644 --- a/src/components/layouts/rightaside/RightAsideBar.jsx +++ b/src/components/layouts/rightaside/RightAsideBar.jsx @@ -20,18 +20,18 @@ export default function RightAsideBar() { - - + {/**/} + {/**/}
{/* Body */} - {active == 'orders' && } - {active == 'tickets' && } - {active == 'tasks' && } + {active === 'orders' && } + {/*{active == 'tickets' && }*/} + {/*{active == 'tasks' && }*/}
) } diff --git a/src/components/transactionDetails/LoanDetails.jsx b/src/components/transactionDetails/LoanDetails.jsx index b213340..47d44c7 100644 --- a/src/components/transactionDetails/LoanDetails.jsx +++ b/src/components/transactionDetails/LoanDetails.jsx @@ -20,6 +20,11 @@ export default function LoanDetails({transactionID}) { const loans = allLoans?.data?.loans // LOANS LIST // const loansCount = allLoans?.data?.count // LOANS LIST COUNT + const handleClick = (transactioID) => { + alert(transactioID) + console.log('Button clicked!'); + }; + return ( <> {isFetching ? @@ -119,8 +124,20 @@ export default function LoanDetails({transactionID}) {
-

Loans Disbursement - Details

+
+
+

Loans Disbursement + Details

+
+
+ +
+
+
Disburse Date : {getDateFromDateString(item?.disburseDate)} {getTimeFromDateString(item?.disburseDate)}
Disburse Description @@ -129,7 +146,7 @@ export default function LoanDetails({transactionID}) { : {item?.disburseResult}

Disburse Verify - Date: {getDateFromDateString(item?.disburseVerify)} {getTimeFromDateString(item?.disburseVerify)}
+ Date: {getDateFromDateString(item?.disburseVerify)} {getTimeFromDateString(item?.disburseVerify)}
Verify Description : {item?.verifyDescription}
Verify Result