| @@ -72,72 +72,103 @@ const GLDUserRoutes = { | |||
| element: <ProofReply_GLD/> | |||
| }:{}, | |||
| isGrantedAny(["VIEW_PROOF","MAINTAIN_PROOF"])? | |||
| isGranted(["MAINTAIN_PAYMENT"])? | |||
| { | |||
| path: '/paymentPage/search', | |||
| element: <PaymentSearch_GLD/> | |||
| }:{}, | |||
| isGranted(["MAINTAIN_PAYMENT"])? | |||
| { | |||
| path: '/paymentPage/details/:id', | |||
| element: <PaymentDetails_GLD/> | |||
| }, | |||
| }:{}, | |||
| isGranted(["MAINTAIN_DEMANDNOTE"])? | |||
| { | |||
| path: '/paymentPage/createDemandNote', | |||
| element: <DemandNote_Create/> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_DEMANDNOTE","MAINTAIN_DEMANDNOTE"])? | |||
| { | |||
| path: '/paymentPage/demandNote', | |||
| element: <DemandNote_Search/> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_DEMANDNOTE","MAINTAIN_DEMANDNOTE"])? | |||
| { | |||
| path: '/paymentPage/demandNote/details/:id', | |||
| element: <DemandNote_Details/> | |||
| }, | |||
| }:{}, | |||
| isGranted("MAINTAIN_RECON") ? | |||
| { | |||
| path: '/paymentPage/reconReport', | |||
| element: <ReconReportPage/> | |||
| }, | |||
| }:{}, | |||
| isGranted("MAINTAIN_RECON") ? | |||
| { | |||
| path: '/gfmis/search', | |||
| element: <GFMIS_Search/> | |||
| }, | |||
| }:{}, | |||
| { | |||
| path: '/user/profile', | |||
| element: <UserMaintainPage /> | |||
| }, | |||
| isGranted("MAINTAIN_SETTING") ? | |||
| { | |||
| path: '/setting/sys', | |||
| element: <SystemSetting /> | |||
| }, | |||
| }:{}, | |||
| isGranted("MAINTAIN_ANNOUNCEMENT") ? | |||
| { | |||
| path: '/setting/announcement', | |||
| element: <AnnouncementSearch /> | |||
| }, | |||
| }:{}, | |||
| isGranted("MAINTAIN_ANNOUNCEMENT")? | |||
| { | |||
| path: '/setting/announcement/details/:id', | |||
| element: <AnnouncementDetails /> | |||
| }, | |||
| }:{}, | |||
| isGranted("MAINTAIN_EMAIL")? | |||
| { | |||
| path: '/setting/emailTemplate', | |||
| element: <EmailTemplatePage/> | |||
| }, | |||
| }:{}, | |||
| isGranted("MAINTAIN_EMAIL")? | |||
| { | |||
| path: '/setting/emailTemplate/:id', | |||
| element: <EmailTemplateDetailPage/> | |||
| }, | |||
| }:{}, | |||
| isGranted("MAINTAIN_GAZETTE_ISSUE")? | |||
| { | |||
| path: '/setting/holiday', | |||
| element: <HolidayPage/> | |||
| }, | |||
| }:{}, | |||
| isGranted("MAINTAIN_GAZETTE_ISSUE")? | |||
| { | |||
| path: '/setting/gazetteissuepage', | |||
| element: <GazetteIssuePage/> | |||
| }, | |||
| }:{}, | |||
| isGranted("MAINTAIN_DR")? | |||
| { | |||
| path: '/setting/drImport', | |||
| element: <DrImport /> | |||
| }, | |||
| }:{}, | |||
| { | |||
| path: '/setting/auditLog', | |||
| element: <AuditLogPage /> | |||
| @@ -2,11 +2,10 @@ import { lazy } from 'react'; | |||
| // project import | |||
| import Loadable from 'components/Loadable'; | |||
| // import MainLayout from "../layout/MainLayout"; | |||
| import {isGranted, isGrantedAny} from "auth/utils"; | |||
| const MainLayout = Loadable(lazy(() => import('layout/MainLayout'))); | |||
| // import {Navigate} from "react-router"; | |||
| // render - login | |||
| const SettingPage = Loadable(lazy(() => import('pages/pnspsSettingPage'))); | |||
| const PasswordPolicyPage = Loadable(lazy(()=> import('pages/pnspsPasswordPolicyPage'))) | |||
| const UserSearchPage = Loadable(lazy(()=>import ('pages/User/SearchPage'))); | |||
| @@ -28,50 +27,72 @@ const SettingRoutes = { | |||
| path: '/', | |||
| element: <MainLayout />, | |||
| children: [ | |||
| isGrantedAny(["VIEW_GROUP","MAINTAIN_GROUP"])? | |||
| { | |||
| path: 'usergroupSearchview', | |||
| element: <UserGroupSearchPage /> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_GROUP","MAINTAIN_GROUP"])? | |||
| { | |||
| path: '/userGroup/:id', | |||
| element: <UserGroupDetailPage /> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
| { | |||
| path: 'userSearchview', | |||
| element: <UserSearchPage /> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
| { | |||
| path: '/user/:id', | |||
| element: <UserMaintainPage /> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
| { | |||
| path: 'indUser', | |||
| element: <UserSearchPage_Individual /> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
| { | |||
| path: '/indUser/:id', | |||
| element: <UserMaintainPage_Individual /> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
| { | |||
| path: 'orgUser', | |||
| element: <UserSearchPage_Organization /> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_USER","MAINTAIN_USER"])? | |||
| { | |||
| path: '/orgUser/:id', | |||
| element: <UserMaintainPage_Organization /> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_ORG","MAINTAIN_ORG"])? | |||
| { | |||
| path: 'org', | |||
| element: <OrganizationSearchPage /> | |||
| }, | |||
| }:{}, | |||
| isGrantedAny(["VIEW_ORG","MAINTAIN_ORG"])? | |||
| { | |||
| path: '/org/:id', | |||
| element: <OrganizationDetailPage /> | |||
| }, | |||
| }:{}, | |||
| isGranted(["VIEW_USER","MAINTAIN_ORG"]) || isGranted(["MAINTAIN_USER","MAINTAIN_ORG"])? | |||
| { | |||
| path: '/org/fromUser/:id', | |||
| element: <OrganizationDetailPage_fromUser /> | |||
| }, | |||
| }:{}, | |||
| { | |||
| path: 'setting', | |||
| element: <SettingPage /> | |||