Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1423057bdf | |||
| 9e4c8271d1 | |||
| 6f8615ebc5 | |||
| dc4b8b67c0 | |||
| 6f9393606f | |||
| 7bc0e90fe7 | |||
| db3afdda2f | |||
| 3c0f8938fc | |||
| ee1e6586c3 | |||
| 26401f8664 | |||
| eb9ec59eb2 |
@@ -5,6 +5,7 @@ const RouteLinks = {
|
|||||||
transactionsPage: '/transactions',
|
transactionsPage: '/transactions',
|
||||||
repaymentsPage: '/repayments',
|
repaymentsPage: '/repayments',
|
||||||
loanChargesPage: '/loan-charges',
|
loanChargesPage: '/loan-charges',
|
||||||
|
offers: '/offers',
|
||||||
transaction_details_page: '/transaction/details',
|
transaction_details_page: '/transaction/details',
|
||||||
errorPage: '*',
|
errorPage: '*',
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -11,8 +11,9 @@ import LoansPage from './pages/LoansPage' // SELECTED LOANS PAGE
|
|||||||
import TransactionsPage from './pages/TransactionsPage' // TRANSACTIONS PAGE
|
import TransactionsPage from './pages/TransactionsPage' // TRANSACTIONS PAGE
|
||||||
import RepaymentsPage from './pages/RepaymentsPage' // REPAYMENTS PAGE
|
import RepaymentsPage from './pages/RepaymentsPage' // REPAYMENTS PAGE
|
||||||
import LoanChargesPage from './pages/LoanChargesPage' // LOAN CHARGES PAGE
|
import LoanChargesPage from './pages/LoanChargesPage' // LOAN CHARGES PAGE
|
||||||
import TransactionDetailsPage from './pages/TransactionDetailsPage'
|
import TransactionDetailsPage from './pages/TransactionDetailsPage' // TRANSACTION DETAILS PAGE
|
||||||
import ErrorPage from './pages/ErrorPage'
|
import OffersPage from './pages/OffersPage' // LOAN OFFERS PAGE
|
||||||
|
import ErrorPage from './pages/ErrorPage' // ERROR PAGE
|
||||||
|
|
||||||
|
|
||||||
// const Home = lazy(() => import('./pages/Home'));
|
// const Home = lazy(() => import('./pages/Home'));
|
||||||
@@ -29,6 +30,7 @@ export default function SiteRoutes() {
|
|||||||
<Route path={RouteLinks.repaymentsPage} element={<RepaymentsPage />} /> {`*/REPAYMENTS PAGE*/`}
|
<Route path={RouteLinks.repaymentsPage} element={<RepaymentsPage />} /> {`*/REPAYMENTS PAGE*/`}
|
||||||
<Route path={RouteLinks.loanChargesPage} element={<LoanChargesPage />} /> {`*/LOAN CHARGES PAGE*/`}
|
<Route path={RouteLinks.loanChargesPage} element={<LoanChargesPage />} /> {`*/LOAN CHARGES PAGE*/`}
|
||||||
<Route path={RouteLinks.transaction_details_page} element={<TransactionDetailsPage />} /> {`*/TRANSACTION PAGE*/`}
|
<Route path={RouteLinks.transaction_details_page} element={<TransactionDetailsPage />} /> {`*/TRANSACTION PAGE*/`}
|
||||||
|
<Route path={RouteLinks.offers} element={<OffersPage />} /> {`*/LOAN OFFERS PAGE*/`}
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
{/* ERROR PAGE */}
|
{/* ERROR PAGE */}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import formatNumber from '../../helpers/formatNumber'
|
|||||||
import queryKeys from '../../services/queryKeys'
|
import queryKeys from '../../services/queryKeys'
|
||||||
import { getDashData } from '../../services/siteServices'
|
import { getDashData } from '../../services/siteServices'
|
||||||
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
||||||
|
import getTimeFromDateString from '../../helpers/GetTimeFromDateString';
|
||||||
import localImgLoader from '../../helpers/localImageLoader';
|
import localImgLoader from '../../helpers/localImageLoader';
|
||||||
import RouteLinks from '../../RouteLinks';
|
import RouteLinks from '../../RouteLinks';
|
||||||
|
|
||||||
@@ -111,7 +112,7 @@ export default function HomeCom() {
|
|||||||
<img className="w-10 h-10 rounded-md" src={localImgLoader(`loan_icons/${item?.type}.png`)} alt="Icon" />
|
<img className="w-10 h-10 rounded-md" src={localImgLoader(`loan_icons/${item?.type}.png`)} alt="Icon" />
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<div className="text-base font-semibold">{item?.transaction_id}</div>
|
<div className="text-base font-semibold">{item?.transaction_id}</div>
|
||||||
<div className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)}</div>
|
<div className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)} {getTimeFromDateString(item?.created_at)}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ const asideNavLinks = [
|
|||||||
{name: 'Repayments', status:1, icon: 'dot', to: RouteLinks.repaymentsPage},
|
{name: 'Repayments', status:1, icon: 'dot', to: RouteLinks.repaymentsPage},
|
||||||
{name: 'Loan Charges', status:1, icon: 'dot', to: RouteLinks.loanChargesPage},
|
{name: 'Loan Charges', status:1, icon: 'dot', to: RouteLinks.loanChargesPage},
|
||||||
{name: 'Configurations', status:1, icon: 'arrow-right', subLinks: [
|
{name: 'Configurations', status:1, icon: 'arrow-right', subLinks: [
|
||||||
{name: 'Loan Offers', status:1, icon: 'dot', to: RouteLinks.loanOffersPage },
|
{name: 'Loan Offers', status:1, icon: 'dot', to: RouteLinks.offers },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -82,14 +82,14 @@ export default function LoansCom() {
|
|||||||
</td>
|
</td>
|
||||||
<td className="px-2">
|
<td className="px-2">
|
||||||
<div className="text-right">
|
<div className="text-right">
|
||||||
<div className="font-normal text-gray-500">{formatNumber(0)}</div>
|
<div className="font-normal text-gray-500">{formatNumber(item?.product_id)}</div>
|
||||||
<div className="font-normal text-gray-500">{formatNumber(0)}</div>
|
<div className="font-normal text-gray-500">{item?.tenor} days</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-2">
|
<td className="px-2">
|
||||||
<div className="text-right">
|
<div className="text-right">
|
||||||
<div className="font-normal text-gray-500">{formatNumber(item?.installment_amount)}</div>
|
|
||||||
<div className="font-normal text-gray-500">{formatNumber(item?.repayment_amount)}</div>
|
<div className="font-normal text-gray-500">{formatNumber(item?.repayment_amount)}</div>
|
||||||
|
<div className="font-normal text-gray-500">{formatNumber(item?.installment_amount)}</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-2">
|
<td className="px-2">
|
||||||
|
|||||||
@@ -0,0 +1,135 @@
|
|||||||
|
import React, { useState } from 'react'
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
|
import BreadcrumbCom from '../breadcrumb/BreadcrumbCom'
|
||||||
|
import TablePaginatedWrapper from '../tableWrapper/TablePaginatedWrapper'
|
||||||
|
import Icons from '../Icons'
|
||||||
|
|
||||||
|
import Avatar from '../../assets/user_avatar.jpg'
|
||||||
|
import queryKeys from '../../services/queryKeys'
|
||||||
|
import { getOffers } from '../../services/siteServices'
|
||||||
|
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
||||||
|
import formatNumber from '../../helpers/formatNumber';
|
||||||
|
|
||||||
|
export default function OffersCom() {
|
||||||
|
|
||||||
|
const [page, setPage] = useState(1)
|
||||||
|
|
||||||
|
const {data, isFetching, isError, error} = useQuery({
|
||||||
|
queryKey: [...queryKeys.offers, page],
|
||||||
|
queryFn: () => getOffers({page}),
|
||||||
|
staleTime: 0,
|
||||||
|
// placeholderData: keepPreviousData,
|
||||||
|
})
|
||||||
|
|
||||||
|
const offers = data?.data?.offers // LOAN CHARGES LIST
|
||||||
|
const pagination = data?.data?.pagination
|
||||||
|
console.log('offers', offers)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='w-full flex flex-col gap-8'>
|
||||||
|
<BreadcrumbCom title='Offers' paths={['Dashboard', 'Offers']} />
|
||||||
|
|
||||||
|
<div className='box bg-white dark:bg-black-box text-black-body dark:text-white-body'>
|
||||||
|
{isFetching ?
|
||||||
|
<>
|
||||||
|
<p className='text-slate-800'>Loading...</p>
|
||||||
|
</>
|
||||||
|
: isError ?
|
||||||
|
<p className='text-red-500'>{error.message}</p>
|
||||||
|
:
|
||||||
|
<TablePaginatedWrapper data={offers} isFetching={isFetching} setPage={setPage} itemsPerPage={pagination?.limit} pagination={pagination}>
|
||||||
|
{({ data }) => (
|
||||||
|
<>
|
||||||
|
<table className="py-2 w-full text-sm">
|
||||||
|
<thead className="py-2 text-sm text-slate-500 text-left">
|
||||||
|
<tr>
|
||||||
|
<th scope="col" className="px-2 py-2">
|
||||||
|
Name
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-2 text-right">
|
||||||
|
Interest Rate
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-2 text-right">
|
||||||
|
Insurance Rate
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-2 text-right">
|
||||||
|
Mgt. Rate
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-2 text-right">
|
||||||
|
Max/Min Amount
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-2 text-right">
|
||||||
|
Tenor
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-2 text-right">
|
||||||
|
Action
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{(data && data.length > 0) ? data?.map((item, index) => (
|
||||||
|
<tr key={index} className="py-2 border-t border-dashed border-slate-300">
|
||||||
|
<td className="px-2 py-2">
|
||||||
|
<div className='w-full min-w-48 flex items-center gap-2 whitespace-nowrap'>
|
||||||
|
<img className="w-10 h-10 rounded-md" src={Avatar} alt="Jese image" />
|
||||||
|
<div className="text-left">
|
||||||
|
<div className="text-base font-semibold">{item?.product_id || ''}</div>
|
||||||
|
{/* <div className="font-normal text-gray-500 line-clamp-1">{item?.description}</div> */}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td className="px-2">
|
||||||
|
<div className="text-right">
|
||||||
|
<div className="font-normal text-gray-500">{formatNumber(item?.interest_rate)}</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td className="px-2">
|
||||||
|
<div className="text-right">
|
||||||
|
<div className="font-normal text-gray-500">{formatNumber(item?.insurance_rate)}</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td className="px-2">
|
||||||
|
<div className="text-right">
|
||||||
|
<div className="font-normal text-gray-500">{formatNumber(item?.management_rate)}</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td className="px-2">
|
||||||
|
<div className="text-right">
|
||||||
|
<div className="font-normal text-gray-500">{formatNumber(item?.maximum_amount)}</div>
|
||||||
|
<div className="font-normal text-gray-500">{formatNumber(item?.minimum_amount)}</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td className="px-2">
|
||||||
|
<div className="text-right">
|
||||||
|
<div className="font-normal text-gray-500">{getDateFromDateString(item?.tenor)}</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td className="px-2 text-right">
|
||||||
|
<div className='flex items-center justify-end gap-3 md:gap-4'>
|
||||||
|
<div className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
|
||||||
|
<Icons name='eye' />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
))
|
||||||
|
:
|
||||||
|
<tr className="py-2 border-t border-dashed border-slate-300">
|
||||||
|
<td className="px-3 py-2" colSpan={7}>
|
||||||
|
<div className="flex justify-center items-center">
|
||||||
|
No Record Found
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</TablePaginatedWrapper>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -48,9 +48,9 @@ export default function LoanChargeDetails({transactionID}) {
|
|||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Added
|
Added
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
{/* <th scope="col" className="px-2 text-right">
|
||||||
Action
|
Action
|
||||||
</th>
|
</th> */}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@@ -61,7 +61,8 @@ export default function LoanChargeDetails({transactionID}) {
|
|||||||
<img className="w-10 h-10 rounded-md" src={Avatar} alt="Jese image" />
|
<img className="w-10 h-10 rounded-md" src={Avatar} alt="Jese image" />
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<div className="text-base font-semibold">{item?.transaction_id || ''}</div>
|
<div className="text-base font-semibold">{item?.transaction_id || ''}</div>
|
||||||
<div className="font-normal text-gray-500 line-clamp-1">{item?.description}</div>
|
{/* <div className="font-normal text-gray-500 line-clamp-1">{item?.description}</div> */}
|
||||||
|
<div className="font-normal text-gray-500">{item?.loan_id} : {item?.code}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -73,21 +74,21 @@ export default function LoanChargeDetails({transactionID}) {
|
|||||||
</td>
|
</td>
|
||||||
<td className="px-2">
|
<td className="px-2">
|
||||||
<div className="text-right">
|
<div className="text-right">
|
||||||
<div className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)}</div>
|
<div className="font-normal text-gray-500">{item?.created_at ? getDateFromDateString(item?.created_at) : 'Not available'}</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-2 text-right">
|
{/* <td className="px-2 text-right">
|
||||||
<div className='flex items-center justify-end gap-3 md:gap-4'>
|
<div className='flex items-center justify-end gap-3 md:gap-4'>
|
||||||
<div className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
|
<div className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
|
||||||
<Icons name='eye' />
|
<Icons name='eye' />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td> */}
|
||||||
</tr>
|
</tr>
|
||||||
))
|
))
|
||||||
:
|
:
|
||||||
<tr className="py-2 border-t border-dashed border-slate-300">
|
<tr className="py-2 border-t border-dashed border-slate-300">
|
||||||
<td className="px-3 py-2" colSpan={4}>
|
<td className="px-3 py-2" colSpan={3}>
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
No Record Found
|
No Record Found
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -41,16 +41,16 @@ export default function LoanDetails({transactionID}) {
|
|||||||
Name
|
Name
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Loan Amount
|
Loan/Eligible Amount
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Product/Tenor
|
Product/Tenor
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Repay/Install Amount
|
Repay/Install Amount.
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Added
|
Added/Due
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Action
|
Action
|
||||||
@@ -66,6 +66,8 @@ export default function LoanDetails({transactionID}) {
|
|||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<div className="text-base font-semibold">{item?.account_id || ''}</div>
|
<div className="text-base font-semibold">{item?.account_id || ''}</div>
|
||||||
<div className="font-normal text-gray-500">{item?.id} : {item?.transaction_id}</div>
|
<div className="font-normal text-gray-500">{item?.id} : {item?.transaction_id}</div>
|
||||||
|
<div className="font-semibold text-red-500">ORIGIN : {item?.original_transaction}</div>
|
||||||
|
<div className="font-bold text-blue-500">OFFER : {item?.offer_id}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -73,23 +75,26 @@ export default function LoanDetails({transactionID}) {
|
|||||||
<div className="text-right">
|
<div className="text-right">
|
||||||
{/* <div className="text-base font-semibold">{formatNumber(item?.initial_loan_amount)}</div> */}
|
{/* <div className="text-base font-semibold">{formatNumber(item?.initial_loan_amount)}</div> */}
|
||||||
<div className="font-normal text-gray-500">{formatNumber(item?.initial_loan_amount)}</div>
|
<div className="font-normal text-gray-500">{formatNumber(item?.initial_loan_amount)}</div>
|
||||||
|
<div className="font-semibold text-red-500">{formatNumber(item?.eligible_amount)}</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-2">
|
<td className="px-2">
|
||||||
<div className="text-right">
|
<div className="text-right">
|
||||||
<div className="font-normal text-gray-500">{formatNumber(0)}</div>
|
<div className="font-normal text-gray-500">{formatNumber(item?.product_id)}</div>
|
||||||
<div className="font-normal text-gray-500">{formatNumber(0)}</div>
|
<div className="font-normal text-gray-500">{item?.tenor} days</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-2">
|
<td className="px-2">
|
||||||
<div className="text-right">
|
<div className="text-right">
|
||||||
<div className="font-normal text-gray-500">{formatNumber(item?.installment_amount)}</div>
|
|
||||||
<div className="font-normal text-gray-500">{formatNumber(item?.repayment_amount)}</div>
|
<div className="font-normal text-gray-500">{formatNumber(item?.repayment_amount)}</div>
|
||||||
|
<div className="font-normal text-gray-500">{formatNumber(item?.installment_amount)}</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-2">
|
<td className="px-2">
|
||||||
<div className="text-right">
|
<div className="text-right">
|
||||||
<div className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)}</div>
|
<div className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)}</div>
|
||||||
|
<div className="font-semibold text-red-500">{getDateFromDateString(item?.due_date)}</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-2 text-right">
|
<td className="px-2 text-right">
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useState } from 'react'
|
import React, { useEffect, useState } from 'react'
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
import Icons from '../Icons'
|
import Icons from '../Icons'
|
||||||
@@ -20,9 +20,13 @@ export default function RepaymentScheduleDetails({transactionID}) {
|
|||||||
// placeholderData: keepPreviousData,
|
// placeholderData: keepPreviousData,
|
||||||
})
|
})
|
||||||
|
|
||||||
const loanCharges = data?.data?.repayment_schedules // LOAN CHARGES LIST
|
const repaymentSchedule = data?.data?.repayment_schedules // LOAN CHARGES LIST
|
||||||
// const pagination = data?.data?.pagination
|
// const pagination = data?.data?.pagination
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
|
||||||
|
},[])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='box bg-white dark:bg-black-box text-black-body dark:text-white-body'>
|
<div className='box bg-white dark:bg-black-box text-black-body dark:text-white-body'>
|
||||||
<p className='pb-4 font-bold text-base'>Repayment Schedule</p>
|
<p className='pb-4 font-bold text-base'>Repayment Schedule</p>
|
||||||
@@ -37,7 +41,7 @@ export default function RepaymentScheduleDetails({transactionID}) {
|
|||||||
<thead className="py-2 text-sm text-slate-500 text-left">
|
<thead className="py-2 text-sm text-slate-500 text-left">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" className="px-2 py-2">
|
<th scope="col" className="px-2 py-2">
|
||||||
Name
|
ID
|
||||||
</th>
|
</th>
|
||||||
{/* <th scope="col" className="px-2">
|
{/* <th scope="col" className="px-2">
|
||||||
Loan
|
Loan
|
||||||
@@ -51,21 +55,23 @@ export default function RepaymentScheduleDetails({transactionID}) {
|
|||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Due Date
|
Due Date
|
||||||
</th>
|
</th>
|
||||||
|
<th scope="col" className="px-2 text-right">
|
||||||
|
Paid Date
|
||||||
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Action
|
Action
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{(loanCharges && loanCharges.length > 0) ? loanCharges?.map((item, index) => (
|
{(repaymentSchedule && repaymentSchedule.length > 0) ? repaymentSchedule?.map((item, index) => (
|
||||||
<tr key={index} className="py-2 border-t border-dashed border-slate-300">
|
<tr key={index} className="py-2 border-t border-dashed border-slate-300">
|
||||||
<td className="px-2 py-2">
|
<td className="px-2 py-2">
|
||||||
<div className='w-full min-w-48 flex items-center gap-2 whitespace-nowrap'>
|
<div className='w-full min-w-48 flex items-center gap-2 whitespace-nowrap'>
|
||||||
<img className="w-10 h-10 rounded-md" src={Avatar} alt="Jese image" />
|
<img className="w-10 h-10 rounded-md" src={Avatar} alt="Jese image" />
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
{/* <div className="text-base font-semibold">{item?.transaction_id || ''}</div>
|
<div className="text-base font-semibold">{item?.loan_id || ''}</div>
|
||||||
<div className="font-normal text-gray-500 line-clamp-1">{item?.description}</div> */}
|
{/* <div className="font-normal text-gray-500 line-clamp-1">{item?.description}</div> */}
|
||||||
<div className="font-normal text-gray-500 line-clamp-1">have no idea how to get this yet</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@@ -84,6 +90,11 @@ export default function RepaymentScheduleDetails({transactionID}) {
|
|||||||
<div className="font-normal text-gray-500">{getDateFromDateString(item?.due_date)}</div>
|
<div className="font-normal text-gray-500">{getDateFromDateString(item?.due_date)}</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td className="px-2">
|
||||||
|
<div className="text-right">
|
||||||
|
<div className="font-normal text-gray-500">{item?.paid_at ? getDateFromDateString(item?.paid_at) : 'Not available'}</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
<td className="px-2 text-right">
|
<td className="px-2 text-right">
|
||||||
<div className='flex items-center justify-end gap-3 md:gap-4'>
|
<div className='flex items-center justify-end gap-3 md:gap-4'>
|
||||||
<div className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
|
<div className='p-2 flex justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
|
||||||
@@ -95,7 +106,7 @@ export default function RepaymentScheduleDetails({transactionID}) {
|
|||||||
))
|
))
|
||||||
:
|
:
|
||||||
<tr className="py-2 border-t border-dashed border-slate-300">
|
<tr className="py-2 border-t border-dashed border-slate-300">
|
||||||
<td className="px-3 py-2" colSpan={5}>
|
<td className="px-3 py-2" colSpan={6}>
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
No Record Found
|
No Record Found
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import Icons from '../Icons'
|
|||||||
import queryKeys from '../../services/queryKeys'
|
import queryKeys from '../../services/queryKeys'
|
||||||
import { getTransactions } from '../../services/siteServices'
|
import { getTransactions } from '../../services/siteServices'
|
||||||
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
||||||
|
import getTimeFromDateString from '../../helpers/GetTimeFromDateString';
|
||||||
import localImgLoader from '../../helpers/localImageLoader';
|
import localImgLoader from '../../helpers/localImageLoader';
|
||||||
|
|
||||||
export default function TransactionDetails({transactionID}) {
|
export default function TransactionDetails({transactionID}) {
|
||||||
@@ -57,7 +58,7 @@ export default function TransactionDetails({transactionID}) {
|
|||||||
<img className="w-10 h-10 rounded-md" src={localImgLoader(`loan_icons/${item?.type}.png`)} alt="Icon" />
|
<img className="w-10 h-10 rounded-md" src={localImgLoader(`loan_icons/${item?.type}.png`)} alt="Icon" />
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<div className="text-base font-semibold">{item?.transaction_id}</div>
|
<div className="text-base font-semibold">{item?.transaction_id}</div>
|
||||||
<div className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)}</div>
|
<div className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)} {getTimeFromDateString(item?.created_at)}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import Avatar from '../../assets/user_avatar.jpg'
|
|||||||
import queryKeys from '../../services/queryKeys'
|
import queryKeys from '../../services/queryKeys'
|
||||||
import { getTransactions } from '../../services/siteServices'
|
import { getTransactions } from '../../services/siteServices'
|
||||||
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
||||||
|
import getTimeFromDateString from '../../helpers/GetTimeFromDateString';
|
||||||
import localImgLoader from '../../helpers/localImageLoader';
|
import localImgLoader from '../../helpers/localImageLoader';
|
||||||
import RouteLinks from '../../RouteLinks';
|
import RouteLinks from '../../RouteLinks';
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@ export default function TransactionsCom() {
|
|||||||
<img className="w-10 h-10 rounded-md" src={localImgLoader(`loan_icons/${item?.type}.png`)} alt="Icon" />
|
<img className="w-10 h-10 rounded-md" src={localImgLoader(`loan_icons/${item?.type}.png`)} alt="Icon" />
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<div className="text-base font-semibold">{item?.transaction_id}</div>
|
<div className="text-base font-semibold">{item?.transaction_id}</div>
|
||||||
<div className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)}</div>
|
<div className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)} {getTimeFromDateString(item?.created_at)}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import OffersCom from '../components/offers/OffersCom'
|
||||||
|
|
||||||
|
export default function OffersPage() {
|
||||||
|
return (
|
||||||
|
<OffersCom />
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ const queryKeys = {
|
|||||||
transactions: ['transactions'],
|
transactions: ['transactions'],
|
||||||
repayment_schedule: ['repayment-schedule'],
|
repayment_schedule: ['repayment-schedule'],
|
||||||
loan_charges: ['loan-charges'],
|
loan_charges: ['loan-charges'],
|
||||||
|
offers: ['offers'],
|
||||||
apply_loan: ['apply'],
|
apply_loan: ['apply'],
|
||||||
select_loan: ['select-loan'],
|
select_loan: ['select-loan'],
|
||||||
approved_loan: ['approved-loan'],
|
approved_loan: ['approved-loan'],
|
||||||
|
|||||||
@@ -80,6 +80,12 @@ export const getLoanCharges = (reqData) => {
|
|||||||
return getAuxEnd(`/loan-charges`, postData)
|
return getAuxEnd(`/loan-charges`, postData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUNCTION TO GET OFFERS LIST TABLE
|
||||||
|
export const getOffers = (reqData) => {
|
||||||
|
const postData = { ...reqData }
|
||||||
|
return getAuxEnd(`/offers`, postData)
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION TO GET REPAYMENT SCHEDULE TABLE
|
// FUNCTION TO GET REPAYMENT SCHEDULE TABLE
|
||||||
export const getRepaymentSchedule = (reqData) => {
|
export const getRepaymentSchedule = (reqData) => {
|
||||||
const postData = { ...reqData }
|
const postData = { ...reqData }
|
||||||
|
|||||||
Reference in New Issue
Block a user