fix parts
This commit is contained in:
@@ -44,7 +44,10 @@ export default function OffersCom() {
|
|||||||
<table className="py-2 w-full text-sm">
|
<table className="py-2 w-full text-sm">
|
||||||
<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-1 py-1">
|
||||||
|
ID
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-1 py-1">
|
||||||
Name
|
Name
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
@@ -53,9 +56,12 @@ export default function OffersCom() {
|
|||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Insurance Rate
|
Insurance Rate
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-1 text-right">
|
||||||
Mgt. Rate
|
Mgt. Rate
|
||||||
</th>
|
</th>
|
||||||
|
<th scope="col" className="px-1 text-right">
|
||||||
|
Vat. Rate
|
||||||
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Max/Min Amount
|
Max/Min Amount
|
||||||
</th>
|
</th>
|
||||||
@@ -70,9 +76,14 @@ export default function OffersCom() {
|
|||||||
<tbody>
|
<tbody>
|
||||||
{(data && data.length > 0) ? data?.map((item, index) => (
|
{(data && data.length > 0) ? data?.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">
|
||||||
|
<div className="text-right">
|
||||||
|
<div className="font-normal text-gray-500">{item?.id || ''}</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
<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?.product_id || ''}</div>
|
<div className="text-base font-semibold">{item?.product_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> */}
|
||||||
@@ -89,11 +100,16 @@ export default function OffersCom() {
|
|||||||
<div className="font-normal text-gray-500">{formatNumber(item?.insurance_rate)}</div>
|
<div className="font-normal text-gray-500">{formatNumber(item?.insurance_rate)}</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-2">
|
<td className="px-1">
|
||||||
<div className="text-right">
|
<div className="text-right">
|
||||||
<div className="font-normal text-gray-500">{formatNumber(item?.management_rate)}</div>
|
<div className="font-normal text-gray-500">{formatNumber(item?.management_rate)}</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td className="px-1">
|
||||||
|
<div className="text-right">
|
||||||
|
<div className="font-normal text-gray-500">{formatNumber(item?.vat_rate)}</div>
|
||||||
|
</div>
|
||||||
|
</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?.max_amount)}</div>
|
<div className="font-normal text-gray-500">{formatNumber(item?.max_amount)}</div>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import queryKeys from '../../services/queryKeys'
|
|||||||
import {getLoans} from '../../services/siteServices'
|
import {getLoans} from '../../services/siteServices'
|
||||||
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
import getDateFromDateString from '../../helpers/GetDateFromDateString';
|
||||||
import formatNumber from '../../helpers/formatNumber'
|
import formatNumber from '../../helpers/formatNumber'
|
||||||
|
import getTimeFromDateString from "../../helpers/GetTimeFromDateString";
|
||||||
|
|
||||||
export default function LoanDetails({transactionID}) {
|
export default function LoanDetails({transactionID}) {
|
||||||
|
|
||||||
@@ -53,86 +54,97 @@ export default function LoanDetails({transactionID}) {
|
|||||||
Added/Due
|
Added/Due
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Action
|
Status
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{loans?.map((item, index) => (
|
{loans?.map((item, index) => (
|
||||||
<tr key={index} className="py-2 border-t border-dashed border-slate-300">
|
<>
|
||||||
<td className="px-2 py-2">
|
<tr key={index} className="py-2 border-t border-dashed border-slate-300">
|
||||||
<div className='w-full min-w-48 flex items-center gap-2 whitespace-nowrap'>
|
<td className="px-2 py-2">
|
||||||
<img className="w-10 h-10 rounded-md" src={Avatar} alt="Jese image"/>
|
<div
|
||||||
<div className="text-left">
|
className='w-full min-w-48 flex items-center gap-2 whitespace-nowrap'>
|
||||||
<div
|
<img className="w-10 h-10 rounded-md" src={Avatar}
|
||||||
className="text-base font-semibold">{item?.account_id || ''}</div>
|
alt="Jese image"/>
|
||||||
<div
|
<div className="text-left">
|
||||||
className="font-normal text-gray-500">{item?.id} : {item?.transaction_id}</div>
|
<div
|
||||||
<div className="font-semibold text-red-500">ORIGIN
|
className="text-base font-semibold">{item?.account_id || ''}</div>
|
||||||
: {item?.original_transaction}</div>
|
<div
|
||||||
<div className="font-bold text-blue-500">OFFER
|
className="font-normal text-gray-500">{item?.id} : {item?.transaction_id}</div>
|
||||||
: {item?.offer_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>
|
<td className="px-2">
|
||||||
<td className="px-2">
|
<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
|
||||||
<div
|
className="font-normal text-gray-500">{formatNumber(item?.initial_loan_amount)}</div>
|
||||||
className="font-normal text-gray-500">{formatNumber(item?.initial_loan_amount)}</div>
|
<div
|
||||||
<div
|
className="font-semibold text-red-500">{formatNumber(item?.eligible_amount)}</div>
|
||||||
className="font-semibold text-red-500">{formatNumber(item?.eligible_amount)}</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-right">
|
|
||||||
<div
|
|
||||||
className="font-normal text-gray-500">{formatNumber(item?.product_id)}</div>
|
|
||||||
<div className="font-normal text-gray-500">{item?.tenor} days</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-right">
|
|
||||||
<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>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-right">
|
|
||||||
<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>
|
|
||||||
</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>
|
||||||
</div>
|
</td>
|
||||||
</td>
|
<td className="px-2">
|
||||||
</tr>
|
<div className="text-right">
|
||||||
|
<div
|
||||||
|
className="font-normal text-gray-500">{formatNumber(item?.product_id)}</div>
|
||||||
|
<div className="font-normal text-gray-500">{item?.tenor} days</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td className="px-2">
|
||||||
|
<div className="text-right">
|
||||||
|
<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>
|
||||||
|
</td>
|
||||||
|
<td className="px-2">
|
||||||
|
<div className="text-right">
|
||||||
|
<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>
|
||||||
|
</td>
|
||||||
|
<td className="px-2 text-right">
|
||||||
|
<div className="font-semibold text-red-500">{item?.status}</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colSpan="8">
|
||||||
|
<div>
|
||||||
|
<p className='pb-4 font-bold text-base'>Loans Disbursement
|
||||||
|
Details</p>
|
||||||
|
<div className="font-bold text-blue-500">Disburse Date
|
||||||
|
: {getDateFromDateString(item?.disburseDate)} {getTimeFromDateString(item?.disburseDate)} </div>
|
||||||
|
<div className="font-bold text-gray-500">Disburse Description
|
||||||
|
: {item?.disburseDescription}</div>
|
||||||
|
<div className="font-bold text-red-500">Disburse Result
|
||||||
|
: {item?.disburseResult}</div>
|
||||||
|
<div><br/></div>
|
||||||
|
<div className="font-bold text-blue-500">Disburse Verify
|
||||||
|
Date: {getDateFromDateString(item?.disburseVerify)} {getTimeFromDateString(item?.disburseVerify)} </div>
|
||||||
|
<div className="font-bold text-gray-500">Verify Description
|
||||||
|
: {item?.verifyDescription}</div>
|
||||||
|
<div className="font-bold text-red-500">Verify Result
|
||||||
|
: {item?.verifyResult}</div>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</>
|
||||||
|
|
||||||
|
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div>
|
|
||||||
<p className='pb-4 font-bold text-base'>Loans Disbursement Details</p>
|
|
||||||
<div className="font-bold text-blue-500">Disburse Date : {item?.disburseDate}</div>
|
|
||||||
<div className="font-bold text-gray-500">Disburse Description
|
|
||||||
: {item?.disburseDescription}</div>
|
|
||||||
<div className="font-bold text-red-500">Disburse Result : {item?.disburseResult}</div>
|
|
||||||
<div><br/></div>
|
|
||||||
<div className="font-bold text-blue-500">Disburse Verify DAte: {item?.disburseVerify}</div>
|
|
||||||
<div className="font-bold text-gray-500">Verify Description
|
|
||||||
: {item?.verifyDescription}</div>
|
|
||||||
<div className="font-bold text-red-500">Verify Result : {item?.verifyResult}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
null
|
null
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ export default function TransactionDetails({transactionID}) {
|
|||||||
Account
|
Account
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2">
|
<th scope="col" className="px-2">
|
||||||
Activity
|
Customer
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2 text-right">
|
<th scope="col" className="px-2 text-right">
|
||||||
Action
|
Channel
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -70,18 +70,11 @@ export default function TransactionDetails({transactionID}) {
|
|||||||
</td>
|
</td>
|
||||||
<td className="px-2">
|
<td className="px-2">
|
||||||
<div className="text-left">
|
<div className="text-left">
|
||||||
<div className="font-normal text-gray-500">50%</div>
|
<div className="text-base font-semibold">{item?.customer_id}</div>
|
||||||
<div className="relative h-[6px] w-full bg-white-body dark:bg-black-body rounded-full overflow-hidden">
|
|
||||||
<div className={`absolute left-0 h-full w-1/2 bg-emerald-600`}></div>
|
|
||||||
</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="text-base font-semibold">{item?.channel}</div>
|
||||||
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
function getDateFromDateString(dateString) {
|
function getDateFromDateString(dateString) {
|
||||||
const date = new Date(dateString);
|
const date = new Date(dateString);
|
||||||
|
|
||||||
|
if (dateString == null || dateString.trim() === '' ) return '';
|
||||||
|
|
||||||
// Ensure the date is valid
|
// Ensure the date is valid
|
||||||
if (isNaN(date)) {
|
if (isNaN(date)) {
|
||||||
return "Invalid date string";
|
return "Invalid date string";
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
function getTimeFromDateString(dateString) {
|
function getTimeFromDateString(dateString) {
|
||||||
const date = new Date(dateString);
|
const date = new Date(dateString);
|
||||||
|
|
||||||
|
if (dateString == null || dateString.trim() === '' ) return '';
|
||||||
|
|
||||||
// Ensure the date is valid
|
// Ensure the date is valid
|
||||||
if (isNaN(date)) {
|
if (isNaN(date)) {
|
||||||
return "Invalid date string";
|
return "Invalid date string";
|
||||||
|
|||||||
Reference in New Issue
Block a user