Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 886c7dd8b3 | |||
| 7d955381c7 | |||
| 8df8fa45db | |||
| de5cb74241 |
@@ -60,13 +60,9 @@ const Navbar = () => {
|
||||
data-kt-menu-attach="parent"
|
||||
data-kt-menu-placement="bottom-end"
|
||||
>
|
||||
<img
|
||||
src={toAbsoluteUrl('media/avatars/300-3.jpg')}
|
||||
alt=""
|
||||
style={{ cursor: 'auto' }}
|
||||
/>
|
||||
<img src={toAbsoluteUrl('media/avatars/300-3.jpg')} alt="" />
|
||||
</div>
|
||||
{/* <HeaderUserMenu /> */}
|
||||
<HeaderUserMenu />
|
||||
</div>
|
||||
|
||||
{config.app?.header?.default?.menu?.display && (
|
||||
|
||||
@@ -1,83 +1,82 @@
|
||||
|
||||
import {FC} from 'react'
|
||||
import {Link} from 'react-router-dom'
|
||||
import {useAuth} from '../../../../app/modules/auth'
|
||||
import {Languages} from './Languages'
|
||||
import {toAbsoluteUrl} from '../../../helpers'
|
||||
import { FC } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { useAuth } from '../../../../app/modules/auth';
|
||||
import { Languages } from './Languages';
|
||||
import { toAbsoluteUrl } from '../../../helpers';
|
||||
|
||||
const HeaderUserMenu: FC = () => {
|
||||
const {currentUser, logout} = useAuth()
|
||||
const { currentUser, logout } = useAuth();
|
||||
return (
|
||||
<div
|
||||
className='menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-600 menu-state-bg menu-state-primary fw-bold py-4 fs-6 w-275px'
|
||||
data-kt-menu='true'
|
||||
className="menu menu-sub menu-sub-dropdown menu-column menu-rounded menu-gray-600 menu-state-bg menu-state-primary fw-bold py-4 fs-6 w-275px"
|
||||
data-kt-menu="true"
|
||||
>
|
||||
<div className='menu-item px-3'>
|
||||
<div className='menu-content d-flex align-items-center px-3'>
|
||||
<div className='symbol symbol-50px me-5'>
|
||||
<img alt='Logo' src={toAbsoluteUrl('media/avatars/300-3.jpg')} />
|
||||
<div className="menu-item px-3">
|
||||
<div className="menu-content d-flex align-items-center px-3">
|
||||
<div className="symbol symbol-50px me-5">
|
||||
<img alt="Logo" src={toAbsoluteUrl('media/avatars/300-3.jpg')} />
|
||||
</div>
|
||||
|
||||
<div className='d-flex flex-column'>
|
||||
<div className='fw-bolder d-flex align-items-center fs-5'>
|
||||
<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>*/}
|
||||
</div>
|
||||
<a href='#' className='fw-bold text-muted text-hover-primary fs-7'>
|
||||
<a href="#" className="fw-bold text-muted text-hover-primary fs-7">
|
||||
{currentUser?.email}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='separator my-2'></div>
|
||||
<div className="separator my-2"></div>
|
||||
|
||||
<div className='menu-item px-5'>
|
||||
{/* <div className='menu-item px-5'>
|
||||
<Link to={'/crafted/pages/profile'} className='menu-link px-5'>
|
||||
My Profile
|
||||
</Link>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className='menu-item px-5'>
|
||||
{/* <div className='menu-item px-5'>
|
||||
<a href='#' className='menu-link px-5'>
|
||||
<span className='menu-text'>My Projects</span>
|
||||
<span className='menu-badge'>
|
||||
<span className='badge badge-light-danger badge-circle fw-bolder fs-7'>3</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div
|
||||
className='menu-item px-5'
|
||||
data-kt-menu-trigger='hover'
|
||||
data-kt-menu-placement='left-start'
|
||||
data-kt-menu-flip='bottom'
|
||||
className="menu-item px-5"
|
||||
data-kt-menu-trigger="hover"
|
||||
data-kt-menu-placement="left-start"
|
||||
data-kt-menu-flip="bottom"
|
||||
>
|
||||
<a href='#' className='menu-link px-5'>
|
||||
{/* <a href='#' className='menu-link px-5'>
|
||||
<span className='menu-title'>My Subscription</span>
|
||||
<span className='menu-arrow'></span>
|
||||
</a>
|
||||
</a> */}
|
||||
|
||||
<div className='menu-sub menu-sub-dropdown w-175px py-4'>
|
||||
<div className='menu-item px-3'>
|
||||
<div className="menu-sub menu-sub-dropdown w-175px py-4">
|
||||
{/* <div className='menu-item px-3'>
|
||||
<a href='#' className='menu-link px-5'>
|
||||
Referrals
|
||||
</a>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className='menu-item px-3'>
|
||||
{/* <div className='menu-item px-3'>
|
||||
<a href='#' className='menu-link px-5'>
|
||||
Billing
|
||||
</a>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className='menu-item px-3'>
|
||||
{/* <div className='menu-item px-3'>
|
||||
<a href='#' className='menu-link px-5'>
|
||||
Payments
|
||||
</a>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className='menu-item px-3'>
|
||||
{/* <div className='menu-item px-3'>
|
||||
<a href='#' className='menu-link d-flex flex-stack px-5'>
|
||||
Statements
|
||||
<i
|
||||
@@ -86,11 +85,11 @@ const HeaderUserMenu: FC = () => {
|
||||
title='View your statements'
|
||||
></i>
|
||||
</a>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className='separator my-2'></div>
|
||||
<div className="separator my-2"></div>
|
||||
|
||||
<div className='menu-item px-3'>
|
||||
{/* <div className='menu-item px-3'>
|
||||
<div className='menu-content px-3'>
|
||||
<label className='form-check form-switch form-check-custom form-check-solid'>
|
||||
<input
|
||||
@@ -103,33 +102,33 @@ const HeaderUserMenu: FC = () => {
|
||||
<span className='form-check-label text-muted fs-7'>Notifications</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='menu-item px-5'>
|
||||
{/* <div className='menu-item px-5'>
|
||||
<a href='#' className='menu-link px-5'>
|
||||
My Statements
|
||||
</a>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className='separator my-2'></div>
|
||||
<div className="separator my-2"></div>
|
||||
|
||||
<Languages />
|
||||
{/* <Languages /> */}
|
||||
|
||||
<div className='menu-item px-5 my-1'>
|
||||
{/* <div className='menu-item px-5 my-1'>
|
||||
<Link to='/crafted/account/settings' className='menu-link px-5'>
|
||||
Account Settings
|
||||
</Link>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className='menu-item px-5'>
|
||||
<a onClick={logout} className='menu-link px-5'>
|
||||
<div className="menu-item px-5">
|
||||
<a onClick={logout} className="menu-link px-5">
|
||||
Sign Out
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
export {HeaderUserMenu}
|
||||
export { HeaderUserMenu };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { KTIcon } from "../../../../../../_digifi/helpers";
|
||||
import { useListView } from "../../core/ListViewProvider";
|
||||
import { UsersListFilter } from "./UsersListFilter";
|
||||
import { KTIcon } from '../../../../../../_digifi/helpers';
|
||||
import { useListView } from '../../core/ListViewProvider';
|
||||
import { UsersListFilter } from './UsersListFilter';
|
||||
|
||||
const UsersListToolbar = () => {
|
||||
const { setItemIdForUpdate } = useListView();
|
||||
@@ -13,7 +13,7 @@ const UsersListToolbar = () => {
|
||||
className="d-flex justify-content-end"
|
||||
data-kt-user-table-toolbar="base"
|
||||
>
|
||||
<UsersListFilter />
|
||||
{/* <UsersListFilter /> */}
|
||||
|
||||
{/* begin::Export */}
|
||||
{/* <button type='button' className='btn btn-light-primary me-3'>
|
||||
|
||||
@@ -1,57 +1,103 @@
|
||||
import {Column} from 'react-table'
|
||||
import {UserInfoCell} from './UserInfoCell'
|
||||
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'
|
||||
import { Column } from 'react-table';
|
||||
import { UserInfoCell } from './UserInfoCell';
|
||||
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 formatNumberWithCommas = (number: string): string => {
|
||||
return number.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
};
|
||||
|
||||
const usersColumns: ReadonlyArray<Column<User>> = [
|
||||
{
|
||||
Header: (props) => <UserSelectionHeader tableProps={props} />,
|
||||
id: 'selection',
|
||||
Cell: ({...props}) => <UserSelectionCell id={props.data[props.row.index].uid} />,
|
||||
},
|
||||
{
|
||||
Header: (props) => <UserCustomHeader tableProps={props} title='Name' className='min-w-125px' />,
|
||||
id: 'firstname',
|
||||
Cell: ({...props}) => <UserInfoCell user={props.data[props.row.index]} />,
|
||||
},
|
||||
{
|
||||
Header: (props) => <UserCustomHeader tableProps={props} title='Amount' className='min-w-125px' />,
|
||||
accessor: 'loan_amount',
|
||||
Cell: ({ ...props }) => (
|
||||
<UserSelectionCell id={props.data[props.row.index].uid} />
|
||||
),
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader tableProps={props} title='Payment Terms' className='min-w-125px' />
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Name"
|
||||
className="min-w-125px"
|
||||
/>
|
||||
),
|
||||
id: 'firstname',
|
||||
Cell: ({ ...props }) => <UserInfoCell user={props.data[props.row.index]} />,
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Amount"
|
||||
className="min-w-125px"
|
||||
/>
|
||||
),
|
||||
accessor: 'loan_amount',
|
||||
Cell: ({ row, data }) =>
|
||||
formatNumberWithCommas(data[row.index].loan_amount || '0'),
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Payment Terms"
|
||||
className="min-w-125px"
|
||||
/>
|
||||
),
|
||||
id: 'payment_month',
|
||||
Cell: ({...props}) => <PaymentMonthCell payment_month={props.data[props.row.index].payment_month} />,
|
||||
Cell: ({ ...props }) => (
|
||||
<PaymentMonthCell
|
||||
payment_month={props.data[props.row.index].payment_month}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader tableProps={props} title='Agent' className='min-w-125px' />
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Agent"
|
||||
className="min-w-125px"
|
||||
/>
|
||||
),
|
||||
id: 'sales_agent',
|
||||
Cell: ({...props}) => <AgentCell agent={props.data[props.row.index].sales_agent} />,
|
||||
Cell: ({ ...props }) => (
|
||||
<AgentCell agent={props.data[props.row.index].sales_agent} />
|
||||
),
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader tableProps={props} title='Added' className='min-w-125px' />
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Added"
|
||||
className="min-w-125px"
|
||||
/>
|
||||
),
|
||||
id: 'added',
|
||||
Cell: ({...props}) => <AddedCell added={props.data[props.row.index].added} />,
|
||||
Cell: ({ ...props }) => (
|
||||
<AddedCell added={props.data[props.row.index].added} />
|
||||
),
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader tableProps={props} title='Actions' className='text-end min-w-100px' />
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Actions"
|
||||
className="text-end min-w-100px"
|
||||
/>
|
||||
),
|
||||
id: 'actions',
|
||||
Cell: ({...props}) => <UserActionsCell id={props.data[props.row.index].uid} />,
|
||||
Cell: ({ ...props }) => (
|
||||
<UserActionsCell id={props.data[props.row.index].uid} />
|
||||
),
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
export {usersColumns}
|
||||
export { usersColumns };
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { KTIcon } from "../../../../../../_digifi/helpers";
|
||||
import { useListView } from "../../core/ListViewProvider";
|
||||
import { UsersListFilter } from "./UsersListFilter";
|
||||
import { KTIcon } from '../../../../../../_digifi/helpers';
|
||||
import { useListView } from '../../core/ListViewProvider';
|
||||
import { UsersListFilter } from './UsersListFilter';
|
||||
|
||||
const UsersListToolbar = () => {
|
||||
const { setItemIdForUpdate } = useListView();
|
||||
@@ -13,7 +13,7 @@ const UsersListToolbar = () => {
|
||||
className="d-flex justify-content-end"
|
||||
data-kt-user-table-toolbar="base"
|
||||
>
|
||||
<UsersListFilter />
|
||||
{/* <UsersListFilter /> */}
|
||||
|
||||
{/* begin::Export */}
|
||||
{/* <button type='button' className='btn btn-light-primary me-3'>
|
||||
|
||||
@@ -1,57 +1,103 @@
|
||||
import {Column} from 'react-table'
|
||||
import {UserInfoCell} from './UserInfoCell'
|
||||
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'
|
||||
import { Column } from 'react-table';
|
||||
import { UserInfoCell } from './UserInfoCell';
|
||||
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 formatNumberWithCommas = (number: string): string => {
|
||||
return number.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
};
|
||||
|
||||
const usersColumns: ReadonlyArray<Column<User>> = [
|
||||
{
|
||||
Header: (props) => <UserSelectionHeader tableProps={props} />,
|
||||
id: 'selection',
|
||||
Cell: ({...props}) => <UserSelectionCell id={props.data[props.row.index].uid} />,
|
||||
},
|
||||
{
|
||||
Header: (props) => <UserCustomHeader tableProps={props} title='Name' className='min-w-125px' />,
|
||||
id: 'firstname',
|
||||
Cell: ({...props}) => <UserInfoCell user={props.data[props.row.index]} />,
|
||||
},
|
||||
{
|
||||
Header: (props) => <UserCustomHeader tableProps={props} title='Amount' className='min-w-125px' />,
|
||||
accessor: 'loan_amount',
|
||||
Cell: ({ ...props }) => (
|
||||
<UserSelectionCell id={props.data[props.row.index].uid} />
|
||||
),
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader tableProps={props} title='Payment Terms' className='min-w-125px' />
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Name"
|
||||
className="min-w-125px"
|
||||
/>
|
||||
),
|
||||
id: 'firstname',
|
||||
Cell: ({ ...props }) => <UserInfoCell user={props.data[props.row.index]} />,
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Amount"
|
||||
className="min-w-125px"
|
||||
/>
|
||||
),
|
||||
accessor: 'loan_amount',
|
||||
Cell: ({ row, data }) =>
|
||||
formatNumberWithCommas(data[row.index].loan_amount || '0'),
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Payment Terms"
|
||||
className="min-w-125px"
|
||||
/>
|
||||
),
|
||||
id: 'payment_month',
|
||||
Cell: ({...props}) => <PaymentMonthCell payment_month={props.data[props.row.index].payment_month} />,
|
||||
Cell: ({ ...props }) => (
|
||||
<PaymentMonthCell
|
||||
payment_month={props.data[props.row.index].payment_month}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader tableProps={props} title='Agent' className='min-w-125px' />
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Agent"
|
||||
className="min-w-125px"
|
||||
/>
|
||||
),
|
||||
id: 'sales_agent',
|
||||
Cell: ({...props}) => <AgentCell agent={props.data[props.row.index].sales_agent} />,
|
||||
Cell: ({ ...props }) => (
|
||||
<AgentCell agent={props.data[props.row.index].sales_agent} />
|
||||
),
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader tableProps={props} title='Added' className='min-w-125px' />
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Added"
|
||||
className="min-w-125px"
|
||||
/>
|
||||
),
|
||||
id: 'added',
|
||||
Cell: ({...props}) => <AddedCell added={props.data[props.row.index].added} />,
|
||||
Cell: ({ ...props }) => (
|
||||
<AddedCell added={props.data[props.row.index].added} />
|
||||
),
|
||||
},
|
||||
{
|
||||
Header: (props) => (
|
||||
<UserCustomHeader tableProps={props} title='Actions' className='text-end min-w-100px' />
|
||||
<UserCustomHeader
|
||||
tableProps={props}
|
||||
title="Actions"
|
||||
className="text-end min-w-100px"
|
||||
/>
|
||||
),
|
||||
id: 'actions',
|
||||
Cell: ({...props}) => <UserActionsCell id={props.data[props.row.index].uid} />,
|
||||
Cell: ({ ...props }) => (
|
||||
<UserActionsCell id={props.data[props.row.index].uid} />
|
||||
),
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
export {usersColumns}
|
||||
export { usersColumns };
|
||||
|
||||
Reference in New Issue
Block a user