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 => { getVerifiedLoanDetailsByUID(selectedUser?.uid).then(res => {
setLoanDetails({loading:false, data:res?.data}) setLoanDetails({loading:false, data:res?.data})
console.log('DATA', res?.data?.application)
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
setLoanDetails({loading:false, data:null}) setLoanDetails({loading:false, data:null})
@@ -103,15 +104,41 @@ export default function ApproveRejectPage() {
<div className='w-100'> <div className='w-100'>
{loanDetails?.data?.application.length > 0 ? {loanDetails?.data?.application.length > 0 ?
<table className='w-100'> <table className='w-100'>
<tr>
<th>UID</th>
<th>AMOUNT</th>
</tr>
{loanDetails?.data?.application?.map((item:any) => ( {loanDetails?.data?.application?.map((item:any) => (
<tr key={item.uid || item.id}> <tbody key={item.uid || item.id}>
<td>{item.uid}</td> <tr>
<td>{item.loan_amount}</td> <th className='text-uppercase py-3'>uid</th>
</tr> <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> </table>
: :