From 60cb73618fbb01de0fc046791ee155fe26bdebae Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Mon, 15 Aug 2022 13:36:59 +0300 Subject: [PATCH] RED-4894 - DocumentView "no redactions" icon in legend doesn't match the list --- .../file-workload/file-workload.component.html | 8 ++------ .../file-workload/file-workload.component.ts | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.html b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.html index 72230dec4..21d4653c2 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.html +++ b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.html @@ -5,12 +5,7 @@ label="A" type="square" > - + + - diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.ts index e4b052cc1..38cae9777 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-workload/file-workload.component.ts @@ -26,7 +26,7 @@ export class FileWorkloadComponent implements OnInit { #dossierTemplateId: string; constructor( - readonly userService: UserService, + private readonly _userService: UserService, private readonly _defaultColorsService: DefaultColorsService, private readonly _dossiersService: DossiersService, private readonly _dictionariesMapService: DictionariesMapService, @@ -45,4 +45,20 @@ export class FileWorkloadComponent implements OnInit { #getDefaultColor$(type: DefaultBasedColorType): Observable { return this._defaultColorsService.getColor$(this.#dossierTemplateId, annotationDefaultColorConfig[type]); } + + get updated(): boolean { + return this.file.hasUpdates && this.file.assignee === this._userService.currentUser.id && !this.file.isApproved; + } + + get noWorkloadItems(): boolean { + return ( + !this.updated && + !this.file.analysisRequired && + !this.file.hasRedactions && + !this.file.hasImages && + !this.file.hintsOnly && + !this.file.hasSuggestions && + !this.file.hasAnnotationComments + ); + } }