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