Source

ui/layouts/utilities/routes-config.ts

  1. import AdminAnalyticsBehaviorTablePage from '../../pages/admin/AdminAnalyticsBehaviorTablePage';
  2. import AdminAnalyticsLoggedInUsersPage from '../../pages/admin/AdminAnalyticsLoggedInUsersPage';
  3. import AdminDatabaseManagementPage from '../../pages/admin/AdminDatabaseManagementPage';
  4. import AdminAnalyticsNewsletterPage from '../../pages/admin/AdminAnalyticsNewsletterPage';
  5. import AdminDataModelAcademicTermsPage from '../../pages/admin/AdminDataModelAcademicTermsPage';
  6. import AdminDataModelAcademicYearsPage from '../../pages/admin/AdminDataModelAcademicYearsPage';
  7. import AdminDataModelCareerGoalsPage from '../../pages/admin/AdminDataModelCareerGoalsPage';
  8. import AdminDataModelCourseInstancesPage from '../../pages/admin/AdminDataModelCourseInstancesPage';
  9. import AdminDataModelCoursesPage from '../../pages/admin/AdminDataModelCoursesPage';
  10. import AdminDataModelInterestKeywordsPage from '../../pages/admin/AdminDataModelInterestKeywordsPage';
  11. import AdminDataModelInterestsPage from '../../pages/admin/AdminDataModelInterestsPage';
  12. import AdminDataModelInterestTypesPage from '../../pages/admin/AdminDataModelInterestTypesPage';
  13. import AdminDataModelOpportunitiesPage from '../../pages/admin/AdminDataModelOpportunitiesPage';
  14. import AdminDataModelOpportunityInstancesPage from '../../pages/admin/AdminDataModelOpportunityInstancesPage';
  15. import AdminDataModelOpportunityTypesPage from '../../pages/admin/AdminDataModelOpportunityTypesPage';
  16. import AdminDataModelReviewsPage from '../../pages/admin/AdminDataModelReviewsPage';
  17. import AdminDataModelSlugsPage from '../../pages/admin/AdminDataModelSlugsPage';
  18. import AdminDataModelTeasersPage from '../../pages/admin/AdminDataModelTeasersPage';
  19. import AdminDataModelUsersPage from '../../pages/admin/AdminDataModelUsersPage';
  20. import AdminDataModelVerificationRequestsPage from '../../pages/admin/AdminDataModelVerificationRequestsPage';
  21. import AdvisorManageStudentsPage from '../../pages/advisor/AdvisorManageStudentsPage';
  22. import AlumniHomePage from '../../pages/alumni/AlumniHomePage';
  23. import CareerGoalBrowserViewPage from '../../pages/shared/browser-view/CareerGoalBrowserViewPage';
  24. import InternshipBrowserViewPage from '../../pages/shared/browser-view/InternshipBrowserViewPage';
  25. import CareerGoalViewPage from '../../pages/shared/item-view/CareerGoalViewPage';
  26. import CommunityPage from '../../pages/shared/CommunityPage';
  27. import CourseBrowserViewPage from '../../pages/shared/browser-view/CourseBrowserViewPage';
  28. import CourseViewPage from '../../pages/shared/item-view/CourseViewPage';
  29. import FacultyVerificationPage from '../../pages/faculty/FacultyVerificationPage';
  30. import ForecastPage from '../../pages/shared/ForecastPage';
  31. import HomePage from '../../pages/shared/HomePage';
  32. import InterestBrowserViewPage from '../../pages/shared/browser-view/InterestBrowserViewPage';
  33. import InterestViewPage from '../../pages/shared/item-view/InterestViewPage';
  34. import LandingCareerGoalsExplorerPage from '../../pages/landing/LandingCareerGoalsExplorerPage';
  35. import LandingCareerGoalExplorerPage from '../../pages/landing/LandingCareerGoalExplorerPage';
  36. import LandingCoursesExplorerPage from '../../pages/landing/LandingCoursesExplorerPage';
  37. import LandingCourseExplorerPage from '../../pages/landing/LandingCourseExplorerPage';
  38. import LandingHomePage from '../../pages/landing/LandingHomePage';
  39. import LandingInterestsExplorerPage from '../../pages/landing/LandingInterestsExplorerPage';
  40. import LandingInterestExplorerPage from '../../pages/landing/LandingInterestExplorerPage';
  41. import LandingOpportunitiesExplorerPage from '../../pages/landing/LandingOpportunitiesExplorerPage';
  42. import LandingOpportunityExplorerPage from '../../pages/landing/LandingOpportunityExplorerPage';
  43. import ManageOpportunitiesPage from '../../pages/shared/ManageOpportunitiesPage';
  44. import ManageReviewsPage from '../../pages/shared/ManageReviewsPage';
  45. import ManageVerificationsPage from '../../pages/shared/ManageVerificationsPage';
  46. import OpportunityBrowserViewPage from '../../pages/shared/browser-view/OpportunityBrowserViewPage';
  47. import OpportunityViewPage from '../../pages/shared/item-view/OpportunityViewPage';
  48. import SandboxLabelPage from '../../pages/sandbox/SandboxLabelPage';
  49. import SandBoxSegmentPage from '../../pages/sandbox/SandBoxSegmentPage';
  50. import SandBoxStickyStatePage from '../../pages/sandbox/SandBoxStickyStatePage';
  51. import SandBoxTabPage from '../../pages/sandbox/SandBoxTabPage';
  52. import StudentDegreePlannerPage from '../../pages/student/StudentDegreePlannerPage';
  53. import StudentIcePage from '../../pages/student/StudentIcePage';
  54. import StudentLevelsPage from '../../pages/student/StudentLevelsPage';
  55. import StudentReviewsPage from '../../pages/student/StudentReviewsPage';
  56. import StudentVerificationPage from '../../pages/student/StudentVerificationPage';
  57. import StudentVisibilityPage from '../../pages/student/StudentVisibilityPage';
  58. import TermsAndConditionsPage from '../../pages/shared/TermsAndConditionsPage';
  59. import VisibilityPage from '../../pages/shared/VisibilityPage';
  60. import {
  61. ANALYTICS,
  62. COMMUNITY,
  63. DATAMODEL,
  64. DEGREEPLANNER,
  65. EXPLORER,
  66. FORECASTS,
  67. HOME,
  68. ICE,
  69. LEVELS,
  70. MANAGE,
  71. VISIBILITY,
  72. STUDENT_REVIEWS,
  73. STUDENT_VERIFICATION,
  74. TERMS_AND_CONDITIONS,
  75. URL_ROLES,
  76. USERNAME,
  77. VERIFICATION_REQUESTS,
  78. } from './route-constants';
  79. /**
  80. * Here are the routes for RadGrad2. The keys are the Roles, the values are an array of route information.
  81. * Route information consists of a path, the path to the component, a Component to render.
  82. */
  83. export const routes = {
  84. ADMIN: [
  85. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${ANALYTICS.NEWSLETTER}`, component: AdminAnalyticsNewsletterPage },
  86. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${ANALYTICS.BEHAVIOR_TABLE}`, component: AdminAnalyticsBehaviorTablePage },
  87. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${ANALYTICS.LOGGED_IN_USERS}`, component: AdminAnalyticsLoggedInUsersPage },
  88. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${COMMUNITY}`, component: CommunityPage },
  89. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${MANAGE.DATABASE}`, component: AdminDatabaseManagementPage },
  90. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.ACADEMIC_TERMS}`, component: AdminDataModelAcademicTermsPage },
  91. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.ACADEMIC_YEAR_INSTANCES}`, component: AdminDataModelAcademicYearsPage },
  92. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.CAREERGOALS}`, component: AdminDataModelCareerGoalsPage },
  93. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.COURSE_INSTANCES}`, component: AdminDataModelCourseInstancesPage },
  94. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.COURSES}`, component: AdminDataModelCoursesPage },
  95. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.INTERESTS}`, component: AdminDataModelInterestsPage },
  96. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.INTEREST_KEYWORDS}`, component: AdminDataModelInterestKeywordsPage },
  97. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.INTEREST_TYPES}`, component: AdminDataModelInterestTypesPage },
  98. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.OPPORTUNITIES}`, component: AdminDataModelOpportunitiesPage },
  99. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.OPPORTUNITY_INSTANCES}`, component: AdminDataModelOpportunityInstancesPage },
  100. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.OPPORTUNITY_TYPES}`, component: AdminDataModelOpportunityTypesPage },
  101. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.REVIEWS}`, component: AdminDataModelReviewsPage },
  102. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.SLUGS}`, component: AdminDataModelSlugsPage },
  103. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.TEASERS}`, component: AdminDataModelTeasersPage },
  104. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.USERS}`, component: AdminDataModelUsersPage },
  105. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${DATAMODEL.VERIFICATION_REQUESTS}`, component: AdminDataModelVerificationRequestsPage },
  106. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${EXPLORER.CAREERGOALS}`, component: CareerGoalBrowserViewPage },
  107. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${EXPLORER.CAREERGOALS_PARAM}`, component: CareerGoalViewPage },
  108. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${EXPLORER.COURSES}`, component: CourseBrowserViewPage },
  109. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${EXPLORER.COURSES_PARAM}`, component: CourseViewPage },
  110. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${EXPLORER.INTERNSHIPS}`, component: InternshipBrowserViewPage },
  111. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${EXPLORER.INTERESTS}`, component: InterestBrowserViewPage },
  112. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${EXPLORER.INTERESTS_PARAM}`, component: InterestViewPage },
  113. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${EXPLORER.OPPORTUNITIES}`, component: OpportunityBrowserViewPage },
  114. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${EXPLORER.OPPORTUNITIES_PARAM}`, component: OpportunityViewPage },
  115. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${FORECASTS}`, component: ForecastPage },
  116. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${HOME}`, component: HomePage },
  117. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${MANAGE.REVIEWS}`, component: ManageReviewsPage },
  118. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${MANAGE.STUDENTS}`, component: AdvisorManageStudentsPage },
  119. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${MANAGE.REVIEWS}`, component: ManageReviewsPage },
  120. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${MANAGE.VERIFICATION}`, component: ManageVerificationsPage },
  121. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${TERMS_AND_CONDITIONS}`, component: TermsAndConditionsPage },
  122. { path: `/${URL_ROLES.ADMIN}/${USERNAME}/${VISIBILITY}`, component: VisibilityPage },
  123. ],
  124. ADVISOR: [
  125. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${COMMUNITY}`, component: CommunityPage },
  126. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${EXPLORER.CAREERGOALS}`, component: CareerGoalBrowserViewPage },
  127. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${EXPLORER.CAREERGOALS_PARAM}`, component: CareerGoalViewPage },
  128. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${EXPLORER.COURSES}`, component: CourseBrowserViewPage },
  129. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${EXPLORER.COURSES_PARAM}`, component: CourseViewPage },
  130. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${EXPLORER.INTERESTS}`, component: InterestBrowserViewPage },
  131. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${EXPLORER.INTERNSHIPS}`, component: InternshipBrowserViewPage },
  132. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${EXPLORER.INTERESTS_PARAM}`, component: InterestViewPage },
  133. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${EXPLORER.OPPORTUNITIES}`, component: OpportunityBrowserViewPage },
  134. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${EXPLORER.OPPORTUNITIES_PARAM}`, component: OpportunityViewPage },
  135. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${FORECASTS}`, component: ForecastPage },
  136. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${HOME}`, component: HomePage },
  137. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${MANAGE.OPPORTUNITIES}`, component: ManageOpportunitiesPage },
  138. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${MANAGE.STUDENTS}`, component: AdvisorManageStudentsPage },
  139. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${MANAGE.REVIEWS}`, component: ManageReviewsPage },
  140. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${MANAGE.VERIFICATION}`, component: ManageVerificationsPage },
  141. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${TERMS_AND_CONDITIONS}`, component: TermsAndConditionsPage },
  142. { path: `/${URL_ROLES.ADVISOR}/${USERNAME}/${VISIBILITY}`, component: VisibilityPage },
  143. ],
  144. ALUMNI: [
  145. { path: `/${URL_ROLES.ALUMNI}/${USERNAME}/${HOME}`, component: AlumniHomePage },
  146. ],
  147. FACULTY: [
  148. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${COMMUNITY}`, component: CommunityPage },
  149. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${EXPLORER.CAREERGOALS}`, component: CareerGoalBrowserViewPage },
  150. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${EXPLORER.CAREERGOALS_PARAM}`, component: CareerGoalViewPage },
  151. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${EXPLORER.COURSES}`, component: CourseBrowserViewPage },
  152. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${EXPLORER.COURSES_PARAM}`, component: CourseViewPage },
  153. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${EXPLORER.INTERNSHIPS}`, component: InternshipBrowserViewPage },
  154. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${EXPLORER.INTERESTS}`, component: InterestBrowserViewPage },
  155. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${EXPLORER.INTERESTS_PARAM}`, component: InterestViewPage },
  156. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${EXPLORER.OPPORTUNITIES}`, component: OpportunityBrowserViewPage },
  157. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${EXPLORER.OPPORTUNITIES_PARAM}`, component: OpportunityViewPage },
  158. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${FORECASTS}`, component: ForecastPage },
  159. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${HOME}`, component: HomePage },
  160. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${MANAGE.OPPORTUNITIES}`, component: ManageOpportunitiesPage },
  161. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${MANAGE.REVIEWS}`, component: ManageReviewsPage },
  162. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${MANAGE.VERIFICATION}`, component: ManageVerificationsPage },
  163. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${TERMS_AND_CONDITIONS}`, component: TermsAndConditionsPage },
  164. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${VISIBILITY}`, component: VisibilityPage },
  165. { path: `/${URL_ROLES.FACULTY}/${USERNAME}/${VERIFICATION_REQUESTS}`, component: FacultyVerificationPage },
  166. ],
  167. LANDING: [
  168. { path: '/', component: LandingHomePage },
  169. { path: `/${EXPLORER.CAREERGOALS}`, component: LandingCareerGoalsExplorerPage },
  170. { path: `/${EXPLORER.CAREERGOALS_PARAM}`, component: LandingCareerGoalExplorerPage },
  171. { path: `/${EXPLORER.COURSES}`, component: LandingCoursesExplorerPage },
  172. { path: `/${EXPLORER.COURSES_PARAM}`, component: LandingCourseExplorerPage, exact: false },
  173. { path: `/${EXPLORER.INTERESTS}`, component: LandingInterestsExplorerPage },
  174. { path: `/${EXPLORER.INTERESTS_PARAM}`, component: LandingInterestExplorerPage, exact: false },
  175. { path: `/${EXPLORER.OPPORTUNITIES}`, component: LandingOpportunitiesExplorerPage },
  176. { path: `/${EXPLORER.OPPORTUNITIES_PARAM}`, component: LandingOpportunityExplorerPage, exact: false },
  177. ],
  178. STUDENT: [
  179. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${COMMUNITY}`, component: CommunityPage },
  180. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${DEGREEPLANNER}`, component: StudentDegreePlannerPage },
  181. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${EXPLORER.CAREERGOALS}`, component: CareerGoalBrowserViewPage },
  182. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${EXPLORER.CAREERGOALS_PARAM}`, component: CareerGoalViewPage },
  183. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${EXPLORER.COURSES}`, component: CourseBrowserViewPage },
  184. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${EXPLORER.COURSES_PARAM}`, component: CourseViewPage },
  185. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${EXPLORER.INTERNSHIPS}`, component: InternshipBrowserViewPage },
  186. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${EXPLORER.INTERESTS}`, component: InterestBrowserViewPage },
  187. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${EXPLORER.INTERESTS_PARAM}`, component: InterestViewPage },
  188. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${EXPLORER.OPPORTUNITIES}`, component: OpportunityBrowserViewPage },
  189. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${EXPLORER.OPPORTUNITIES_PARAM}`, component: OpportunityViewPage },
  190. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${HOME}`, component: HomePage },
  191. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${ICE}`, component: StudentIcePage },
  192. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${LEVELS}`, component: StudentLevelsPage },
  193. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${VISIBILITY}`, component: StudentVisibilityPage },
  194. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${STUDENT_REVIEWS}`, component: StudentReviewsPage },
  195. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${STUDENT_VERIFICATION}`, component: StudentVerificationPage },
  196. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/${TERMS_AND_CONDITIONS}`, component: TermsAndConditionsPage },
  197. // The following routes display sandbox pages under the student role.
  198. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/sandbox/labels`, component: SandboxLabelPage },
  199. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/sandbox/segments`, component: SandBoxSegmentPage },
  200. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/sandbox/tabs`, component: SandBoxTabPage },
  201. { path: `/${URL_ROLES.STUDENT}/${USERNAME}/sandbox/stickystate`, component: SandBoxStickyStatePage },
  202. ],
  203. };