Merge branch 'RED-8270' into 'master'
RED-8270: fixed actions not available for manually added hints. See merge request redactmanager/red-ui!266
This commit is contained in:
commit
ef286355db
@ -34,7 +34,9 @@ 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.isDictBasedHint) && (autoAnalysisDisabled || !annotation.pending);
|
||||
canRecategorize &&
|
||||
(annotation.isImage || (annotation.isHint && !annotation.isRuleBased)) &&
|
||||
(autoAnalysisDisabled || !annotation.pending);
|
||||
|
||||
export const canResizeAnnotation = (
|
||||
annotation: AnnotationWrapper,
|
||||
@ -42,17 +44,18 @@ export const canResizeAnnotation = (
|
||||
autoAnalysisDisabled: boolean,
|
||||
hasDictionary = false,
|
||||
) =>
|
||||
canAddRedaction &&
|
||||
!annotation.isSkipped &&
|
||||
(autoAnalysisDisabled || !annotation.pending) &&
|
||||
(annotation.isRedacted ||
|
||||
annotation.isImage ||
|
||||
annotation.isDictBasedHint ||
|
||||
annotation.isRecommendation ||
|
||||
(hasDictionary && annotation.isRuleBased));
|
||||
(canAddRedaction &&
|
||||
!annotation.isSkipped &&
|
||||
!annotation.isIgnoredHint &&
|
||||
(autoAnalysisDisabled || !annotation.pending) &&
|
||||
(annotation.isRedacted ||
|
||||
annotation.isImage ||
|
||||
(annotation.isHint && !annotation.isRuleBased) ||
|
||||
(!annotation.isHint && hasDictionary && annotation.isRuleBased))) ||
|
||||
annotation.isRecommendation;
|
||||
|
||||
export const canEditAnnotation = (annotation: AnnotationWrapper) => (annotation.isRedacted || annotation.isSkipped) && !annotation.isImage;
|
||||
|
||||
export const canEditHint = (annotation: AnnotationWrapper) => annotation.HINT || annotation.isIgnoredHint;
|
||||
export const canEditHint = (annotation: AnnotationWrapper) => (annotation.isHint && !annotation.isRuleBased) || annotation.isIgnoredHint;
|
||||
|
||||
export const canEditImage = (annotation: AnnotationWrapper) => annotation.isImage;
|
||||
|
||||
@ -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