feat(frontend): add new enterprise modules
This commit is contained in:
parent
11e86f2000
commit
613501657d
|
|
@ -1,14 +1,16 @@
|
||||||
import ChartBarIcon from '@heroicons/react/24/solid/ChartBarIcon';
|
import ChartBarIcon from '@heroicons/react/24/solid/ChartBarIcon';
|
||||||
import CogIcon from '@heroicons/react/24/solid/CogIcon';
|
import CogIcon from '@heroicons/react/24/solid/CogIcon';
|
||||||
import ChatBubbleLeftRightIcon from '@heroicons/react/24/solid/ChatBubbleLeftRightIcon'
|
import ChatBubbleLeftRightIcon from '@heroicons/react/24/solid/ChatBubbleLeftRightIcon'
|
||||||
import MapIcon from '@heroicons/react/24/solid/MapIcon'
|
|
||||||
import RectangleGroupIcon from '@heroicons/react/24/solid/RectangleGroupIcon'
|
import RectangleGroupIcon from '@heroicons/react/24/solid/RectangleGroupIcon'
|
||||||
import ArrowDownOnSquareStackIcon from '@heroicons/react/24/solid/ArrowDownOnSquareStackIcon'
|
import ArrowDownOnSquareStackIcon from '@heroicons/react/24/solid/ArrowDownOnSquareStackIcon'
|
||||||
import UserGroupIcon from '@heroicons/react/24/solid/UserGroupIcon'
|
import UserGroupIcon from '@heroicons/react/24/solid/UserGroupIcon'
|
||||||
import KeyIcon from '@heroicons/react/24/solid/KeyIcon'
|
import KeyIcon from '@heroicons/react/24/solid/KeyIcon'
|
||||||
import CpuChip from '@heroicons/react/24/solid/CpuChipIcon';
|
import CpuChip from '@heroicons/react/24/solid/CpuChipIcon';
|
||||||
import BriefCaseIcon from '@heroicons/react/24/outline/BriefcaseIcon';
|
|
||||||
import { SvgIcon } from '@mui/material';
|
import { SvgIcon } from '@mui/material';
|
||||||
|
import FolderIcon from '@heroicons/react/24/solid/FolderIcon';
|
||||||
|
import ShieldCheckIcon from '@heroicons/react/24/solid/ShieldCheckIcon';
|
||||||
|
import EnvelopeIcon from '@heroicons/react/24/solid/EnvelopeIcon';
|
||||||
|
import UserIcon from '@heroicons/react/24/solid/UserIcon';
|
||||||
|
|
||||||
export const items = [
|
export const items = [
|
||||||
{
|
{
|
||||||
|
|
@ -48,19 +50,19 @@ export const items = [
|
||||||
</SvgIcon>
|
</SvgIcon>
|
||||||
),
|
),
|
||||||
disabled: true
|
disabled: true
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
title: 'Message',
|
||||||
|
tooltip: 'Upgrade to Business Plan',
|
||||||
|
disabled: true,
|
||||||
|
icon: (
|
||||||
|
<SvgIcon fontSize="small">
|
||||||
|
<EnvelopeIcon color='gray'/>
|
||||||
|
</SvgIcon>
|
||||||
|
)
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: 'Map',
|
|
||||||
tooltip: 'Upgrade to Business Plan',
|
|
||||||
icon: (
|
|
||||||
<SvgIcon fontSize="small">
|
|
||||||
<MapIcon color='gray'/>
|
|
||||||
</SvgIcon>
|
|
||||||
),
|
|
||||||
disabled: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: 'Credentials',
|
title: 'Credentials',
|
||||||
path: '/credentials',
|
path: '/credentials',
|
||||||
|
|
@ -71,11 +73,44 @@ export const items = [
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Users',
|
title: 'Access Control',
|
||||||
path: '/users',
|
disabled: true,
|
||||||
|
tooltip: 'Upgrade to Business Plan',
|
||||||
icon: (
|
icon: (
|
||||||
<SvgIcon fontSize="small">
|
<SvgIcon fontSize="small">
|
||||||
<UserGroupIcon />
|
<UserGroupIcon color='gray'/>
|
||||||
|
</SvgIcon>
|
||||||
|
),
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
title: 'Roles',
|
||||||
|
disabled: true,
|
||||||
|
tooltip: 'Upgrade to Business Plan',
|
||||||
|
icon: (
|
||||||
|
<SvgIcon fontSize="small">
|
||||||
|
<ShieldCheckIcon color='gray'/>
|
||||||
|
</SvgIcon>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Users',
|
||||||
|
disabled: true,
|
||||||
|
tooltip: 'Upgrade to Business Plan',
|
||||||
|
icon: (
|
||||||
|
<SvgIcon fontSize="small">
|
||||||
|
<UserIcon color='gray'/>
|
||||||
|
</SvgIcon>
|
||||||
|
)
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'File Server',
|
||||||
|
tooltip: 'Upgrade to Business Plan',
|
||||||
|
disabled: true,
|
||||||
|
icon: (
|
||||||
|
<SvgIcon fontSize="small">
|
||||||
|
<FolderIcon color='gray'/>
|
||||||
</SvgIcon>
|
</SvgIcon>
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import { usePathname } from 'next/navigation';
|
||||||
export const SideNavItem = (props) => {
|
export const SideNavItem = (props) => {
|
||||||
const { active = false, disabled, external, icon, path, title, children, padleft, tooltip } = props;
|
const { active = false, disabled, external, icon, path, title, children, padleft, tooltip } = props;
|
||||||
|
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(true);
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
|
|
||||||
const isItemActive = (currentPath, itemPath) => {
|
const isItemActive = (currentPath, itemPath) => {
|
||||||
|
|
@ -64,10 +64,14 @@ export const SideNavItem = (props) => {
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
||||||
{icon && (
|
{icon && (
|
||||||
<Box
|
<Box
|
||||||
component="span"
|
component="span"
|
||||||
|
onClick={()=>{
|
||||||
|
if (!path){
|
||||||
|
setOpen(!open)
|
||||||
|
}
|
||||||
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
color: 'neutral.400',
|
color: 'neutral.400',
|
||||||
|
|
@ -85,6 +89,11 @@ export const SideNavItem = (props) => {
|
||||||
)}
|
)}
|
||||||
<Box
|
<Box
|
||||||
component="span"
|
component="span"
|
||||||
|
onClick={()=>{
|
||||||
|
if (!path){
|
||||||
|
setOpen(!open)
|
||||||
|
}
|
||||||
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
color: 'neutral.400',
|
color: 'neutral.400',
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user