diff --git a/src/app/comment-list/comment-list.component.html b/src/app/comment-list/comment-list.component.html index 53058da0a97dc507907ae257dc27c312d40a651d..aa36d3c01a01dd797025b0faa41879ad0ebbc6e4 100644 --- a/src/app/comment-list/comment-list.component.html +++ b/src/app/comment-list/comment-list.component.html @@ -7,14 +7,14 @@ {{comment.body}} - <div class="body-buttons" *ngIf="userRole === userRoleTemp"> - <button *ngIf="!comment.read" mat-fab color="warn" matTooltip="Is not read" (click)="setRead(comment)"> + <div class="body-buttons"> + <button *ngIf="!comment.read" mat-fab color="warn" matTooltip="Is not read" (click)="userRole === userRoleTemp && setRead(comment)"> <mat-icon>clear</mat-icon> </button> - <button *ngIf="comment.read" mat-fab color="primary" matTooltip="Is read" (click)="setRead(comment)"> + <button *ngIf="comment.read" mat-fab color="primary" matTooltip="Is read" (click)="userRole === userRoleTemp && setRead(comment)"> <mat-icon>check</mat-icon> </button> - <button class="trash-icon" mat-fab color="primary" matTooltip="Delete" (click)="delete(comment)"> + <button *ngIf="userRole === userRoleTemp" class="trash-icon" mat-fab color="primary" matTooltip="Delete" (click)="delete(comment)"> <mat-icon>delete</mat-icon> </button> </div>