import { lazy } from 'react'; // project import import Loadable from 'components/Loadable'; import {isGranted, isGrantedAny} from "auth/utils"; const MainLayout = Loadable(lazy(() => import('layout/MainLayout'))); const SettingPage = Loadable(lazy(() => import('pages/pnspsSettingPage'))); const PasswordPolicyPage = Loadable(lazy(()=> import('pages/pnspsPasswordPolicyPage'))) const UserSearchPage = Loadable(lazy(()=>import ('pages/User/SearchPage'))); const UserMaintainPage = Loadable(lazy(() => import('pages/User/DetailPage'))); const UserSearchPage_Individual= Loadable(lazy(()=>import ('pages/User/SearchPage_Individual'))); const UserMaintainPage_Individual = Loadable(lazy(() => import('pages/User/DetailsPage_Individual'))); const UserSearchPage_Organization= Loadable(lazy(()=>import ('pages/User/SearchPage_Organization'))); const UserMaintainPage_Organization = Loadable(lazy(() => import('pages/User/DetailsPage_Organization'))); const UserGroupSearchPage = Loadable(lazy(() => import('pages/pnspsUserGroupSearchPage'))); const UserGroupDetailPage = Loadable(lazy(() => import('pages/pnspsUserGroupDetailPage'))); const OrganizationSearchPage = Loadable(lazy(() => import('pages/Organization/SearchPage'))); const OrganizationDetailPage = Loadable(lazy(() => import('pages/Organization/DetailPage'))); const OrganizationDetailPage_fromUser = Loadable(lazy(() => import('pages/Organization/DetailPage_FromUser'))); // ==============================|| AUTH ROUTING ||============================== // const SettingRoutes = { path: '/', element: , children: [ isGrantedAny(["VIEW_GROUP","MAINTAIN_GROUP"])? { path: 'usergroupSearchview', element: }:{}, isGrantedAny(["VIEW_GROUP","MAINTAIN_GROUP"])? { path: '/userGroup/:id', element: }:{}, isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? { path: 'userSearchview', element: }:{}, isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? { path: '/user/:id', element: }:{}, isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? { path: 'indUser', element: }:{}, isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? { path: '/indUser/:id', element: }:{}, isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? { path: 'orgUser', element: }:{}, isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? { path: '/orgUser/:id', element: }:{}, isGrantedAny(["VIEW_ORG","MAINTAIN_ORG"])? { path: 'org', element: }:{}, isGrantedAny(["VIEW_ORG","MAINTAIN_ORG"])? { path: '/org/:id', element: }:{}, isGranted(["VIEW_USER","MAINTAIN_ORG"]) || isGranted(["MAINTAIN_USER","MAINTAIN_ORG"])? { path: '/org/fromUser/:id', element: }:{}, { path: 'setting', element: }, { path: 'passwordpolicy', element: }, ] }; export default SettingRoutes;