Skip to content
Snippets Groups Projects
Commit e6aea7d9 authored by Hagen Dreßler's avatar Hagen Dreßler
Browse files

Add routing for feedback-barometer

parent 0b2ab423
No related merge requests found
Showing with 65 additions and 14 deletions
......@@ -13,9 +13,8 @@ import { CommentListComponent } from './components/fragments/comment-list/commen
import { ContentListComponent } from './components/fragments/content-list/content-list.component';
import { StatisticsComponent } from './components/fragments/statistics/statistics.component';
import { ContentCreatePageComponent } from './components/pages/content-create-page/content-create-page.component';
import {
ContentCarouselPageComponent
} from './components/pages/content-carousel-page/content-carousel-page.component';
import { ContentCarouselPageComponent } from './components/pages/content-carousel-page/content-carousel-page.component';
import { FeedbackBarometerPageComponent } from './components/pages/feedback-barometer-page/feedback-barometer-page.component';
const routes: Routes = [
{
......@@ -63,6 +62,12 @@ const routes: Routes = [
canActivate: [AuthenticationGuard],
data: { roles: [UserRole.CREATOR] }
},
{
path: 'creator/room/:roomId/feedback-barometer',
component: FeedbackBarometerPageComponent,
canActivate: [AuthenticationGuard],
data: { roles: [UserRole.CREATOR] }
},
{
path: 'participant',
component: HomeParticipantPageComponent,
......@@ -87,6 +92,12 @@ const routes: Routes = [
canActivate: [AuthenticationGuard],
data: { roles: [UserRole.PARTICIPANT] }
},
{
path: 'participant/room/:roomId/feedback-barometer',
component: FeedbackBarometerPageComponent,
canActivate: [AuthenticationGuard],
data: { roles: [UserRole.PARTICIPANT] }
},
{
path: '**',
component: PageNotFoundPageComponent
......
......@@ -85,7 +85,6 @@ import { ContentYesNoCreatorComponent } from './components/fragments/content-yes
import { AnswerEditComponent } from './components/dialogs/answer-edit/answer-edit.component';
import { ContentDeleteComponent } from './components/dialogs/content-delete/content-delete.component';
import { FeebackBarometerPageComponent } from './components/pages/feeback-barometer-page/feeback-barometer-page.component';
import {FeedbackBarometerPageComponent} from './components/pages/feedback-barometer-page/feedback-barometer-page.component';
@NgModule({
declarations: [
......
<p>
feeback-barometer-page works!
</p>
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FeebackBarometerPageComponent } from './feeback-barometer-page.component';
import { FeedbackBarometerPageComponent } from './feedback-barometer-page.component';
describe('FeebackBarometerPageComponent', () => {
let component: FeebackBarometerPageComponent;
let fixture: ComponentFixture<FeebackBarometerPageComponent>;
describe('FeedbackBarometerPageComponent', () => {
let component: FeedbackBarometerPageComponent;
let fixture: ComponentFixture<FeedbackBarometerPageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ FeebackBarometerPageComponent ]
declarations: [ FeedbackBarometerPageComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FeebackBarometerPageComponent);
fixture = TestBed.createComponent(FeedbackBarometerPageComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
......
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-feeback-barometer-page',
templateUrl: './feeback-barometer-page.component.html',
styleUrls: ['./feeback-barometer-page.component.scss']
selector: 'app-feedback-barometer-page',
templateUrl: './feedback-barometer-page.component.html',
styleUrls: ['./feedback-barometer-page.component.scss']
})
export class FeebackBarometerPageComponent implements OnInit {
export class FeedbackBarometerPageComponent implements OnInit {
constructor() { }
......
......@@ -23,13 +23,19 @@
<mat-divider></mat-divider>
<mat-card-actions>
<button mat-button color="primary" matTooltip="Create new content"
routerLink="/creator/room/{{room.id}}/create-content">
routerLink="/creator/room/{{ room.id }}/create-content">
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">
<button mat-button color="primary" matTooltip="See feedback"
routerLink="/creator/room/{{ room.id }}/feedback-barometer">
Feedback barometer
</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">
......@@ -38,9 +44,6 @@
<button mat-button color="warn" (click)="openDeletionRoomDialog()">
Delete room
</button>
<button mat-button color="primary" (click)="goBack()">
Go back
</button>
</mat-card-actions>
</mat-card>
<div *ngIf="!isLoading && !room">Error: room could not be found!</div>
......
......@@ -21,7 +21,8 @@
</button>
</mat-grid-tile>
<mat-grid-tile>
<button mat-icon-button color="primary" matTooltip="Give feedback">
<button mat-icon-button color="primary" matTooltip="Give feedback"
routerLink="/participant/room/{{ room.id }}/feedback-barometer">
<mat-icon>thumbs_up_down</mat-icon>
</button>
</mat-grid-tile>
......
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