-
-
-
+
+
-
{
- this.addedDateFilters.push({
- key: date,
- label: date
- });
- });
-
this.needsWorkFilters = [];
allDistinctNeedsWork.forEach((type) => {
this.needsWorkFilters.push({
@@ -330,7 +322,6 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
const filters = [
{ values: this.statusFilters, checker: keyChecker('status') },
{ values: this.peopleFilters, checker: keyChecker('currentReviewer') },
- { values: this.addedDateFilters, checker: fileAddedFilterChecker },
{ values: this.needsWorkFilters, checker: annotationFilterChecker, matchAll: true }
];
this.displayedFiles = getFilteredEntities(
diff --git a/apps/red-ui/src/app/state/app-state.service.ts b/apps/red-ui/src/app/state/app-state.service.ts
index 6668bb901..98316e2e8 100644
--- a/apps/red-ui/src/app/state/app-state.service.ts
+++ b/apps/red-ui/src/app/state/app-state.service.ts
@@ -1,7 +1,6 @@
import { EventEmitter, Injectable } from '@angular/core';
import {
DictionaryControllerService,
- FileStatus,
FileUploadControllerService,
Project,
ProjectControllerService,
@@ -9,7 +8,6 @@ import {
StatusControllerService,
TypeValue,
VersionsControllerService,
- ViewedPages,
ViewedPagesControllerService
} from '@redaction/red-ui-http';
import { NotificationService, NotificationType } from '../notification/notification.service';
@@ -38,11 +36,24 @@ export interface AppState {
export class ProjectWrapper {
totalNumberOfPages?: number;
- hasStatus(status: string) {
- return this.files.find((f) => f.status === status);
+ hasHints?: boolean;
+ hasRedactions?: boolean;
+ hasRequests?: boolean;
+ private _files: FileStatusWrapper[];
+
+ constructor(public project: Project, files: FileStatusWrapper[]) {
+ this._files = files ? files : [];
+ this._recomputeFileStatus();
}
- constructor(public project: Project, public files: FileStatusWrapper[]) {}
+ set files(files: FileStatusWrapper[]) {
+ this._files = files ? files : [];
+ this._recomputeFileStatus();
+ }
+
+ get files() {
+ return this._files;
+ }
get projectDate() {
return this.project.date;
@@ -52,6 +63,14 @@ export class ProjectWrapper {
return this.project.dueDate;
}
+ get hasFiles() {
+ return this._files.length > 0;
+ }
+
+ hasStatus(status: string) {
+ return this._files.find((f) => f.status === status);
+ }
+
hasMember(key: string) {
return this.project.memberIds.indexOf(key) >= 0;
}
@@ -64,8 +83,15 @@ export class ProjectWrapper {
return moment(this.projectDate).format('DD/MM/YYYY') === key;
}
- get hasFiles() {
- return this.files?.length > 0;
+ private _recomputeFileStatus() {
+ this.hasHints = false;
+ this.hasRedactions = false;
+ this.hasRequests = false;
+ this._files.forEach((f) => {
+ this.hasHints = this.hasHints || f.hasHints;
+ this.hasRedactions = this.hasRedactions || f.hasRedactions;
+ this.hasRequests = this.hasRequests || f.hasRequests;
+ });
}
}
diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json
index aca4b5432..be31eb3e7 100644
--- a/apps/red-ui/src/assets/i18n/en.json
+++ b/apps/red-ui/src/assets/i18n/en.json
@@ -90,7 +90,7 @@
"created-on": "Created On",
"project": "Project",
"document": "Document",
- "needs-work": "Needs Work"
+ "needs-work": "Analysed"
},
"project-listing": {
"report": {
@@ -109,6 +109,7 @@
},
"table-col-names": {
"name": "Document",
+ "needs-work": "Analysed",
"owner": "Owner",
"status": "Status"
},