diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html
index 4356f071c..f53c916f6 100644
--- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html
+++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html
@@ -16,68 +16,78 @@
-
+
+
-
-
-
-
-
-
+
+
+
+
+
-
+
+
{
this.hasHints = this.hasHints || f.hasHints;
this.hasRedactions = this.hasRedactions || f.hasRedactions;
this.hasRequests = this.hasRequests || f.hasRequests;
+ this.allFilesApproved = this.allFilesApproved && f.isApproved;
});
}
}
@@ -467,7 +472,10 @@ export class AppStateService {
await this.reloadActiveProjectFiles();
}
- downloadFileRedactionReport(file: FileStatusWrapper) {
+ downloadFileRedactionReport(file?: FileStatusWrapper) {
+ if (!file) {
+ file = this.activeFile;
+ }
this._fileUploadControllerService
.downloadRedactionReport({ fileIds: [file.fileId] }, true, 'response')
.subscribe((data) => {
@@ -536,7 +544,10 @@ export class AppStateService {
return data ? data : this._dictionaryData['default'];
}
- isManagerAndOwner(user: UserWrapper, project: Project) {
+ isManagerAndOwner(project: Project, user?: UserWrapper) {
+ if (!user) {
+ user = this._userService.user;
+ }
return user.isManager && project.ownerId === user.id;
}
@@ -566,12 +577,24 @@ export class AppStateService {
);
}
+ canReanalyseFile(fileStatus?: FileStatusWrapper) {
+ if (!fileStatus) {
+ fileStatus = this.activeFile;
+ }
+ return (
+ (!fileStatus.isApproved && this.fileNotUpToDateWithDictionary(fileStatus)) ||
+ fileStatus.isError
+ );
+ }
+
fileNotUpToDateWithDictionary(fileStatus?: FileStatusWrapper) {
if (!fileStatus) {
fileStatus = this.activeFile;
}
return (
- (fileStatus.status === 'UNASSIGNED' || fileStatus.status === 'UNDER_REVIEW') &&
+ (fileStatus.status === 'UNASSIGNED' ||
+ fileStatus.status === 'UNDER_REVIEW' ||
+ fileStatus.status === 'UNDER_APPROVAL') &&
fileStatus.dictionaryVersion !== this.dictionaryVersion
);
}
diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json
index 275f5868a..0039a2a62 100644
--- a/apps/red-ui/src/assets/i18n/en.json
+++ b/apps/red-ui/src/assets/i18n/en.json
@@ -90,10 +90,12 @@
"document": "Document",
"needs-work": "Analysed"
},
+ "report": {
+ "unavailable": "Redaction Report is only available once all files have been approved.",
+ "unavailable-single": "Redaction Report is only available once this file has been approved.",
+ "action": "Download Redaction Report"
+ },
"project-listing": {
- "report": {
- "action": "Download Redaction Report"
- },
"reanalyse": {
"action": "Reanalyse entire Project"
},
diff --git a/apps/red-ui/src/assets/styles/red-tooltips.scss b/apps/red-ui/src/assets/styles/red-tooltips.scss
index efe8a669b..a26529fca 100644
--- a/apps/red-ui/src/assets/styles/red-tooltips.scss
+++ b/apps/red-ui/src/assets/styles/red-tooltips.scss
@@ -16,13 +16,22 @@
.mat-tooltip:after {
content: '';
position: absolute;
- top: 100%;
left: 50%;
margin-left: -5px;
width: 0;
height: 0;
- border-top: solid 6px $accent;
+ z-index: 3000;
border-left: solid 5px transparent;
border-right: solid 5px transparent;
- z-index: 3000;
+ border-top: solid 6px $accent;
+}
+
+.mat-tooltip[style*='transform-origin: center top']:after {
+ top: -6px;
+ transform: rotate(180deg);
+}
+
+.mat-tooltip[style*='transform-origin: center bottom']:after {
+ top: 100%;
+ border-top: solid 6px $accent;
}