diff --git a/src/SiteRoutes.jsx b/src/SiteRoutes.jsx index dc89a2d..4646b4f 100644 --- a/src/SiteRoutes.jsx +++ b/src/SiteRoutes.jsx @@ -10,7 +10,8 @@ import HomePage from './pages/HomePage' // Home PAGE import LoansPage from './pages/LoansPage' // SELECTED LOANS PAGE import TransactionsPage from './pages/TransactionsPage' // TRANSACTIONS PAGE import RepaymentsPage from './pages/RepaymentsPage' // REPAYMENTS PAGE -import LoanChargesPage from './pages/LoanChargesPage' +import LoanChargesPage from './pages/LoanChargesPage' // LOAN CHARGES PAGE +import ErrorPage from './pages/ErrorPage' // const Home = lazy(() => import('./pages/Home')); @@ -33,7 +34,7 @@ export default function SiteRoutes() { path={RouteLinks.errorPage} // error page element={ }> -

Error Page 1

+
} /> diff --git a/src/assets/404-error.png b/src/assets/404-error.png new file mode 100644 index 0000000..5e8542f Binary files /dev/null and b/src/assets/404-error.png differ diff --git a/src/assets/loan_icons/eligibility_check.png b/src/assets/loan_icons/eligibility_check.png new file mode 100644 index 0000000..c25d561 Binary files /dev/null and b/src/assets/loan_icons/eligibility_check.png differ diff --git a/src/assets/loan_icons/loan_status.png b/src/assets/loan_icons/loan_status.png new file mode 100644 index 0000000..1fb92fd Binary files /dev/null and b/src/assets/loan_icons/loan_status.png differ diff --git a/src/assets/loan_icons/provide_loan.png b/src/assets/loan_icons/provide_loan.png new file mode 100644 index 0000000..7984922 Binary files /dev/null and b/src/assets/loan_icons/provide_loan.png differ diff --git a/src/assets/loan_icons/repayment.png b/src/assets/loan_icons/repayment.png new file mode 100644 index 0000000..a76c0a5 Binary files /dev/null and b/src/assets/loan_icons/repayment.png differ diff --git a/src/assets/loan_icons/select_offer.png b/src/assets/loan_icons/select_offer.png new file mode 100644 index 0000000..8339dcc Binary files /dev/null and b/src/assets/loan_icons/select_offer.png differ diff --git a/src/components/error/ErrorCom.jsx b/src/components/error/ErrorCom.jsx new file mode 100644 index 0000000..080fd31 --- /dev/null +++ b/src/components/error/ErrorCom.jsx @@ -0,0 +1,37 @@ +import React from 'react' +import { useNavigate } from 'react-router-dom' + +import ErrorLogo from '../../assets/404-error.png' + +export default function ErrorCom() { + + const navigate = useNavigate() + + return ( + <> +
+
+
+
+
+

Oops!

+

We can't find that page.

+
+ + {/*
+

Or with email

+
*/} + +
+ error logo +
+ +
+
+
+
+
+
+ + ) +} diff --git a/src/components/home/HomeCom.jsx b/src/components/home/HomeCom.jsx index 3a8e5ce..9e0326b 100644 --- a/src/components/home/HomeCom.jsx +++ b/src/components/home/HomeCom.jsx @@ -1,4 +1,5 @@ import React from 'react' +import {Link} from 'react-router-dom' import { useQuery } from "@tanstack/react-query"; import BreadcrumbCom from '../../components/breadcrumb/BreadcrumbCom' import CustomCounter from '../../components/CustomCounter' @@ -9,6 +10,9 @@ import formatNumber from '../../helpers/formatNumber' import queryKeys from '../../services/queryKeys' import { getDashData } from '../../services/siteServices' +import getDateFromDateString from '../../helpers/GetDateFromDateString'; +import localImgLoader from '../../helpers/localImageLoader'; +import RouteLinks from '../../RouteLinks'; export default function HomeCom() { @@ -82,81 +86,92 @@ export default function HomeCom() { */} - - {({ data }) => ( + + + + + + + + + + + {(dashData?.recent_transactions && dashData?.recent_transactions.length > 0) ? dashData?.recent_transactions?.map((item, index) => { + if(index <= 10) { + return ( + + + + + + + ) + } + } + ) + : + + + + } <> -
+ Request + + Account + + Activity + + Action +
+
+ Icon +
+
{item?.transaction_id}
+
{getDateFromDateString(item?.created_at)}
+
+
+
+
+
{item?.account_id}
+
{item?.type}
+
+
+
+
50%
+
+
+
+
+
+
+ {/*
+ +
*/} +
+ +
+ {/*
+ +
*/} +
+
+
+ No Record Found +
+
- - - - - - - - - - {(data && data.length > 0) ? data?.map((item, index) => ( - - - - - - - )) - : - - - - } - -
- Request - - Account - - Activity - - Action -
-
- Jese image -
-
{item?.account_id}
-
{item?.channel}
-
-
-
-
-
{item?.transaction_id}
-
{item?.type}
-
-
-
-
50%
-
-
-
-
-
-
- {/*
- -
*/} -
- -
- {/*
- -
*/} -
-
-
- No Record Found -
-
+ {dashData?.recent_transactions.length > 10 && + + + + More ... + + + + } - )} -
+ + + diff --git a/src/components/loanscom/LoansCom.jsx b/src/components/loanscom/LoansCom.jsx index 6c10784..6cef16c 100644 --- a/src/components/loanscom/LoansCom.jsx +++ b/src/components/loanscom/LoansCom.jsx @@ -46,6 +46,12 @@ export default function LoansCom() { Loan Amount + + Repay Amount + + + Install Amount + Added @@ -72,6 +78,16 @@ export default function LoansCom() {
{formatNumber(item?.initial_loan_amount)}
+ +
+
{formatNumber(item?.repayment_amount)}
+
+ + +
+
{formatNumber(item?.installment_amount)}
+
+
{getDateFromDateString(item?.created_at)}
diff --git a/src/components/transactions/TransactionsCom.jsx b/src/components/transactions/TransactionsCom.jsx index 97f19df..80c7aa0 100644 --- a/src/components/transactions/TransactionsCom.jsx +++ b/src/components/transactions/TransactionsCom.jsx @@ -9,6 +9,7 @@ import Avatar from '../../assets/user_avatar.jpg' import queryKeys from '../../services/queryKeys' import { getTransactions } from '../../services/siteServices' import getDateFromDateString from '../../helpers/GetDateFromDateString'; +import localImgLoader from '../../helpers/localImageLoader'; export default function TransactionsCom() { @@ -43,13 +44,13 @@ export default function TransactionsCom() { - Name + Request - {/* - Loan - */} - Added + Account + + + Activity Action @@ -61,22 +62,25 @@ export default function TransactionsCom() {
- Jese image + Icon
-
{item?.account_id || ''}
-
{item?.transaction_id}
+
{item?.transaction_id}
+
{getDateFromDateString(item?.created_at)}
- {/* -
-
{item?.loan}
-
{item?.description}
-
- */}
-
{getDateFromDateString(item?.created_at)}
+
{item?.account_id}
+
{item?.type}
+
+ + +
+
50%
+
+
+
@@ -90,7 +94,7 @@ export default function TransactionsCom() { )) : - +
No Record Found
diff --git a/src/helpers/localImageLoader.js b/src/helpers/localImageLoader.js new file mode 100644 index 0000000..a1d99fc --- /dev/null +++ b/src/helpers/localImageLoader.js @@ -0,0 +1,2 @@ +const localImgLoader = (location) => require(`../assets/${location}`); +export default localImgLoader \ No newline at end of file diff --git a/src/pages/ErrorPage.jsx b/src/pages/ErrorPage.jsx new file mode 100644 index 0000000..86186b2 --- /dev/null +++ b/src/pages/ErrorPage.jsx @@ -0,0 +1,8 @@ +import React from 'react' +import ErrorCom from '../components/error/ErrorCom' + +export default function ErrorPage() { + return ( + + ) +}