From b414060f734ceb520d35370785fa46eaf982874f Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Thu, 21 Dec 2023 14:36:52 +0200 Subject: [PATCH] RED-8119: show only annotations with excluded=false. --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 2 ++ .../src/app/modules/file-preview/services/file-data.service.ts | 1 + 2 files changed, 3 insertions(+) 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 441b0ae03..e89109a68 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -63,6 +63,7 @@ export class AnnotationWrapper implements IListable { hasBeenRemovedByManualOverride: boolean; isRemoved = false; isRemovedLocally = false; + excluded: boolean; get isRuleBased() { return this.engines.includes(LogEntryEngines.RULE); @@ -234,6 +235,7 @@ export class AnnotationWrapper implements IListable { annotationWrapper.textBefore = logEntry.textBefore; annotationWrapper.textAfter = logEntry.textAfter; annotationWrapper.dictionaryOperation = logEntry.dictionaryEntry; + annotationWrapper.excluded = logEntry.excluded; annotationWrapper.HINT = logEntry.entryType === EntityTypes.HINT; annotationWrapper.IMAGE = logEntry.entryType === EntityTypes.IMAGE; diff --git a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts index 84505a2f0..773a5576a 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts @@ -128,6 +128,7 @@ export class FileDataService extends EntitiesService !a.isFalsePositive); + annotations = annotations.filter(a => !a.excluded); this.#annotations.set(annotations); }