diff --git a/apps/red-ui/src/app/common/file-actions/file-actions.component.html b/apps/red-ui/src/app/common/file-actions/file-actions.component.html index 926aec0c3..f8b498aa1 100644 --- a/apps/red-ui/src/app/common/file-actions/file-actions.component.html +++ b/apps/red-ui/src/app/common/file-actions/file-actions.component.html @@ -26,7 +26,7 @@ mat-icon-button #reanalyseTooltip="matTooltip" [matTooltip]="'file-preview.reanalyse-notification' | translate" - matTooltipClass="warn" + matTooltipClass="warn small" > diff --git a/apps/red-ui/src/app/common/file-actions/file-actions.component.ts b/apps/red-ui/src/app/common/file-actions/file-actions.component.ts index 985c79cc7..db24c4e4f 100644 --- a/apps/red-ui/src/app/common/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/common/file-actions/file-actions.component.ts @@ -86,9 +86,10 @@ export class FileActionsComponent implements OnInit, AfterViewInit { setFileUnderReview($event: MouseEvent, fileStatus: FileStatusWrapper) { $event.stopPropagation(); - this._fileActionService.setFileUnderReview(fileStatus).subscribe(() => { - this.reloadProjects('set-review'); - }); + // this._fileActionService.setFileUnderReview(fileStatus).subscribe(() => { + // this.reloadProjects('set-review'); + // }); + this._fileActionService.assignProjectReviewer(fileStatus, () => this.actionPerformed.emit('assign-reviewer')); } reloadProjects(action: string) { diff --git a/apps/red-ui/src/app/common/service/permissions.service.ts b/apps/red-ui/src/app/common/service/permissions.service.ts index 13208cbbf..85fece71a 100644 --- a/apps/red-ui/src/app/common/service/permissions.service.ts +++ b/apps/red-ui/src/app/common/service/permissions.service.ts @@ -71,14 +71,14 @@ export class PermissionsService { if (!fileStatus) { fileStatus = this._appStateService.activeFile; } - return fileStatus.status === 'UNDER_APPROVAL'; + return fileStatus.status === 'UNDER_APPROVAL' && this.isManagerAndOwner(); } canSetUnderApproval(fileStatus?: FileStatusWrapper) { if (!fileStatus) { fileStatus = this._appStateService.activeFile; } - return fileStatus.status === 'UNDER_REVIEW'; + return fileStatus.status === 'UNDER_REVIEW' && this.isReviewerOrOwner(fileStatus); } isManagerAndOwner(project?: Project, user?: UserWrapper) { @@ -112,7 +112,7 @@ export class PermissionsService { if (!fileStatus) { fileStatus = this._appStateService.activeFile; } - return !fileStatus.isError && !fileStatus.isProcessing && this.isReviewerOrOwner(fileStatus); + return !fileStatus.isError && !fileStatus.isProcessing; //&& this.isReviewerOrOwner(fileStatus); } canShowRedactionReportDownloadBtn(fileStatus?: FileStatusWrapper) { @@ -123,7 +123,12 @@ export class PermissionsService { if (!fileStatus) { fileStatus = this._appStateService.activeFile; } - return this.isProjectMember() && !fileStatus.isError && !fileStatus.isApprovedOrUnderApproval; + return ( + this.isProjectMember() && + !fileStatus.isError && + !fileStatus.isApprovedOrUnderApproval && + (this.isManagerAndOwner() || !this.isFileReviewer(fileStatus)) + ); } canUndoApproval(fileStatus: FileStatusWrapper) { @@ -137,10 +142,15 @@ export class PermissionsService { if (!fileStatus) { fileStatus = this._appStateService.activeFile; } - return fileStatus.status === 'UNDER_APPROVAL' && this.isManagerAndOwner(); + return fileStatus.status === 'UNDER_APPROVAL' && this.isProjectMember(); } - canMarkPagesAsViewed() { - return this.isReviewerOrOwner(); + canMarkPagesAsViewed(fileStatus?: FileStatusWrapper) { + if (!fileStatus) { + fileStatus = this._appStateService.activeFile; + } + return ( + (fileStatus.status === 'UNDER_REVIEW' && this.isFileReviewer(fileStatus)) || (fileStatus.status === 'UNDER_APPROVAL' && this.isManagerAndOwner()) + ); } } diff --git a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html index c622f2a65..c59dd9e70 100644 --- a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html +++ b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html @@ -1,56 +1,62 @@ -
+
- -
- -
-
-
- -
-
+ + +
+ +
+
+
+ +
+
+
+ +
+ +
+
+
+ +
+
+
- + +