Merge branch 'RED-5108' into 'master'

RED-5108: use default redaction color for redacted image hints.

See merge request redactmanager/red-ui!459
This commit is contained in:
Dan Percic 2024-06-18 17:13:03 +02:00
commit 59b1219128

View File

@ -77,6 +77,10 @@ export class AnnotationWrapper implements IListable {
return this.engines.includes(LogEntryEngines.DICTIONARY);
}
get isRedactedImageHint() {
return this.IMAGE_HINT && this.superType === SuperTypes.Redaction;
}
get searchKey(): string {
return this.id;
}
@ -291,7 +295,10 @@ export class AnnotationWrapper implements IListable {
} else {
const colorKey = annotationEntityColorConfig[annotationWrapper.superType];
const defaultColor = annotationDefaultColorConfig[annotationWrapper.superType];
annotationWrapper.color = dictionary ? (dictionary[colorKey] as string) : (defaultColors[defaultColor] as string);
annotationWrapper.color =
dictionary && !annotationWrapper.isRedactedImageHint
? (dictionary[colorKey] as string)
: (defaultColors[defaultColor] as string);
}
annotationWrapper.entry = logEntry;