RED-5401 - display remove suggestions in preview

This commit is contained in:
Valentin Mihai 2022-11-25 14:26:19 +02:00
parent f874aad5ca
commit 8e5fd27787
2 changed files with 11 additions and 0 deletions

View File

@ -16,6 +16,7 @@ import {
LowLevelFilterTypes,
ManualRedactionType,
SuggestionAddSuperTypes,
SuggestionRemoveSuperTypes,
SuggestionsSuperTypes,
SuperType,
SuperTypes,
@ -190,6 +191,10 @@ export class AnnotationWrapper implements IListable, Record<string, unknown> {
return !!SuggestionAddSuperTypes[this.superType];
}
get isSuggestionRemove() {
return !!SuggestionRemoveSuperTypes[this.superType];
}
get isSuggestionRemoveDictionary() {
return this.superType === SuperTypes.SuggestionRemoveDictionary;
}
@ -249,6 +254,7 @@ export class AnnotationWrapper implements IListable, Record<string, unknown> {
return (
this.isRedacted ||
this.isSuggestionAdd ||
this.isSuggestionRemove ||
this.isSuggestionResize ||
this.isSuggestionLegalBasisChange ||
this.isSuggestionRecategorizeImage

View File

@ -44,6 +44,11 @@ export const SuggestionAddSuperTypes = {
[SuperTypes.SuggestionForceHint]: true,
} as const;
export const SuggestionRemoveSuperTypes = {
[SuperTypes.SuggestionRemove]: true,
[SuperTypes.SuggestionRemoveDictionary]: true,
} as const;
export const SuggestionsSuperTypes = {
[SuperTypes.SuggestionAdd]: true,
[SuperTypes.SuggestionAddDictionary]: true,