diff --git a/src/app/answer-statistics/answer-statistics.component.html b/src/app/answer-statistics/answer-statistics.component.html index c9d9752197eb33a3f9f4f61d0c43380072f5349a..d6571e24a166330cc81fc5959db3be8e7ffeab5d 100644 --- a/src/app/answer-statistics/answer-statistics.component.html +++ b/src/app/answer-statistics/answer-statistics.component.html @@ -1,3 +1,4 @@ -<p> - answer-statistics works! -</p> +<mat-card> + <mat-progress-bar [value]="50"> + </mat-progress-bar> +</mat-card> diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 50cfded9ff08fa2256b5e71e8fc02eab3f8059f0..af4bfcbb79920e3b8b3fbc614de27ad7a8a67e25 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -13,6 +13,7 @@ import { CommentListComponent } from './comment-list/comment-list.component'; import { ContentListComponent } from './content-list/content-list.component'; import { ContentCreationComponent } from './content-creation/content-creation.component'; import { ContentDetailComponent } from './content-detail/content-detail.component'; +import { AnswerStatisticsComponent } from './answer-statistics/answer-statistics.component'; const routes: Routes = [ { path: '', redirectTo: '/home', pathMatch: 'full' }, @@ -45,6 +46,12 @@ const routes: Routes = [ canActivate: [AuthenticationGuard], data: { roles: [UserRole.CREATOR] } }, + { + path: 'creator/room/:roomId/answer-statistics', + component: AnswerStatisticsComponent, + canActivate: [AuthenticationGuard], + data: { roles: [UserRole.CREATOR] } + }, { path: 'creator/room/:roomId/content-creation', component: ContentCreationComponent, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index f6cbbf8d7cd00668a4c89383acff5216fe8e0149..618e686c611bd200b022e13fa4cceac368bf099c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -73,6 +73,7 @@ import { ContentService } from './content.service'; import { ContentAnswersListComponent } from './content-answers-list/content-answers-list.component'; import { ContentAnswerService } from './content-answer.service'; import { RoomDeletionComponent } from './room-deletion/room-deletion.component'; +import { AnswerStatisticsComponent } from './answer-statistics/answer-statistics.component'; import { RoomModificationComponent } from './room-modification/room-modification.component'; @NgModule({ @@ -101,7 +102,8 @@ import { RoomModificationComponent } from './room-modification/room-modification ContentListComponent, ContentAnswersListComponent, RoomDeletionComponent, - RoomModificationComponent + RoomModificationComponent, + AnswerStatisticsComponent ], entryComponents: [ RegisterComponent, diff --git a/src/app/creator-room/creator-room.component.html b/src/app/creator-room/creator-room.component.html index 78d20e59e31d7a121789c1e50181f05f83e60931..bbcbe08ce0404917bb765cac7d21a9f94cc4890a 100644 --- a/src/app/creator-room/creator-room.component.html +++ b/src/app/creator-room/creator-room.component.html @@ -24,10 +24,12 @@ <button mat-button color="primary" matTooltip="Create new content" (click)="createContentDialog()"> Create content </button> - <button mat-button color="primary" matTooltip="See room comments" - routerLink="/creator/room/{{room.id}}/comments"> + <button mat-button color="primary" matTooltip="See room comments" routerLink="/creator/room/{{room.id}}/comments"> Comments </button> + <button mat-button color="primary" matTooltip="See answer statistics" routerLink="/creator/room/{{room.id}}/answer-statistics"> + Answer statistics + </button> <button *ngIf="!modify" (click)="showEditDialog()" mat-button color="primary"> Edit room </button>