+
el.value)
.map((el) => ({
...el,
- checked: this.filter?.find((f) => f.key === el.label)?.checked
+ checked: this.filter?.find((f) => f.key === el.key)?.checked
}));
}
}
diff --git a/apps/red-ui/src/app/components/type-filter/type-filter.component.html b/apps/red-ui/src/app/components/type-filter/type-filter.component.html
index 873e399f1..3f57796ae 100644
--- a/apps/red-ui/src/app/components/type-filter/type-filter.component.html
+++ b/apps/red-ui/src/app/components/type-filter/type-filter.component.html
@@ -1,4 +1,5 @@
+
@@ -7,6 +8,7 @@
{
- this.canPerformAnnotationActions = this.permissionsService.canPerformAnnotationActions(this.fileData.fileStatus);
+ this._updateCanPerformActions();
});
this.appStateService.fileReanalysed.subscribe((fileStatus: FileStatusWrapper) => {
if (fileStatus.fileId === this.fileId) {
this._loadFileData(true).subscribe(() => {
this.viewReady = true;
this.loadingMessage = null;
- this.canPerformAnnotationActions = this.permissionsService.canPerformAnnotationActions(this.fileData.fileStatus);
+ this._updateCanPerformActions();
this._cleanupAndRedrawManualAnnotations();
this._fileDownloadService.loadRedactedView(this.fileData);
});
@@ -444,7 +448,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
}
await this._loadFileData().toPromise();
- this.canPerformAnnotationActions = this.permissionsService.canPerformAnnotationActions();
+ this._updateCanPerformActions();
await this.appStateService.reloadActiveProjectFiles();
}
@@ -454,13 +458,13 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
public assignReviewer() {
this._fileActionService.assignProjectReviewer(this.fileData.fileStatus, async () => {
- this.canPerformAnnotationActions = this.permissionsService.canPerformAnnotationActions();
+ this._updateCanPerformActions();
});
}
public async assignToMe() {
await this._fileActionService.assignToMe(this.fileData.fileStatus, async () => {
- this.canPerformAnnotationActions = this.permissionsService.canPerformAnnotationActions();
+ this._updateCanPerformActions();
});
}
}
diff --git a/apps/red-ui/src/app/screens/file/page-indicator/page-indicator.component.ts b/apps/red-ui/src/app/screens/file/page-indicator/page-indicator.component.ts
index 0d4516289..979570d5e 100644
--- a/apps/red-ui/src/app/screens/file/page-indicator/page-indicator.component.ts
+++ b/apps/red-ui/src/app/screens/file/page-indicator/page-indicator.component.ts
@@ -27,7 +27,9 @@ export class PageIndicatorComponent implements OnChanges, OnInit {
) {}
ngOnInit(): void {
- this.canMarkPagesAsViewed = this._permissionService.canMarkPagesAsViewed();
+ this._appStateService.fileChanged.subscribe(() => {
+ this.canMarkPagesAsViewed = this._permissionService.canMarkPagesAsViewed();
+ });
}
ngOnChanges(changes: SimpleChanges): void {
diff --git a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html
index f33367eb7..35f85c661 100644
--- a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html
+++ b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html
@@ -16,13 +16,6 @@
[icon]="'red:user'"
(filtersChanged)="filtersChanged()"
>
-
();
const allDistinctPeople = new Set();
- const allDistinctDueDates = new Set();
const allDistinctNeedsWork = new Set();
this.appStateService.allProjects.forEach((entry) => {
// all people
entry.project.memberIds.forEach((memberId) => allDistinctPeople.add(memberId));
- // due date
- if (entry.dueDate) {
- allDistinctDueDates.add(moment(entry.dueDate).format('DD/MM/YYYY'));
- }
// file statuses
entry.files.forEach((file) => {
allDistinctFileStatus.add(file.status);
@@ -218,15 +212,6 @@ export class ProjectListingScreenComponent implements OnInit, OnDestroy {
});
this.peopleFilters = processFilters(this.peopleFilters, peopleFilters);
- const dueDateFilters = [];
- allDistinctDueDates.forEach((date) => {
- dueDateFilters.push({
- key: date,
- label: date
- });
- });
- this.dueDateFilters = processFilters(this.dueDateFilters, dueDateFilters);
-
const needsWorkFilters = [];
allDistinctNeedsWork.forEach((type) => {
needsWorkFilters.push({
@@ -254,7 +239,6 @@ export class ProjectListingScreenComponent implements OnInit, OnDestroy {
const filters = [
{ values: this.statusFilters, checker: projectStatusChecker },
{ values: this.peopleFilters, checker: projectMemberChecker },
- { values: this.dueDateFilters, checker: dueDateChecker },
{ values: this.needsWorkFilters, checker: annotationFilterChecker, matchAll: true, checkerArgs: this.permissionsService }
];
this.detailsContainerFilters = {
diff --git a/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.ts b/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.ts
index 69be9148c..4ab377dd2 100644
--- a/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.ts
+++ b/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.ts
@@ -70,7 +70,7 @@ export class ProjectDetailsComponent implements OnInit {
const groups = groupBy(this.appStateService.activeProject?.files, 'status');
this.documentsChartData = [];
for (const key of Object.keys(groups)) {
- this.documentsChartData.push({ value: groups[key].length, color: key, label: key });
+ this.documentsChartData.push({ value: groups[key].length, color: key, label: key, key: key });
}
this._changeDetectorRef.detectChanges();
}
@@ -81,6 +81,7 @@ export class ProjectDetailsComponent implements OnInit {
}
public toggleFilter(filterType: 'needsWorkFilters' | 'statusFilters', key: string): void {
+ console.log(this.filters, filterType, this.filters[filterType], key);
const filter = this.filters[filterType].find((f) => f.key === key);
filter.checked = !filter.checked;
this.filtersChanged.emit(this.filters);
diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json
index 966d083b7..473ee1549 100644
--- a/apps/red-ui/src/assets/i18n/en.json
+++ b/apps/red-ui/src/assets/i18n/en.json
@@ -152,7 +152,7 @@
"new-rule": {
"label": "Outdated",
"toast": {
- "message-project": "Renalysis required: ",
+ "message-project": "Reanalysis required: ",
"actions": {
"reanalyse-all": "Reanalyze all",
"reanalyse-file": "Reanalyze this file",