updated confirmation page
This commit is contained in:
@@ -55,9 +55,6 @@ export default function LoanOffersCom() {
|
|||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Added
|
Added
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
|
||||||
Verified
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Action
|
Action
|
||||||
</th>
|
</th>
|
||||||
@@ -84,11 +81,6 @@ export default function LoanOffersCom() {
|
|||||||
{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}
|
{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-3 py-2">
|
|
||||||
<div className="flex items-center">
|
|
||||||
{!item?.verified ? 'N/A' : `${getDateFromDateString(item?.verified)} ${getTimeFromDateString(item?.verified)}`}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
||||||
{/* <!-- Modal toggle --> */}
|
{/* <!-- Modal toggle --> */}
|
||||||
{/* <Link to={RouteLinks.manageAdminPage}>
|
{/* <Link to={RouteLinks.manageAdminPage}>
|
||||||
@@ -104,7 +96,7 @@ export default function LoanOffersCom() {
|
|||||||
))
|
))
|
||||||
:
|
:
|
||||||
<tr className="w-3 p-3">
|
<tr className="w-3 p-3">
|
||||||
<td className="px-3 py-2" colSpan={6}>
|
<td className="px-3 py-2" colSpan={5}>
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
No Record Found
|
No Record Found
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import queryKeys from '../../services/queryKeys'
|
|||||||
import { approvedLoan } from '../../services/siteServices'
|
import { approvedLoan } from '../../services/siteServices'
|
||||||
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
||||||
import getTimeFromDateString from '../../helpers/GetTimeFromDateString';
|
import getTimeFromDateString from '../../helpers/GetTimeFromDateString';
|
||||||
|
import formatNumber from '../../helpers/formatNumber';
|
||||||
|
|
||||||
export default function ApprovedLoanCom() {
|
export default function ApprovedLoanCom() {
|
||||||
|
|
||||||
@@ -51,6 +52,15 @@ export default function ApprovedLoanCom() {
|
|||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Added
|
Added
|
||||||
</th>
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Verified
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Initail Amount
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Fee
|
||||||
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Action
|
Action
|
||||||
</th>
|
</th>
|
||||||
@@ -74,6 +84,17 @@ export default function ApprovedLoanCom() {
|
|||||||
{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}
|
{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
<div className="flex items-center">
|
||||||
|
{getDateFromDateString(item?.verified)} {getTimeFromDateString(item?.verified)}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{formatNumber(item?.amount)}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{formatNumber(item?.total_fee)}
|
||||||
|
</td>
|
||||||
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
||||||
{/* <!-- Modal toggle --> */}
|
{/* <!-- Modal toggle --> */}
|
||||||
{/* <Link to={RouteLinks.manageAdminPage}>
|
{/* <Link to={RouteLinks.manageAdminPage}>
|
||||||
@@ -89,7 +110,7 @@ export default function ApprovedLoanCom() {
|
|||||||
))
|
))
|
||||||
:
|
:
|
||||||
<tr className="w-3 p-3">
|
<tr className="w-3 p-3">
|
||||||
<td className="px-3 py-2" colSpan={4}>
|
<td className="px-3 py-2" colSpan={7}>
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
No Record Found
|
No Record Found
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,15 +8,16 @@ import Icons from '../Icons'
|
|||||||
|
|
||||||
import Avatar from '../../assets/user_avatar.jpg'
|
import Avatar from '../../assets/user_avatar.jpg'
|
||||||
import queryKeys from '../../services/queryKeys'
|
import queryKeys from '../../services/queryKeys'
|
||||||
import { approvedLoan } from '../../services/siteServices'
|
import { disbursementsLoan } from '../../services/siteServices'
|
||||||
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
||||||
import getTimeFromDateString from '../../helpers/GetTimeFromDateString';
|
import getTimeFromDateString from '../../helpers/GetTimeFromDateString';
|
||||||
|
import formatNumber from '../../helpers/formatNumber';
|
||||||
|
|
||||||
export default function DisbursementsLoanCom() {
|
export default function DisbursementsLoanCom() {
|
||||||
|
|
||||||
const {data, isFetching, isError, error} = useQuery({
|
const {data, isFetching, isError, error} = useQuery({
|
||||||
queryKey: queryKeys.approved_loan,
|
queryKey: queryKeys.disbursements_loan,
|
||||||
queryFn: () => approvedLoan()
|
queryFn: () => disbursementsLoan()
|
||||||
})
|
})
|
||||||
|
|
||||||
const approvedUsers = data?.data?.result_data?.data // DISBURSED LOAN LIST
|
const approvedUsers = data?.data?.result_data?.data // DISBURSED LOAN LIST
|
||||||
@@ -51,6 +52,15 @@ export default function DisbursementsLoanCom() {
|
|||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Added
|
Added
|
||||||
</th>
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Amount
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Disbursement Status
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Fee
|
||||||
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Action
|
Action
|
||||||
</th>
|
</th>
|
||||||
@@ -74,6 +84,15 @@ export default function DisbursementsLoanCom() {
|
|||||||
{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}
|
{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{formatNumber(item?.approved_amount)}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.transmission_status}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{formatNumber(item?.total_fee)}
|
||||||
|
</td>
|
||||||
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
||||||
{/* <!-- Modal toggle --> */}
|
{/* <!-- Modal toggle --> */}
|
||||||
{/* <Link to={RouteLinks.manageAdminPage}>
|
{/* <Link to={RouteLinks.manageAdminPage}>
|
||||||
@@ -81,7 +100,7 @@ export default function DisbursementsLoanCom() {
|
|||||||
</Link> */}
|
</Link> */}
|
||||||
{/* <i onClick={handleShowEditModal} className="fa-solid fa-pen-to-square text-base md:text-lg cursor-pointer p-2"></i> */}
|
{/* <i onClick={handleShowEditModal} className="fa-solid fa-pen-to-square text-base md:text-lg cursor-pointer p-2"></i> */}
|
||||||
{/* <i onClick={handleDeleteModal} className="fa-solid fa-trash text-base md:text-lg cursor-pointer p-2 text-red-500"></i> */}
|
{/* <i onClick={handleDeleteModal} className="fa-solid fa-trash text-base md:text-lg cursor-pointer p-2 text-red-500"></i> */}
|
||||||
<Icons name='edit' />
|
{/* <Icons name='edit' /> */}
|
||||||
<Icons name='eye' />
|
<Icons name='eye' />
|
||||||
<Icons name='trash' className={'hidden text-red-500'} />
|
<Icons name='trash' className={'hidden text-red-500'} />
|
||||||
</td>
|
</td>
|
||||||
@@ -89,7 +108,7 @@ export default function DisbursementsLoanCom() {
|
|||||||
))
|
))
|
||||||
:
|
:
|
||||||
<tr className="w-3 p-3">
|
<tr className="w-3 p-3">
|
||||||
<td className="px-3 py-2" colSpan={4}>
|
<td className="px-3 py-2" colSpan={7}>
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
No Record Found
|
No Record Found
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ export default function TableWrapper({
|
|||||||
<div className="text-sm text-center lg:text-left font-normal text-gray-500 dark:text-gray-400 block w-full">Showing <span className="font-semibold text-gray-900 dark:text-white">
|
<div className="text-sm text-center lg:text-left font-normal text-gray-500 dark:text-gray-400 block w-full">Showing <span className="font-semibold text-gray-900 dark:text-white">
|
||||||
{isLoading ? '----' : `${currentPage + 1}-${currentPage + numberOfSelection >= data.length ? data.length : (currentPage + numberOfSelection)}`}</span> of <span className="font-semibold text-gray-900 dark:text-white">{data.length}</span>
|
{isLoading ? '----' : `${currentPage + 1}-${currentPage + numberOfSelection >= data.length ? data.length : (currentPage + numberOfSelection)}`}</span> of <span className="font-semibold text-gray-900 dark:text-white">{data.length}</span>
|
||||||
</div>
|
</div>
|
||||||
{(newData.length >= itemsPerPage) &&
|
|
||||||
<div className='flex items-center gap-3 md:gap-6'>
|
<div className='flex items-center gap-3 md:gap-6'>
|
||||||
<MainBtn
|
<MainBtn
|
||||||
onClick={handlePrev}
|
onClick={handlePrev}
|
||||||
@@ -106,7 +105,8 @@ export default function TableWrapper({
|
|||||||
<Icons name='next' />
|
<Icons name='next' />
|
||||||
</MainBtn>
|
</MainBtn>
|
||||||
</div>
|
</div>
|
||||||
}
|
{/* {(newData.length >= itemsPerPage) &&
|
||||||
|
} */}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
const formatNumber = (number = 0) => {
|
||||||
|
// return new Intl.NumberFormat().format(number);
|
||||||
|
return number.toFixed(2);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default formatNumber
|
||||||
@@ -2,6 +2,7 @@ const queryKeys = {
|
|||||||
apply_loan: ['apply'],
|
apply_loan: ['apply'],
|
||||||
select_loan: ['select-loan'],
|
select_loan: ['select-loan'],
|
||||||
approved_loan: ['approved-loan'],
|
approved_loan: ['approved-loan'],
|
||||||
|
disbursements_loan: ['disbursements-loan'],
|
||||||
loan_offers: ['loan-offers'],
|
loan_offers: ['loan-offers'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,4 +72,10 @@ export const selectLoan = (reqData) => {
|
|||||||
export const approvedLoan = (reqData) => {
|
export const approvedLoan = (reqData) => {
|
||||||
const postData = { ...reqData }
|
const postData = { ...reqData }
|
||||||
return getAuxEnd(`/office/loan/approved`, postData)
|
return getAuxEnd(`/office/loan/approved`, postData)
|
||||||
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET DISBURSEMENTS LOANS TABLE
|
||||||
|
export const disbursementsLoan = (reqData) => {
|
||||||
|
const postData = { ...reqData }
|
||||||
|
return getAuxEnd(`/office/loan/disbursements`, postData)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user