diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-recommendation-dialog/redact-recommendation-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-recommendation-dialog/redact-recommendation-dialog.component.html
index eb1d4b146..7acc288cc 100644
--- a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-recommendation-dialog/redact-recommendation-dialog.component.html
+++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-recommendation-dialog/redact-recommendation-dialog.component.html
@@ -21,7 +21,7 @@
-
+
{{ displayedDictionaryLabel }}
-
+
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-recommendation-dialog/redact-recommendation-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-recommendation-dialog/redact-recommendation-dialog.component.ts
index 587f154e9..fddd4302f 100644
--- a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-recommendation-dialog/redact-recommendation-dialog.component.ts
+++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-recommendation-dialog/redact-recommendation-dialog.component.ts
@@ -85,7 +85,7 @@ export class RedactRecommendationDialogComponent
}
get disabled() {
- return this.dictionaryRequest && !this.form.controls.dictionary.value;
+ return !this.form.controls.dictionary.value;
}
async ngOnInit(): Promise {
@@ -160,9 +160,10 @@ export class RedactRecommendationDialogComponent
}
#resetValues() {
+ const sameType = this.data.annotations.every(annotation => annotation.type === this.firstEntry.type);
this.#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
if (this.dictionaryRequest) {
- this.form.controls.dictionary.setValue(this.firstEntry.type);
+ this.form.controls.dictionary.setValue(sameType ? this.firstEntry.type : null);
return;
}
this.form.controls.dictionary.setValue(this.#manualRedactionTypeExists ? SuperTypes.ManualRedaction : null);
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss
index df1cd1e09..0b6f2896a 100644
--- a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss
+++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss
@@ -32,7 +32,8 @@ textarea {
.table {
display: flex;
flex-direction: column;
- min-width: 100%;
+ min-width: calc(100% - 26px);
+ padding: 0 13px;
label {
opacity: 0.7;
diff --git a/apps/red-ui/src/app/modules/file-preview/services/manual-redaction.service.ts b/apps/red-ui/src/app/modules/file-preview/services/manual-redaction.service.ts
index a86a57ef7..dd90f6be4 100644
--- a/apps/red-ui/src/app/modules/file-preview/services/manual-redaction.service.ts
+++ b/apps/red-ui/src/app/modules/file-preview/services/manual-redaction.service.ts
@@ -56,7 +56,7 @@ export class ManualRedactionService extends GenericService {
value: annotation.value,
reason: annotation.legalBasis ?? 'Dictionary Request',
positions: annotation.positions,
- type: redaction.type,
+ type: redaction.type ?? annotation.type,
comment: redaction.comment,
}));
return this.addAnnotation(recommendations, dossierId, fileId);