From 8e0b21c4a976221b5f4bf80f1bd3e540a40fc1ca Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Fri, 11 Mar 2022 18:13:40 +0200 Subject: [PATCH] RED-3515 -> changed selected value input field with textarea --- .../manual-annotation-dialog.component.html | 17 +++++++++-------- .../manual-annotation-dialog.component.ts | 7 +++++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html index b5f51f176..e09aa6ea9 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html @@ -7,7 +7,7 @@
- {{ data.manualRedactionEntryWrapper.manualRedactionEntry.value }} + {{ form.get('selectedText').value }}
- + formControlName="selectedText" + iqserHasScrollbar + name="comment" + rows="4" + type="text" + > +
diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts index 701a8355e..d1b8ab602 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts @@ -66,7 +66,7 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme } get disabled() { - return this.form.invalid || this.isEditingSelectedText; + return this.form.invalid; } async ngOnInit() { @@ -104,6 +104,7 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme private _getForm(): FormGroup { return this._formBuilder.group({ + selectedText: this.data?.manualRedactionEntryWrapper?.manualRedactionEntry?.value, section: [null], reason: this.isDictionaryRequest ? [null] : [null, Validators.required], dictionary: this.isDictionaryRequest @@ -131,6 +132,8 @@ export class ManualAnnotationDialogComponent extends BaseDialogComponent impleme const commentValue = this.form.get('comment').value; addRedactionRequest.comment = commentValue ? { text: commentValue } : null; addRedactionRequest.section = this.form.get('section').value; - addRedactionRequest.value = addRedactionRequest.rectangle ? this.form.get('classification').value : addRedactionRequest.value; + addRedactionRequest.value = addRedactionRequest.rectangle + ? this.form.get('classification').value + : this.form.get('selectedText').value; } }