Compare commits

...

19 Commits

Author SHA1 Message Date
victorAnumudu 2eb39b773a loan started list display 2024-05-03 10:48:00 +01:00
victorAnumudu 4e97119644 initial commit 2024-05-03 04:49:59 +01:00
ameye 7bc39a449c Merge branch 'login-new-api' of DigiFi/digifi-bko into master 2024-05-02 16:59:18 +00:00
victorAnumudu f7f728c066 added new login API 2024-05-02 14:00:57 +01:00
CHIEFSOFT\ameye 3845ecbefe env 2024-05-02 05:44:34 -04:00
ameye 43b0e60db2 Merge branch 'get-loan-started' of DigiFi/digifi-bko into master 2024-05-02 09:21:44 +00:00
victorAnumudu 51e06716e5 get loan started API added 2024-05-02 10:19:38 +01:00
ameye 9d7605ebfe Merge branch 'table-headers' of DigiFi/digifi-bko into master 2024-05-01 23:52:03 +00:00
victorAnumudu 54b550b624 removed used variable 2024-05-01 23:36:11 +01:00
victorAnumudu cead31a6d1 updated table header names 2024-05-01 23:33:32 +01:00
ameye 4508743be4 Merge branch 'axios-call-helper' of DigiFi/digifi-bko into master 2024-05-01 14:00:50 +00:00
victorAnumudu 7d43300724 added axios verb call function 2024-05-01 14:42:43 +01:00
CHIEFSOFT\ameye e05d465c2f icons update 2024-04-29 16:15:32 -04:00
ameye 75a7496164 Merge branch 'page-tables' of DigiFi/digifi-bko into master 2024-04-25 17:02:41 +00:00
victorAnumudu 25b48416b7 page dummy table 2024-04-25 16:48:09 +01:00
ameye 996eee612d Merge branch 'help-component' of DigiFi/digifi-bko into master 2024-04-25 13:16:55 +00:00
victorAnumudu aa7c1b0354 help component hidden 2024-04-25 14:13:45 +01:00
CHIEFSOFT\ameye 4877e349f2 Change Text 2024-04-25 06:36:40 -04:00
ameye d163528f68 Merge branch 'aside-menu' of DigiFi/digifi-bko into master 2024-04-25 10:09:34 +00:00
35 changed files with 295 additions and 111 deletions
+4 -1
View File
@@ -11,4 +11,7 @@ VITE_APP_PURCHASE_URL=https://www.digifi.com/
VITE_APP_PREVIEW_URL=https://www.digifi.com/demo1/
VITE_APP_PREVIEW_REACT_URL=https://www.digifi.com
VITE_APP_PREVIEW_DOCS_URL=https://www.digifi.com/
VITE_APP_THEME_API_URL=https://api.digifi/api/api
VITE_APP_THEME_API_URL=https://api.digifi/api/api
# CUSTOM ENV VARIABLES ADDED
VITE_APP_USER_ENDPOINT=https://digifi-apidev.chiefsoft.net/digibko/v1
+12 -9
View File
@@ -1,14 +1,17 @@
PORT=3011
VITE_APP_BASE_LAYOUT_CONFIG_KEY='metronic-react-demo1-8150'
VITE_APP_API_URL=https://preview.keenthemes.com/metronic8/laravel/api
VITE_APP_BASE_LAYOUT_CONFIG_KEY='digifi-agent'
VITE_APP_API_URL=https://dev-agents.digifi.com
VITE_APP_VERSION=v8.2.3
VITE_APP_THEME_NAME=WrenchBoard
VITE_APP_THEME_DEMO=demo1
VITE_APP_THEME_NAME=digifi
VITE_APP_THEME_DEMO=digifi
VITE_APP_BOOTSTRAP_DOCS_LINK=https://getbootstrap.com/docs/5.0
VITE_APP_SASS_PATH=src/_digifi/assets/sass/core/components
VITE_APP_SASS_VARIABLES_PATH=src/_digifi/assets/sass/core/components/_variables.scss
VITE_APP_PURCHASE_URL=https://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469
VITE_APP_PREVIEW_URL=https://preview.keenthemes.com/metronic8/react/demo1/
VITE_APP_PREVIEW_REACT_URL=https://preview.keenthemes.com/metronic8/react
VITE_APP_PREVIEW_DOCS_URL=https://preview.keenthemes.com/metronic8/react/docs
VITE_APP_THEME_API_URL=https://preview.keenthemes.com/theme-api/api
VITE_APP_PURCHASE_URL=https://www.digifi.com/
VITE_APP_PREVIEW_URL=https://www.digifi.com/demo1/
VITE_APP_PREVIEW_REACT_URL=https://www.digifi.com
VITE_APP_PREVIEW_DOCS_URL=https://www.digifi.com/
VITE_APP_THEME_API_URL=https://api.digifi/api/api
# CUSTOM ENV VARIABLES ADDED
VITE_APP_USER_ENDPOINT=https://digifi-apidev.chiefsoft.net/digibko/v1
+12 -9
View File
@@ -1,14 +1,17 @@
PORT=3011
VITE_APP_BASE_LAYOUT_CONFIG_KEY='metronic-react-demo1-8150'
VITE_APP_API_URL=https://preview.keenthemes.com/metronic8/laravel/api
VITE_APP_BASE_LAYOUT_CONFIG_KEY='digifi-agent'
VITE_APP_API_URL=https://dev-agents.digifi.com
VITE_APP_VERSION=v8.2.3
VITE_APP_THEME_NAME=DigiFi
VITE_APP_THEME_DEMO=demo1
VITE_APP_THEME_NAME=digifi
VITE_APP_THEME_DEMO=digifi
VITE_APP_BOOTSTRAP_DOCS_LINK=https://getbootstrap.com/docs/5.0
VITE_APP_SASS_PATH=src/_digifi/assets/sass/core/components
VITE_APP_SASS_VARIABLES_PATH=src/_digifi/assets/sass/core/components/_variables.scss
VITE_APP_PURCHASE_URL=https://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469
VITE_APP_PREVIEW_URL=https://preview.keenthemes.com/metronic8/react/demo1/
VITE_APP_PREVIEW_REACT_URL=https://preview.keenthemes.com/metronic8/react
VITE_APP_PREVIEW_DOCS_URL=https://preview.keenthemes.com/metronic8/react/docs
VITE_APP_THEME_API_URL=https://preview.keenthemes.com/theme-api/api
VITE_APP_PURCHASE_URL=https://www.digifi.com/
VITE_APP_PREVIEW_URL=https://www.digifi.com/demo1/
VITE_APP_PREVIEW_REACT_URL=https://www.digifi.com
VITE_APP_PREVIEW_DOCS_URL=https://www.digifi.com/
VITE_APP_THEME_API_URL=https://api.digifi/api/api
# CUSTOM ENV VARIABLES ADDED
VITE_APP_USER_ENDPOINT=https://digifi-apidev.chiefsoft.net/digibko/v1
+1 -1
View File
@@ -5,7 +5,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="WrenchBoard Agent" />
<meta name="description" content="digiFi BackOffice" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter:300,400,500,600,700" />
<title>digiFi Back Office</title>
<link rel="shortcut icon" href="media/logos/favicon.ico" />
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 713 B

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 950 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

