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 2bde17f99..25196da0e 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -415,13 +415,24 @@ export class AnnotationWrapper implements IListable, Record { } break; case ManualRedactionType.REMOVE_FROM_DICTIONARY: - switch (lastManualChange.annotationStatus) { - case LogEntryStatus.APPROVED: - return SuperTypes.Skipped; - case LogEntryStatus.DECLINED: - return SuperTypes.Redaction; - case LogEntryStatus.REQUESTED: - return SuperTypes.SuggestionRemoveDictionary; + if (redactionLogEntry.redacted) { + switch (lastManualChange.annotationStatus) { + case LogEntryStatus.APPROVED: + return SuperTypes.Skipped; + case LogEntryStatus.DECLINED: + return SuperTypes.Redaction; + case LogEntryStatus.REQUESTED: + return SuperTypes.SuggestionRemoveDictionary; + } + } else { + switch (lastManualChange.annotationStatus) { + case LogEntryStatus.APPROVED: + return SuperTypes.Redaction; + case LogEntryStatus.DECLINED: + return SuperTypes.Skipped; + case LogEntryStatus.REQUESTED: + return SuperTypes.SuggestionRemoveDictionary; + } } break; case ManualRedactionType.FORCE_REDACT: @@ -454,9 +465,8 @@ export class AnnotationWrapper implements IListable, Record { return SuperTypes.Redaction; } else if (redactionLogEntry.hint) { return SuperTypes.Hint; - } else { - return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped; } + return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped; } case LogEntryStatus.REQUESTED: return SuperTypes.SuggestionRecategorizeImage; @@ -481,9 +491,9 @@ export class AnnotationWrapper implements IListable, Record { return redactionLogEntry.type === 'manual' ? SuperTypes.ManualRedaction : SuperTypes.Redaction; } else if (redactionLogEntry.hint) { return SuperTypes.Hint; - } else { - return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped; } + return isHintDictionary ? SuperTypes.IgnoredHint : SuperTypes.Skipped; + case LogEntryStatus.REQUESTED: return SuperTypes.SuggestionResize; } diff --git a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts index 36dd47ea4..0e2e842ee 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts @@ -370,10 +370,7 @@ export class AnnotationActionsService { type: 'actionButton', img: this._convertPath('/assets/icons/general/close.svg'), title: this._translateService.instant('annotation-actions.reject-suggestion'), - onClick: () => - this._ngZone.run(() => { - this.rejectSuggestion(null, annotations); - }), + onClick: () => this._ngZone.run(() => this.rejectSuggestion(null, annotations)), }); }