diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html index b682425b5..de2afe834 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html @@ -43,7 +43,7 @@ -
+
annotation.isRedacted); - } - get allSkipped() { return this.data.annotations.every(annotation => annotation.isSkipped); } + get someSkipped() { + return this.data.annotations.some(annotation => annotation.isSkipped); + } + get redactBasedTypes() { return this._dictionaryService .getRedactTextDictionaries(this.#dossier.dossierTemplateId, !this.#applyToAllDossiers) @@ -166,12 +166,10 @@ export class EditRedactionDialogComponent } #getForm() { - const sameType = - this.data.annotations.every(annotation => annotation.type === this.data.annotations[0].type) && - (this.allRedacted || this.allSkipped); + const sameType = this.data.annotations.every(annotation => annotation.type === this.data.annotations[0].type); const sameSection = this.data.annotations.every(annotation => annotation.section === this.data.annotations[0].section); return new FormGroup({ - reason: new FormControl({ value: null, disabled: this.allSkipped }), + reason: new FormControl({ value: null, disabled: this.someSkipped }), comment: new FormControl(null), type: new FormControl(sameType ? this.data.annotations[0].type : null), section: new FormControl(sameSection ? this.data.annotations[0].section : null),