Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f98299d39b |
@@ -5,10 +5,13 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@reduxjs/toolkit": "^2.5.1",
|
"@reduxjs/toolkit": "^2.5.1",
|
||||||
"@tanstack/react-query": "^5.66.0",
|
"@tanstack/react-query": "^5.66.0",
|
||||||
|
"apexcharts": "^4.5.0",
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.7.9",
|
||||||
"cra-template": "1.2.0",
|
"cra-template": "1.2.0",
|
||||||
"formik": "^2.4.6",
|
"formik": "^2.4.6",
|
||||||
"react": "^19.0.0",
|
"react": "^19.0.0",
|
||||||
|
"react-apexcharts": "^1.7.0",
|
||||||
|
"react-countup": "^6.5.3",
|
||||||
"react-dom": "^19.0.0",
|
"react-dom": "^19.0.0",
|
||||||
"react-icons": "^5.4.0",
|
"react-icons": "^5.4.0",
|
||||||
"react-redux": "^9.2.0",
|
"react-redux": "^9.2.0",
|
||||||
|
|||||||
@@ -1,29 +1,39 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
// import React, { useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
// const CustomCounter = ({ targetNumber, timeInSeconds }) => {
|
||||||
|
// const [count, setCount] = useState(0);
|
||||||
|
|
||||||
|
// useEffect(() => {
|
||||||
|
// if (targetNumber <= 0 || timeInSeconds <= 0) return; // Handle edge cases
|
||||||
|
|
||||||
|
// const interval = Math.floor(timeInSeconds * 1000 / targetNumber); // Time interval for each count in milliseconds
|
||||||
|
// const totalTime = timeInSeconds * 1000; // Total time for the entire count in milliseconds
|
||||||
|
|
||||||
|
// let currentCount = 0;
|
||||||
|
// const intervalId = setInterval(() => {
|
||||||
|
// currentCount++;
|
||||||
|
// setCount((prevCount) => prevCount + 1); // Update state using the previous state
|
||||||
|
|
||||||
|
// if (currentCount >= targetNumber) {
|
||||||
|
// clearInterval(intervalId); // Stop the counting when the target number is reached
|
||||||
|
// }
|
||||||
|
// }, interval);
|
||||||
|
|
||||||
|
// // Cleanup the interval on component unmount
|
||||||
|
// return () => clearInterval(intervalId);
|
||||||
|
// }, [targetNumber, timeInSeconds]);
|
||||||
|
|
||||||
|
// return <>{count}</>;
|
||||||
|
// };
|
||||||
|
|
||||||
|
// export default CustomCounter;
|
||||||
|
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import CountUp from 'react-countup';
|
||||||
|
|
||||||
const CustomCounter = ({ targetNumber, timeInSeconds }) => {
|
const CustomCounter = ({ targetNumber, timeInSeconds }) => {
|
||||||
const [count, setCount] = useState(0);
|
return <CountUp end={targetNumber} duration={timeInSeconds} />;
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (targetNumber <= 0 || timeInSeconds <= 0) return; // Handle edge cases
|
|
||||||
|
|
||||||
const interval = Math.floor(timeInSeconds * 1000 / targetNumber); // Time interval for each count in milliseconds
|
|
||||||
const totalTime = timeInSeconds * 1000; // Total time for the entire count in milliseconds
|
|
||||||
|
|
||||||
let currentCount = 0;
|
|
||||||
const intervalId = setInterval(() => {
|
|
||||||
currentCount++;
|
|
||||||
setCount((prevCount) => prevCount + 1); // Update state using the previous state
|
|
||||||
|
|
||||||
if (currentCount >= targetNumber) {
|
|
||||||
clearInterval(intervalId); // Stop the counting when the target number is reached
|
|
||||||
}
|
|
||||||
}, interval);
|
|
||||||
|
|
||||||
// Cleanup the interval on component unmount
|
|
||||||
return () => clearInterval(intervalId);
|
|
||||||
}, [targetNumber, timeInSeconds]);
|
|
||||||
|
|
||||||
return <>{count}</>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default CustomCounter;
|
export default CustomCounter;
|
||||||
@@ -26,103 +26,97 @@ export default function LoanOffersCom() {
|
|||||||
<div className='w-full flex flex-col gap-8'>
|
<div className='w-full flex flex-col gap-8'>
|
||||||
<BreadcrumbCom title='Applications' paths={['Dashboard', 'Applications']} />
|
<BreadcrumbCom title='Applications' paths={['Dashboard', 'Applications']} />
|
||||||
|
|
||||||
<div className='box bg-white dark:bg-black-box text-black-body dark:text-white-body'>
|
{isFetching ?
|
||||||
{isFetching ?
|
<>
|
||||||
<>
|
<div className="w-full py-4">
|
||||||
<p className='text-slate-800'>Loading...</p>
|
<p className='text-slate-800'>Loading...</p>
|
||||||
</>
|
</div>
|
||||||
: isError ?
|
</>
|
||||||
|
: isError ?
|
||||||
|
<div className="w-full py-4">
|
||||||
<p className='text-red-500'>{error.message}</p>
|
<p className='text-red-500'>{error.message}</p>
|
||||||
:
|
</div>
|
||||||
<TableWrapper data={appliedUsers} itemsPerPage={15}>
|
:
|
||||||
{({ data }) => (
|
<TableWrapper data={appliedUsers} itemsPerPage={15}>
|
||||||
<>
|
{({ data }) => (
|
||||||
<table className="py-2 w-full text-sm">
|
<>
|
||||||
<thead className="py-2 text-sm text-slate-500 text-left">
|
<table className="py-2 w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
||||||
<tr>
|
<thead className="text-sm md:text-base text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||||
<th scope="col" className="px-2 py-2">
|
<tr>
|
||||||
Name
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Name
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Loan
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Amount
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Added
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Verified
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Action
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{(data && data.length > 0) ? data?.map((item, index) => (
|
||||||
|
<tr key={index} className="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600">
|
||||||
|
<th scope="row" className="mr-4 flex items-center px-3 py-2 text-gray-900 whitespace-nowrap dark:text-white">
|
||||||
|
<img className="w-10 h-10 rounded-full" src={Avatar} alt="Jese image" />
|
||||||
|
<div className="px-3">
|
||||||
|
<div className="text-base font-semibold">{item?.name || ''}</div>
|
||||||
|
<div className="font-normal text-gray-500">{item?.bvn}</div>
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2">
|
<td className="px-3 py-2">
|
||||||
Loan
|
{item?.loan} - {item?.description}
|
||||||
</th>
|
</td>
|
||||||
<th scope="col" className="px-2">
|
<td className="px-3 py-2">
|
||||||
Amount
|
{item?.amount || ''}
|
||||||
</th>
|
</td>
|
||||||
<th scope="col" className="px-2">
|
<td className="px-3 py-2">
|
||||||
Added
|
<div className="flex items-center">
|
||||||
</th>
|
{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}
|
||||||
<th scope="col" className="px-2">
|
|
||||||
Verified
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-2 text-right">
|
|
||||||
Action
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{(data && data.length > 0) ? data?.map((item, index) => (
|
|
||||||
<tr 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?.name || ''}</div>
|
|
||||||
<div className="font-normal text-gray-500">{item?.bvn}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
<div className="font-normal text-gray-500">{item?.loan}</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
<div className="font-normal text-gray-500">{item?.amount}</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
<div className="font-normal text-gray-500">{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
{!item?.verified ? 'N/A' : `${getDateFromDateString(item?.verified)} ${getTimeFromDateString(item?.verified)}`}
|
|
||||||
</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='edit' />
|
|
||||||
</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 className='hidden fle p-2 justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
|
|
||||||
<Icons name='trash' />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))
|
|
||||||
:
|
|
||||||
<tr className="py-2 border-t border-dashed border-slate-300">
|
|
||||||
<td className="px-3 py-2" colSpan={4}>
|
|
||||||
<div className="flex justify-center items-center">
|
|
||||||
No Record Found
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
<div className="flex items-center">
|
||||||
|
{!item?.verified ? 'N/A' : `${getDateFromDateString(item?.verified)} ${getTimeFromDateString(item?.verified)}`}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
||||||
|
{/* <!-- Modal toggle --> */}
|
||||||
|
{/* <Link to={RouteLinks.manageAdminPage}>
|
||||||
|
<i onClick={handleShowEditModal} className="fa-solid fa-eye text-base md:text-lg cursor-pointer p-2 text-sky-600"></i>
|
||||||
|
</Link> */}
|
||||||
|
{/* <i onClick={handleShowEditModal} className="fa-solid fa-pen-to-square text-base md:text-lg cursor-pointer p-2"></i> */}
|
||||||
|
{/* <i onClick={handleDeleteModal} className="fa-solid fa-trash text-base md:text-lg cursor-pointer p-2 text-red-500"></i> */}
|
||||||
|
<Icons name='edit' />
|
||||||
|
<Icons name='eye' />
|
||||||
|
<Icons name='trash' className={'hidden text-red-500'} />
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
))
|
||||||
</tbody>
|
:
|
||||||
</table>
|
<tr className="w-3 p-3">
|
||||||
</>
|
<td className="px-3 py-2" colSpan={6}>
|
||||||
)}
|
<div className="flex justify-center items-center">
|
||||||
</TableWrapper>
|
No Record Found
|
||||||
}
|
</div>
|
||||||
</div>
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</TableWrapper>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -25,88 +25,83 @@ export default function ApprovedLoanCom() {
|
|||||||
<div className='w-full flex flex-col gap-8'>
|
<div className='w-full flex flex-col gap-8'>
|
||||||
<BreadcrumbCom title='Approved' paths={['Dashboard', 'Approved']} />
|
<BreadcrumbCom title='Approved' paths={['Dashboard', 'Approved']} />
|
||||||
|
|
||||||
<div className='box bg-white dark:bg-black-box text-black-body dark:text-white-body'>
|
{isFetching ?
|
||||||
{isFetching ?
|
<>
|
||||||
<>
|
<div className="w-full py-4">
|
||||||
<p className='text-slate-800'>Loading...</p>
|
<p className='text-slate-800'>Loading...</p>
|
||||||
</>
|
</div>
|
||||||
: isError ?
|
</>
|
||||||
|
: isError ?
|
||||||
|
<div className="w-full py-4">
|
||||||
<p className='text-red-500'>{error.message}</p>
|
<p className='text-red-500'>{error.message}</p>
|
||||||
:
|
</div>
|
||||||
<TableWrapper data={approvedUsers} itemsPerPage={15}>
|
:
|
||||||
{({ data }) => (
|
<TableWrapper data={approvedUsers} itemsPerPage={15}>
|
||||||
<>
|
{({ data }) => (
|
||||||
<table className="py-2 w-full text-sm">
|
<>
|
||||||
<thead className="py-2 text-sm text-slate-500 text-left">
|
<table className="py-2 w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
||||||
<tr>
|
<thead className="text-sm md:text-base text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||||
<th scope="col" className="px-2 py-2">
|
<tr>
|
||||||
Name
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Name
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Loan
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Added
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Action
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{(data && data.length > 0) ? data?.map((item, index) => (
|
||||||
|
<tr key={index} className="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600">
|
||||||
|
<th scope="row" className="mr-4 flex items-center px-3 py-2 text-gray-900 whitespace-nowrap dark:text-white">
|
||||||
|
<img className="w-10 h-10 rounded-full" src={Avatar} alt="Jese image" />
|
||||||
|
<div className="px-3">
|
||||||
|
<div className="text-base font-semibold">{item?.name || ''}</div>
|
||||||
|
<div className="font-normal text-gray-500">{item?.bvn}</div>
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2">
|
<td className="px-3 py-2">
|
||||||
Loan
|
{item?.loan} - {item?.description}
|
||||||
</th>
|
</td>
|
||||||
<th scope="col" className="px-2">
|
<td className="px-3 py-2">
|
||||||
Added
|
<div className="flex items-center">
|
||||||
</th>
|
{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}
|
||||||
<th scope="col" className="px-2 text-right">
|
|
||||||
Action
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{(data && data.length > 0) ? data?.map((item, index) => (
|
|
||||||
<tr 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?.name || ''}</div>
|
|
||||||
<div className="font-normal text-gray-500">{item?.bvn}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
<div className="text-base font-semibold">{item?.loan}</div>
|
|
||||||
<div className="font-normal text-gray-500">{item?.description}</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
<div className="font-normal text-gray-500">{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}</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='edit' />
|
|
||||||
</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 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='trash' />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))
|
|
||||||
:
|
|
||||||
<tr className="py-2 border-t border-dashed border-slate-300">
|
|
||||||
<td className="px-3 py-2" colSpan={4}>
|
|
||||||
<div className="flex justify-center items-center">
|
|
||||||
No Record Found
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
||||||
|
{/* <!-- Modal toggle --> */}
|
||||||
|
{/* <Link to={RouteLinks.manageAdminPage}>
|
||||||
|
<i onClick={handleShowEditModal} className="fa-solid fa-eye text-base md:text-lg cursor-pointer p-2 text-sky-600"></i>
|
||||||
|
</Link> */}
|
||||||
|
{/* <i onClick={handleShowEditModal} className="fa-solid fa-pen-to-square text-base md:text-lg cursor-pointer p-2"></i> */}
|
||||||
|
{/* <i onClick={handleDeleteModal} className="fa-solid fa-trash text-base md:text-lg cursor-pointer p-2 text-red-500"></i> */}
|
||||||
|
<Icons name='edit' />
|
||||||
|
<Icons name='eye' />
|
||||||
|
<Icons name='trash' className={'hidden text-red-500'} />
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
))
|
||||||
</tbody>
|
:
|
||||||
</table>
|
<tr className="w-3 p-3">
|
||||||
</>
|
<td className="px-3 py-2" colSpan={4}>
|
||||||
)}
|
<div className="flex justify-center items-center">
|
||||||
</TableWrapper>
|
No Record Found
|
||||||
}
|
</div>
|
||||||
</div>
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</TableWrapper>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -25,7 +25,7 @@ export default function BreadcrumbCom({title, span, paths}) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
// ${stickNav ? 'sticky top-0 transition-[top] duration-1000 shadow-md shadow-black' : '-top-[100px] static'}
|
// ${stickNav ? 'sticky top-0 transition-[top] duration-1000 shadow-md shadow-black' : '-top-[100px] static'}
|
||||||
<div className={`sticky z-[999] -top-10 bg-white-body dark:bg-black-body dark:border-b dark:border-black-box dark:shadow-sm dark:shadow-black-box`}>
|
<div className={`sticky z-[970] top-[78px] lg:-top-10 bg-white-body dark:bg-black-body dark:border-b dark:border-black-box dark:shadow-sm dark:shadow-black-box`}>
|
||||||
<div className= {`w-full py-2 flex justify-between items-center`}>
|
<div className= {`w-full py-2 flex justify-between items-center`}>
|
||||||
<div className='flex flex-col gap-2'>
|
<div className='flex flex-col gap-2'>
|
||||||
<div className='flex flex-col md:flex-row gap-1 md:items-center'>
|
<div className='flex flex-col md:flex-row gap-1 md:items-center'>
|
||||||
|
|||||||
@@ -24,88 +24,84 @@ export default function DisbursementsLoanCom() {
|
|||||||
return (
|
return (
|
||||||
<div className='w-full flex flex-col gap-8'>
|
<div className='w-full flex flex-col gap-8'>
|
||||||
<BreadcrumbCom title='Disbursements' paths={['Dashboard', 'Disbursements']} />
|
<BreadcrumbCom title='Disbursements' paths={['Dashboard', 'Disbursements']} />
|
||||||
<div className='box bg-white dark:bg-black-box text-black-body dark:text-white-body'>
|
|
||||||
{isFetching ?
|
{isFetching ?
|
||||||
<>
|
<>
|
||||||
|
<div className="w-full py-4">
|
||||||
<p className='text-slate-800'>Loading...</p>
|
<p className='text-slate-800'>Loading...</p>
|
||||||
</>
|
</div>
|
||||||
: isError ?
|
</>
|
||||||
|
: isError ?
|
||||||
|
<div className="w-full py-4">
|
||||||
<p className='text-red-500'>{error.message}</p>
|
<p className='text-red-500'>{error.message}</p>
|
||||||
:
|
</div>
|
||||||
<TableWrapper data={approvedUsers} itemsPerPage={15}>
|
:
|
||||||
{({ data }) => (
|
<TableWrapper data={approvedUsers} itemsPerPage={15}>
|
||||||
<>
|
{({ data }) => (
|
||||||
<table className="py-2 w-full text-sm">
|
<>
|
||||||
<thead className="py-2 text-sm text-slate-500 text-left">
|
<table className="py-2 w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
||||||
<tr>
|
<thead className="text-sm md:text-base text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||||
<th scope="col" className="px-2 py-2">
|
<tr>
|
||||||
Name
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Name
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Loan
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Added
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Action
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{(data && data.length > 0) ? data?.map((item, index) => (
|
||||||
|
<tr key={index} className="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600">
|
||||||
|
<th scope="row" className="mr-4 flex items-center px-3 py-2 text-gray-900 whitespace-nowrap dark:text-white">
|
||||||
|
<img className="w-10 h-10 rounded-full" src={Avatar} alt="Jese image" />
|
||||||
|
<div className="px-3">
|
||||||
|
<div className="text-base font-semibold">{item?.name || ''}</div>
|
||||||
|
<div className="font-normal text-gray-500">{item?.bvn}</div>
|
||||||
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-2">
|
<td className="px-3 py-2">
|
||||||
Loan
|
{item?.loan} - {item?.description}
|
||||||
</th>
|
</td>
|
||||||
<th scope="col" className="px-2">
|
<td className="px-3 py-2">
|
||||||
Added
|
<div className="flex items-center">
|
||||||
</th>
|
{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}
|
||||||
<th scope="col" className="px-2 text-right">
|
|
||||||
Action
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{(data && data.length > 0) ? data?.map((item, index) => (
|
|
||||||
<tr 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?.name || ''}</div>
|
|
||||||
<div className="font-normal text-gray-500">{item?.bvn}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
<div className="text-base font-semibold">{item?.loan}</div>
|
|
||||||
<div className="font-normal text-gray-500">{item?.description}</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
<div className="font-normal text-gray-500">{getDateFromDateString(item?.added)} {getTimeFromDateString(item?.added)}</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='edit' />
|
|
||||||
</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 className='hidden fle p-2 justify-center items-center text-slate-500 bg-white-body dark:text-white-body dark:bg-black-body rounded-md'>
|
|
||||||
<Icons name='trash' />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
))
|
|
||||||
:
|
|
||||||
<tr className="py-2 border-t border-dashed border-slate-300">
|
|
||||||
<td className="px-3 py-2" colSpan={4}>
|
|
||||||
<div className="flex justify-center items-center">
|
|
||||||
No Record Found
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
||||||
|
{/* <!-- Modal toggle --> */}
|
||||||
|
{/* <Link to={RouteLinks.manageAdminPage}>
|
||||||
|
<i onClick={handleShowEditModal} className="fa-solid fa-eye text-base md:text-lg cursor-pointer p-2 text-sky-600"></i>
|
||||||
|
</Link> */}
|
||||||
|
{/* <i onClick={handleShowEditModal} className="fa-solid fa-pen-to-square text-base md:text-lg cursor-pointer p-2"></i> */}
|
||||||
|
{/* <i onClick={handleDeleteModal} className="fa-solid fa-trash text-base md:text-lg cursor-pointer p-2 text-red-500"></i> */}
|
||||||
|
<Icons name='edit' />
|
||||||
|
<Icons name='eye' />
|
||||||
|
<Icons name='trash' className={'hidden text-red-500'} />
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
))
|
||||||
</tbody>
|
:
|
||||||
</table>
|
<tr className="w-3 p-3">
|
||||||
</>
|
<td className="px-3 py-2" colSpan={4}>
|
||||||
)}
|
<div className="flex justify-center items-center">
|
||||||
</TableWrapper>
|
No Record Found
|
||||||
}
|
</div>
|
||||||
</div>
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</TableWrapper>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,187 @@
|
|||||||
|
import {useEffect, useRef} from 'react'
|
||||||
|
import ApexCharts from 'apexcharts'
|
||||||
|
|
||||||
|
const Widget1 = ({chartHeight='50px'}) => {
|
||||||
|
const chartRef = useRef(null)
|
||||||
|
|
||||||
|
const {mode} = '' // to be replaced by theme mode value later
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const chart = refreshChart()
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
if (chart) {
|
||||||
|
chart.destroy()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, [chartRef, mode])
|
||||||
|
|
||||||
|
const refreshChart = () => {
|
||||||
|
if (!chartRef.current) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const chart = new ApexCharts(chartRef.current, chartOptions(chartHeight))
|
||||||
|
if (chart) {
|
||||||
|
chart.render()
|
||||||
|
}
|
||||||
|
|
||||||
|
return chart
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='w-full'>
|
||||||
|
{/* end::Title */}
|
||||||
|
<div
|
||||||
|
ref={chartRef}
|
||||||
|
className='mixed-widget-13-chart'
|
||||||
|
style={{height: chartHeight, minHeight: chartHeight}}
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const chartOptions = (chartHeight) => {
|
||||||
|
// const labelColor = getCSSVariableValue('--bs-gray-800')
|
||||||
|
// const strokeColor = getCSSVariableValue('--bs-gray-300')
|
||||||
|
const labelColor = '#e9e9e9'
|
||||||
|
const strokeColor = '#e3e3e3'
|
||||||
|
// const strokeColor = getCSSVariableValue('--bs-gray-300') as string
|
||||||
|
|
||||||
|
return {
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: 'Net Profit',
|
||||||
|
data: [15, 25, 15, 40, 20, 50],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
grid: {
|
||||||
|
show: false,
|
||||||
|
padding: {
|
||||||
|
top: 0,
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
chart: {
|
||||||
|
fontFamily: 'inherit',
|
||||||
|
type: 'area',
|
||||||
|
height: chartHeight,
|
||||||
|
toolbar: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
zoom: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
sparkline: {
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plotOptions: {},
|
||||||
|
legend: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
fill: {
|
||||||
|
type: 'gradient',
|
||||||
|
gradient: {
|
||||||
|
opacityFrom: 0.4,
|
||||||
|
opacityTo: 0,
|
||||||
|
stops: [20, 120, 120, 120],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
stroke: {
|
||||||
|
curve: 'smooth',
|
||||||
|
show: true,
|
||||||
|
width: 3,
|
||||||
|
colors: ['#FFFFFF'],
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
categories: ['Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTicks: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
labels: {
|
||||||
|
show: false,
|
||||||
|
style: {
|
||||||
|
colors: labelColor,
|
||||||
|
fontSize: '12px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
crosshairs: {
|
||||||
|
show: false,
|
||||||
|
position: 'front',
|
||||||
|
stroke: {
|
||||||
|
color: strokeColor,
|
||||||
|
width: 1,
|
||||||
|
dashArray: 3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
enabled: true,
|
||||||
|
formatter: undefined,
|
||||||
|
offsetY: 0,
|
||||||
|
style: {
|
||||||
|
fontSize: '12px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yaxis: {
|
||||||
|
min: 0,
|
||||||
|
max: 60,
|
||||||
|
labels: {
|
||||||
|
show: false,
|
||||||
|
style: {
|
||||||
|
colors: labelColor,
|
||||||
|
fontSize: '12px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
states: {
|
||||||
|
normal: {
|
||||||
|
filter: {
|
||||||
|
type: 'none',
|
||||||
|
value: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
hover: {
|
||||||
|
filter: {
|
||||||
|
type: 'none',
|
||||||
|
value: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
active: {
|
||||||
|
allowMultipleDataPointsSelection: false,
|
||||||
|
filter: {
|
||||||
|
type: 'none',
|
||||||
|
value: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
style: {
|
||||||
|
fontSize: '12px',
|
||||||
|
},
|
||||||
|
y: {
|
||||||
|
formatter: function (val) {
|
||||||
|
return '$' + val + ' thousands'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
colors: ['#ffffff'],
|
||||||
|
markers: {
|
||||||
|
colors: [labelColor],
|
||||||
|
strokeColors: [strokeColor],
|
||||||
|
strokeWidth: 3,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export {Widget1}
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
import {useEffect, useRef} from 'react'
|
||||||
|
import ApexCharts from 'apexcharts'
|
||||||
|
|
||||||
|
const Widget2 = ({chartHeight='100px'}) => {
|
||||||
|
const chartRef = useRef(null)
|
||||||
|
|
||||||
|
const {mode} = '' // to be replaced by theme mode value later
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const chart = refreshChart()
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
if (chart) {
|
||||||
|
chart.destroy()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, [chartRef, mode])
|
||||||
|
|
||||||
|
const refreshChart = () => {
|
||||||
|
if (!chartRef.current) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const chart = new ApexCharts(chartRef.current, chartOptions(chartHeight))
|
||||||
|
if (chart) {
|
||||||
|
chart.render()
|
||||||
|
}
|
||||||
|
|
||||||
|
return chart
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className='w-full'>
|
||||||
|
{/* end::Title */}
|
||||||
|
<div
|
||||||
|
ref={chartRef}
|
||||||
|
className='mixed-widget-13-chart'
|
||||||
|
style={{height: chartHeight, minHeight: chartHeight}}
|
||||||
|
></div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const chartOptions = (chartHeight) => {
|
||||||
|
// const labelColor = getCSSVariableValue('--bs-gray-800')
|
||||||
|
|
||||||
|
return {
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: 'Inflation',
|
||||||
|
data: [1, 2.1, 1, 2.1, 4.1, 6.1, 4.1, 4.1, 2.1, 4.1, 2.1, 3.1, 1, 1, 2.1],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
chart: {
|
||||||
|
fontFamily: 'inherit',
|
||||||
|
height: chartHeight,
|
||||||
|
type: 'bar',
|
||||||
|
toolbar: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
show: false,
|
||||||
|
padding: {
|
||||||
|
top: 0,
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
colors: ['#ffffff'],
|
||||||
|
plotOptions: {
|
||||||
|
bar: {
|
||||||
|
borderRadius: 2.5,
|
||||||
|
dataLabels: {
|
||||||
|
position: 'top', // top, center, bottom
|
||||||
|
},
|
||||||
|
columnWidth: '20%',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dataLabels: {
|
||||||
|
enabled: false,
|
||||||
|
formatter: function (val) {
|
||||||
|
return val + '%'
|
||||||
|
},
|
||||||
|
offsetY: -20,
|
||||||
|
style: {
|
||||||
|
fontSize: '12px',
|
||||||
|
colors: ['#304758'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
xaxis: {
|
||||||
|
labels: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
categories: [
|
||||||
|
'Jan',
|
||||||
|
'Feb',
|
||||||
|
'Mar',
|
||||||
|
'Apr',
|
||||||
|
'May',
|
||||||
|
'Jun',
|
||||||
|
'Jul',
|
||||||
|
'Aug',
|
||||||
|
'Sep',
|
||||||
|
'Oct',
|
||||||
|
'Nov',
|
||||||
|
'Dec',
|
||||||
|
'Jan',
|
||||||
|
'Feb',
|
||||||
|
'Mar',
|
||||||
|
],
|
||||||
|
position: 'top',
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTicks: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
crosshairs: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yaxis: {
|
||||||
|
show: false,
|
||||||
|
axisBorder: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
axisTicks: {
|
||||||
|
show: false,
|
||||||
|
// background: labelColor,
|
||||||
|
},
|
||||||
|
labels: {
|
||||||
|
show: false,
|
||||||
|
formatter: function (val) {
|
||||||
|
return val + '%'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export {Widget2}
|
||||||
@@ -29,7 +29,7 @@ export default function DashboardLayout() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={`main w-full bg-inherit ${pathname == '/' && 'large:mr-[400px]'}`}>
|
<div className={`main w-full bg-inherit ${pathname == '/' && 'large:mr-[400px]'}`}>
|
||||||
<div className='fixed top-0 left-0 z-[777] w-full px-8 bg-inherit lg:hidden'>
|
<div className='fixed top-0 left-0 z-[980] w-full px-8 bg-inherit lg:hidden'>
|
||||||
<DashboardHeader />
|
<DashboardHeader />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -25,111 +25,105 @@ export default function ApplicationsLoanCom() {
|
|||||||
return (
|
return (
|
||||||
<div className='w-full flex flex-col gap-8'>
|
<div className='w-full flex flex-col gap-8'>
|
||||||
<BreadcrumbCom title='Loan offers' paths={['Dashboard', 'Loan offers']} />
|
<BreadcrumbCom title='Loan offers' paths={['Dashboard', 'Loan 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>
|
|
||||||
:
|
|
||||||
<TableWrapper data={loanOffersUsersList} itemsPerPage={15}>
|
|
||||||
{({ 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">
|
|
||||||
CID
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-2">
|
|
||||||
Loan
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-2">
|
|
||||||
Amount
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-2">
|
|
||||||
Description
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-2 text-right">
|
|
||||||
Days Duration
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-2 text-right">
|
|
||||||
Active
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-2 text-right">
|
|
||||||
Score
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-2 text-right">
|
|
||||||
Lorder
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{(data && data.length > 0) ? data?.map((item, index) => (
|
|
||||||
<tr 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?.cid || ''}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
<div className="font-normal text-gray-500">{item?.loan}</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
<div className="font-normal text-gray-500">{item?.amount}</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-2">
|
|
||||||
<div className="text-left">
|
|
||||||
<div className="font-normal text-gray-500">{item?.description}</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
|
|
||||||
<td className="px-2">
|
{isFetching ?
|
||||||
<div className="text-right">
|
<>
|
||||||
<div className="font-normal text-gray-500">{item?.days_duration}</div>
|
<div className="w-full py-4">
|
||||||
</div>
|
<p className='text-slate-800'>Loading...</p>
|
||||||
</td>
|
</div>
|
||||||
<td className="px-2">
|
</>
|
||||||
<div className="text-right">
|
: isError ?
|
||||||
<div className="font-normal text-gray-500">{item?.active}</div>
|
<div className="w-full py-4">
|
||||||
</div>
|
<p className='text-red-500'>{error.message}</p>
|
||||||
</td>
|
</div>
|
||||||
<td className="px-2">
|
:
|
||||||
<div className="text-right">
|
<TableWrapper data={loanOffersUsersList} itemsPerPage={15}>
|
||||||
<div className="font-normal text-gray-500">{item?.score}</div>
|
{({ data }) => (
|
||||||
</div>
|
<>
|
||||||
</td>
|
<table className="py-2 w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
||||||
<td className="px-2">
|
<thead className="text-sm md:text-base text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||||
<div className="text-right">
|
<tr>
|
||||||
<div className="font-normal text-gray-500">{item?.lorder}</div>
|
<th scope="col" className="px-4 py-2">
|
||||||
</div>
|
CID
|
||||||
</td>
|
</th>
|
||||||
</tr>
|
<th scope="col" className="px-4 py-2">
|
||||||
))
|
Loan
|
||||||
:
|
</th>
|
||||||
<tr className="py-2 border-t border-dashed border-slate-300">
|
<th scope="col" className="px-4 py-2">
|
||||||
<td className="px-3 py-2" colSpan={4}>
|
Amount
|
||||||
<div className="flex justify-center items-center">
|
</th>
|
||||||
No Record Found
|
<th scope="col" className="px-4 py-2">
|
||||||
</div>
|
Description
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Days Duration
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Ative
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Score
|
||||||
|
</th>
|
||||||
|
<th scope="col" className="px-4 py-2">
|
||||||
|
Lorder
|
||||||
|
</th>
|
||||||
|
{/* <th scope="col" className="px-4 py-2">
|
||||||
|
Action
|
||||||
|
</th> */}
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{(data && data.length > 0) ? data?.map((item, index) => (
|
||||||
|
<tr key={index} className="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600">
|
||||||
|
<th scope="row" className="mr-4 flex items-center px-3 py-2 text-gray-900 whitespace-nowrap dark:text-white">
|
||||||
|
<img className="w-10 h-10 rounded-full" src={Avatar} alt="Jese image" />
|
||||||
|
<div className="px-3">
|
||||||
|
<div className="text-base font-semibold">{item?.cid}</div>
|
||||||
|
</div>
|
||||||
|
</th>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.loan}
|
||||||
</td>
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.amount || ''}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.description}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.days_duration}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.active}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.score}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.lorder}
|
||||||
|
</td>
|
||||||
|
{/* <td className="px-3 py-2 flex gap-3 md:gap-4">
|
||||||
|
<Icons name='edit' />
|
||||||
|
<Icons name='eye' />
|
||||||
|
<Icons name='trash' className={'hidden text-red-500'} />
|
||||||
|
</td> */}
|
||||||
</tr>
|
</tr>
|
||||||
}
|
))
|
||||||
</tbody>
|
:
|
||||||
</table>
|
<tr className="w-3 p-3">
|
||||||
</>
|
<td className="px-3 py-2" colSpan={8}>
|
||||||
)}
|
<div className="flex justify-center items-center">
|
||||||
</TableWrapper>
|
No Record Found
|
||||||
}
|
</div>
|
||||||
</div>
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</TableWrapper>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
+1
-1
@@ -29,7 +29,7 @@ code {
|
|||||||
@apply [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-thumb]:rounded-full
|
@apply [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500 [&::-webkit-scrollbar-track]:rounded-full [&::-webkit-scrollbar-thumb]:rounded-full
|
||||||
}
|
}
|
||||||
.box {
|
.box {
|
||||||
@apply flex flex-col gap-8 w-full p-8 cursor-pointer rounded-lg h-full border-[1px] border-[#F1F1F4] dark:border-[#1E2027] shadow-[0px_3px_4px_0px_rgba(0,_0,_0,_0.03)]
|
@apply flex flex-col w-full p-8 cursor-pointer rounded-lg h-full border-[1px] border-[#F1F1F4] dark:border-[#1E2027] shadow-[0px_3px_4px_0px_rgba(0,_0,_0,_0.03)]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,15 +4,18 @@ import CustomCounter from '../components/CustomCounter'
|
|||||||
import Icons from '../components/Icons'
|
import Icons from '../components/Icons'
|
||||||
import TableWrapper from '../components/tableWrapper/TableWrapper'
|
import TableWrapper from '../components/tableWrapper/TableWrapper'
|
||||||
import Avatar from '../assets/user_avatar.jpg'
|
import Avatar from '../assets/user_avatar.jpg'
|
||||||
|
import { Widget1 } from '../components/home/Widget1'
|
||||||
|
import { Widget2 } from '../components/home/Widget2'
|
||||||
|
|
||||||
export default function HomePage() {
|
export default function HomePage() {
|
||||||
return (
|
return (
|
||||||
<div className='w-full flex flex-col gap-8'>
|
<div className='w-full flex flex-col gap-8'>
|
||||||
<BreadcrumbCom title='Dashboard' paths={['Home', 'Dashboard']} />
|
<BreadcrumbCom title='Dashboard' paths={['Home', 'Dashboard']} />
|
||||||
<div className='grid grid-cols-1 gap-8'>
|
<div className='grid grid-cols-1 gap-8'>
|
||||||
<div className='w-full grid grid-cols-1 lg:grid-cols-3 gap-8'>
|
<div className='w-full grid grid-cols-1 xl:grid-cols-3 gap-8'>
|
||||||
<div className='box min-h-[230] justify-between bg-[#F7D9E3] dark:bg-black-box text-black-body dark:text-white-body'>
|
<div className='box min-h-[230] justify-between bg-[#F7D9E3] dark:bg-black-box text-black-body dark:text-white-body'>
|
||||||
<p className='text-base sm:text-lg font-bold hover:text-primary'>Earnings</p>
|
<p className='text-base sm:text-lg font-bold hover:text-primary'>Earnings</p>
|
||||||
|
{/* <Widget1 /> */}
|
||||||
<div className='flex gap-2 items-end font-bold'>
|
<div className='flex gap-2 items-end font-bold'>
|
||||||
<p className='text-3xl sm:text-[39px]'><span className='text-xl sm:text-2xl'>$</span><CustomCounter targetNumber='47' timeInSeconds='1' /></p>
|
<p className='text-3xl sm:text-[39px]'><span className='text-xl sm:text-2xl'>$</span><CustomCounter targetNumber='47' timeInSeconds='1' /></p>
|
||||||
<p className='sm:text-[13.9px]'>- 12% this week</p>
|
<p className='sm:text-[13.9px]'>- 12% this week</p>
|
||||||
@@ -20,13 +23,14 @@ export default function HomePage() {
|
|||||||
</div>
|
</div>
|
||||||
<div className='box min-h-[230] justify-between bg-[#CBF0F5] dark:bg-black-box text-black-body dark:text-white-body'>
|
<div className='box min-h-[230] justify-between bg-[#CBF0F5] dark:bg-black-box text-black-body dark:text-white-body'>
|
||||||
<p className='text-base sm:text-lg font-bold hover:text-primary'>Contributions</p>
|
<p className='text-base sm:text-lg font-bold hover:text-primary'>Contributions</p>
|
||||||
|
{/* <Widget2 /> */}
|
||||||
<div className='flex gap-2 items-end font-bold'>
|
<div className='flex gap-2 items-end font-bold'>
|
||||||
<p className='text-3xl sm:text-[39px]'><CustomCounter targetNumber='500' timeInSeconds='1' /></p>
|
<p className='text-3xl sm:text-[39px]'><CustomCounter targetNumber='500' timeInSeconds='1' /></p>
|
||||||
<p className='sm:text-[13.9px]'>+ 56% this week</p>
|
<p className='sm:text-[13.9px]'>+ 56% this week</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='box min-h-[230] justify-between bg-[#CBD4F4] dark:bg-black-box text-black-body dark:text-white-body'>
|
<div className='box min-h-[230] justify-between bg-[#CBD4F4] dark:bg-black-box text-black-body dark:text-white-body'>
|
||||||
<p className='text-base sm:text-lg font-bold hover:text-primary'>Summary</p>
|
<p className='mb-4 text-base sm:text-lg font-bold hover:text-primary'>Summary</p>
|
||||||
<div className='grid grid-cols-2 gap-4 font-bold'>
|
<div className='grid grid-cols-2 gap-4 font-bold'>
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex items-center gap-2'>
|
||||||
<div className='w-10 h-10 bg-white-body dark:bg-black-box dark:shadow-[0_0_0_1px_#f9f9f9] rounded-md flex justify-center items-center'>
|
<div className='w-10 h-10 bg-white-body dark:bg-black-box dark:shadow-[0_0_0_1px_#f9f9f9] rounded-md flex justify-center items-center'>
|
||||||
@@ -68,7 +72,7 @@ export default function HomePage() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='w-full'>
|
<div className='w-full'>
|
||||||
<div className='box bg-white dark:bg-black-box text-black-body dark:text-white-body'>
|
<div className='box gap-8 bg-white dark:bg-black-box text-black-body dark:text-white-body'>
|
||||||
<div className='grid grid-cols-1 xs:grid-cols-2 gap-4'>
|
<div className='grid grid-cols-1 xs:grid-cols-2 gap-4'>
|
||||||
<div className='flex flex-col gap-1 order-2 xs:order-1'>
|
<div className='flex flex-col gap-1 order-2 xs:order-1'>
|
||||||
<p className='font-bold text-base'>Members Statistics</p>
|
<p className='font-bold text-base'>Members Statistics</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user