diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts index 08268f8e1..fdb1e990a 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.ts @@ -56,6 +56,7 @@ export class RedactTextDialogComponent readonly #translations = redactTextTranslations; readonly #dossier: Dossier; + readonly #isRss = this._iqserPermissionsService.has(Roles.getRss); readonly hint: boolean; constructor( @@ -97,7 +98,7 @@ export class RedactTextDialogComponent } get disabled() { - if (this.dictionaryRequest || this.hint) { + if (this.dictionaryRequest || this.hint || this.#isRss) { return !this.form.get('dictionary').value; } return !this.form.get('reason').value; @@ -192,8 +193,9 @@ export class RedactTextDialogComponent addRedactionRequest.legalBasis = legalOption.legalBasis; } - if (this._iqserPermissionsService.has(Roles.getRss)) { - const selectedType = this.dictionaries.find(d => d.type === addRedactionRequest.type); + const selectedType = this.dictionaries.find(d => d.type === addRedactionRequest.type); + + if (selectedType) { addRedactionRequest.addToDictionary = selectedType.hasDictionary; } else { addRedactionRequest.addToDictionary = this.dictionaryRequest && addRedactionRequest.type !== 'dossier_redaction'; @@ -220,7 +222,7 @@ export class RedactTextDialogComponent value: RedactTextOptions.ONLY_HERE, }, ]; - if (!this._iqserPermissionsService.has(Roles.getRss)) { + if (!this.#isRss) { options.push({ label: this.#translations[this.type].inDossier.label, description: this.#translations[this.type].inDossier.description, @@ -239,7 +241,9 @@ export class RedactTextDialogComponent #resetValues() { this.#applyToAllDossiers = this.data.applyToAllDossiers ?? true; - this.options[1].extraOption.checked = this.#applyToAllDossiers; + if (!this.#isRss) { + this.options[1].extraOption.checked = this.#applyToAllDossiers; + } if (this.dictionaryRequest || this.hint) { this.form.get('reason').setValue(null); this.form.get('dictionary').setValue(null); diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index 005f01732..2f8bf1f8b 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -255,8 +255,8 @@ }, "manual-redaction": { "add": { - "error": "Failed to save component: {error}", - "success": "Component added!" + "error": "Failed to save annotation: {error}", + "success": "Annotation added!" }, "approve": { "error": "Failed to approve suggestion: {error}", @@ -287,8 +287,8 @@ "success": "Hint removed!" }, "remove": { - "error": "Failed to remove component: {error}", - "success": "Component removed!" + "error": "Failed to remove annotation: {error}", + "success": "Annotation removed!" }, "request-change-legal-basis": { "error": "Failed to request annotation reason change: {error}", @@ -365,7 +365,7 @@ "hint": "Hint", "ignored-hint": "Ignored Hint", "manual-hint": "Manual Hint", - "manual-redaction": "Manual Component", + "manual-redaction": "Manual Annotation", "recommendation": "Recommendation", "redaction": "Annotation", "skipped": "Skipped",