diff --git a/src/app/components/creator/creator-routing.module.ts b/src/app/components/creator/creator-routing.module.ts index d0a8a51f3e831b5b0ff89d6aa20d00fa56ce0e0f..83d79e684c08097065c3d74294a1a9ec4f376d5c 100644 --- a/src/app/components/creator/creator-routing.module.ts +++ b/src/app/components/creator/creator-routing.module.ts @@ -5,7 +5,7 @@ import { UserRole } from '../../models/user-roles.enum'; import { RoomCreatorPageComponent } from './room-creator-page/room-creator-page.component'; import { CommentPageComponent } from '../shared/comment-page/comment-page.component'; import { CommentAnswerComponent } from '../shared/comment-answer/comment-answer.component'; -import { QuestionWallComponent } from './questionwall/question-wall/question-wall.component'; +import { QuestionWallComponent } from '../shared/questionwall/question-wall/question-wall.component'; const routes: Routes = [ { @@ -24,12 +24,6 @@ const routes: Routes = [ path: 'room/:shortId/comment/:commentId', component: CommentAnswerComponent, canActivate: [AuthenticationGuard], - }, - { - path: 'room/:shortId/questionwall', - component: QuestionWallComponent, - canActivate: [AuthenticationGuard], - data: { roles: [UserRole.CREATOR] } } ]; diff --git a/src/app/components/creator/creator.module.ts b/src/app/components/creator/creator.module.ts index f4527b93b5e5342e643055229f174b9fcb01086e..1ec0045680b1ed592ec5268cf2596c69b5c9b1c6 100644 --- a/src/app/components/creator/creator.module.ts +++ b/src/app/components/creator/creator.module.ts @@ -20,7 +20,7 @@ import { DeleteCommentsComponent } from './_dialogs/delete-comments/delete-comme import { BonusDeleteComponent } from './_dialogs/bonus-delete/bonus-delete.component'; import { MarkdownModule } from 'ngx-markdown'; import { DeleteAnswerComponent } from './_dialogs/delete-answer/delete-answer.component'; -import { QuestionWallComponent } from './questionwall/question-wall/question-wall.component'; +import { QuestionWallComponent } from '../shared/questionwall/question-wall/question-wall.component'; import { ArsModule } from '../../../../projects/ars/src/lib/ars.module'; @NgModule({ diff --git a/src/app/components/creator/room-creator-page/room-creator-page.component.html b/src/app/components/creator/room-creator-page/room-creator-page.component.html index 90f8e78551f6774abdcbb9e1f976778163562d27..c26aa310493d08ef79215cce5e64adac6ca4b1f0 100644 --- a/src/app/components/creator/room-creator-page/room-creator-page.component.html +++ b/src/app/components/creator/room-creator-page/room-creator-page.component.html @@ -40,10 +40,6 @@ <mat-icon svgIcon="comment_tag"></mat-icon> {{ 'room-page.tags' | translate}} </button> - <button mat-menu-item routerLink="/creator/room/{{room.shortId}}/questionwall"> - <mat-icon svgIcon="comment_tag"></mat-icon> - Questionwall - </button> </mat-menu> <button id="settings-menu" mat-icon-button class="corner-icons" [matMenuTriggerFor]="settingsMenu" aria-labelledby="settings"> diff --git a/src/app/components/shared/header/header.component.html b/src/app/components/shared/header/header.component.html index 2be678e8d94426797e2726e421997eb85064bf8f..1a3e6f2aaf49bb32db6d9aac2b641bb36ca4adec 100644 --- a/src/app/components/shared/header/header.component.html +++ b/src/app/components/shared/header/header.component.html @@ -13,6 +13,10 @@ fxLayoutAlign="center center"> {{cTime}} </h2> + <span class="fill-remaining-space"></span> + <button *ngIf="router.url.includes('comments')" mat-button routerLink="participant/room/{{shortId}}/questionwall"> + <span>Presentation</span> + </button> <span class="fill-remaining-space" *ngIf="router.url.includes('comments') && user.role === 3 && deviceType === 'desktop'"></span> <span diff --git a/src/app/components/creator/questionwall/QuestionWallComment.ts b/src/app/components/shared/questionwall/QuestionWallComment.ts similarity index 100% rename from src/app/components/creator/questionwall/QuestionWallComment.ts rename to src/app/components/shared/questionwall/QuestionWallComment.ts diff --git a/src/app/components/creator/questionwall/question-wall/question-wall.component.html b/src/app/components/shared/questionwall/question-wall/question-wall.component.html similarity index 94% rename from src/app/components/creator/questionwall/question-wall/question-wall.component.html rename to src/app/components/shared/questionwall/question-wall/question-wall.component.html index 4d1551a5a81eb453f5eac70c7b4bbe33c41fc0d9..db3ad117645b6539c95e67b1910f20c41539261f 100644 --- a/src/app/components/creator/questionwall/question-wall/question-wall.component.html +++ b/src/app/components/shared/questionwall/question-wall/question-wall.component.html @@ -1,6 +1,6 @@ <ars-screen ars-flex-box class="questionwall-screen"> <ars-row [height]="50" class="questionwall-header"> - <button *ngIf="room" routerLink="/creator/room/{{room.shortId}}">BACK</button> + <button *ngIf="room" routerLink="/participant/room/{{room.shortId}}/comments">BACK</button> </ars-row> <ars-fill ars-flex-box> <ars-fill style="overflow:hidden;"> diff --git a/src/app/components/creator/questionwall/question-wall/question-wall.component.scss b/src/app/components/shared/questionwall/question-wall/question-wall.component.scss similarity index 100% rename from src/app/components/creator/questionwall/question-wall/question-wall.component.scss rename to src/app/components/shared/questionwall/question-wall/question-wall.component.scss diff --git a/src/app/components/creator/questionwall/question-wall/question-wall.component.spec.ts b/src/app/components/shared/questionwall/question-wall/question-wall.component.spec.ts similarity index 100% rename from src/app/components/creator/questionwall/question-wall/question-wall.component.spec.ts rename to src/app/components/shared/questionwall/question-wall/question-wall.component.spec.ts diff --git a/src/app/components/creator/questionwall/question-wall/question-wall.component.ts b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts similarity index 98% rename from src/app/components/creator/questionwall/question-wall/question-wall.component.ts rename to src/app/components/shared/questionwall/question-wall/question-wall.component.ts index 017799aa6de17239dbe6b819a1005db5a175c2bf..03833d312d7691b70567b3ad63d0d04f3927d946 100644 --- a/src/app/components/creator/questionwall/question-wall/question-wall.component.ts +++ b/src/app/components/shared/questionwall/question-wall/question-wall.component.ts @@ -7,6 +7,7 @@ import { Room } from '../../../../models/room'; import { WsCommentServiceService } from '../../../../services/websockets/ws-comment-service.service'; import { QuestionWallComment } from '../QuestionWallComment'; import { ColComponent } from '../../../../../../projects/ars/src/lib/components/layout/frame/col/col.component'; +import { Router } from '@angular/router'; @Component({ selector: 'app-question-wall', @@ -29,6 +30,7 @@ export class QuestionWallComponent implements OnInit, AfterViewInit, OnDestroy { } constructor( + private router: Router, private commentService: CommentService, private roomService: RoomService, private wsCommentService: WsCommentServiceService diff --git a/src/app/components/shared/shared-routing.module.ts b/src/app/components/shared/shared-routing.module.ts index 306cccc7c643122e5ae791403649f1e0aa9caf37..67a4b6a985d141be1173b4799f7fd30c48535708 100644 --- a/src/app/components/shared/shared-routing.module.ts +++ b/src/app/components/shared/shared-routing.module.ts @@ -1,7 +1,19 @@ import { RouterModule, Routes } from '@angular/router'; import { NgModule } from '@angular/core'; +import { QuestionWallComponent } from './questionwall/question-wall/question-wall.component'; +import { AuthenticationGuard } from '../../guards/authentication.guard'; +import { UserRole } from '../../models/user-roles.enum'; const routes: Routes = [ + { + path: 'room/:shortId/questionwall', + component: QuestionWallComponent, + canActivate: [AuthenticationGuard], + data: { roles: [UserRole.CREATOR, + UserRole.EDITING_MODERATOR, + UserRole.EXECUTIVE_MODERATOR, + UserRole.PARTICIPANT] } + } ]; @NgModule({