Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 633e88f44b | |||
| b58153d059 | |||
| 482612a8a6 | |||
| c8e15a1cc3 |
@@ -1,24 +1,31 @@
|
||||
import React from 'react'
|
||||
import {Link} from 'react-router-dom'
|
||||
import Img from '../../../assets/user_avatar.jpg'
|
||||
import formatNumber from '../../../helpers/formatNumber'
|
||||
import CustomCounter from '../../CustomCounter'
|
||||
import RouteLinks from '../../../RouteLinks'
|
||||
|
||||
export default function Orders({data}) {
|
||||
return (
|
||||
<div className='h-full p-2 sm:p-4 large:p-8 flex flex-col gap-16 overflow-y-auto aside-scroll-design'>
|
||||
<div className='h-full flex flex-col gap-16 overflow-y-auto aside-scroll-design'>
|
||||
<div className='flex flex-col gap-4'>
|
||||
<p className='text-base text-white-body font-bold'>Recent Loans</p>
|
||||
<div className='flex flex-col gap-4'>
|
||||
{data.map((item, index)=>{
|
||||
return (
|
||||
<div key={index} className='flex gap-3 items-center'>
|
||||
<Link
|
||||
to={RouteLinks.transaction_details_page}
|
||||
state={{transactionID: item?.transaction_id}}
|
||||
key={index} className='flex gap-3 items-center'
|
||||
>
|
||||
<div className='px-4 py-2 bg-[#0E172E] rounded-md'>
|
||||
<img src={Img} className='w-8' alt="Order Image" />
|
||||
</div>
|
||||
<div className='flex-col'>
|
||||
<p className='text-base font-bold text-white-body'>Project Briefing</p>
|
||||
<p className='text-sm text-slate-500'>Project Manager</p>
|
||||
<p className='text-sm font-bold text-white-body'>{item?.customer_id}</p>
|
||||
<p className='text-sm text-slate-500'>{formatNumber(item?.current_loan_amount)}</p>
|
||||
</div>
|
||||
</div>
|
||||
</Link>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@ export default function RightAsideBar() {
|
||||
queryFn: () => getRecentLoans()
|
||||
})
|
||||
|
||||
console.log('data', data?.data)
|
||||
const loanList = data?.data?.loans
|
||||
|
||||
return (
|
||||
<div className='w-full h-full flex flex-col gap-8'>
|
||||
@@ -46,7 +46,7 @@ export default function RightAsideBar() {
|
||||
</div>
|
||||
:
|
||||
<div className='w-full'>
|
||||
{active === 'orders' && <Orders data={[1,2,3,4,5]} />}
|
||||
{active === 'orders' && <Orders data={loanList} />}
|
||||
{/*{active == 'tickets' && <Tickets />}*/}
|
||||
{/*{active == 'tasks' && <Tasks />}*/}
|
||||
</div>
|
||||
|
||||
@@ -93,14 +93,11 @@ export default function RepaymentsCom() {
|
||||
<th scope="col" className="px-2 py-2">
|
||||
CustomerID / ID:TrxID
|
||||
</th>
|
||||
{/* <th scope="col" className="px-2">
|
||||
Loan
|
||||
</th> */}
|
||||
<th scope="col" className="px-2">
|
||||
Added
|
||||
<th scope="col" className="px-8 ">
|
||||
Descriptions
|
||||
</th>
|
||||
<th scope="col" className="px-2 text-right">
|
||||
Action
|
||||
Date/Result Codes
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -118,6 +115,12 @@ export default function RepaymentsCom() {
|
||||
<div
|
||||
className="font-normal text-blue-500">{item?.loan_id} :<b> {item?.transaction_id}</b>
|
||||
</div>
|
||||
<div
|
||||
className="font-normal text-red-500">{item?.initiated_by}
|
||||
</div>
|
||||
<div
|
||||
className="font-normal text-green-500"><b> {item?.product_id}</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@@ -127,18 +130,26 @@ export default function RepaymentsCom() {
|
||||
<div className="font-normal text-gray-500">{item?.description}</div>
|
||||
</div>
|
||||
</td> */}
|
||||
<td className="px-2">
|
||||
<td className="px-8">
|
||||
<div className="text-left">
|
||||
<div
|
||||
className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)}</div>
|
||||
|
||||
<div className="font-normal text-gray-500">Repay Date : {getDateFromDateString(item?.repay_date)}</div>
|
||||
|
||||
<div className="font-normal">Repay Desc : {item?.repay_description || ''}</div>
|
||||
|
||||
<div className="font-normal text-gray-500">Verify Repay Date : {getDateFromDateString(item?.verify_date)}</div>
|
||||
|
||||
<div className="font-normal">Verify Repay Desc : {item?.verify_description || ''}</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 className="text-left">
|
||||
<div className="font-normal text-gray-500">{getDateFromDateString(item?.created_at)}</div>
|
||||
<div className="font-normal text-red-500">Repay Result :{item?.repay_result || ''}</div>
|
||||
<div className="font-normal text-blue-500">Verify Repay Result :{item?.verify_result || ''}</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user