+2 -2
View File
@@ -75,7 +75,7 @@ function groupingOnSelect(
function groupingOnSelectAll<T>(
isAllSelected: boolean,
setSelected: Dispatch<SetStateAction<Array<ID>>>,
data?: Array<T & {id?: ID}>
data?: Array<T & {uid?: ID}>
) {
if (isAllSelected) {
setSelected([])
@@ -86,7 +86,7 @@ function groupingOnSelectAll<T>(
return
}
setSelected(data.filter((item) => item.id).map((item) => item.id))
setSelected(data.filter((item) => item.uid).map((item) => item.uid))
}
// Hook
+2 -1
View File
@@ -1,6 +1,6 @@
import {Dispatch, SetStateAction} from 'react'
export type ID = undefined | null | number
export type ID = undefined | null | number | string
export type PaginationState = {
page: number
@@ -23,6 +23,7 @@ export type SearchState = {
export type Response<T> = {
data?: T
records?: Array<any>
payload?: {
message?: string
errors?: {
+1 -1
View File
@@ -34,7 +34,7 @@ const MasterLayout = () => {
{/* begin:: Drawers */}
<ActivityDrawer />
<RightToolbar />
{/* <RightToolbar /> */}
<DrawerMessenger />
{/* end:: Drawers */}
@@ -21,26 +21,26 @@ const SidebarMenuMain = () => {
</div>
</div>
<SidebarMenuItemWithSub
to='/crafted/pages'
to='/loan/pages'
title='Process'
fontIcon='bi-archive'
icon='element-plus'
>
<SidebarMenuItemWithSub to='/crafted/pages/process' title='Loan' hasBullet={true}>
<SidebarMenuItem to='/crafted/pages/process/started' title='Started' hasBullet={true} />
<SidebarMenuItem to='/crafted/pages/process/pending' title='Pending' hasBullet={true} />
<SidebarMenuItemWithSub to='/loan/pages/process' title='Loan' hasBullet={true}>
<SidebarMenuItem to='/loan/pages/process/started' title='Started' hasBullet={true} />
<SidebarMenuItem to='/loan/pages/process/pending' title='Pending' hasBullet={true} />
<SidebarMenuItem
to='/crafted/pages/process/ready'
to='/loan/pages/process/ready'
title='Ready'
hasBullet={true}
/>
<SidebarMenuItem
to='/crafted/pages/process/approved'
to='/loan/pages/process/approved'
title='Approved'
hasBullet={true}
/>
<SidebarMenuItem
to='/crafted/pages/process/rejected'
to='/loan/pages/process/rejected'
title='Rejected'
hasBullet={true}
/>
+18
View File
@@ -0,0 +1,18 @@
export function NewDateTimeFormatter(isoDateString:any, addHour = true) {
const date = new Date(isoDateString);
if (addHour) {
date.setTime(date.getTime() + 1 * 60 * 60 * 1000);
}
const formattedDate = date.toLocaleDateString("en-US", {
year: "numeric",
month: "numeric",
day: "numeric",
hour: "2-digit",
minute: "2-digit",
// second: "2-digit",
hour12: true,
timeZone: "UTC",
});
return formattedDate;
}
@@ -21,7 +21,7 @@ const HeaderUserMenu: FC = () => {
<div className='d-flex flex-column'>
<div className='fw-bolder d-flex align-items-center fs-5'>
{currentUser?.first_name} {currentUser?.first_name}
<span className='badge badge-light-success fw-bolder fs-8 px-2 py-1 ms-2'>Pro</span>
{/*<span className='badge badge-light-success fw-bolder fs-8 px-2 py-1 ms-2'>Pro</span>*/}
</div>
<a href='#' className='fw-bold text-muted text-hover-primary fs-7'>
{currentUser?.email}
@@ -11,7 +11,7 @@ import {
stringifyRequestQuery,
WithChildren,
} from '../../../../../../_digifi/helpers'
import {getUsers} from './_requests'
import {getStartedUsers} from './_requests'
import {User} from './_models'
import {useQueryRequest} from './QueryRequestProvider'
@@ -34,7 +34,7 @@ const QueryResponseProvider: FC<WithChildren> = ({children}) => {
} = useQuery(
`${QUERIES.USERS_LIST}-${query}`,
() => {
return getUsers(query)
return getStartedUsers(query)
},
{cacheTime: 0, keepPreviousData: true, refetchOnWindowFocus: false}
)
@@ -54,7 +54,7 @@ const useQueryResponseData = () => {
return []
}
return response?.data || []
return response?.records || []
}
const useQueryResponsePagination = () => {
@@ -3,7 +3,7 @@ export type User = {
id?: ID
name?: string
avatar?: string
email?: string
// email?: string
position?: string
role?: string
last_login?: string
@@ -14,6 +14,21 @@ export type User = {
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>>
@@ -4,11 +4,18 @@ 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 GET_USERS_URL = `${API_URL}/users/query`;
const getUsers = (query: string): Promise<UsersQueryResponse> => {
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(`${GET_USERS_URL}?${query}`)
.get(`${NEW_USER_ENDPOINT}/loan/started`)
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
};
@@ -43,7 +50,7 @@ const deleteSelectedUsers = (userIds: Array<ID>): Promise<void> => {
};
export {
getUsers,
getStartedUsers,
deleteUser,
deleteSelectedUsers,
getUserById,
@@ -11,6 +11,7 @@ import {KTCardBody} from '../../../../../../_digifi/helpers'
const UsersTable = () => {
const users = useQueryResponseData()
// console.log('users', users)
const isLoading = useQueryResponseLoading()
const data = useMemo(() => users, [users])
const columns = useMemo(() => usersColumns, [])
@@ -0,0 +1,12 @@
import {FC} from 'react'
import { NewDateTimeFormatter } from '../../../../../../../_digifi/lib/NewDateTimeFormatter'
type Props = {
added?: string
}
const AddedCell: FC<Props> = ({added}) => (
<div className='badge badge-light fw-bolder'>{NewDateTimeFormatter((added))}</div>
)
export {AddedCell}
@@ -0,0 +1,11 @@
import {FC} from 'react'
type Props = {
agent?: string
}
const AgentCell: FC<Props> = ({agent}) => (
<> {agent && <div className='badge badge-light-success fw-bolder'>{agent}</div>}</>
)
export {AgentCell}
@@ -25,14 +25,14 @@ const UserInfoCell: FC<Props> = ({user}) => (
`text-${user.initials?.state}`
)}
>
{user.initials?.label}
{user.firstname?.substring(0,1).toUpperCase()} {user.lastname?.substring(0,1).toUpperCase()}
</div>
)}
</a>
</div>
<div className='d-flex flex-column'>
<a href='#' className='text-gray-800 text-hover-primary mb-1'>
{user.name}
{user.firstname} {user.lastname}
</a>
<span>{user.email}</span>
</div>
@@ -1,11 +1,11 @@
import {FC} from 'react'
type Props = {
last_login?: string
payment_month?: string
}
const UserLastLoginCell: FC<Props> = ({last_login}) => (
<div className='badge badge-light fw-bolder'>{last_login}</div>
const PaymentMonthCell: FC<Props> = ({payment_month}) => (
<div className='badge badge-light fw-bolder'>{payment_month}</div>
)
export {UserLastLoginCell}
export {PaymentMonthCell}
@@ -1,11 +0,0 @@
import {FC} from 'react'
type Props = {
two_steps?: boolean
}
const UserTwoStepsCell: FC<Props> = ({two_steps}) => (
<> {two_steps && <div className='badge badge-light-success fw-bolder'>Enabled</div>}</>
)
export {UserTwoStepsCell}
@@ -1,55 +1,57 @@
import {Column} from 'react-table'
import {UserInfoCell} from './UserInfoCell'
import {UserLastLoginCell} from './UserLastLoginCell'
import {UserTwoStepsCell} from './UserTwoStepsCell'
import { PaymentMonthCell } from './UserLastLoginCell'
import {AgentCell} from './AgentCell'
import {UserActionsCell} from './UserActionsCell'
import {UserSelectionCell} from './UserSelectionCell'
import {UserCustomHeader} from './UserCustomHeader'
import {UserSelectionHeader} from './UserSelectionHeader'
import {User} from '../../core/_models'
import { AddedCell } from './AddedCell'
const usersColumns: ReadonlyArray<Column<User>> = [
{
Header: (props) => <UserSelectionHeader tableProps={props} />,
id: 'selection',
Cell: ({...props}) => <UserSelectionCell id={props.data[props.row.index].id} />,
Cell: ({...props}) => <UserSelectionCell id={props.data[props.row.index].uid} />,
},
{
Header: (props) => <UserCustomHeader tableProps={props} title='Name' className='min-w-125px' />,
id: 'name',
id: 'firstname',
Cell: ({...props}) => <UserInfoCell user={props.data[props.row.index]} />,
},
{
Header: (props) => <UserCustomHeader tableProps={props} title='Role' className='min-w-125px' />,
accessor: 'role',
Header: (props) => <UserCustomHeader tableProps={props} title='Amount' className='min-w-125px' />,
accessor: 'loan_amount',
},
{
Header: (props) => (
<UserCustomHeader tableProps={props} title='Last login' className='min-w-125px' />
<UserCustomHeader tableProps={props} title='Payment Terms' className='min-w-125px' />
),
id: 'last_login',
Cell: ({...props}) => <UserLastLoginCell last_login={props.data[props.row.index].last_login} />,
id: 'payment_month',
Cell: ({...props}) => <PaymentMonthCell payment_month={props.data[props.row.index].payment_month} />,
},
{
Header: (props) => (
<UserCustomHeader tableProps={props} title='Two steps' className='min-w-125px' />
<UserCustomHeader tableProps={props} title='Agent' className='min-w-125px' />
),
id: 'two_steps',
Cell: ({...props}) => <UserTwoStepsCell two_steps={props.data[props.row.index].two_steps} />,
id: 'sales_agent',
Cell: ({...props}) => <AgentCell agent={props.data[props.row.index].sales_agent} />,
},
{
Header: (props) => (
<UserCustomHeader tableProps={props} title='Joined day' className='min-w-125px' />
<UserCustomHeader tableProps={props} title='Added' className='min-w-125px' />
),
accessor: 'joined_day',
id: 'added',
Cell: ({...props}) => <AddedCell added={props.data[props.row.index].added} />,
},
{
Header: (props) => (
<UserCustomHeader tableProps={props} title='Actions' className='text-end min-w-100px' />
),
id: 'actions',
Cell: ({...props}) => <UserActionsCell id={props.data[props.row.index].id} />,
Cell: ({...props}) => <UserActionsCell id={props.data[props.row.index].uid} />,
},
]
export {usersColumns}
export {usersColumns}
+3 -3
View File
@@ -53,9 +53,9 @@ export function setupAxios(axios: any) {
axios.interceptors.request.use(
(config: {headers: {Authorization: string}}) => {
const auth = getAuth()
if (auth && auth.api_token) {
config.headers.Authorization = `Bearer ${auth.api_token}`
}
// if (auth && auth.api_token) {
// config.headers.Authorization = `Bearer ${auth.api_token}`
// }
return config
},
@@ -0,0 +1,50 @@
import axios from "axios";
export function postAuxEnd(uri:string, reqData:any):Promise<any> {
const endPoint = import.meta.env.VITE_APP_USER_ENDPOINT + uri;
const formData = new FormData();
for (let value in reqData) {
formData.append(value, reqData[value]);
}
return axios.post(endPoint, formData)
.then((response) => {
console.log(response);
// if (response.data.internal_return == "-9999") {
// localStorage.clear();
// window.location.href = `/login?sessionExpired=true`;
// }
return response;
})
.catch((error) => {
if (error.response) {
//response status is an error code
console.log(
"ERROR-------------------------------------------------------"
);
console.log(error.response.status);
console.log(
"ERROR-------------------------------------------------------"
);
} else if (error.request) {
//response not received though the request was sent
console.log(
"ERROR2-------------------------------------------------------"
);
console.log(error?.request);
console.log(
"ERROR2-------------------------------------------------------"
);
} else {
//an error occurred when setting up the request
console.log(
"ERROR3-------------------------------------------------------"
);
console.log(error);
console.log(
"ERROR3-------------------------------------------------------"
);
}
});
}
+21
View File
@@ -1,6 +1,18 @@
export interface AuthModel {
api_token: string
refreshToken?: string
message?: string
call_return?: string
username: string
token?: string
id?: string
first_name?: string
last_name?: string
email?: string
email_verified_at?: string
created_at?: string
updated_at?: string
}
export interface UserAddressModel {
@@ -64,4 +76,13 @@ export interface UserModel {
communication?: UserCommunicationModel
address?: UserAddressModel
socialNetworks?: UserSocialNetworksModel
api_token: string
refreshToken?: string
message?: string
call_return?: string
token?: string
email_verified_at?: string
created_at?: string
updated_at?: string
}
+20 -10
View File
@@ -1,19 +1,25 @@
import axios from "axios";
import { AuthModel, UserModel } from "./_models";
import { postAuxEnd } from "./AxiosCallHelper";
const API_URL = import.meta.env.VITE_APP_API_URL;
export const GET_USER_BY_ACCESSTOKEN_URL = `${API_URL}/verify_token`;
export const LOGIN_URL = `${API_URL}/login`;
// export const GET_USER_BY_ACCESSTOKEN_URL = `${API_URL}/verify_token`;
// export const LOGIN_URL = `${API_URL}/login`;
export const GET_USER_BY_ACCESSTOKEN_URL = '/identity/verify_token'
export const LOGIN_URL = '/identity/token'
export const REGISTER_URL = `${API_URL}/register`;
export const REQUEST_PASSWORD_URL = `${API_URL}/forgot_password`;
// Server should return AuthModel
//Function to login user in // Server should return AuthModel
export function login(email: string, password: string) {
return axios.post<AuthModel>(LOGIN_URL, {
email,
password,
});
// return axios.post<AuthModel>(LOGIN_URL, {
// email,
// password,
// });
return postAuxEnd(LOGIN_URL, {username:email, pass:password})
}
// Server should return AuthModel
@@ -40,8 +46,12 @@ export function requestPassword(email: string) {
});
}
// export function getUserByToken(token: string) {
// return axios.post<UserModel>(GET_USER_BY_ACCESSTOKEN_URL, {
// api_token: token,
// });
// }
export function getUserByToken(token: string) {
return axios.post<UserModel>(GET_USER_BY_ACCESSTOKEN_URL, {
api_token: token,
});
return postAuxEnd(GET_USER_BY_ACCESSTOKEN_URL, {token})
}
+10 -10
View File
@@ -147,9 +147,9 @@ const ProcessHeader: FC = () => {
<Link
className={
`nav-link text-active-primary me-6 ` +
(location.pathname === '/crafted/pages/process/started' && 'active')
(location.pathname === '/loan/pages/process/started' && 'active')
}
to='/crafted/pages/process/started'
to='/loan/pages/process/started'
>
Started
</Link>
@@ -158,9 +158,9 @@ const ProcessHeader: FC = () => {
<Link
className={
`nav-link text-active-primary me-6 ` +
(location.pathname === '/crafted/pages/process/pending' && 'active')
(location.pathname === '/loan/pages/process/pending' && 'active')
}
to='/crafted/pages/process/pending'
to='/loan/pages/process/pending'
>
Pending
</Link>
@@ -169,9 +169,9 @@ const ProcessHeader: FC = () => {
<Link
className={
`nav-link text-active-primary me-6 ` +
(location.pathname === '/crafted/pages/process/ready' && 'active')
(location.pathname === '/loan/pages/process/ready' && 'active')
}
to='/crafted/pages/process/ready'
to='/loan/pages/process/ready'
>
Ready
</Link>
@@ -180,9 +180,9 @@ const ProcessHeader: FC = () => {
<Link
className={
`nav-link text-active-primary me-6 ` +
(location.pathname === '/crafted/pages/process/approved' && 'active')
(location.pathname === '/loan/pages/process/approved' && 'active')
}
to='/crafted/pages/process/approved'
to='/loan/pages/process/approved'
>
Approved
</Link>
@@ -191,9 +191,9 @@ const ProcessHeader: FC = () => {
<Link
className={
`nav-link text-active-primary me-6 ` +
(location.pathname === '/crafted/pages/process/rejected' && 'active')
(location.pathname === '/loan/pages/process/rejected' && 'active')
}
to='/crafted/pages/process/rejected'
to='/loan/pages/process/rejected'
>
Rejected
</Link>
+15 -14
View File
@@ -1,16 +1,17 @@
import {Navigate, Routes, Route, Outlet} from 'react-router-dom'
import {PageLink, PageTitle} from '../../../_digifi/layout/core'
import {Overview} from './components/Overview'
import {Projects} from './components/Projects'
import {Campaigns} from './components/Campaigns'
import {Documents} from './components/Documents'
import {Connections} from './components/Connections'
import {ProcessHeader} from './ProcessHeader'
// import {Overview} from './components/Overview'
// import {Projects} from './components/Projects'
// import {Campaigns} from './components/Campaigns'
// import {Documents} from './components/Documents'
// import {Connections} from './components/Connections'
// import {ProcessHeader} from './ProcessHeader'
import { StartedUserList } from './components/StartedUserList'
const processBreadCrumbs: Array<PageLink> = [
{
title: 'Loan',
path: '/crafted/pages/process/started',
path: '/loan/pages/process/started',
isSeparator: false,
isActive: false,
},
@@ -27,7 +28,7 @@ const ProcessPage = () => (
<Route
element={
<>
<ProcessHeader />
{/* <ProcessHeader /> */}
<Outlet />
</>
}
@@ -37,7 +38,7 @@ const ProcessPage = () => (
element={
<>
<PageTitle breadcrumbs={processBreadCrumbs}>Started</PageTitle>
<Overview />
<StartedUserList />
</>
}
/>
@@ -46,7 +47,7 @@ const ProcessPage = () => (
element={
<>
<PageTitle breadcrumbs={processBreadCrumbs}>Pending</PageTitle>
<Projects />
<StartedUserList />
</>
}
/>
@@ -55,7 +56,7 @@ const ProcessPage = () => (
element={
<>
<PageTitle breadcrumbs={processBreadCrumbs}>Ready</PageTitle>
<Campaigns />
<StartedUserList />
</>
}
/>
@@ -64,7 +65,7 @@ const ProcessPage = () => (
element={
<>
<PageTitle breadcrumbs={processBreadCrumbs}>Approved</PageTitle>
<Documents />
<StartedUserList />
</>
}
/>
@@ -73,11 +74,11 @@ const ProcessPage = () => (
element={
<>
<PageTitle breadcrumbs={processBreadCrumbs}>Rejected</PageTitle>
<Connections />
<StartedUserList />
</>
}
/>
<Route index element={<Navigate to='/crafted/pages/profile/started' />} />
<Route index element={<Navigate to='/loan/pages/profile/started' />} />
</Route>
</Routes>
)
@@ -0,0 +1,37 @@
import { KTCard } from "../../../../_digifi/helpers"
import { Content } from "../../../../_digifi/layout/components/content"
import { ToolbarWrapper } from "../../../../_digifi/layout/components/toolbar"
import { UsersListHeader } from "../../apps/user-management/users-list/components/header/UsersListHeader"
import { ListViewProvider, useListView } from "../../apps/user-management/users-list/core/ListViewProvider"
import { QueryRequestProvider } from "../../apps/user-management/users-list/core/QueryRequestProvider"
import { QueryResponseProvider } from "../../apps/user-management/users-list/core/QueryResponseProvider"
import { UsersTable } from "../../apps/user-management/users-list/table/UsersTable"
import { UserEditModal } from "../../apps/user-management/users-list/user-edit-modal/UserEditModal"
const UsersList = () => {
const {itemIdForUpdate} = useListView()
return (
<>
<KTCard>
<UsersListHeader />
<UsersTable />
</KTCard>
{itemIdForUpdate !== undefined && <UserEditModal />}
</>
)
}
const StartedUserList = () => (
<QueryRequestProvider>
<QueryResponseProvider>
<ListViewProvider>
<ToolbarWrapper />
<Content>
<UsersList />
</Content>
</ListViewProvider>
</QueryResponseProvider>
</QueryRequestProvider>
)
export {StartedUserList}
+1 -1
View File
@@ -27,7 +27,7 @@ const PrivateRoutes = () => {
<Route path='menu-test' element={<MenuTestPage />} />
{/* Lazy Modules */}
<Route
path='crafted/pages/process/*'
path='loan/pages/process/*'
element={
<SuspensedView>
<ProcessPage />