@@ -23,11 +23,12 @@ import SetUserPreferences from '../pages/HomePage/SetUserPreferences';
23
23
import Finance from '../pages/FinancePage/Finance' ;
24
24
import Sidebar from '../layouts/Sidebar/Sidebar' ;
25
25
import { Box } from '@mui/system' ;
26
- import { Container } from '@mui/material' ;
26
+ import { Container , Typography } from '@mui/material' ;
27
27
import ErrorPage from '../pages/ErrorPage' ;
28
- import { Role , isGuest } from 'shared' ;
28
+ import { Role , RoleEnum , isGuest } from 'shared' ;
29
29
import Calendar from '../pages/CalendarPage/Calendar' ;
30
30
import { useState } from 'react' ;
31
+ import PageBlock from '../layouts/PageBlock' ;
31
32
32
33
interface AppAuthenticatedProps {
33
34
userId : number ;
@@ -49,6 +50,14 @@ const AppAuthenticated: React.FC<AppAuthenticatedProps> = ({ userId, userRole })
49
50
}
50
51
}
51
52
53
+ const Maintainenance = ( ) => {
54
+ return (
55
+ < PageBlock >
56
+ < Typography > This Page is Currently Undergoing Maintainenance</ Typography >
57
+ </ PageBlock >
58
+ ) ;
59
+ } ;
60
+
52
61
return userSettingsData . slackId || isGuest ( userRole ) ? (
53
62
< AppContextUser >
54
63
< Box display = { 'flex' } >
@@ -58,7 +67,7 @@ const AppAuthenticated: React.FC<AppAuthenticatedProps> = ({ userId, userRole })
58
67
< Route path = { routes . PROJECTS } component = { Projects } />
59
68
< Redirect from = { routes . CR_BY_ID } to = { routes . CHANGE_REQUESTS_BY_ID } />
60
69
< 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 } />
62
71
< Route path = { routes . TEAMS } component = { Teams } />
63
72
< Route path = { routes . SETTINGS } component = { Settings } />
64
73
< Route path = { routes . ADMIN_TOOLS } component = { AdminTools } />
0 commit comments