Merge branch 'aside-menu' of DigiFi/digifi-bko into master

This commit is contained in:
2024-04-25 10:09:34 +00:00
committed by Gogs
21 changed files with 78 additions and 68 deletions
@@ -44,7 +44,7 @@ export function HeaderWrapper() {
<Link to='/dashboard' className='d-lg-none'>
<img
alt='Logo'
src={toAbsoluteUrl('media/logos/default-small.svg')}
src={toAbsoluteUrl('media/logos/custom-1.png')}
className='h-30px'
/>
</Link>
@@ -8,12 +8,13 @@ export function MenuInner() {
return (
<>
<MenuItem title={intl.formatMessage({id: 'MENU.DASHBOARD'})} to='/dashboard' />
<MenuItem title='Layout Builder' to='/builder' />
{/* <MenuItem title='Layout Builder' to='/builder' /> */}
<MenuInnerWithSub
title='Crafted'
to='/crafted'
menuPlacement='bottom-start'
menuTrigger='click'
show={false}
>
{/* PAGES */}
<MenuInnerWithSub
@@ -99,7 +100,7 @@ export function MenuInner() {
</MenuInnerWithSub>
</MenuInnerWithSub>
<MenuInnerWithSub title='Apps' to='/apps' menuPlacement='bottom-start' menuTrigger='click'>
<MenuInnerWithSub title='Apps' to='/apps' menuPlacement='bottom-start' menuTrigger='click' show={false}>
{/* PAGES */}
<MenuInnerWithSub
title='Chat'
@@ -122,6 +123,7 @@ export function MenuInner() {
to='/mega-menu'
menuPlacement='bottom-start'
menuTrigger='click'
show={false}
>
<MegaMenu />
</MenuInnerWithSub>
@@ -13,6 +13,7 @@ type Props = {
hasArrow?: boolean
hasBullet?: boolean
isMega?: boolean
show?:boolean
}
const MenuInnerWithSub: FC<Props & WithChildren> = ({
@@ -26,6 +27,7 @@ const MenuInnerWithSub: FC<Props & WithChildren> = ({
hasArrow = false,
hasBullet = false,
isMega = false,
show = true
}) => {
const menuItemRef = useRef<HTMLDivElement>(null)
const {pathname} = useLocation()
@@ -38,7 +40,7 @@ const MenuInnerWithSub: FC<Props & WithChildren> = ({
}, [menuTrigger, menuPlacement])
return (
<div ref={menuItemRef} className='menu-item menu-lg-down-accordion me-lg-1'>
<div ref={menuItemRef} className={`${!show && 'd-none'} menu-item menu-lg-down-accordion me-lg-1`}>
<span
className={clsx('menu-link py-3', {
active: checkIsActive(pathname, to),
@@ -53,19 +53,19 @@ const SidebarLogo = (props: PropsType) => {
{config.layoutType === 'dark-sidebar' ? (
<img
alt='Logo'
src={toAbsoluteUrl('media/logos/default-dark.svg')}
src={toAbsoluteUrl('media/logos/sidelogo_new.png')} //for dark mode
className='h-25px app-sidebar-logo-default'
/>
) : (
<>
<img
alt='Logo'
src={toAbsoluteUrl('media/logos/sidelogo.png')}
src={toAbsoluteUrl('media/logos/sidelogo_new.png')}
className='h-25px app-sidebar-logo-default theme-light-show'
/>
<img
alt='Logo'
src={toAbsoluteUrl('media/logos/default-dark.svg')}
src={toAbsoluteUrl('media/logos/sidelogo_new.png')} //for dark mode
className='h-25px app-sidebar-logo-default theme-dark-show'
/>
</>
@@ -73,7 +73,7 @@ const SidebarLogo = (props: PropsType) => {
<img
alt='Logo'
src={toAbsoluteUrl('media/logos/default-small.svg')}
src={toAbsoluteUrl('media/logos/custom-1.png')} // for when the sidebar reduces
className='h-20px app-sidebar-logo-minimize'
/>
</Link>
@@ -22,40 +22,41 @@ const SidebarMenuMain = () => {
</div>
<SidebarMenuItemWithSub
to='/crafted/pages'
title='Pages'
title='Process'
fontIcon='bi-archive'
icon='element-plus'
>
<SidebarMenuItemWithSub to='/crafted/pages/profile' title='Profile' hasBullet={true}>
<SidebarMenuItem to='/crafted/pages/profile/overview' title='Overview' hasBullet={true} />
<SidebarMenuItem to='/crafted/pages/profile/projects' title='Projects' hasBullet={true} />
<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} />
<SidebarMenuItem
to='/crafted/pages/profile/campaigns'
title='Campaigns'
to='/crafted/pages/process/ready'
title='Ready'
hasBullet={true}
/>
<SidebarMenuItem
to='/crafted/pages/profile/documents'
title='Documents'
to='/crafted/pages/process/approved'
title='Approved'
hasBullet={true}
/>
<SidebarMenuItem
to='/crafted/pages/profile/connections'
title='Connections'
to='/crafted/pages/process/rejected'
title='Rejected'
hasBullet={true}
/>
</SidebarMenuItemWithSub>
<SidebarMenuItemWithSub to='/crafted/pages/wizards' title='Wizards' hasBullet={true}>
{/* <SidebarMenuItemWithSub to='/crafted/pages/wizards' title='Wizards' hasBullet={true}>
<SidebarMenuItem
to='/crafted/pages/wizards/horizontal'
title='Horizontal'
hasBullet={true}
/>
<SidebarMenuItem to='/crafted/pages/wizards/vertical' title='Vertical' hasBullet={true} />
</SidebarMenuItemWithSub>
</SidebarMenuItemWithSub> */}
</SidebarMenuItemWithSub>
<SidebarMenuItemWithSub
{/* <SidebarMenuItemWithSub
to='/crafted/accounts'
title='Accounts'
icon='profile-circle'
@@ -63,12 +64,14 @@ const SidebarMenuMain = () => {
>
<SidebarMenuItem to='/crafted/account/overview' title='Overview' hasBullet={true} />
<SidebarMenuItem to='/crafted/account/settings' title='Settings' hasBullet={true} />
</SidebarMenuItemWithSub>
<SidebarMenuItemWithSub to='/error' title='Errors' fontIcon='bi-sticky' icon='cross-circle'>
</SidebarMenuItemWithSub> */}
{/* <SidebarMenuItemWithSub to='/error' title='Errors' fontIcon='bi-sticky' icon='cross-circle'>
<SidebarMenuItem to='/error/404' title='Error 404' hasBullet={true} />
<SidebarMenuItem to='/error/500' title='Error 500' hasBullet={true} />
</SidebarMenuItemWithSub>
<SidebarMenuItemWithSub
</SidebarMenuItemWithSub> */}
{/* <SidebarMenuItemWithSub
to='/crafted/widgets'
title='Widgets'
icon='element-7'
@@ -80,13 +83,15 @@ const SidebarMenuMain = () => {
<SidebarMenuItem to='/crafted/widgets/mixed' title='Mixed' hasBullet={true} />
<SidebarMenuItem to='/crafted/widgets/tables' title='Tables' hasBullet={true} />
<SidebarMenuItem to='/crafted/widgets/feeds' title='Feeds' hasBullet={true} />
</SidebarMenuItemWithSub>
</SidebarMenuItemWithSub> */}
<div className='menu-item'>
<div className='menu-content pt-8 pb-2'>
<span className='menu-section text-muted text-uppercase fs-8 ls-1'>Apps</span>
</div>
</div>
<SidebarMenuItemWithSub
{/* <SidebarMenuItemWithSub
to='/apps/chat'
title='Chat'
fontIcon='bi-chat-left'
@@ -95,7 +100,8 @@ const SidebarMenuMain = () => {
<SidebarMenuItem to='/apps/chat/private-chat' title='Private Chat' hasBullet={true} />
<SidebarMenuItem to='/apps/chat/group-chat' title='Group Chart' hasBullet={true} />
<SidebarMenuItem to='/apps/chat/drawer-chat' title='Drawer Chart' hasBullet={true} />
</SidebarMenuItemWithSub>
</SidebarMenuItemWithSub> */}
<SidebarMenuItem
to='/apps/user-management/users'
icon='abstract-28'
+2 -2
View File
@@ -1,8 +1,8 @@
import {FC} from 'react'
import {Link} from 'react-router-dom'
import {IconUserModel} from '../../../../app/modules/profile/ProfileModels'
import {UsersList} from '../../../../app/modules/profile/components/UsersList'
import {IconUserModel} from '../../../../app/modules/process/ProfileModels'
import {UsersList} from '../../../../app/modules/process/components/UsersList'
import {toAbsoluteUrl} from '../../../helpers'
type Props = {
@@ -6,7 +6,7 @@ import {Dropdown1} from '../../../_digifi/partials'
import { ToolbarWrapper } from '../../../_digifi/layout/components/toolbar'
import { Content } from '../../../_digifi/layout/components/content'
const ProfileHeader: FC = () => {
const ProcessHeader: FC = () => {
const location = useLocation()
return (
@@ -147,55 +147,55 @@ const ProfileHeader: FC = () => {
<Link
className={
`nav-link text-active-primary me-6 ` +
(location.pathname === '/crafted/pages/profile/overview' && 'active')
(location.pathname === '/crafted/pages/process/started' && 'active')
}
to='/crafted/pages/profile/overview'
to='/crafted/pages/process/started'
>
Overview
Started
</Link>
</li>
<li className='nav-item'>
<Link
className={
`nav-link text-active-primary me-6 ` +
(location.pathname === '/crafted/pages/profile/projects' && 'active')
(location.pathname === '/crafted/pages/process/pending' && 'active')
}
to='/crafted/pages/profile/projects'
to='/crafted/pages/process/pending'
>
Projects
Pending
</Link>
</li>
<li className='nav-item'>
<Link
className={
`nav-link text-active-primary me-6 ` +
(location.pathname === '/crafted/pages/profile/campaigns' && 'active')
(location.pathname === '/crafted/pages/process/ready' && 'active')
}
to='/crafted/pages/profile/campaigns'
to='/crafted/pages/process/ready'
>
Campaigns
Ready
</Link>
</li>
<li className='nav-item'>
<Link
className={
`nav-link text-active-primary me-6 ` +
(location.pathname === '/crafted/pages/profile/documents' && 'active')
(location.pathname === '/crafted/pages/process/approved' && 'active')
}
to='/crafted/pages/profile/documents'
to='/crafted/pages/process/approved'
>
Documents
Approved
</Link>
</li>
<li className='nav-item'>
<Link
className={
`nav-link text-active-primary me-6 ` +
(location.pathname === '/crafted/pages/profile/connections' && 'active')
(location.pathname === '/crafted/pages/process/rejected' && 'active')
}
to='/crafted/pages/profile/connections'
to='/crafted/pages/process/rejected'
>
Connections
Rejected
</Link>
</li>
</ul>
@@ -207,4 +207,4 @@ const ProfileHeader: FC = () => {
)
}
export {ProfileHeader}
export {ProcessHeader}
@@ -5,12 +5,12 @@ import {Projects} from './components/Projects'
import {Campaigns} from './components/Campaigns'
import {Documents} from './components/Documents'
import {Connections} from './components/Connections'
import {ProfileHeader} from './ProfileHeader'
import {ProcessHeader} from './ProcessHeader'
const profileBreadCrumbs: Array<PageLink> = [
const processBreadCrumbs: Array<PageLink> = [
{
title: 'Profile',
path: '/crafted/pages/profile/overview',
title: 'Loan',
path: '/crafted/pages/process/started',
isSeparator: false,
isActive: false,
},
@@ -22,64 +22,64 @@ const profileBreadCrumbs: Array<PageLink> = [
},
]
const ProfilePage = () => (
const ProcessPage = () => (
<Routes>
<Route
element={
<>
<ProfileHeader />
<ProcessHeader />
<Outlet />
</>
}
>
<Route
path='overview'
path='started'
element={
<>
<PageTitle breadcrumbs={profileBreadCrumbs}>Overview</PageTitle>
<PageTitle breadcrumbs={processBreadCrumbs}>Started</PageTitle>
<Overview />
</>
}
/>
<Route
path='projects'
path='pending'
element={
<>
<PageTitle breadcrumbs={profileBreadCrumbs}>Projects</PageTitle>
<PageTitle breadcrumbs={processBreadCrumbs}>Pending</PageTitle>
<Projects />
</>
}
/>
<Route
path='campaigns'
path='ready'
element={
<>
<PageTitle breadcrumbs={profileBreadCrumbs}>Campaigns</PageTitle>
<PageTitle breadcrumbs={processBreadCrumbs}>Ready</PageTitle>
<Campaigns />
</>
}
/>
<Route
path='documents'
path='approved'
element={
<>
<PageTitle breadcrumbs={profileBreadCrumbs}>Documents</PageTitle>
<PageTitle breadcrumbs={processBreadCrumbs}>Approved</PageTitle>
<Documents />
</>
}
/>
<Route
path='connections'
path='rejected'
element={
<>
<PageTitle breadcrumbs={profileBreadCrumbs}>Connections</PageTitle>
<PageTitle breadcrumbs={processBreadCrumbs}>Rejected</PageTitle>
<Connections />
</>
}
/>
<Route index element={<Navigate to='/crafted/pages/profile/overview' />} />
<Route index element={<Navigate to='/crafted/pages/profile/started' />} />
</Route>
</Routes>
)
export default ProfilePage
export default ProcessPage
+3 -3
View File
@@ -9,7 +9,7 @@ import {WithChildren} from '../../_digifi/helpers'
import BuilderPageWrapper from '../pages/layout-builder/BuilderPageWrapper'
const PrivateRoutes = () => {
const ProfilePage = lazy(() => import('../modules/profile/ProfilePage'))
const ProcessPage = lazy(() => import('../modules/process/ProcessPage'))
const WizardsPage = lazy(() => import('../modules/wizards/WizardsPage'))
const AccountPage = lazy(() => import('../modules/accounts/AccountPage'))
const WidgetsPage = lazy(() => import('../modules/widgets/WidgetsPage'))
@@ -27,10 +27,10 @@ const PrivateRoutes = () => {
<Route path='menu-test' element={<MenuTestPage />} />
{/* Lazy Modules */}
<Route
path='crafted/pages/profile/*'
path='crafted/pages/process/*'
element={
<SuspensedView>
<ProfilePage />
<ProcessPage />
</SuspensedView>
}
/>