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