Merge branch 'RED-8870' into 'master'
RED-8870: fixed comment author displayed as unknown user. See merge request redactmanager/red-ui!368
This commit is contained in:
commit
9d858bfe39
@ -1,7 +1,7 @@
|
||||
<div *ngFor="let comment of comments(); trackBy: trackBy" class="comment">
|
||||
<div class="comment-details-wrapper">
|
||||
<div [matTooltipPosition]="'above'" [matTooltip]="comment.date | date: 'exactDate'" class="small-label">
|
||||
<strong> {{ comment.user | name }} </strong>
|
||||
<strong> {{ comment.userId | name }} </strong>
|
||||
{{ comment.date | date: 'sophisticatedDate' }}
|
||||
</div>
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ export class CommentsComponent implements OnChanges {
|
||||
text: value,
|
||||
id: commentId,
|
||||
annotationId: this.annotation.id,
|
||||
user: this.currentUser.id,
|
||||
userId: this.currentUser.id,
|
||||
},
|
||||
]);
|
||||
this.input.reset();
|
||||
|
||||
@ -336,7 +336,7 @@ export class PermissionsService {
|
||||
canDeleteComment(comment: IComment, file: File, dossier: Dossier) {
|
||||
return (
|
||||
this._iqserPermissionsService.has(Roles.comments.delete) &&
|
||||
(comment.user === this.#userId || this.isApprover(dossier)) &&
|
||||
(comment.userId === this.#userId || this.isApprover(dossier)) &&
|
||||
!file.isApproved
|
||||
);
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
export interface IComment {
|
||||
id: string;
|
||||
user: string;
|
||||
userId: string;
|
||||
date?: string;
|
||||
text: string;
|
||||
annotationId?: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user