Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c16690702 | |||
| 6987fbf9b4 | |||
| eb3d337a2e | |||
| ede0aa0358 | |||
| e2ea8e18ed | |||
| 5e13f6225f | |||
| 7fcf45fcf5 | |||
| 9f30419367 | |||
| 3a607071db | |||
| 5b1e24a299 | |||
| 021e80c0e9 | |||
| 9b2e0a6857 | |||
| 724e846826 | |||
| 0a31a25162 | |||
| 50e2385b50 |
@@ -2,12 +2,17 @@ import {useIntl} from 'react-intl'
|
||||
import {MenuItem} from './MenuItem'
|
||||
import {MenuInnerWithSub} from './MenuInnerWithSub'
|
||||
import {MegaMenu} from './MegaMenu'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
|
||||
export function MenuInner() {
|
||||
const intl = useIntl()
|
||||
const {pathname} = useLocation()
|
||||
const isHelpPath = pathname == '/help'
|
||||
return (
|
||||
<>
|
||||
<MenuItem title={intl.formatMessage({id: 'MENU.DASHBOARD'})} to='/dashboard' />
|
||||
{/* <MenuItem title={intl.formatMessage({id: 'MENU.DASHBOARD'})} to='/dashboard' /> */}
|
||||
<MenuItem title={`${isHelpPath ? 'Help' : 'Dashboard'}`} to={`${isHelpPath ? '/help' : '/dashboard'}`} />
|
||||
|
||||
{/* <MenuItem title='Layout Builder' to='/builder' /> */}
|
||||
<MenuInnerWithSub
|
||||
title='Crafted'
|
||||
|
||||
@@ -18,11 +18,12 @@ const EngageWidget10 = ({className}: Props) => (
|
||||
<div className='mb-10'>
|
||||
<div className='fs-2hx fw-bold text-gray-800 text-center mb-13'>
|
||||
<span className='me-2'>
|
||||
Need more help to manage to the platform
|
||||
Need more help to manage the platform
|
||||
<br />
|
||||
<span className='position-relative d-inline-block text-danger'>
|
||||
<Link
|
||||
to='/crafted/pages/profile/overview'
|
||||
to='/help'
|
||||
// target='_blank'
|
||||
className='text-danger
|
||||
opacity-75-hover'
|
||||
>
|
||||
|
||||
@@ -62,6 +62,12 @@ const ListsWidget3: React.FC<Props> = ({dashData, className}) => {
|
||||
</span>
|
||||
<span className='text-muted fw-semibold d-block'>{NewDateTimeFormatter(item?.added)}</span>
|
||||
</div>
|
||||
<div className='flex-grow-1'>
|
||||
<span className='text-gray-800 fw-bold fs-6'>
|
||||
Pin
|
||||
</span>
|
||||
<span className='text-muted fw-semibold d-block'>{item?.pin || 'dummy'}</span>
|
||||
</div>
|
||||
{/* end::Description */}
|
||||
<span className='badge badge-light-primary fs-8 fw-bold'>status: {item?.status}</span>
|
||||
</div>
|
||||
|
||||
@@ -108,13 +108,14 @@ const TablesWidget10: FC<Props> = ({className, dashData}) => {
|
||||
<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>
|
||||
{/* <span className='text-muted me-2 fs-7 fw-semibold'>50%</span> */}
|
||||
<span className='text-muted me-2 fs-7 fw-semibold'>{(Number(item?.status)/5)*100}%</span>
|
||||
</div>
|
||||
<div className='progress h-6px w-100'>
|
||||
<div
|
||||
className='progress-bar bg-primary'
|
||||
role='progressbar'
|
||||
style={{width: '50%'}}
|
||||
style={{width: `${(Number(item?.status)/5)*100}%`}}
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,12 @@ const getCustomerList = (query: string): Promise<UsersQueryResponse> => { // FUN
|
||||
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
|
||||
};
|
||||
|
||||
const getAdminUserList = (query: string): Promise<UsersQueryResponse> => { // FUNCTION TO GET USERS THAT HAVE STARTED LOAN APPLICATION
|
||||
return axios
|
||||
.get(`${NEW_USER_ENDPOINT}/users`)
|
||||
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
|
||||
};
|
||||
|
||||
const getUserById = (id: ID): Promise<User | undefined> => {
|
||||
return axios
|
||||
.get(`${USER_URL}/${id}`)
|
||||
@@ -51,6 +57,7 @@ const deleteSelectedUsers = (userIds: Array<ID>): Promise<void> => {
|
||||
|
||||
export {
|
||||
getCustomerList,
|
||||
getAdminUserList,
|
||||
deleteUser,
|
||||
deleteSelectedUsers,
|
||||
getUserById,
|
||||
|
||||
+3
-3
@@ -40,13 +40,13 @@ const UserActionsCell: FC<Props> = ({id}) => {
|
||||
data-kt-menu-trigger='click'
|
||||
data-kt-menu-placement='bottom-end'
|
||||
>
|
||||
Actions
|
||||
<KTIcon iconName='down' className='fs-5 m-0' />
|
||||
View
|
||||
{/* <KTIcon iconName='down' className='fs-5 m-0' /> */}
|
||||
</a>
|
||||
{/* begin::Menu */}
|
||||
<div
|
||||
className='menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-600 menu-state-bg-light-primary fw-bold fs-7 w-125px py-4'
|
||||
data-kt-menu='true'
|
||||
data-kt-menu='false'
|
||||
>
|
||||
{/* begin::Menu item */}
|
||||
<div className='menu-item px-3'>
|
||||
|
||||
@@ -57,10 +57,10 @@ const deleteSelectedUsers = (userIds: Array<ID>): Promise<void> => {
|
||||
|
||||
export {
|
||||
getCustomerList,
|
||||
getAdminUserList,
|
||||
deleteUser,
|
||||
deleteSelectedUsers,
|
||||
getUserById,
|
||||
getAdminUserList,
|
||||
createUser,
|
||||
updateUser,
|
||||
};
|
||||
|
||||
@@ -34,7 +34,7 @@ const UserInfoCell: FC<Props> = ({user}) => (
|
||||
<a href='#' className='text-gray-800 text-hover-primary mb-1'>
|
||||
{user.firstname} {user.lastname}
|
||||
</a>
|
||||
<span>{user.email}</span>
|
||||
<span>{user.username}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -27,7 +27,7 @@ const AuthLayout = () => {
|
||||
className="d-flex h-100 align-items-center"
|
||||
>
|
||||
{/* begin::Wrapper */}
|
||||
<div className="w-lg-500px p-10 bg-white shadow-sm">
|
||||
<div className="w-lg-500px p-10 bg-white shadow-sm rounded">
|
||||
{/* begin::Title */}
|
||||
<h1 className="text-black fs-2qx fw-bolder text-center mb-7">
|
||||
{/* begin::Logo */}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { Content } from "../../../_digifi/layout/components/content";
|
||||
|
||||
export default function HelpPage() {
|
||||
return (
|
||||
<Content>
|
||||
<div className="w-100 h-100">
|
||||
<h1 className="fs-2hx fw-bold text-gray-800">Help</h1>
|
||||
</div>
|
||||
</Content>
|
||||
)
|
||||
}
|
||||
@@ -49,6 +49,9 @@ const getApprovedUsers = (query: string): Promise<UsersQueryResponse> => { // FU
|
||||
.get(`${NEW_USER_ENDPOINT}/loan/approved`)
|
||||
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
|
||||
};
|
||||
const sendServerOffer = (uid: ID): Promise<UsersQueryResponse> => { // FUNCTION FOR EMPLOYERS VERIFICATION
|
||||
return postAuxEnd('/loan/send_offer', {application_uid:uid})
|
||||
};
|
||||
|
||||
const employersVerify = (uid: ID): Promise<UsersQueryResponse> => { // FUNCTION FOR EMPLOYERS VERIFICATION
|
||||
return postAuxEnd('/employers/verify', {application_uid:uid})
|
||||
@@ -97,7 +100,7 @@ export {
|
||||
getApprovedUsers,
|
||||
employersVerify,
|
||||
getVerifiedLoanDetailsByUID,
|
||||
|
||||
sendServerOffer,
|
||||
deleteUser,
|
||||
deleteSelectedUsers,
|
||||
getUserById,
|
||||
|
||||
@@ -72,7 +72,7 @@ const UserActionsCell: FC<Props> = ({ id }) => {
|
||||
data-kt-users-table-filter="delete_row"
|
||||
onClick={async () => resendVerification()}
|
||||
>
|
||||
Resend Verification
|
||||
Employer Verification
|
||||
</a>
|
||||
</div>
|
||||
{/* end::Menu item */}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { FC, useEffect } from "react";
|
||||
import { useQueryClient } from "react-query";
|
||||
import {useMutation, useQueryClient} from "react-query";
|
||||
import { MenuComponent } from "../../../../../../_digifi/assets/ts/components";
|
||||
import { ID, KTIcon, QUERIES } from "../../../../../../_digifi/helpers";
|
||||
import { useListView } from "../../core/ListViewProvider";
|
||||
@@ -7,6 +7,7 @@ import { useQueryResponse } from "../../core/QueryResponseProvider";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
import { User } from "../../../core/_models";
|
||||
import {sendServerOffer} from "../../../core/_requests.ts";
|
||||
|
||||
type Props = {
|
||||
id: ID;
|
||||
@@ -24,7 +25,23 @@ const UserActionsCell: FC<Props> = ({ id, data }) => {
|
||||
MenuComponent.reinitialization();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
const sendApplicationOffer = useMutation(() => sendServerOffer(id), {
|
||||
// 💡 response of the mutation is passed to onSuccess
|
||||
onSuccess: () => {
|
||||
// ✅ update detail view directly
|
||||
// queryClient.invalidateQueries([`${QUERIES.READY_LIST}-${query}`]);
|
||||
},
|
||||
});
|
||||
|
||||
const sendUserOffer = async () => { // FUNCTION TO RESEND VERIFICATION
|
||||
let cont = confirm('Are you sure, you want to send resend offer ?')
|
||||
if(cont){
|
||||
await sendApplicationOffer.mutateAsync()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<a
|
||||
href="#"
|
||||
@@ -42,11 +59,21 @@ const UserActionsCell: FC<Props> = ({ id, data }) => {
|
||||
>
|
||||
{/* begin::Menu item */}
|
||||
<div className="menu-item px-3">
|
||||
<Link state={{selectedUser}} to='/loan/verified/process' className="menu-link px-3">
|
||||
Process
|
||||
</Link>
|
||||
<a
|
||||
className="menu-link px-3"
|
||||
data-kt-users-table-filter="delete_row"
|
||||
onClick={async () => sendUserOffer()}
|
||||
>
|
||||
Send Offer
|
||||
</a>
|
||||
</div>
|
||||
{/* end::Menu item */}
|
||||
|
||||
<div className="menu-item px-3">
|
||||
<Link state={{selectedUser}} to='/loan/verified/process' className="menu-link px-3">
|
||||
Process Loan
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/* end::Menu */}
|
||||
</>
|
||||
|
||||
@@ -30,6 +30,7 @@ export type RecentBVNProps = {
|
||||
birthdate?: string | null
|
||||
phone?: string | null
|
||||
nationality?: string | null
|
||||
pin?: string | null
|
||||
}[]
|
||||
|
||||
export type DataProps = {
|
||||
|
||||
@@ -6,6 +6,7 @@ import { DashboardWrapper } from "../pages/dashboard/DashboardWrapper";
|
||||
// import {MenuTestPage} from '../pages/MenuTestPage'
|
||||
import { getCSSVariableValue } from "../../_digifi/assets/ts/_utils";
|
||||
import { WithChildren } from "../../_digifi/helpers";
|
||||
import HelpPage from "../modules/help/HelpPage";
|
||||
// import BuilderPageWrapper from '../pages/layout-builder/BuilderPageWrapper'
|
||||
|
||||
const PrivateRoutes = () => {
|
||||
@@ -98,6 +99,7 @@ const PrivateRoutes = () => {
|
||||
</SuspensedView>
|
||||
}
|
||||
/>
|
||||
<Route path='/help' element={<HelpPage />} />
|
||||
{/* Page Not Found */}
|
||||
<Route path="*" element={<Navigate to="/error/404" />} />
|
||||
</Route>
|
||||
|
||||
Reference in New Issue
Block a user