Merge branch 'VM/RED-8829' into 'master'

RED-8829 - Disable option to resize a forced redaction with dictionary action

Closes RED-8829

See merge request redactmanager/red-ui!362
This commit is contained in:
Dan Percic 2024-03-25 15:59:35 +01:00
commit 500290db7f
3 changed files with 4 additions and 1 deletions

View File

@ -59,6 +59,7 @@ export class AnnotationWrapper implements IListable {
hasBeenResized: boolean;
hasBeenRecategorized: boolean;
hasLegalBasisChanged: boolean;
hasBeenForced: boolean;
hasBeenForcedHint: boolean;
hasBeenForcedRedaction: boolean;
hasBeenRemovedByManualOverride: boolean;
@ -259,6 +260,7 @@ export class AnnotationWrapper implements IListable {
annotationWrapper.hasLegalBasisChanged = !!logEntry.manualChanges?.find(
c => c.manualRedactionType === ManualRedactionTypes.LEGAL_BASIS_CHANGE,
);
annotationWrapper.hasBeenForced = !!logEntry.manualChanges?.find(c => c.manualRedactionType === ManualRedactionTypes.FORCE);
annotationWrapper.hasBeenForcedHint = !!logEntry.manualChanges?.find(
c => c.manualRedactionType === ManualRedactionTypes.FORCE_HINT,
);

View File

@ -133,7 +133,7 @@ export const getResizeRedactionOptions = (
label: translations.inDossier.label,
description: translations.inDossier.description,
descriptionParams: { dossierName: dossier.dossierName },
disabled: !dictBasedType || redaction.hasBeenRecategorized,
disabled: !dictBasedType || redaction.hasBeenRecategorized || redaction.hasBeenForced,
tooltip: !dictBasedType ? translations.inDossier.tooltip : null,
icon: FOLDER_ICON,
value: RedactOrHintOptions.IN_DOSSIER,

View File

@ -15,6 +15,7 @@ export const ManualRedactionTypes = {
ADD_TO_DICTIONARY: 'ADD_TO_DICTIONARY',
REMOVE_LOCALLY: 'REMOVE_LOCALLY',
REMOVE_FROM_DICTIONARY: 'REMOVE_FROM_DICTIONARY',
FORCE: 'FORCE',
FORCE_REDACT: 'FORCE_REDACT',
FORCE_HINT: 'FORCE_HINT',
RECATEGORIZE: 'RECATEGORIZE',