diff --git a/src/app/components/participant/participant-routing.module.ts b/src/app/components/participant/participant-routing.module.ts new file mode 100644 index 0000000000000000000000000000000000000000..b021e11ed2218673f59569195ddba16433df65b2 --- /dev/null +++ b/src/app/components/participant/participant-routing.module.ts @@ -0,0 +1,50 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import { HomeParticipantPageComponent } from './home-participant-page/home-participant-page.component'; +import { AuthenticationGuard } from '../../guards/authentication.guard'; +import { UserRole } from '../../models/user-roles.enum'; +import { RoomParticipantPageComponent } from './room-participant-page/room-participant-page.component'; +import { CommentCreatePageComponent } from '../creator/comment-create-page/comment-create-page.component'; +import { FeedbackBarometerPageComponent } from '../shared/feedback-barometer-page/feedback-barometer-page.component'; +import { ContentCarouselPageComponent } from '../shared/content-carousel-page/content-carousel-page.component'; + +const routes: Routes = [ + { + path: 'participant', + component: HomeParticipantPageComponent, + canActivate: [AuthenticationGuard], + data: { roles: [UserRole.PARTICIPANT] } + }, + { + path: 'participant/room/:roomId', + component: RoomParticipantPageComponent, + canActivate: [AuthenticationGuard], + data: { roles: [UserRole.PARTICIPANT] } + }, + { + path: 'participant/room/:roomId/create-comment', + component: CommentCreatePageComponent, + canActivate: [AuthenticationGuard], + data: { roles: [UserRole.PARTICIPANT] } + }, + { + path: 'participant/room/:roomId/feedback-barometer', + component: FeedbackBarometerPageComponent, + canActivate: [AuthenticationGuard], + data: { roles: [UserRole.PARTICIPANT] } + }, + { + path: 'participant/room/:roomId/:contentGroup', + component: ContentCarouselPageComponent, + canActivate: [AuthenticationGuard], + data: { roles: [UserRole.PARTICIPANT] } + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) + +export class ParticipantRoutingModule { +}