-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/deseng661: Implemented new admin navigation design. (#2565)
* feature/deseng661: Implemented new admin navigation design. * feature/deseng661: Separated close button component, modified types, disabled default button animations. * [To Feature] DESENG-661 Patch: Optimizations and Accessibility (#2566) * Patch for DESENG-661: Optimizations and Accessibility * Unify route item styles * Sonarcloud issues? Fixed * feature/deseng661: Enhanced accessibility of admin nav bar. * feature/deseng661: Further accessibility enhancements. * feature/deseng661: Changed aria label of nav menu. * feature/deseng661: Changed aria label again. --------- Co-authored-by: Nat² <[email protected]>
- Loading branch information
1 parent
bcbdcdc
commit 3443e95
Showing
6 changed files
with
267 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 37 additions & 18 deletions
55
met-web/src/components/layout/SideNav/SideNavElements.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,81 @@ | ||
import { USER_ROLES } from 'services/userService/constants'; | ||
|
||
interface Route { | ||
import { IconDefinition } from '@fortawesome/fontawesome-common-types'; | ||
import { | ||
faHouse, | ||
faPeopleArrows, | ||
faSquarePollHorizontal, | ||
faTags, | ||
faGlobe, | ||
faUserGear, | ||
faHouseUser, | ||
faMessagePen, | ||
} from '@fortawesome/pro-regular-svg-icons'; | ||
export interface Route { | ||
name: string; | ||
path: string; | ||
base: string; | ||
authenticated: boolean; | ||
allowedRoles: string[]; | ||
icon?: IconDefinition; | ||
customComponent?: React.ReactNode; | ||
} | ||
|
||
export const Routes: Route[] = [ | ||
{ name: 'Home', path: '/home', base: '/', authenticated: false, allowedRoles: [] }, | ||
{ name: 'Home', path: '/home', base: '/', authenticated: false, allowedRoles: [], icon: faHouse }, | ||
{ | ||
name: 'Engagements', | ||
path: '/engagements', | ||
base: '/engagements', | ||
authenticated: false, | ||
allowedRoles: [], | ||
icon: faPeopleArrows, | ||
}, | ||
{ | ||
name: 'Surveys', | ||
path: '/surveys', | ||
base: '/surveys', | ||
authenticated: false, | ||
allowedRoles: [], | ||
icon: faSquarePollHorizontal, | ||
}, | ||
{ | ||
name: 'Metadata Management', | ||
name: 'Metadata', | ||
path: '/metadatamanagement', | ||
base: '/metadatamanagement', | ||
authenticated: true, | ||
allowedRoles: [USER_ROLES.MANAGE_METADATA], | ||
}, | ||
{ | ||
name: 'User Management', | ||
path: '/usermanagement', | ||
base: 'usermanagement', | ||
authenticated: true, | ||
allowedRoles: [USER_ROLES.VIEW_USERS], | ||
}, | ||
{ | ||
name: 'Feedback Tool', | ||
path: '/feedback', | ||
base: 'feedback', | ||
authenticated: true, | ||
allowedRoles: [USER_ROLES.VIEW_FEEDBACKS], | ||
icon: faTags, | ||
}, | ||
{ | ||
name: 'Languages', | ||
path: '/languages', | ||
base: 'languages', | ||
authenticated: true, | ||
allowedRoles: [USER_ROLES.VIEW_LANGUAGES], | ||
icon: faGlobe, | ||
}, | ||
{ | ||
name: 'User Admin', | ||
path: '/usermanagement', | ||
base: 'usermanagement', | ||
authenticated: true, | ||
allowedRoles: [USER_ROLES.VIEW_USERS], | ||
icon: faUserGear, | ||
}, | ||
{ | ||
name: 'Tenant Admin', | ||
path: '/tenantadmin', | ||
base: 'tenantadmin', | ||
authenticated: true, | ||
allowedRoles: [USER_ROLES.SUPER_ADMIN], | ||
icon: faHouseUser, | ||
}, | ||
{ | ||
name: 'MET Feedback', | ||
path: '/feedback', | ||
base: 'feedback', | ||
authenticated: true, | ||
allowedRoles: [USER_ROLES.VIEW_FEEDBACKS], | ||
icon: faMessagePen, | ||
}, | ||
]; |
Oops, something went wrong.