Skip to content
Snippets Groups Projects
Commit a728dbee authored by Lukas Haase's avatar Lukas Haase
Browse files

Change button position, make questionwall available for every role

parent 60da0675
No related merge requests found
Showing
with 21 additions and 13 deletions
......@@ -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] }
}
];
......
......@@ -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({
......
......@@ -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">
......
......@@ -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
......
<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;">
......
......@@ -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
......
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({
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment