Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c16690702 | |||
| 6987fbf9b4 | |||
| eb3d337a2e | |||
| ede0aa0358 | |||
| e2ea8e18ed | |||
| 5e13f6225f | |||
| 7fcf45fcf5 | |||
| 9f30419367 | |||
| 3a607071db |
@@ -62,6 +62,12 @@ const ListsWidget3: React.FC<Props> = ({dashData, className}) => {
|
|||||||
</span>
|
</span>
|
||||||
<span className='text-muted fw-semibold d-block'>{NewDateTimeFormatter(item?.added)}</span>
|
<span className='text-muted fw-semibold d-block'>{NewDateTimeFormatter(item?.added)}</span>
|
||||||
</div>
|
</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 */}
|
{/* end::Description */}
|
||||||
<span className='badge badge-light-primary fs-8 fw-bold'>status: {item?.status}</span>
|
<span className='badge badge-light-primary fs-8 fw-bold'>status: {item?.status}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+3
-3
@@ -40,13 +40,13 @@ const UserActionsCell: FC<Props> = ({id}) => {
|
|||||||
data-kt-menu-trigger='click'
|
data-kt-menu-trigger='click'
|
||||||
data-kt-menu-placement='bottom-end'
|
data-kt-menu-placement='bottom-end'
|
||||||
>
|
>
|
||||||
Actions
|
View
|
||||||
<KTIcon iconName='down' className='fs-5 m-0' />
|
{/* <KTIcon iconName='down' className='fs-5 m-0' /> */}
|
||||||
</a>
|
</a>
|
||||||
{/* begin::Menu */}
|
{/* begin::Menu */}
|
||||||
<div
|
<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'
|
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 */}
|
{/* begin::Menu item */}
|
||||||
<div className='menu-item px-3'>
|
<div className='menu-item px-3'>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const UserInfoCell: FC<Props> = ({user}) => (
|
|||||||
<a href='#' className='text-gray-800 text-hover-primary mb-1'>
|
<a href='#' className='text-gray-800 text-hover-primary mb-1'>
|
||||||
{user.firstname} {user.lastname}
|
{user.firstname} {user.lastname}
|
||||||
</a>
|
</a>
|
||||||
<span>{user.email}</span>
|
<span>{user.username}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ const getApprovedUsers = (query: string): Promise<UsersQueryResponse> => { // FU
|
|||||||
.get(`${NEW_USER_ENDPOINT}/loan/approved`)
|
.get(`${NEW_USER_ENDPOINT}/loan/approved`)
|
||||||
.then((d: AxiosResponse<UsersQueryResponse>) => d.data);
|
.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
|
const employersVerify = (uid: ID): Promise<UsersQueryResponse> => { // FUNCTION FOR EMPLOYERS VERIFICATION
|
||||||
return postAuxEnd('/employers/verify', {application_uid:uid})
|
return postAuxEnd('/employers/verify', {application_uid:uid})
|
||||||
@@ -97,7 +100,7 @@ export {
|
|||||||
getApprovedUsers,
|
getApprovedUsers,
|
||||||
employersVerify,
|
employersVerify,
|
||||||
getVerifiedLoanDetailsByUID,
|
getVerifiedLoanDetailsByUID,
|
||||||
|
sendServerOffer,
|
||||||
deleteUser,
|
deleteUser,
|
||||||
deleteSelectedUsers,
|
deleteSelectedUsers,
|
||||||
getUserById,
|
getUserById,
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ const UserActionsCell: FC<Props> = ({ id }) => {
|
|||||||
data-kt-users-table-filter="delete_row"
|
data-kt-users-table-filter="delete_row"
|
||||||
onClick={async () => resendVerification()}
|
onClick={async () => resendVerification()}
|
||||||
>
|
>
|
||||||
Resend Verification
|
Employer Verification
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{/* end::Menu item */}
|
{/* end::Menu item */}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { FC, useEffect } from "react";
|
import { FC, useEffect } from "react";
|
||||||
import { useQueryClient } from "react-query";
|
import {useMutation, useQueryClient} from "react-query";
|
||||||
import { MenuComponent } from "../../../../../../_digifi/assets/ts/components";
|
import { MenuComponent } from "../../../../../../_digifi/assets/ts/components";
|
||||||
import { ID, KTIcon, QUERIES } from "../../../../../../_digifi/helpers";
|
import { ID, KTIcon, QUERIES } from "../../../../../../_digifi/helpers";
|
||||||
import { useListView } from "../../core/ListViewProvider";
|
import { useListView } from "../../core/ListViewProvider";
|
||||||
@@ -7,6 +7,7 @@ import { useQueryResponse } from "../../core/QueryResponseProvider";
|
|||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
|
||||||
import { User } from "../../../core/_models";
|
import { User } from "../../../core/_models";
|
||||||
|
import {sendServerOffer} from "../../../core/_requests.ts";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
id: ID;
|
id: ID;
|
||||||
@@ -24,7 +25,23 @@ const UserActionsCell: FC<Props> = ({ id, data }) => {
|
|||||||
MenuComponent.reinitialization();
|
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
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
@@ -42,11 +59,21 @@ const UserActionsCell: FC<Props> = ({ id, data }) => {
|
|||||||
>
|
>
|
||||||
{/* begin::Menu item */}
|
{/* begin::Menu item */}
|
||||||
<div className="menu-item px-3">
|
<div className="menu-item px-3">
|
||||||
<Link state={{selectedUser}} to='/loan/verified/process' className="menu-link px-3">
|
<a
|
||||||
Process
|
className="menu-link px-3"
|
||||||
</Link>
|
data-kt-users-table-filter="delete_row"
|
||||||
|
onClick={async () => sendUserOffer()}
|
||||||
|
>
|
||||||
|
Send Offer
|
||||||
|
</a>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
{/* end::Menu */}
|
{/* end::Menu */}
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export type RecentBVNProps = {
|
|||||||
birthdate?: string | null
|
birthdate?: string | null
|
||||||
phone?: string | null
|
phone?: string | null
|
||||||
nationality?: string | null
|
nationality?: string | null
|
||||||
|
pin?: string | null
|
||||||
}[]
|
}[]
|
||||||
|
|
||||||
export type DataProps = {
|
export type DataProps = {
|
||||||
|
|||||||
Reference in New Issue
Block a user