Merge branch 'RED-5108' into 'master'

RED-5108: map IGNORED IMAGE_HINT to Hint instead of IngoredHint.

See merge request redactmanager/red-ui!489
This commit is contained in:
Dan Percic 2024-07-09 13:03:13 +02:00
commit f6346c27bc
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
import { AnnotationPermissions } from '@models/file/annotation.permissions';
import { AnnotationWrapper } from '@models/file/annotation.wrapper';
import { Dictionary, LogEntryEngines } from '@red/domain';
import { Dictionary, LogEntryEngines, SuperTypes } from '@red/domain';
export const canUndo = (annotation: AnnotationWrapper, isApprover: boolean) => !isApprover && annotation.pending;
@ -9,7 +9,7 @@ export const canForceHint = (annotation: AnnotationWrapper, canAddRedaction: boo
export const canForceRedaction = (annotation: AnnotationWrapper, canAddRedaction: boolean) =>
canAddRedaction &&
(annotation.isSkipped || (annotation.IMAGE_HINT && !annotation.hasBeenForcedRedaction)) &&
(annotation.isSkipped || (annotation.IMAGE_HINT && annotation.superType === SuperTypes.Hint)) &&
!annotation.isFalsePositive &&
!annotation.pending;

View File

@ -90,7 +90,7 @@ export const SuperTypeMapper: Record<EntityType, Record<EntryState, (entry: IEnt
[EntityTypes.IMAGE_HINT]: {
[EntryStates.APPLIED]: entry => resolveRedactionType(entry),
[EntryStates.SKIPPED]: () => SuperTypes.Hint,
[EntryStates.IGNORED]: () => SuperTypes.IgnoredHint,
[EntryStates.IGNORED]: () => SuperTypes.Hint,
[EntryStates.REMOVED]: wrongSuperTypeHandler,
[EntryStates.PENDING]: entry => resolveRedactionType(entry),
},