updated loan details page

This commit is contained in:
victorAnumudu
2024-07-15 17:38:11 +01:00
parent 5fe90c3ead
commit ca7db4b0aa
@@ -26,6 +26,7 @@ export default function ApproveRejectPage() {
}
getVerifiedLoanDetailsByUID(selectedUser?.uid).then(res => {
setLoanDetails({loading:false, data:res?.data})
console.log('DATA', res?.data?.application)
}).catch(err => {
console.log(err)
setLoanDetails({loading:false, data:null})
@@ -103,15 +104,41 @@ export default function ApproveRejectPage() {
<div className='w-100'>
{loanDetails?.data?.application.length > 0 ?
<table className='w-100'>
<tr>
<th>UID</th>
<th>AMOUNT</th>
</tr>
{loanDetails?.data?.application?.map((item:any) => (
<tr key={item.uid || item.id}>
<td>{item.uid}</td>
<td>{item.loan_amount}</td>
</tr>
<tbody key={item.uid || item.id}>
<tr>
<th className='text-uppercase py-3'>uid</th>
<td>{item.uid}</td>
</tr>
<tr>
<th className='text-uppercase py-3'>Amount</th>
<td>{item.loan_amount}</td>
</tr>
<tr>
<th className='text-uppercase py-3'>Payment Month</th>
<td>{item.loan_amount}</td>
</tr>
<tr>
<th className='text-uppercase py-3'>Sales Agent</th>
<td>{item.sales_agent}</td>
</tr>
<tr>
<th className='text-uppercase py-3'>Gender</th>
<td>{item.gender || 'Others'}</td>
</tr>
<tr>
<th className='text-uppercase py-3'>Marital Status</th>
<td>{item.marital_status}</td>
</tr>
<tr>
<th className='text-uppercase py-3'>Email</th>
<td>{item.email}</td>
</tr>
<tr>
<th className='text-uppercase py-3'>Address</th>
<td>{item.address}</td>
</tr>
</tbody>
))}
</table>
: