From a37e36dff15844d14edbd0a6c5554ce4c2ca1bf9 Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Wed, 18 Jan 2023 13:34:53 +0800 Subject: [PATCH] RED-6005 - type changes --- .../src/app/models/file/annotation.wrapper.ts | 48 +++++++++++++------ .../annotation-wrapper.component.html | 2 +- libs/common-ui | 2 +- 3 files changed, 36 insertions(+), 16 deletions(-) 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 860c633e0..44024837e 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -473,22 +473,42 @@ export class AnnotationWrapper implements IListable, Record { break; case ManualRedactionTypes.REMOVE_FROM_DICTIONARY: if (redactionLogEntry.redacted) { - switch (lastManualChange.annotationStatus) { - case LogEntryStatuses.APPROVED: - return SuperTypes.Skipped; - case LogEntryStatuses.DECLINED: - return SuperTypes.Redaction; - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionRemoveDictionary; + if (lastManualChange.processed) { + switch (lastManualChange.annotationStatus) { + case LogEntryStatuses.APPROVED: + return SuperTypes.Skipped; + case LogEntryStatuses.DECLINED: + return SuperTypes.Redaction; + case LogEntryStatuses.REQUESTED: + return SuperTypes.SuggestionRemoveDictionary; + } + } else { + switch (lastManualChange.annotationStatus) { + case LogEntryStatuses.APPROVED: + case LogEntryStatuses.DECLINED: + return SuperTypes.Redaction; + case LogEntryStatuses.REQUESTED: + return SuperTypes.SuggestionRemoveDictionary; + } } } else { - switch (lastManualChange.annotationStatus) { - case LogEntryStatuses.APPROVED: - return SuperTypes.Redaction; - case LogEntryStatuses.DECLINED: - return isHintDictionary ? SuperTypes.Hint : SuperTypes.Skipped; - case LogEntryStatuses.REQUESTED: - return SuperTypes.SuggestionRemoveDictionary; + if (lastManualChange.processed) { + switch (lastManualChange.annotationStatus) { + case LogEntryStatuses.APPROVED: + return SuperTypes.Redaction; + case LogEntryStatuses.DECLINED: + return isHintDictionary ? SuperTypes.Hint : SuperTypes.Skipped; + case LogEntryStatuses.REQUESTED: + return SuperTypes.SuggestionRemoveDictionary; + } + } else { + switch (lastManualChange.annotationStatus) { + case LogEntryStatuses.APPROVED: + case LogEntryStatuses.DECLINED: + return isHintDictionary ? SuperTypes.Hint : SuperTypes.Skipped; + case LogEntryStatuses.REQUESTED: + return SuperTypes.SuggestionRemoveDictionary; + } } } break; diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html index bebcc261f..f64120c3e 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html @@ -11,7 +11,7 @@
diff --git a/libs/common-ui b/libs/common-ui index 03d63fc78..e6fcc2b9f 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 03d63fc78e36cbb36dbaee65bd5638eb3d501eb9 +Subproject commit e6fcc2b9f0f7c199c83cf57ff4e84ce7307b8026