Merge branch 'RED-8765' into 'master'
RED-8765: fixed actions and edit fields for specific combinations. See merge request redactmanager/red-ui!372
This commit is contained in:
commit
035986ea4f
@ -56,6 +56,7 @@ export const canResizeAnnotation = (
|
||||
|
||||
export const canEditAnnotation = (annotation: AnnotationWrapper) => (annotation.isRedacted || annotation.isSkipped) && !annotation.isImage;
|
||||
|
||||
export const canEditHint = (annotation: AnnotationWrapper) => (annotation.isHint && !annotation.isRuleBased) || annotation.isIgnoredHint;
|
||||
export const canEditHint = (annotation: AnnotationWrapper) =>
|
||||
((annotation.isHint && !annotation.isRuleBased) || annotation.isIgnoredHint) && !annotation.isImage;
|
||||
|
||||
export const canEditImage = (annotation: AnnotationWrapper) => annotation.isImage;
|
||||
|
||||
@ -9,7 +9,6 @@ import { firstValueFrom } from 'rxjs';
|
||||
import { getEditRedactionOptions, RedactOrHintOption } from '../../utils/dialog-options';
|
||||
import { EditRedactionData, EditRedactResult } from '../../utils/dialog-types';
|
||||
import { LegalBasisOption } from '../manual-redaction-dialog/manual-annotation-dialog.component';
|
||||
import { editRedactionLabelsTranslations } from '@translations/redact-text-translations';
|
||||
import { Roles } from '@users/roles';
|
||||
import { DialogHelpModeKeys } from '../../utils/constants';
|
||||
|
||||
@ -31,11 +30,10 @@ export class EditRedactionDialogComponent
|
||||
readonly #applyToAllDossiers = this.data.applyToAllDossiers;
|
||||
readonly annotations = this.data.annotations;
|
||||
readonly iconButtonTypes = IconButtonTypes;
|
||||
readonly editRedactionLabelsTranslations = editRedactionLabelsTranslations;
|
||||
readonly isModifyDictionary = this.annotations.every(annotation => annotation.isModifyDictionary);
|
||||
readonly isImage = this.annotations.reduce((acc, next) => acc && next.isImage, true);
|
||||
readonly redactedTexts = !this.isImage ? this.annotations.map(annotation => annotation.value).filter(value => !!value) : null;
|
||||
readonly isManualRedaction = this.annotations.every(annotation => annotation.type === SuperTypes.ManualRedaction);
|
||||
readonly isManualRedaction = this.annotations.some(annotation => annotation.type === SuperTypes.ManualRedaction);
|
||||
readonly isHint = this.annotations.every(annotation => annotation.HINT || annotation.IMAGE_HINT);
|
||||
readonly isRedacted = this.annotations.every(annotation => annotation.isRedacted);
|
||||
readonly isImported: boolean = this.annotations.every(annotation => annotation.imported);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user