diff --git a/src/app/components/creator/_dialogs/comment-export/comment-export.component.ts b/src/app/components/creator/_dialogs/comment-export/comment-export.component.ts index 11e5b4ac52935921cd7ad8412f7bb1c8367e0356..04960808e6ac8bfbc12d90009f5fda8c00ed8257 100644 --- a/src/app/components/creator/_dialogs/comment-export/comment-export.component.ts +++ b/src/app/components/creator/_dialogs/comment-export/comment-export.component.ts @@ -1,7 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { MatDialogRef } from '@angular/material'; -import { CommentCreatorPageComponent } from '../../comment-creator-page/comment-creator-page.component'; -import { Comment } from '../../../../models/comment'; +import { CommentPageComponent } from '../../../shared/comment-page/comment-page.component'; @Component({ selector: 'app-comment-export', @@ -12,7 +11,7 @@ export class CommentExportComponent implements OnInit { exportType = 'comma'; - constructor(public dialogRef: MatDialogRef<CommentCreatorPageComponent>) { } + constructor(public dialogRef: MatDialogRef<CommentPageComponent>) { } ngOnInit() { } diff --git a/src/app/components/creator/comment-creator-page/comment-creator-page.component.html b/src/app/components/creator/comment-creator-page/comment-creator-page.component.html deleted file mode 100644 index 2445a6fcae34f3159b6597b46220b8fe37935acc..0000000000000000000000000000000000000000 --- a/src/app/components/creator/comment-creator-page/comment-creator-page.component.html +++ /dev/null @@ -1 +0,0 @@ -<app-comment-page></app-comment-page> diff --git a/src/app/components/creator/comment-creator-page/comment-creator-page.component.scss b/src/app/components/creator/comment-creator-page/comment-creator-page.component.scss deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/app/components/creator/comment-creator-page/comment-creator-page.component.spec.ts b/src/app/components/creator/comment-creator-page/comment-creator-page.component.spec.ts deleted file mode 100644 index de0a3aef6dc4dfda982d534c827258d562a082c9..0000000000000000000000000000000000000000 --- a/src/app/components/creator/comment-creator-page/comment-creator-page.component.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { CommentCreatorPageComponent } from './comment-creator-page.component'; - -describe('CommentCreatorPageComponent', () => { - let component: CommentCreatorPageComponent; - let fixture: ComponentFixture<CommentCreatorPageComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ CommentCreatorPageComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(CommentCreatorPageComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); -*/ diff --git a/src/app/components/creator/comment-creator-page/comment-creator-page.component.ts b/src/app/components/creator/comment-creator-page/comment-creator-page.component.ts deleted file mode 100644 index c971df4b4cd2023e25c5ecdf17eab19b848b2146..0000000000000000000000000000000000000000 --- a/src/app/components/creator/comment-creator-page/comment-creator-page.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-comment-creator-page', - templateUrl: './comment-creator-page.component.html', - styleUrls: ['./comment-creator-page.component.scss'] -}) -export class CommentCreatorPageComponent implements OnInit { - - constructor() { } - - ngOnInit() { - } -} diff --git a/src/app/components/creator/creator-routing.module.ts b/src/app/components/creator/creator-routing.module.ts index 37cc87063de37571aba54ebc76be84f41371afa9..e7528ff675731d1ad2237c5f1dd7e6ebb6ad4954 100644 --- a/src/app/components/creator/creator-routing.module.ts +++ b/src/app/components/creator/creator-routing.module.ts @@ -10,7 +10,7 @@ import { FeedbackBarometerPageComponent } from '../shared/feedback-barometer-pag import { ContentListComponent } from './content-list/content-list.component'; import { StatisticComponent } from '../shared/statistic/statistic.component'; import { ContentPresentationComponent } from './content-presentation/content-presentation.component'; -import { CommentCreatorPageComponent } from './comment-creator-page/comment-creator-page.component'; +import { CommentPageComponent } from '../shared/comment-page/comment-page.component'; const routes: Routes = [ { @@ -45,7 +45,7 @@ const routes: Routes = [ }, { path: 'room/:roomId/comments', - component: CommentCreatorPageComponent, + component: CommentPageComponent, 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 5707a9ddd352e3e396d204340ccf13bdbf7a0823..349e8dbcfb28f4034306e854ed4c586a178778ae 100644 --- a/src/app/components/creator/creator.module.ts +++ b/src/app/components/creator/creator.module.ts @@ -21,7 +21,6 @@ import { ContentCreatorComponent } from './content-creator/content-creator.compo import { ContentListComponent } from './content-list/content-list.component'; import { ContentEditComponent } from './_dialogs/content-edit/content-edit.component'; import { ContentPresentationComponent } from './content-presentation/content-presentation.component'; -import { CommentCreatorPageComponent } from './comment-creator-page/comment-creator-page.component'; import { CommentExportComponent } from './_dialogs/comment-export/comment-export.component'; @NgModule({ @@ -53,7 +52,6 @@ import { CommentExportComponent } from './_dialogs/comment-export/comment-export ContentListComponent, ContentEditComponent, ContentPresentationComponent, - CommentCreatorPageComponent, CommentExportComponent ], entryComponents: [ diff --git a/src/app/components/participant/comment-participant-page/comment-participant-page.component.html b/src/app/components/participant/comment-participant-page/comment-participant-page.component.html deleted file mode 100644 index 2445a6fcae34f3159b6597b46220b8fe37935acc..0000000000000000000000000000000000000000 --- a/src/app/components/participant/comment-participant-page/comment-participant-page.component.html +++ /dev/null @@ -1 +0,0 @@ -<app-comment-page></app-comment-page> diff --git a/src/app/components/participant/comment-participant-page/comment-participant-page.component.scss b/src/app/components/participant/comment-participant-page/comment-participant-page.component.scss deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/app/components/participant/comment-participant-page/comment-participant-page.component.spec.ts b/src/app/components/participant/comment-participant-page/comment-participant-page.component.spec.ts deleted file mode 100644 index 6287f88a12f29bf8718cfa17ad8ef9dc0ea7b490..0000000000000000000000000000000000000000 --- a/src/app/components/participant/comment-participant-page/comment-participant-page.component.spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { CommentParticipantPageComponent } from './comment-participant-page.component'; - -describe('CommentParticipantPageComponent', () => { - let component: CommentParticipantPageComponent; - let fixture: ComponentFixture<CommentParticipantPageComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ CommentParticipantPageComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(CommentParticipantPageComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); -*/ diff --git a/src/app/components/participant/comment-participant-page/comment-participant-page.component.ts b/src/app/components/participant/comment-participant-page/comment-participant-page.component.ts deleted file mode 100644 index e652a59ef795450533ed4f834ce437bfe4545ee8..0000000000000000000000000000000000000000 --- a/src/app/components/participant/comment-participant-page/comment-participant-page.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'app-comment-participant-page', - templateUrl: './comment-participant-page.component.html', - styleUrls: ['./comment-participant-page.component.scss'] -}) -export class CommentParticipantPageComponent implements OnInit { - - constructor() { } - - ngOnInit() { - } - -} diff --git a/src/app/components/participant/participant-routing.module.ts b/src/app/components/participant/participant-routing.module.ts index 1b6054cae8add874cad84fa73b8b247118b9549c..5b266e4441283ec468ff6db9f4e863e45408e59c 100644 --- a/src/app/components/participant/participant-routing.module.ts +++ b/src/app/components/participant/participant-routing.module.ts @@ -8,7 +8,7 @@ import { FeedbackBarometerPageComponent } from '../shared/feedback-barometer-pag import { ParticipantContentCarouselPageComponent } from './participant-content-carousel-page/participant-content-carousel-page.component'; import { StatisticsPageComponent } from '../shared/statistics-page/statistics-page.component'; import { StatisticComponent } from '../shared/statistic/statistic.component'; -import { CommentParticipantPageComponent } from './comment-participant-page/comment-participant-page.component'; +import { CommentPageComponent } from '../shared/comment-page/comment-page.component'; const routes: Routes = [ { @@ -37,7 +37,7 @@ const routes: Routes = [ }, { path: 'room/:roomId/comments', - component: CommentParticipantPageComponent, + component: CommentPageComponent, canActivate: [AuthenticationGuard], data: { roles: [UserRole.PARTICIPANT] } }, diff --git a/src/app/components/participant/participant.module.ts b/src/app/components/participant/participant.module.ts index 640952e86f8c4ee683e67d86574822321a401f5f..77d5bb07717cd9433c3260a33bf96838a0bd9fda 100644 --- a/src/app/components/participant/participant.module.ts +++ b/src/app/components/participant/participant.module.ts @@ -11,7 +11,6 @@ import { ParticipantContentCarouselPageComponent } from './participant-content-c import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { HttpClient } from '@angular/common/http'; import { TranslateHttpLoader } from '@ngx-translate/http-loader'; -import { CommentParticipantPageComponent } from './comment-participant-page/comment-participant-page.component'; @NgModule({ imports: [ @@ -33,8 +32,7 @@ import { CommentParticipantPageComponent } from './comment-participant-page/comm ContentTextParticipantComponent, HomeParticipantPageComponent, RoomParticipantPageComponent, - ParticipantContentCarouselPageComponent, - CommentParticipantPageComponent + ParticipantContentCarouselPageComponent ] }) export class ParticipantModule { diff --git a/src/app/components/shared/comment-list/comment-list.component.html b/src/app/components/shared/comment-list/comment-list.component.html index 886f34baf99903c51dea2c4c29dfa201a309b555..9187f1a081014663f475b193d187478839e35439 100644 --- a/src/app/components/shared/comment-list/comment-list.component.html +++ b/src/app/components/shared/comment-list/comment-list.component.html @@ -4,53 +4,53 @@ </mat-label> <input #searchBox placeholder="{{ 'comment-list-page.search' | translate }}" (input)="searchComments(searchBox.value)"> - <button mat-icon-button class="searchBarButton close" *ngIf="searchBox.value || isIconHide" - (click)="hideCommentsList=false; searchBox.value=''; isIconHide=false"> + <button mat-icon-button class="searchBarButton close" *ngIf="searchBox.value" + (click)="hideCommentsList=false; searchBox.value=''"> <mat-icon>close</mat-icon> </button> <span class="fill-remaining-space"></span> - <button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && userRole === 1 && comments.length > 0 && !isIconHide" + <button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && userRole === 1 && comments.length > 0" [matTooltip]="'Export comments'" (click)="openExportDialog()"> <mat-icon class="searchBarIcon" color="accent">cloud_download</mat-icon> </button> - <button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && !isIconHide" + <button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value" color="accent" (click)="openSubmitDialog()"> <mat-icon class="searchBarIcon">add_circle</mat-icon> </button> - <button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && !isIconHide" + <button mat-icon-button class="searchBarButton" *ngIf="!searchBox.value && comments.length > 0" color="accent" [matMenuTriggerFor]="filterMenu"> <mat-icon class="searchBarIcon">sort</mat-icon> </button> <mat-menu #filterMenu="matMenu" xPosition="before"> <div id="filterIcon"> - <button mat-icon-button (focus)="hideCommentsList=true" (click)="filterMarkAsCorrect(); isIconHide=true"> - <mat-icon color="primary">check_circle</mat-icon> + <button mat-icon-button (focus)="hideCommentsList=true" (click)="filterMarkAsCorrect()"> + <mat-icon>check_circle</mat-icon> </button> - <button mat-icon-button (focus)="hideCommentsList=true" (click)="filterFavorite(); isIconHide=true"> - <mat-icon color="primary">star</mat-icon> + <button mat-icon-button (focus)="hideCommentsList=true" (click)="filterFavorite()"> + <mat-icon>star</mat-icon> </button> - <button mat-icon-button (focus)="hideCommentsList=true" (click)="filterMarkAsRead(); isIconHide=true"> - <mat-icon color="primary">visibility</mat-icon> + <button mat-icon-button (focus)="hideCommentsList=true" (click)="filterMarkAsRead()"> + <mat-icon>visibility</mat-icon> </button> <button mat-icon-button (focus)="hideCommentsList=false" (click)="sortVoteDesc()"> - <mat-icon color="primary">keyboard_arrow_up</mat-icon> + <mat-icon>keyboard_arrow_up</mat-icon> </button> <button mat-icon-button (focus)="hideCommentsList=false" (click)="sortVote()"> - <mat-icon color="primary">keyboard_arrow_down</mat-icon> + <mat-icon>keyboard_arrow_down</mat-icon> </button> <button mat-icon-button (focus)="hideCommentsList=false" (click)="sortTimeStamp()"> - <mat-icon color="primary">remove</mat-icon> + <mat-icon>remove</mat-icon> </button> <button mat-icon-button *ngIf="userRole === 1" (focus)="hideCommentsList=false" (click)="deleteComments()"> - <mat-icon color="primary">delete</mat-icon> + <mat-icon color="warn">delete</mat-icon> </button> </div> </mat-menu> diff --git a/src/app/components/shared/comment-list/comment-list.component.scss b/src/app/components/shared/comment-list/comment-list.component.scss index 838f23a98519a6db69f48f25676fa44b21fcb598..b18c30908a1f420c703c090ba06cd19e8bb299aa 100644 --- a/src/app/components/shared/comment-list/comment-list.component.scss +++ b/src/app/components/shared/comment-list/comment-list.component.scss @@ -16,7 +16,7 @@ app-comment { input { box-sizing: border-box; padding: 0 10px 0 5px; - width: 50%; + width: 100%; background-color: var(--light); border: none; outline: none; diff --git a/src/app/components/shared/comment-list/comment-list.component.ts b/src/app/components/shared/comment-list/comment-list.component.ts index 7c55c8a401992ff306d277a4d5d43e890935f036..b203f63ae40e9d19227150e0e7d63e30691eea77 100644 --- a/src/app/components/shared/comment-list/comment-list.component.ts +++ b/src/app/components/shared/comment-list/comment-list.component.ts @@ -26,7 +26,6 @@ export class CommentListComponent implements OnInit { comments: Comment[]; isLoading = true; hideCommentsList = false; - isIconHide: boolean; filteredComments: Comment[]; userRole: UserRole; @@ -171,7 +170,7 @@ export class CommentListComponent implements OnInit { } exportCsv(delimiter: string, date: string): void { - let exportComments = JSON.parse(JSON.stringify(this.comments)); + const exportComments = JSON.parse(JSON.stringify(this.comments)); let csv: string; let keyFields = ''; let valueFields = '';