RED-8270: prevent future bug.
This commit is contained in:
parent
70dcc38503
commit
a1f8451ee6
@ -16,11 +16,13 @@ export const canMarkAsFalsePositive = (annotation: AnnotationWrapper, annotation
|
||||
annotation.canBeMarkedAsFalsePositive && annotationEntity?.hasDictionary;
|
||||
|
||||
export const canRemoveOnlyHere = (annotation: AnnotationWrapper, canAddRedaction: boolean, autoAnalysisDisabled: boolean) =>
|
||||
canAddRedaction && (autoAnalysisDisabled || !annotation.pending) && (annotation.isRedacted || (annotation.HINT && !annotation.isImage));
|
||||
canAddRedaction &&
|
||||
(autoAnalysisDisabled || !annotation.pending) &&
|
||||
(annotation.isRedacted || (annotation.isHint && !annotation.isImage));
|
||||
|
||||
export const canRemoveFromDictionary = (annotation: AnnotationWrapper, autoAnalysisDisabled: boolean) =>
|
||||
annotation.isModifyDictionary &&
|
||||
(annotation.isRedacted || annotation.isSkipped || annotation.HINT) &&
|
||||
(annotation.isRedacted || annotation.isSkipped || annotation.isHint) &&
|
||||
(autoAnalysisDisabled || !annotation.pending) &&
|
||||
!annotation.hasBeenResized;
|
||||
|
||||
@ -32,7 +34,7 @@ export const canChangeLegalBasis = (annotation: AnnotationWrapper, canAddRedacti
|
||||
canAddRedaction && annotation.isRedacted && (autoAnalysisDisabled || !annotation.pending);
|
||||
|
||||
export const canRecategorizeAnnotation = (annotation: AnnotationWrapper, canRecategorize: boolean, autoAnalysisDisabled: boolean) =>
|
||||
canRecategorize && (annotation.isImage || annotation.HINT) && (autoAnalysisDisabled || !annotation.pending);
|
||||
canRecategorize && (annotation.isImage || annotation.isHint) && (autoAnalysisDisabled || !annotation.pending);
|
||||
|
||||
export const canResizeAnnotation = (
|
||||
annotation: AnnotationWrapper,
|
||||
@ -45,7 +47,7 @@ export const canResizeAnnotation = (
|
||||
(autoAnalysisDisabled || !annotation.pending) &&
|
||||
(annotation.isRedacted ||
|
||||
annotation.isImage ||
|
||||
annotation.HINT ||
|
||||
annotation.isHint ||
|
||||
annotation.isRecommendation ||
|
||||
(hasDictionary && annotation.isRuleBased));
|
||||
|
||||
|
||||
@ -126,7 +126,11 @@ export class AnnotationWrapper implements IListable {
|
||||
}
|
||||
|
||||
get isHint() {
|
||||
return this.superType === SuperTypes.Hint;
|
||||
return this.superType === SuperTypes.Hint || this.superType === SuperTypes.ManualHint;
|
||||
}
|
||||
|
||||
get isIgnoredHint() {
|
||||
return this.superType === SuperTypes.IgnoredHint;
|
||||
}
|
||||
|
||||
get isEarmark() {
|
||||
@ -145,14 +149,6 @@ export class AnnotationWrapper implements IListable {
|
||||
return 'square';
|
||||
}
|
||||
|
||||
get isDictBasedHint() {
|
||||
return this.isHint && this.engines.includes(LogEntryEngines.DICTIONARY);
|
||||
}
|
||||
|
||||
get isIgnoredHint() {
|
||||
return this.superType === SuperTypes.IgnoredHint;
|
||||
}
|
||||
|
||||
get isRedacted() {
|
||||
return this.superType === SuperTypes.Redaction || this.superType === SuperTypes.ManualRedaction;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user