@@ -23,11 +23,12 @@ import SetUserPreferences from '../pages/HomePage/SetUserPreferences';
2323import Finance from '../pages/FinancePage/Finance' ;
2424import Sidebar from '../layouts/Sidebar/Sidebar' ;
2525import { Box } from '@mui/system' ;
26- import { Container } from '@mui/material' ;
26+ import { Container , Typography } from '@mui/material' ;
2727import ErrorPage from '../pages/ErrorPage' ;
28- import { Role , isGuest } from 'shared' ;
28+ import { Role , RoleEnum , isGuest } from 'shared' ;
2929import Calendar from '../pages/CalendarPage/Calendar' ;
3030import { useState } from 'react' ;
31+ import PageBlock from '../layouts/PageBlock' ;
3132
3233interface AppAuthenticatedProps {
3334 userId : number ;
@@ -49,6 +50,14 @@ const AppAuthenticated: React.FC<AppAuthenticatedProps> = ({ userId, userRole })
4950 }
5051 }
5152
53+ const Maintainenance = ( ) => {
54+ return (
55+ < PageBlock >
56+ < Typography > This Page is Currently Undergoing Maintainenance</ Typography >
57+ </ PageBlock >
58+ ) ;
59+ } ;
60+
5261 return userSettingsData . slackId || isGuest ( userRole ) ? (
5362 < AppContextUser >
5463 < Box display = { 'flex' } >
@@ -58,7 +67,7 @@ const AppAuthenticated: React.FC<AppAuthenticatedProps> = ({ userId, userRole })
5867 < Route path = { routes . PROJECTS } component = { Projects } />
5968 < Redirect from = { routes . CR_BY_ID } to = { routes . CHANGE_REQUESTS_BY_ID } />
6069 < Route path = { routes . CHANGE_REQUESTS } component = { ChangeRequests } />
61- < Route path = { routes . GANTT } component = { GanttChartPage } />
70+ < Route path = { routes . GANTT } component = { userRole === RoleEnum . APP_ADMIN ? GanttChartPage : Maintainenance } />
6271 < Route path = { routes . TEAMS } component = { Teams } />
6372 < Route path = { routes . SETTINGS } component = { Settings } />
6473 < Route path = { routes . ADMIN_TOOLS } component = { AdminTools } />
0 commit comments