apply loan endpoint added
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { AiFillProduct, AiOutlineDashboard } from 'react-icons/ai'
|
import { AiFillProduct, AiOutlineDashboard } from 'react-icons/ai'
|
||||||
import { FaRegMoneyBill1 } from 'react-icons/fa6'
|
import { FaEye, FaRegMoneyBill1 } from 'react-icons/fa6'
|
||||||
import { GoDotFill } from 'react-icons/go'
|
import { GoDotFill } from 'react-icons/go'
|
||||||
import { IoPeople, IoTrash } from 'react-icons/io5'
|
import { IoPeople, IoTrash } from 'react-icons/io5'
|
||||||
|
import { TbPlayerTrackNext, TbPlayerTrackPrev } from 'react-icons/tb'
|
||||||
|
|
||||||
export default function Icons({name, className}) {
|
export default function Icons({name, className}) {
|
||||||
return (
|
return (
|
||||||
@@ -19,6 +20,12 @@ export default function Icons({name, className}) {
|
|||||||
<AiFillProduct className={`text-base ${className}`} />
|
<AiFillProduct className={`text-base ${className}`} />
|
||||||
:name.toLowerCase() == 'trash' ?
|
:name.toLowerCase() == 'trash' ?
|
||||||
<IoTrash lassName={`text-base ${className}`} />
|
<IoTrash lassName={`text-base ${className}`} />
|
||||||
|
:name.toLowerCase() == 'eye' ?
|
||||||
|
<FaEye lassName={`text-base ${className}`} />
|
||||||
|
:name.toLowerCase() == 'next' ?
|
||||||
|
<TbPlayerTrackNext lassName={`text-base ${className}`} />
|
||||||
|
:name.toLowerCase() == 'prev' ?
|
||||||
|
<TbPlayerTrackPrev lassName={`text-base ${className}`} />
|
||||||
:
|
:
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export default function MainBtn({
|
|||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
className={`py-3 px-4 rounded text-12 lg:text-lg ${className || ''} ${(disabled || loading) && 'opacity-60'}`}
|
className={`py-2 px-3 rounded text-12 lg:text-lg ${className || ''} ${(disabled || loading) && 'opacity-60'}`}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
{children && children}
|
{children && children}
|
||||||
|
|||||||
@@ -17,15 +17,12 @@ export default function ApplyCom() {
|
|||||||
queryFn: () => applyLoan()
|
queryFn: () => applyLoan()
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('data', data?.data)
|
const appliedUsers = data?.data?.result_data?.data // APPLY LOAN LIST
|
||||||
// const appliedUsers = data?.data?.demo_data?.list // APPLY LOAN LIST
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='w-full'>
|
<div className='w-full flex flex-col gap-3'>
|
||||||
<BreadcrumbCom title='Apply' paths={['Dashboard', 'Apply']} />
|
<BreadcrumbCom title='Apply' paths={['Dashboard', 'Apply']} />
|
||||||
<p className='py-4'>
|
|
||||||
coming soon ...
|
|
||||||
</p>
|
|
||||||
{isFetching ?
|
{isFetching ?
|
||||||
<>
|
<>
|
||||||
<div className="w-full py-4">
|
<div className="w-full py-4">
|
||||||
@@ -37,29 +34,23 @@ export default function ApplyCom() {
|
|||||||
<p className='text-red-500'>{error.message}</p>
|
<p className='text-red-500'>{error.message}</p>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<TableWrapper data={dummy} itemsPerPage={7}>
|
<TableWrapper data={appliedUsers} itemsPerPage={9}>
|
||||||
{({ data }) => (
|
{({ data }) => (
|
||||||
<>
|
<>
|
||||||
<table className="hidden py-2 w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
<table className="py-2 w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
||||||
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" className="p-3">
|
|
||||||
<div className="flex items-center">
|
|
||||||
<input id="checkbox-all-search" type="checkbox" className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" />
|
|
||||||
<label htmlFor="checkbox-all-search" className="sr-only">checkbox</label>
|
|
||||||
</div>
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Name
|
Name
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
To
|
Loan
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
From
|
Amount
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Ticket Number
|
Added
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Action
|
Action
|
||||||
@@ -69,39 +60,34 @@ export default function ApplyCom() {
|
|||||||
<tbody>
|
<tbody>
|
||||||
{(data && data.length > 0) ? data?.map((item, index) => (
|
{(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">
|
<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">
|
||||||
<td className="w-3 p-3">
|
|
||||||
<div className="flex items-center">
|
|
||||||
<input id="checkbox-table-search-1" type="checkbox" className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" />
|
|
||||||
<label htmlFor="checkbox-table-search-1" className="sr-only">checkbox</label>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th scope="row" className="mr-4 flex items-center px-3 py-2 text-gray-900 whitespace-nowrap dark:text-white">
|
<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" />
|
<img className="w-10 h-10 rounded-full" src={Avatar} alt="Jese image" />
|
||||||
<div className="px-3">
|
<div className="px-3">
|
||||||
<div className="text-base font-semibold">{item?.name || ''}</div>
|
<div className="text-base font-semibold">{item?.name || ''}</div>
|
||||||
<div className="font-normal text-gray-500">{!item?.email || 'neil.sims@flowbite12345.com'}</div>
|
<div className="font-normal text-gray-500">{item?.bvn}</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<td className="px-3 py-2">
|
<td className="px-3 py-2">
|
||||||
{item?.to || ''}
|
{item?.loan || ''}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.amount || ''}
|
||||||
</td>
|
</td>
|
||||||
<td className="px-3 py-2">
|
<td className="px-3 py-2">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
{item?.from || ''}
|
{new Date(item?.added).toDateString()}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-3 py-2">
|
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
||||||
<div className="flex items-center">
|
|
||||||
{item?.ticket || ''}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-2 flex gap-2">
|
|
||||||
{/* <!-- Modal toggle --> */}
|
{/* <!-- Modal toggle --> */}
|
||||||
{/* <Link to={RouteLinks.manageAdminPage}>
|
{/* <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>
|
<i onClick={handleShowEditModal} className="fa-solid fa-eye text-base md:text-lg cursor-pointer p-2 text-sky-600"></i>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
{/* <i onClick={handleShowEditModal} className="fa-solid fa-pen-to-square text-base md:text-lg cursor-pointer p-2"></i> */}
|
{/* <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> */}
|
{/* <i onClick={handleDeleteModal} className="fa-solid fa-trash text-base md:text-lg cursor-pointer p-2 text-red-500"></i> */}
|
||||||
|
<span className='text-primary text-xl'>
|
||||||
|
<Icons name='eye' />
|
||||||
|
</span>
|
||||||
<span className='text-red-500 text-xl'>
|
<span className='text-red-500 text-xl'>
|
||||||
<Icons name='trash' />
|
<Icons name='trash' />
|
||||||
</span>
|
</span>
|
||||||
@@ -110,7 +96,7 @@ export default function ApplyCom() {
|
|||||||
))
|
))
|
||||||
:
|
:
|
||||||
<tr className="w-3 p-3">
|
<tr className="w-3 p-3">
|
||||||
<td className="px-3 py-2" colSpan={6}>
|
<td className="px-3 py-2" colSpan={5}>
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
No Record Found
|
No Record Found
|
||||||
</div>
|
</div>
|
||||||
@@ -125,9 +111,4 @@ export default function ApplyCom() {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const dummy = [
|
|
||||||
{name:'ok'}
|
|
||||||
]
|
|
||||||
@@ -8,24 +8,21 @@ import Icons from '../Icons'
|
|||||||
|
|
||||||
import Avatar from '../../assets/user_avatar.jpg'
|
import Avatar from '../../assets/user_avatar.jpg'
|
||||||
import queryKeys from '../../services/queryKeys'
|
import queryKeys from '../../services/queryKeys'
|
||||||
import { applyLoan } from '../../services/siteServices'
|
import { approvedLoan } from '../../services/siteServices'
|
||||||
|
|
||||||
export default function ApprovedLoanCom() {
|
export default function ApprovedLoanCom() {
|
||||||
|
|
||||||
const {data, isFetching, isError, error} = useQuery({
|
const {data, isFetching, isError, error} = useQuery({
|
||||||
queryKey: queryKeys.apply_loan,
|
queryKey: queryKeys.approved_loan,
|
||||||
queryFn: () => applyLoan()
|
queryFn: () => approvedLoan()
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('data', data?.data)
|
const approvedUsers = data?.data?.result_data?.data // APPLY LOAN LIST
|
||||||
// const approvedUsers = data?.data?.demo_data?.list // APPLY LOAN LIST
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='w-full'>
|
<div className='w-full flex flex-col gap-3'>
|
||||||
<BreadcrumbCom title='Apply' paths={['Dashboard', 'Apply']} />
|
<BreadcrumbCom title='Approved Loan' paths={['Dashboard', 'Approved Loan']} />
|
||||||
<p className='py-4'>
|
|
||||||
coming soon ...
|
|
||||||
</p>
|
|
||||||
{isFetching ?
|
{isFetching ?
|
||||||
<>
|
<>
|
||||||
<div className="w-full py-4">
|
<div className="w-full py-4">
|
||||||
@@ -37,29 +34,23 @@ export default function ApprovedLoanCom() {
|
|||||||
<p className='text-red-500'>{error.message}</p>
|
<p className='text-red-500'>{error.message}</p>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<TableWrapper data={dummy} itemsPerPage={7}>
|
<TableWrapper data={approvedUsers} itemsPerPage={9}>
|
||||||
{({ data }) => (
|
{({ data }) => (
|
||||||
<>
|
<>
|
||||||
<table className="py-2 w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
<table className="py-2 w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
||||||
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" className="p-3">
|
|
||||||
<div className="flex items-center">
|
|
||||||
<input id="checkbox-all-search" type="checkbox" className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" />
|
|
||||||
<label htmlFor="checkbox-all-search" className="sr-only">checkbox</label>
|
|
||||||
</div>
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Name
|
Name
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
To
|
Loan
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
From
|
Amount
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Ticket Number
|
Added
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Action
|
Action
|
||||||
@@ -69,39 +60,34 @@ export default function ApprovedLoanCom() {
|
|||||||
<tbody>
|
<tbody>
|
||||||
{(data && data.length > 0) ? data?.map((item, index) => (
|
{(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">
|
<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">
|
||||||
<td className="w-3 p-3">
|
|
||||||
<div className="flex items-center">
|
|
||||||
<input id="checkbox-table-search-1" type="checkbox" className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" />
|
|
||||||
<label htmlFor="checkbox-table-search-1" className="sr-only">checkbox</label>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th scope="row" className="mr-4 flex items-center px-3 py-2 text-gray-900 whitespace-nowrap dark:text-white">
|
<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" />
|
<img className="w-10 h-10 rounded-full" src={Avatar} alt="Jese image" />
|
||||||
<div className="px-3">
|
<div className="px-3">
|
||||||
<div className="text-base font-semibold">{item?.name || ''}</div>
|
<div className="text-base font-semibold">{item?.name || ''}</div>
|
||||||
<div className="font-normal text-gray-500">{!item?.email || 'neil.sims@flowbite12345.com'}</div>
|
<div className="font-normal text-gray-500">{item?.bvn}</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<td className="px-3 py-2">
|
<td className="px-3 py-2">
|
||||||
{item?.to || ''}
|
{item?.loan || ''}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.amount || ''}
|
||||||
</td>
|
</td>
|
||||||
<td className="px-3 py-2">
|
<td className="px-3 py-2">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
{item?.from || ''}
|
{new Date(item?.added).toDateString()}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-3 py-2">
|
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
||||||
<div className="flex items-center">
|
|
||||||
{item?.ticket || ''}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-2 flex gap-2">
|
|
||||||
{/* <!-- Modal toggle --> */}
|
{/* <!-- Modal toggle --> */}
|
||||||
{/* <Link to={RouteLinks.manageAdminPage}>
|
{/* <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>
|
<i onClick={handleShowEditModal} className="fa-solid fa-eye text-base md:text-lg cursor-pointer p-2 text-sky-600"></i>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
{/* <i onClick={handleShowEditModal} className="fa-solid fa-pen-to-square text-base md:text-lg cursor-pointer p-2"></i> */}
|
{/* <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> */}
|
{/* <i onClick={handleDeleteModal} className="fa-solid fa-trash text-base md:text-lg cursor-pointer p-2 text-red-500"></i> */}
|
||||||
|
<span className='text-primary text-xl'>
|
||||||
|
<Icons name='eye' />
|
||||||
|
</span>
|
||||||
<span className='text-red-500 text-xl'>
|
<span className='text-red-500 text-xl'>
|
||||||
<Icons name='trash' />
|
<Icons name='trash' />
|
||||||
</span>
|
</span>
|
||||||
@@ -110,7 +96,7 @@ export default function ApprovedLoanCom() {
|
|||||||
))
|
))
|
||||||
:
|
:
|
||||||
<tr className="w-3 p-3">
|
<tr className="w-3 p-3">
|
||||||
<td className="px-3 py-2" colSpan={6}>
|
<td className="px-3 py-2" colSpan={5}>
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
No Record Found
|
No Record Found
|
||||||
</div>
|
</div>
|
||||||
@@ -125,9 +111,4 @@ export default function ApprovedLoanCom() {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const dummy = [
|
|
||||||
{name:'ok'}
|
|
||||||
]
|
|
||||||
@@ -8,24 +8,21 @@ import Icons from '../Icons'
|
|||||||
|
|
||||||
import Avatar from '../../assets/user_avatar.jpg'
|
import Avatar from '../../assets/user_avatar.jpg'
|
||||||
import queryKeys from '../../services/queryKeys'
|
import queryKeys from '../../services/queryKeys'
|
||||||
import { applyLoan } from '../../services/siteServices'
|
import { selectLoan } from '../../services/siteServices'
|
||||||
|
|
||||||
export default function SelectLoanCom() {
|
export default function SelectLoanCom() {
|
||||||
|
|
||||||
const {data, isFetching, isError, error} = useQuery({
|
const {data, isFetching, isError, error} = useQuery({
|
||||||
queryKey: queryKeys.apply_loan,
|
queryKey: queryKeys.select_loan,
|
||||||
queryFn: () => applyLoan()
|
queryFn: () => selectLoan()
|
||||||
})
|
})
|
||||||
|
|
||||||
console.log('data', data?.data)
|
const selectUsers = data?.data?.result_data?.data // APPLY LOAN LIST
|
||||||
// const selectLoanUsers = data?.data?.demo_data?.list // APPLY LOAN LIST
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='w-full'>
|
<div className='w-full flex flex-col gap-3'>
|
||||||
<BreadcrumbCom title='Apply' paths={['Dashboard', 'Apply']} />
|
<BreadcrumbCom title='Apply' paths={['Dashboard', 'Apply']} />
|
||||||
<p className='py-4'>
|
|
||||||
coming soon ...
|
|
||||||
</p>
|
|
||||||
{isFetching ?
|
{isFetching ?
|
||||||
<>
|
<>
|
||||||
<div className="w-full py-4">
|
<div className="w-full py-4">
|
||||||
@@ -37,29 +34,23 @@ export default function SelectLoanCom() {
|
|||||||
<p className='text-red-500'>{error.message}</p>
|
<p className='text-red-500'>{error.message}</p>
|
||||||
</div>
|
</div>
|
||||||
:
|
:
|
||||||
<TableWrapper data={dummy} itemsPerPage={7}>
|
<TableWrapper data={selectUsers} itemsPerPage={9}>
|
||||||
{({ data }) => (
|
{({ data }) => (
|
||||||
<>
|
<>
|
||||||
<table className="py-2 w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
<table className="py-2 w-full text-sm text-left rtl:text-right text-gray-500 dark:text-gray-400">
|
||||||
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col" className="p-3">
|
|
||||||
<div className="flex items-center">
|
|
||||||
<input id="checkbox-all-search" type="checkbox" className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" />
|
|
||||||
<label htmlFor="checkbox-all-search" className="sr-only">checkbox</label>
|
|
||||||
</div>
|
|
||||||
</th>
|
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Name
|
Name
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
To
|
Loan
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
From
|
Amount
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Ticket Number
|
Added
|
||||||
</th>
|
</th>
|
||||||
<th scope="col" className="px-4 py-2">
|
<th scope="col" className="px-4 py-2">
|
||||||
Action
|
Action
|
||||||
@@ -69,39 +60,34 @@ export default function SelectLoanCom() {
|
|||||||
<tbody>
|
<tbody>
|
||||||
{(data && data.length > 0) ? data?.map((item, index) => (
|
{(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">
|
<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">
|
||||||
<td className="w-3 p-3">
|
|
||||||
<div className="flex items-center">
|
|
||||||
<input id="checkbox-table-search-1" type="checkbox" className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" />
|
|
||||||
<label htmlFor="checkbox-table-search-1" className="sr-only">checkbox</label>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<th scope="row" className="mr-4 flex items-center px-3 py-2 text-gray-900 whitespace-nowrap dark:text-white">
|
<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" />
|
<img className="w-10 h-10 rounded-full" src={Avatar} alt="Jese image" />
|
||||||
<div className="px-3">
|
<div className="px-3">
|
||||||
<div className="text-base font-semibold">{item?.name || ''}</div>
|
<div className="text-base font-semibold">{item?.name || ''}</div>
|
||||||
<div className="font-normal text-gray-500">{!item?.email || 'neil.sims@flowbite12345.com'}</div>
|
<div className="font-normal text-gray-500">{item?.bvn}</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
<td className="px-3 py-2">
|
<td className="px-3 py-2">
|
||||||
{item?.to || ''}
|
{item?.loan || ''}
|
||||||
|
</td>
|
||||||
|
<td className="px-3 py-2">
|
||||||
|
{item?.amount || ''}
|
||||||
</td>
|
</td>
|
||||||
<td className="px-3 py-2">
|
<td className="px-3 py-2">
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
{item?.from || ''}
|
{new Date(item?.added).toDateString()}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-3 py-2">
|
<td className="px-3 py-2 flex gap-3 md:gap-4">
|
||||||
<div className="flex items-center">
|
|
||||||
{item?.ticket || ''}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td className="px-3 py-2 flex gap-2">
|
|
||||||
{/* <!-- Modal toggle --> */}
|
{/* <!-- Modal toggle --> */}
|
||||||
{/* <Link to={RouteLinks.manageAdminPage}>
|
{/* <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>
|
<i onClick={handleShowEditModal} className="fa-solid fa-eye text-base md:text-lg cursor-pointer p-2 text-sky-600"></i>
|
||||||
</Link> */}
|
</Link> */}
|
||||||
{/* <i onClick={handleShowEditModal} className="fa-solid fa-pen-to-square text-base md:text-lg cursor-pointer p-2"></i> */}
|
{/* <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> */}
|
{/* <i onClick={handleDeleteModal} className="fa-solid fa-trash text-base md:text-lg cursor-pointer p-2 text-red-500"></i> */}
|
||||||
|
<span className='text-primary text-xl'>
|
||||||
|
<Icons name='eye' />
|
||||||
|
</span>
|
||||||
<span className='text-red-500 text-xl'>
|
<span className='text-red-500 text-xl'>
|
||||||
<Icons name='trash' />
|
<Icons name='trash' />
|
||||||
</span>
|
</span>
|
||||||
@@ -110,7 +96,7 @@ export default function SelectLoanCom() {
|
|||||||
))
|
))
|
||||||
:
|
:
|
||||||
<tr className="w-3 p-3">
|
<tr className="w-3 p-3">
|
||||||
<td className="px-3 py-2" colSpan={6}>
|
<td className="px-3 py-2" colSpan={5}>
|
||||||
<div className="flex justify-center items-center">
|
<div className="flex justify-center items-center">
|
||||||
No Record Found
|
No Record Found
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { ReactNode, useEffect, useState } from "react";
|
import { ReactNode, useEffect, useState } from "react";
|
||||||
import MainBtn from "../MainBtn";
|
import MainBtn from "../MainBtn";
|
||||||
|
import Icons from "../Icons";
|
||||||
|
|
||||||
|
|
||||||
export default function TableWrapper({
|
export default function TableWrapper({
|
||||||
@@ -89,16 +90,20 @@ export default function TableWrapper({
|
|||||||
<div className='flex items-center gap-3 md:gap-6'>
|
<div className='flex items-center gap-3 md:gap-6'>
|
||||||
<MainBtn
|
<MainBtn
|
||||||
onClick={handlePrev}
|
onClick={handlePrev}
|
||||||
text='Prev'
|
// text='Prev'
|
||||||
className={`${currentPage == 0 ? 'bg-primary/50 pointer-events-none' : 'bg-primary'} text-white-light`}
|
className={`${currentPage == 0 ? 'bg-primary/50 pointer-events-none' : 'bg-primary'} text-white-light text-center flex justify-center gap-2 items-center`}
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
/>
|
>
|
||||||
|
<Icons name='prev' />
|
||||||
|
</MainBtn>
|
||||||
<MainBtn
|
<MainBtn
|
||||||
onClick={handleNext}
|
onClick={handleNext}
|
||||||
text='Next'
|
// text='Next'
|
||||||
className={`${currentPage + numberOfSelection >= data.length ? 'bg-primary/50 pointer-events-none' : 'bg-primary'} text-white-light`}
|
className={`${currentPage + numberOfSelection >= data.length ? 'bg-primary/50 pointer-events-none' : 'bg-primary'} text-white-light text-center flex justify-center gap-2 items-center`}
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
/>
|
>
|
||||||
|
<Icons name='next' />
|
||||||
|
</MainBtn>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import BreadcrumbCom from '../components/breadcrumb/BreadcrumbCom'
|
import BreadcrumbCom from '../components/breadcrumb/BreadcrumbCom'
|
||||||
|
// import ApprovedLoanCom from '../components/approvedloancom/ApprovedLoanCom'
|
||||||
|
|
||||||
export default function ApprovedLoansPage() {
|
export default function ApprovedLoansPage() {
|
||||||
return (
|
return (
|
||||||
@@ -8,6 +9,7 @@ export default function ApprovedLoansPage() {
|
|||||||
<p className=''>
|
<p className=''>
|
||||||
coming soon ...
|
coming soon ...
|
||||||
</p>
|
</p>
|
||||||
|
{/* <ApprovedLoanCom /> */}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import BreadcrumbCom from '../components/breadcrumb/BreadcrumbCom'
|
import BreadcrumbCom from '../components/breadcrumb/BreadcrumbCom'
|
||||||
|
// import SelectLoanCom from '../components/selectloancom/SelectLoanCom'
|
||||||
|
|
||||||
export default function SelectPage() {
|
export default function SelectPage() {
|
||||||
return (
|
return (
|
||||||
@@ -8,6 +9,7 @@ export default function SelectPage() {
|
|||||||
<p className=''>
|
<p className=''>
|
||||||
coming soon ...
|
coming soon ...
|
||||||
</p>
|
</p>
|
||||||
|
{/* <SelectLoanCom /> */}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user