diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index b88ff247f6ac410a1e1c85c9f4fab2ff1e3f2272..ef8e784582d701f4b605707992e1e4bd388f7a49 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -9,7 +9,7 @@ import { AuthenticationGuard } from './guards/authentication.guard'; import { UserRole } from './models/user-roles.enum'; import { RoomParticipantPageComponent } from './components/pages/room-participant-page/room-participant-page.component'; import { RoomCreatorPageComponent } from './components/pages/room-creator-page/room-creator-page.component'; -import { CommentListComponent } from './components/fragments/comment-list/comment-list.component'; +import { CommentListComponent } from './components/pages/comment-list/comment-list.component'; 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'; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index cdb2b87b8f12804181c2ad3fe95b801f42ef7726..f386baf32d31681432d3127a0177bb6f01e95457 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -7,7 +7,7 @@ import { RoomJoinComponent } from './components/fragments/room-join/room-join.co import { LoginComponent } from './components/fragments/login/login.component'; import { RegisterComponent } from './components/dialogs/register/register.component'; import { PasswordResetComponent } from './components/dialogs/password-reset/password-reset.component'; -import { CommentListComponent } from './components/fragments/comment-list/comment-list.component'; +import { CommentListComponent } from './components/pages/comment-list/comment-list.component'; import { AppRoutingModule } from './app-routing.module'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { PageNotFoundPageComponent } from './components/pages/page-not-found-page/page-not-found-page.component'; diff --git a/src/app/components/fragments/comment-list/comment-list.component.html b/src/app/components/pages/comment-list/comment-list.component.html similarity index 100% rename from src/app/components/fragments/comment-list/comment-list.component.html rename to src/app/components/pages/comment-list/comment-list.component.html diff --git a/src/app/components/fragments/comment-list/comment-list.component.scss b/src/app/components/pages/comment-list/comment-list.component.scss similarity index 100% rename from src/app/components/fragments/comment-list/comment-list.component.scss rename to src/app/components/pages/comment-list/comment-list.component.scss diff --git a/src/app/components/fragments/comment-list/comment-list.component.spec.ts b/src/app/components/pages/comment-list/comment-list.component.spec.ts similarity index 100% rename from src/app/components/fragments/comment-list/comment-list.component.spec.ts rename to src/app/components/pages/comment-list/comment-list.component.spec.ts diff --git a/src/app/components/fragments/comment-list/comment-list.component.ts b/src/app/components/pages/comment-list/comment-list.component.ts similarity index 82% rename from src/app/components/fragments/comment-list/comment-list.component.ts rename to src/app/components/pages/comment-list/comment-list.component.ts index ff2e3707ab4cd40a9af081f1f11b5277aff842f7..7cad6d866109e435ddfec7a474bb10e939a069ba 100644 --- a/src/app/components/fragments/comment-list/comment-list.component.ts +++ b/src/app/components/pages/comment-list/comment-list.component.ts @@ -45,19 +45,11 @@ export class CommentListComponent implements OnInit { } getComments(roomId: string): void { - if (this.userRole === UserRole.CREATOR) { - this.commentService.getComments(roomId) - .subscribe(comments => { - this.comments = comments; - this.isLoading = false; - }); - } else if (this.userRole === UserRole.PARTICIPANT) { - this.commentService.searchComments(roomId, this.user.id) - .subscribe(comments => { - this.comments = comments; - this.isLoading = false; - }); - } + this.commentService.getComments(roomId) + .subscribe(comments => { + this.comments = comments; + this.isLoading = false; + }); } setRead(comment: Comment): void { diff --git a/src/app/components/pages/room-participant-page/room-participant-page.component.html b/src/app/components/pages/room-participant-page/room-participant-page.component.html index 3b69ee966d895fb6c9205998ef5e4a52f3959e3f..e9444018f37a55ed511840d9b161e8dd0cfbea89 100644 --- a/src/app/components/pages/room-participant-page/room-participant-page.component.html +++ b/src/app/components/pages/room-participant-page/room-participant-page.component.html @@ -16,7 +16,7 @@ <mat-grid-list cols="2" rowHeight="2:1"> <mat-grid-tile> <button mat-icon-button color="primary" matTooltip="Create comment" - routerLink="/participant/room/{{ room.id }}/create-comment"> + routerLink="/participant/room/{{ room.shortId }}/create-comment"> <mat-icon>question_answer</mat-icon> </button> </mat-grid-tile>