Compare commits

..

9 Commits

Author SHA1 Message Date
victorAnumudu 0a28d478d8 correct loan route added 2024-05-15 17:41:41 +01:00
ameye 0d9318ddd9 Merge branch 'remove_extra_backoffice_menu' of DigiFi/digifi-bko into master 2024-05-15 08:55:29 +00:00
Elias c53c37611a remove extra backoffice menu 2024-05-14 11:00:13 +01:00
tokslaw f7d82c0958 Merge branch 'dashboard-table-adjustment' of DigiFi/digifi-bko into master 2024-05-12 00:47:30 +00:00
victorAnumudu e1535de92c adjusted table list display 2024-05-10 18:41:03 +01:00
ameye 93f3c0c526 Merge branch 'list-pagination-modified' of DigiFi/digifi-bko into master 2024-05-10 13:10:40 +00:00
victorAnumudu 4cb347cfa0 modified table pagination 2024-05-10 12:46:15 +01:00
victorAnumudu 75699342c7 modified table pagination 2024-05-10 11:58:34 +01:00
ameye f2741f3325 Merge branch 'dash-details' of DigiFi/digifi-bko into master 2024-05-10 10:45:21 +00:00
19 changed files with 359 additions and 184 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

+36 -22
View File
@@ -1,18 +1,23 @@
import clsx from 'clsx'
import {KTIcon, toAbsoluteUrl} from '../../../helpers'
import {HeaderNotificationsMenu, HeaderUserMenu, Search, ThemeModeSwitcher} from '../../../partials'
import {useLayout} from '../../core'
import clsx from 'clsx';
import { KTIcon, toAbsoluteUrl } from '../../../helpers';
import {
HeaderNotificationsMenu,
HeaderUserMenu,
Search,
ThemeModeSwitcher,
} from '../../../partials';
import { useLayout } from '../../core';
const itemClass = 'ms-1 ms-md-4'
const itemClass = 'ms-1 ms-md-4';
const btnClass =
'btn btn-icon btn-custom btn-icon-muted btn-active-light btn-active-color-primary w-35px h-35px'
const userAvatarClass = 'symbol-35px'
const btnIconClass = 'fs-2'
'btn btn-icon btn-custom btn-icon-muted btn-active-light btn-active-color-primary w-35px h-35px';
const userAvatarClass = 'symbol-35px';
const btnIconClass = 'fs-2';
const Navbar = () => {
const {config} = useLayout()
const { config } = useLayout();
return (
<div className='app-navbar flex-shrink-0'>
<div className="app-navbar flex-shrink-0">
{/* <div className={clsx('app-navbar-item align-items-stretch', itemClass)}>
<Search />
</div> */}
@@ -43,33 +48,42 @@ const Navbar = () => {
</div> */}
<div className={clsx('app-navbar-item', itemClass)}>
<ThemeModeSwitcher toggleBtnClass={clsx('btn-active-light-primary btn-custom')} />
<ThemeModeSwitcher
toggleBtnClass={clsx('btn-active-light-primary btn-custom')}
/>
</div>
<div className={clsx('app-navbar-item', itemClass)}>
<div
className={clsx('cursor-pointer symbol', userAvatarClass)}
data-kt-menu-trigger="{default: 'click'}"
data-kt-menu-attach='parent'
data-kt-menu-placement='bottom-end'
data-kt-menu-attach="parent"
data-kt-menu-placement="bottom-end"
>
<img src={toAbsoluteUrl('media/avatars/300-3.jpg')} alt='' />
<img
src={toAbsoluteUrl('media/avatars/300-3.jpg')}
alt=""
style={{ cursor: 'auto' }}
/>
</div>
<HeaderUserMenu />
{/* <HeaderUserMenu /> */}
</div>
{config.app?.header?.default?.menu?.display && (
<div className='app-navbar-item d-lg-none ms-2 me-n3' title='Show header menu'>
<div
className="app-navbar-item d-lg-none ms-2 me-n3"
title="Show header menu"
>
<div
className='btn btn-icon btn-active-color-primary w-35px h-35px'
id='kt_app_header_menu_toggle'
className="btn btn-icon btn-active-color-primary w-35px h-35px"
id="kt_app_header_menu_toggle"
>
<KTIcon iconName='text-align-left' className={btnIconClass} />
<KTIcon iconName="text-align-left" className={btnIconClass} />
</div>
</div>
)}
</div>
)
}
);
};
export {Navbar}
export { Navbar };
@@ -57,7 +57,7 @@ export default function RecentBVNList({
},[itemsPerPage])
return (
<div className="w-full">
<div className="w-full d-flex flex-column h-100">
<h1 className={`text-2xl mb-5 font-semibold ${titleClass && titleClass}`}>{tableTitle}</h1>
{data.length > 0 && filterItem && (
@@ -86,7 +86,7 @@ export default function RecentBVNList({
{/* show prev and next button if data exist */}
{(data.length > 0 && data.length > itemsPerPage) && (
<div className="mt-2 mt-sm-5 w-full d-flex gap-4 justify-content-center align-items-center">
<div className="w-full h-100 d-flex gap-4 justify-content-center align-items-end">
<button
onClick={handlePrev}
className={`text-sm md:text-lg d-flex justify-content-center align-items-center border-1 transition-all duration-300 ${
@@ -94,6 +94,7 @@ export default function RecentBVNList({
? "text-slate-400 border-slate-400 dark:text-slate-400 dark:border-slate-400 pe-none"
: "text-slate-600 border-slate-600 dark:text-white dark:border-white"
}`}
disabled={currentPage == 0}
// style={{width:'30px', height:'30px'}}
>
&lt; Previous
@@ -106,11 +107,12 @@ export default function RecentBVNList({
<button
key={index}
onClick={handleNext}
className={`text-sm md:text-lg d-flex justify-content-center align-items-center border-1 transition-all duration-300 ${
className={`text-sm md:text-lg rounded-circle d-flex justify-content-center align-items-center border-1 transition-all duration-300 ${
currentPage != index
? "text-slate-400 border-slate-400 dark:text-slate-400 dark:border-slate-400"
: "text-slate-600 border-slate-600 dark:text-white dark:border-white pe-none"
}`}
disabled={currentPage != index}
style={{width:'30px', height:'30px'}}
>
{index/itemsPerPage +1}
@@ -126,9 +128,10 @@ export default function RecentBVNList({
? "text-slate-400 border-slate-400 dark:text-slate-400 dark:border-slate-400 pe-none"
: "text-slate-600 border-slate-600 dark:text-white dark:border-white"
}`}
disabled={currentPage + numberOfSelection >= data.length}
// style={{width:'30px', height:'30px'}}
>
Next &gt;
Next &gt;
</button>
</div>
)}
@@ -57,7 +57,7 @@ export default function RecentLoanAppList({
},[itemsPerPage])
return (
<div className="w-full">
<div className="w-full d-flex flex-column h-100">
<h1 className={`text-2xl mb-5 font-semibold ${titleClass && titleClass}`}>{tableTitle}</h1>
{data.length > 0 && filterItem && (
@@ -86,7 +86,7 @@ export default function RecentLoanAppList({
{/* show prev and next button if data exist */}
{(data.length > 0 && data.length > itemsPerPage) && (
<div className="mt-2 mt-sm-5 w-full d-flex gap-4 justify-content-center align-items-center">
<div className="w-full h-100 d-flex gap-4 justify-content-center align-items-end">
<button
onClick={handlePrev}
className={`text-sm md:text-lg d-flex justify-content-center align-items-center border-1 transition-all duration-300 ${
@@ -94,6 +94,7 @@ export default function RecentLoanAppList({
? "text-slate-400 border-slate-400 dark:text-slate-400 dark:border-slate-400 pe-none"
: "text-slate-600 border-slate-600 dark:text-white dark:border-white"
}`}
disabled={currentPage == 0}
// style={{width:'30px', height:'30px'}}
>
&lt; Previous
@@ -111,6 +112,7 @@ export default function RecentLoanAppList({
? "text-slate-400 border-slate-400 dark:text-slate-400 dark:border-slate-400"
: "text-slate-600 border-slate-600 dark:text-white dark:border-white pe-none"
}`}
disabled={currentPage != index}
style={{width:'30px', height:'30px'}}
>
{index/itemsPerPage +1}
@@ -126,6 +128,7 @@ export default function RecentLoanAppList({
? "text-slate-400 border-slate-400 dark:text-slate-400 dark:border-slate-400 pe-none"
: "text-slate-600 border-slate-600 dark:text-white dark:border-white"
}`}
disabled={currentPage + numberOfSelection >= data.length}
// style={{width:'30px', height:'30px'}}
>
Next &gt;
+24
View File
@@ -0,0 +1,24 @@
// FUNCTION TO RETURN AMOUNT TO TWO DECIMAL PLACES
export const AmountTo2DP = (
amount = "00",
) => {
// Convert the number to a string
let numStr = String(amount);
// Split the string into integer and decimal parts
let parts = numStr.split(".");
let integerPart = parts[0] || "";
let decimalPart = parts[1] || "";
// Add thousands separators to the integer part
let formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
// Truncate or pad the decimal part to two decimal points
let formattedDecimal = decimalPart.slice(0, 2).padEnd(2, "0");
// Combine the formatted integer and decimal parts
let formattedNumber = formattedInteger + '.' + formattedDecimal;
// return formattedNumber;
return formattedNumber;
};
@@ -17,9 +17,9 @@ const ListsWidget3: React.FC<Props> = ({dashData, className}) => {
{/* begin::Header */}
<div className='card-header border-0'>
<h3 className='card-title fw-bold text-gray-900'>BVN Verification</h3>
<div className='card-toolbar'>
{/* begin::Menu */}
{/* <button
{/* begin::Menu */}
{/* <div className='card-toolbar'>
<button
type='button'
className='btn btn-sm btn-icon btn-color-primary btn-active-light-primary'
data-kt-menu-trigger='click'
@@ -27,43 +27,43 @@ const ListsWidget3: React.FC<Props> = ({dashData, className}) => {
data-kt-menu-flip='top-end'
>
<KTIcon iconName='category' className='fs-2' />
</button> */}
{/* <Dropdown1 /> */}
{/* end::Menu */}
</div>
</button>
<Dropdown1 />
</div> */}
{/* end::Menu */}
</div>
{/* end::Header */}
{/* begin::Body */}
<div className='card-body pt-2'>
<div className='card-body pt-0'>
{dashData?.loading ?
null
:
dashData?.data?.recent_bvn && dashData?.data?.recent_bvn.length ?
<RecentBVNList
data = {dashData?.data?.recent_bvn}
itemsPerPage={5}
itemsPerPage={7}
>
{(data:RecentBVNProps) => (
<>
{data?.map(item => (
<div key={item?.uid} className='d-flex align-items-center mb-8'>
{/* begin::Bullet */}
<span className='bullet bullet-vertical h-40px bg-primary'></span>
<span className='bullet bullet-vertical h-40px bg-primary me-5'></span>
{/* end::Bullet */}
{/* begin::Checkbox */}
<div className='form-check form-check-custom form-check-solid mx-5'>
{/* <div className='form-check form-check-custom form-check-solid mx-5'>
<input className='form-check-input' type='checkbox' value='' />
</div>
</div> */}
{/* end::Checkbox */}
{/* begin::Description */}
<div className='flex-grow-1'>
<a href='#' className='text-gray-800 text-hover-primary fw-bold fs-6'>
<span className='text-gray-800 fw-bold fs-6'>
{item?.bvn}
</a>
</span>
<span className='text-muted fw-semibold d-block'>{NewDateTimeFormatter(item?.added)}</span>
</div>
{/* end::Description */}
<span className='badge badge-light-primary fs-8 fw-bold'>New</span>
<span className='badge badge-light-primary fs-8 fw-bold'>status: {item?.status}</span>
</div>
))}
</>
@@ -1,10 +1,10 @@
import { FC } from 'react'
import {KTIcon, toAbsoluteUrl} from '../../../helpers'
import { DashDataProps, RecentApplicationsProps } from '../../../../app/pages/dashboard/model'
import { DashDataProps } from '../../../../app/pages/dashboard/model'
import { NewDateTimeFormatter } from '../../../lib/NewDateTimeFormatter'
import RecentLoanAppList from '../../../layout/components/paginatedListing/RecentLoanAppList'
import { Link } from 'react-router-dom'
import { AmountTo2DP } from '../../../lib/AmountFormatter'
type Props = {
className: string
@@ -15,11 +15,12 @@ const TablesWidget10: FC<Props> = ({className, dashData}) => {
return (
<div className={`card ${className}`}>
{/* begin::Header */}
<div className='card-header border-0 pt-5'>
<h3 className='card-title align-items-start flex-column'>
<span className='card-label fw-bold fs-3 mb-1'>Recent Loan Application</span>
{/* <span className='text-muted mt-1 fw-semibold fs-7'>Over 500 members</span> */}
</h3>
<div className='card-header border-0'>
<h3 className='card-title fw-bold text-gray-900'>Recent Loan Application</h3>
{/* <h3 className='card-title align-items-start flex-column'>
<span className='card-label fw-bold fs-3'>Recent Loan Application</span>
<span className='text-muted mt-1 fw-semibold fs-7'>Over 500 members</span>
</h3> */}
{/* <div
className='card-toolbar'
data-bs-toggle='tooltip'
@@ -42,124 +43,124 @@ const TablesWidget10: FC<Props> = ({className, dashData}) => {
{dashData?.loading ?
null
: dashData?.data?.recent_applications ?
<RecentLoanAppList
data={dashData?.data?.recent_applications}
itemsPerPage={5}
>
{(data:RecentApplicationsProps)=>(
<>
<div className='card-body py-3'>
{/* begin::Table container */}
<div className='table-responsive'>
{/* begin::Table */}
<table className='table table-row-dashed table-row-gray-300 align-middle gs-0 gy-4'>
{/* begin::Table head */}
<thead>
<tr className='fw-bold text-muted'>
<th className='w-25px'>
<div className='form-check form-check-sm form-check-custom form-check-solid'>
<input
className='form-check-input'
type='checkbox'
value='1'
data-kt-check='true'
data-kt-check-target='.widget-9-check'
/>
</div>
</th>
<th className='min-w-150px'>Authors</th>
<th className='min-w-140px'>Amount</th>
<th className='min-w-120px'>Progress</th>
<th className='min-w-100px text-end'>Actions</th>
</tr>
</thead>
{/* end::Table head */}
{/* begin::Table body */}
<tbody>
{data && data.length ?
data.map(item => (
<tr key={item?.uid}>
<td>
<div className='form-check form-check-sm form-check-custom form-check-solid'>
<input className='form-check-input widget-9-check' type='checkbox' value='1' />
</div>
</td>
<td>
<div className='d-flex align-items-center'>
<div className='symbol symbol-45px me-5'>
<img src={toAbsoluteUrl('media/avatars/300-14.jpg')} alt='' />
<>
<div className='card-body py-0'>
{/* begin::Table container */}
<div className='table-responsive'>
{/* begin::Table */}
<table className='table table-row-dashed table-row-gray-300 align-middle gs-0 gy-4'>
{/* begin::Table head */}
<thead>
<tr className='fw-bold text-muted'>
<th className='w-25px'>
<div className='form-check form-check-sm form-check-custom form-check-solid'>
<input
className='form-check-input'
type='checkbox'
value='1'
data-kt-check='true'
data-kt-check-target='.widget-9-check'
/>
</div>
</th>
<th className='min-w-150px'>Authors</th>
<th className='min-w-140px'>Amount (NGN)</th>
<th className='min-w-120px'>Progress</th>
<th className='min-w-100px text-end'>Actions</th>
</tr>
</thead>
{/* end::Table head */}
{/* begin::Table body */}
<tbody>
{dashData?.data?.recent_applications && dashData?.data?.recent_applications.length ?
dashData?.data?.recent_applications.map((item, index:any) => {
if(index < 6){
return (
<tr key={item?.uid}>
<td>
<div className='form-check form-check-sm form-check-custom form-check-solid'>
<input className='form-check-input widget-9-check' type='checkbox' value='1' />
</div>
<div className='d-flex justify-content-start flex-column'>
<a href='#' className='text-gray-900 fw-bold text-hover-primary fs-6'>
{item?.firstname} {item?.lastname}
</td>
<td>
<div className='d-flex align-items-center'>
<div className='symbol symbol-45px me-5'>
<img src={toAbsoluteUrl('media/avatars/avatar1.jpg')} alt='' />
</div>
<div className='d-flex justify-content-start flex-column'>
<span className='text-gray-900 fw-bold fs-6'>
{item?.firstname} {item?.lastname}
</span>
<span className='text-muted fw-semibold text-muted d-block fs-7'>
{NewDateTimeFormatter(item?.added)}
</span>
</div>
</div>
</td>
<td>
<span className='text-gray-900 fw-bold d-block fs-6'>
{AmountTo2DP(item.loan_amount)}
</span>
<span className='text-muted fw-semibold text-muted d-block fs-7'>
{item?.sales_agent? `Agent: ${item?.sales_agent}` : ``}
</span>
</td>
<td className='text-end'>
<div className='d-flex flex-column w-100 me-2'>
<div className='d-flex flex-stack mb-2'>
<span className='text-muted me-2 fs-7 fw-semibold'>50%</span>
</div>
<div className='progress h-6px w-100'>
<div
className='progress-bar bg-primary'
role='progressbar'
style={{width: '50%'}}
></div>
</div>
</div>
</td>
<td>
<div className='d-flex justify-content-end flex-shrink-0'>
<a
href='#'
className='btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1'
>
<KTIcon iconName='switch' className='fs-3' />
</a>
<a
href='#'
className='btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1'
>
<KTIcon iconName='pencil' className='fs-3' />
</a>
<a
href='#'
className='btn btn-icon btn-bg-light btn-active-color-primary btn-sm'
>
<KTIcon iconName='trash' className='fs-3' />
</a>
<span className='text-muted fw-semibold text-muted d-block fs-7'>
{NewDateTimeFormatter(item?.added)}
</span>
</div>
</div>
</td>
<td>
<span className='text-gray-900 fw-bold text-hover-primary d-block fs-6'>
{item.loan_amount}
</span>
<span className='text-muted fw-semibold text-muted d-block fs-7'>
{item?.sales_agent? `Agent: ${item?.sales_agent}` : ``}
</span>
</td>
<td className='text-end'>
<div className='d-flex flex-column w-100 me-2'>
<div className='d-flex flex-stack mb-2'>
<span className='text-muted me-2 fs-7 fw-semibold'>50%</span>
</div>
<div className='progress h-6px w-100'>
<div
className='progress-bar bg-primary'
role='progressbar'
style={{width: '50%'}}
></div>
</div>
</div>
</td>
<td>
<div className='d-flex justify-content-end flex-shrink-0'>
<a
href='#'
className='btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1'
>
<KTIcon iconName='switch' className='fs-3' />
</a>
<a
href='#'
className='btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1'
>
<KTIcon iconName='pencil' className='fs-3' />
</a>
<a
href='#'
className='btn btn-icon btn-bg-light btn-active-color-primary btn-sm'
>
<KTIcon iconName='trash' className='fs-3' />
</a>
</div>
</td>
</tr>
))
:
<tr>
<td colSpan={5}>No data found!</td>
</tr>
</td>
</tr>
)
}
</tbody>
{/* end::Table body */}
</table>
{/* end::Table */}
</div>
{/* end::Table container */}
</div>
</>
)}
</RecentLoanAppList>
})
:
<tr>
<td colSpan={5}>No data found!</td>
</tr>
}
</tbody>
{/* end::Table body */}
</table>
{/* end::Table */}
<p className='py-1 w-100 text-center text-hover-primary'>
<Link to='/loan/pages/process/started'>more applications</Link>
</p>
</div>
{/* end::Table container */}
</div>
</>
:
null
}
+43
View File
@@ -0,0 +1,43 @@
import { ID, Response } from "../../../../_digifi/helpers"
export type User = {
id?: ID
name?: string
avatar?: string
// email?: string
position?: string
role?: string
last_login?: string
two_steps?: boolean
joined_day?: string
online?: boolean
initials?: {
label: string
state: string
}
firstname?: string,
lastname?: string
uid?: string
loan_amount?: string
payment_month?: string
sales_agent?: string
gender?: string | null
marital_status?: string
email?: string
address?: string
state?: string
country?: string
status?: string
added?: string
updated?: string
}
export type UsersQueryResponse = Response<Array<User>>
export const initialUser: User = {
avatar: 'avatars/300-6.jpg',
position: 'Art Director',
role: 'Administrator',
name: '',
email: '',
}
+87
View File
@@ -0,0 +1,87 @@
import axios, { AxiosResponse } from "axios";
import { ID, Response } from "../../../../_digifi/helpers"
import { User, UsersQueryResponse } from "./_models";
const API_URL = import.meta.env.VITE_APP_THEME_API_URL;
const USER_URL = `${API_URL}/user`;
// const GET_USERS_URL = `${API_URL}/users/query`;
const NEW_USER_ENDPOINT = import.meta.env.VITE_APP_USER_ENDPOINT
// const getStartedUsers = (query: string): Promise<UsersQueryResponse> => {
// return axios
// .get(`${GET_USERS_URL}?${query}`)
// .then((d: AxiosResponse<UsersQueryResponse>) => d.data);
// };
const getStartedUsers = (query: string): Promise<UsersQueryResponse> => { // FUNCTION TO GET USERS THAT HAVE STARTED LOAN APPLICATION
return axios
.get(`${NEW_USER_ENDPOINT}/loan/started`)
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
};
const getRejectedUsers = (query: string): Promise<UsersQueryResponse> => { // FUNCTION TO GET USERS THAT HAVE REJECTED LOAN APPLICATION
return axios
.get(`${NEW_USER_ENDPOINT}/loan/rejected`)
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
};
const getPendingUsers = (query: string): Promise<UsersQueryResponse> => { // FUNCTION TO GET USERS THAT HAVE PENDING LOAN APPLICATION
return axios
.get(`${NEW_USER_ENDPOINT}/loan/pending`)
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
};
const getReadyUsers = (query: string): Promise<UsersQueryResponse> => { // FUNCTION TO GET USERS THAT HAVE READY LOAN APPLICATION
return axios
.get(`${NEW_USER_ENDPOINT}/loan/ready`)
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
};
const getApprovedUsers = (query: string): Promise<UsersQueryResponse> => { // FUNCTION TO GET USERS THAT HAVE APPROVED LOAN APPLICATION
return axios
.get(`${NEW_USER_ENDPOINT}/loan/approved`)
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
};
const getUserById = (id: ID): Promise<User | undefined> => {
return axios
.get(`${USER_URL}/${id}`)
.then((response: AxiosResponse<Response<User>>) => response.data)
.then((response: Response<User>) => response.data);
};
const createUser = (user: User): Promise<User | undefined> => {
return axios
.put(USER_URL, user)
.then((response: AxiosResponse<Response<User>>) => response.data)
.then((response: Response<User>) => response.data);
};
const updateUser = (user: User): Promise<User | undefined> => {
return axios
.post(`${USER_URL}/${user.id}`, user)
.then((response: AxiosResponse<Response<User>>) => response.data)
.then((response: Response<User>) => response.data);
};
const deleteUser = (userId: ID): Promise<void> => {
return axios.delete(`${USER_URL}/${userId}`).then(() => {});
};
const deleteSelectedUsers = (userIds: Array<ID>): Promise<void> => {
const requests = userIds.map((id) => axios.delete(`${USER_URL}/${id}`));
return axios.all(requests).then(() => {});
};
export {
getStartedUsers,
getRejectedUsers,
getPendingUsers,
getReadyUsers,
getApprovedUsers,
deleteUser,
deleteSelectedUsers,
getUserById,
createUser,
updateUser,
};
@@ -11,8 +11,8 @@ import {
stringifyRequestQuery,
WithChildren,
} from '../../../../../../_digifi/helpers'
import {getStartedUsers} from './_requests'
import {User} from './_models'
import {getApprovedUsers} from '../../../core/_requests'
import {User} from '../../../core/_models'
import {useQueryRequest} from './QueryRequestProvider'
const QueryResponseContext = createResponseContext<User>(initialQueryResponse)
@@ -34,7 +34,7 @@ const QueryResponseProvider: FC<WithChildren> = ({children}) => {
} = useQuery(
`${QUERIES.USERS_LIST}-${query}`,
() => {
return getStartedUsers(query)
return getApprovedUsers(query)
},
{cacheTime: 0, keepPreviousData: true, refetchOnWindowFocus: false}
)
@@ -4,7 +4,7 @@ import {CustomHeaderColumn} from './columns/CustomHeaderColumn'
import {CustomRow} from './columns/CustomRow'
import {useQueryResponseData, useQueryResponseLoading} from '../core/QueryResponseProvider'
import {usersColumns} from './columns/_columns'
import {User} from '../core/_models'
import {User} from '../../../core/_models'
import {UsersListLoading} from '../components/loading/UsersListLoading'
import {UsersListPagination} from '../components/pagination/UsersListPagination'
import {KTCardBody} from '../../../../../../_digifi/helpers'
@@ -11,8 +11,8 @@ import {
stringifyRequestQuery,
WithChildren,
} from '../../../../../../_digifi/helpers'
import {getStartedUsers} from './_requests'
import {User} from './_models'
import {getPendingUsers} from '../../../core/_requests'
import {User} from '../../../core/_models'
import {useQueryRequest} from './QueryRequestProvider'
const QueryResponseContext = createResponseContext<User>(initialQueryResponse)
@@ -34,7 +34,7 @@ const QueryResponseProvider: FC<WithChildren> = ({children}) => {
} = useQuery(
`${QUERIES.USERS_LIST}-${query}`,
() => {
return getStartedUsers(query)
return getPendingUsers(query)
},
{cacheTime: 0, keepPreviousData: true, refetchOnWindowFocus: false}
)
@@ -4,7 +4,7 @@ import {CustomHeaderColumn} from './columns/CustomHeaderColumn'
import {CustomRow} from './columns/CustomRow'
import {useQueryResponseData, useQueryResponseLoading} from '../core/QueryResponseProvider'
import {usersColumns} from './columns/_columns'
import {User} from '../core/_models'
import {User} from '../../../core/_models'
import {UsersListLoading} from '../components/loading/UsersListLoading'
import {UsersListPagination} from '../components/pagination/UsersListPagination'
import {KTCardBody} from '../../../../../../_digifi/helpers'
@@ -11,8 +11,8 @@ import {
stringifyRequestQuery,
WithChildren,
} from '../../../../../../_digifi/helpers'
import {getStartedUsers} from './_requests'
import {User} from './_models'
import {getReadyUsers} from '../../../core/_requests'
import {User} from '../../../core/_models'
import {useQueryRequest} from './QueryRequestProvider'
const QueryResponseContext = createResponseContext<User>(initialQueryResponse)
@@ -34,7 +34,7 @@ const QueryResponseProvider: FC<WithChildren> = ({children}) => {
} = useQuery(
`${QUERIES.USERS_LIST}-${query}`,
() => {
return getStartedUsers(query)
return getReadyUsers(query)
},
{cacheTime: 0, keepPreviousData: true, refetchOnWindowFocus: false}
)
@@ -4,7 +4,7 @@ import {CustomHeaderColumn} from './columns/CustomHeaderColumn'
import {CustomRow} from './columns/CustomRow'
import {useQueryResponseData, useQueryResponseLoading} from '../core/QueryResponseProvider'
import {usersColumns} from './columns/_columns'
import {User} from '../core/_models'
import {User} from '../../../core/_models'
import {UsersListLoading} from '../components/loading/UsersListLoading'
import {UsersListPagination} from '../components/pagination/UsersListPagination'
import {KTCardBody} from '../../../../../../_digifi/helpers'
@@ -11,8 +11,8 @@ import {
stringifyRequestQuery,
WithChildren,
} from '../../../../../../_digifi/helpers'
import {getStartedUsers} from './_requests'
import {User} from './_models'
import {getRejectedUsers} from '../../../core/_requests'
import {User} from '../../../core/_models'
import {useQueryRequest} from './QueryRequestProvider'
const QueryResponseContext = createResponseContext<User>(initialQueryResponse)
@@ -34,7 +34,7 @@ const QueryResponseProvider: FC<WithChildren> = ({children}) => {
} = useQuery(
`${QUERIES.USERS_LIST}-${query}`,
() => {
return getStartedUsers(query)
return getRejectedUsers(query)
},
{cacheTime: 0, keepPreviousData: true, refetchOnWindowFocus: false}
)
@@ -4,7 +4,7 @@ import {CustomHeaderColumn} from './columns/CustomHeaderColumn'
import {CustomRow} from './columns/CustomRow'
import {useQueryResponseData, useQueryResponseLoading} from '../core/QueryResponseProvider'
import {usersColumns} from './columns/_columns'
import {User} from '../core/_models'
import {User} from '../../../core/_models'
import {UsersListLoading} from '../components/loading/UsersListLoading'
import {UsersListPagination} from '../components/pagination/UsersListPagination'
import {KTCardBody} from '../../../../../../_digifi/helpers'
@@ -11,8 +11,8 @@ import {
stringifyRequestQuery,
WithChildren,
} from '../../../../../../_digifi/helpers'
import {getStartedUsers} from './_requests'
import {User} from './_models'
import {getStartedUsers} from '../../../core/_requests'
import {User} from '../../../core/_models'
import {useQueryRequest} from './QueryRequestProvider'
const QueryResponseContext = createResponseContext<User>(initialQueryResponse)
@@ -4,7 +4,7 @@ import {CustomHeaderColumn} from './columns/CustomHeaderColumn'
import {CustomRow} from './columns/CustomRow'
import {useQueryResponseData, useQueryResponseLoading} from '../core/QueryResponseProvider'
import {usersColumns} from './columns/_columns'
import {User} from '../core/_models'
import {User} from '../../../core/_models'
import {UsersListLoading} from '../components/loading/UsersListLoading'
import {UsersListPagination} from '../components/pagination/UsersListPagination'
import {KTCardBody} from '../../../../../../_digifi/helpers'