diff --git a/src/components/loan_charges/_LoanChargesCom.jsx b/src/components/loan_charges/_LoanChargesCom.jsx index 2ea06ae..26a4ab3 100644 --- a/src/components/loan_charges/_LoanChargesCom.jsx +++ b/src/components/loan_charges/_LoanChargesCom.jsx @@ -1,5 +1,5 @@ -import React, { useState } from 'react' -import { useQuery } from "@tanstack/react-query"; +import React, {useState} from 'react' +import {useQuery} from "@tanstack/react-query"; import BreadcrumbCom from '../breadcrumb/BreadcrumbCom' import TablePaginatedWrapper from '../tableWrapper/TablePaginatedWrapper' @@ -7,7 +7,7 @@ import Icons from '../Icons' import Avatar from '../../assets/user_avatar.jpg' import queryKeys from '../../services/queryKeys' -import { getLoanCharges } from '../../services/siteServices' +import {getLoanCharges} from '../../services/siteServices' import getDateFromDateString from '../../helpers/GetDateFromDateString'; import formatNumber from '../../helpers/formatNumber'; @@ -26,86 +26,92 @@ export default function LoanChargesCom() { const pagination = data?.data?.pagination return ( -
- +
+
- {isFetching ? - <> -

Loading...

- - : isError ? -

{error.message}

- : - - {({ data }) => ( - <> - - - - - {/* + + {(data && data.length > 0) ? data?.map((item, index) => ( + + + + + + + )) + : + + + + } + +
- Name - + {isFetching ? + <> +

Loading...

+ + : isError ? +

{error.message}

+ : + + {({data}) => ( + <> + + + + + {/* */} - - - - - - - {(data && data.length > 0) ? data?.map((item, index) => ( - - - - - + + + - )) - : - - - - } - -
+ Name + Loan - Amount - - Added - - Action -
-
- Jese image -
-
{item?.transaction_id || ''}
-
{item?.code}
-
-
-
-
- {/*
{formatNumber(item?.initial_loan_amount)}
*/} -
{formatNumber(item?.amount)}
-
-
-
-
{getDateFromDateString(item?.created_at)}
-
-
-
-
- -
-
-
+ Amount + + Added + + Action +
-
- No Record Found -
-
- - )} -
+
+
+
+
{item?.transaction_id || ''}
+
{item?.code}
+
+
+
+
+ {/*
{formatNumber(item?.initial_loan_amount)}
*/} +
{formatNumber(item?.amount)}
+
+
+
+
{getDateFromDateString(item?.created_at)}
+
+
+
+
+ +
+
+
+
+ No Record Found +
+
+ + )} +
}
diff --git a/src/components/transactionDetails/LoanChargeDetails.jsx b/src/components/transactionDetails/LoanChargeDetails.jsx index 946caa9..4c34a0b 100644 --- a/src/components/transactionDetails/LoanChargeDetails.jsx +++ b/src/components/transactionDetails/LoanChargeDetails.jsx @@ -24,7 +24,7 @@ export default function LoanChargeDetails({transactionID}) { // const pagination = data?.data?.pagination return ( -
+

Loan Charges

{isFetching ? <> @@ -58,7 +58,7 @@ export default function LoanChargeDetails({transactionID}) {
- Jese image + {/*Jese image*/}
{item?.transaction_id || ''}
{/*
{item?.description}
*/} diff --git a/src/components/transactionDetails/LoanDetails.jsx b/src/components/transactionDetails/LoanDetails.jsx index 47d44c7..05349ab 100644 --- a/src/components/transactionDetails/LoanDetails.jsx +++ b/src/components/transactionDetails/LoanDetails.jsx @@ -38,8 +38,8 @@ export default function LoanDetails({transactionID}) {

{error.message}

: (loans && loans.length > 0) ? -
-

Loans

+
+

Loan

diff --git a/src/components/transactionDetails/RepaymentScheduleDetails.jsx b/src/components/transactionDetails/RepaymentScheduleDetails.jsx index 74fa97a..da8627c 100644 --- a/src/components/transactionDetails/RepaymentScheduleDetails.jsx +++ b/src/components/transactionDetails/RepaymentScheduleDetails.jsx @@ -41,7 +41,7 @@ export default function RepaymentScheduleDetails({transactionID}) { {/* @@ -67,12 +67,9 @@ export default function RepaymentScheduleDetails({transactionID}) { {(repaymentSchedule && repaymentSchedule.length > 0) ? repaymentSchedule?.map((item, index) => ( -
- ID + ID/TrxID Loan @@ -59,7 +59,7 @@ export default function RepaymentScheduleDetails({transactionID}) { Paid Date - Action + Paid ?
-
- Jese image
{item?.loan_id || ''}
- {/*
{item?.description}
*/} -
+
{item?.transaction_id || ''}
@@ -95,11 +92,9 @@ export default function RepaymentScheduleDetails({transactionID}) {
{item?.paid_at ? getDateFromDateString(item?.paid_at) : 'Not available'}
-
-
- -
+
+
+
{item?.paid || 'false'}