From 7fcad33eb3ddfe3bc29bb4b1f6dcb03335c53a76 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Wed, 6 Dec 2023 17:11:27 +0200 Subject: [PATCH] RED-7980 - Not all unprocessed annotations are displayed correctly --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 3 +++ .../components/annotation-card/annotation-card.component.html | 2 +- .../components/annotation-card/annotation-card.component.ts | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index 4688b0587..054b7f8ed 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -60,6 +60,7 @@ export class AnnotationWrapper implements IListable { hasBeenForcedRedaction: boolean; hasBeenRemovedByManualOverride: boolean; isRemoved = false; + isRemovedLocally = false; get isRuleBased() { return this.engines.includes(LogEntryEngines.RULE); @@ -237,6 +238,8 @@ export class AnnotationWrapper implements IListable { annotationWrapper.IMAGE_HINT = logEntry.entryType === EntityTypes.IMAGE_HINT; annotationWrapper.isRemoved = logEntry.state === EntryStates.REMOVED; + annotationWrapper.isRemovedLocally = + logEntry.manualChanges.slice(-1)[0]?.manualRedactionType === ManualRedactionTypes.REMOVE_LOCALLY; annotationWrapper.numberOfComments = logEntry.numberOfComments; annotationWrapper.imported = logEntry.imported; diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html index 50a482417..99c2ed520 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html @@ -10,7 +10,7 @@
{{ annotation.superTypeLabel | translate }}   - + {{ 'annotation.pending' | translate }}
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts index 8fb71348f..10cba30f6 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts @@ -16,4 +16,8 @@ export class AnnotationCardComponent { @Input() isSelected = false; constructor(readonly multiSelectService: MultiSelectService) {} + + get pending() { + return this.annotation.pending && this.annotation.isModifyDictionary && !this.annotation.isRemovedLocally; + } }