From c3697964be037f4a70cb3102808c800af17fe6b6 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Mon, 22 Apr 2024 12:19:58 +0300 Subject: [PATCH] RED-8904: adjusted the table columns width for specific cases. --- .../selected-annotations-table.component.html | 4 ++-- .../selected-annotations-table.component.scss | 13 ++++++++++++- .../selected-annotations-table.component.ts | 1 + .../force-annotation-dialog.component.html | 6 +++++- .../remove-redaction-dialog.component.html | 1 + .../remove-redaction-dialog.component.ts | 4 ++++ 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.html b/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.html index 567b04b25..f8bbf10d5 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.html @@ -1,14 +1,14 @@ - - diff --git a/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.scss b/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.scss index c4a571d6e..6812c9358 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.scss +++ b/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.scss @@ -27,8 +27,10 @@ table { th, td { + &:not(.w-50) { + width: 25%; + } max-width: 0; - width: 25%; text-align: start; white-space: nowrap; @@ -58,6 +60,15 @@ tbody tr:nth-child(odd) { visibility: hidden; } +.w-50 { + max-width: 0; + min-width: 50%; + + &.hide { + display: none; + } +} + .bold { font-weight: bold; } diff --git a/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.ts b/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.ts index db71779c7..3601d4b77 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/selected-annotations-table/selected-annotations-table.component.ts @@ -20,6 +20,7 @@ const MAX_ITEMS_DISPLAY = 10; export class SelectedAnnotationsTableComponent { @Input({ required: true }) columns: ValueColumn[]; @Input({ required: true }) data: ValueColumn[][]; + @Input() staticColumns = false; get redactedTextsAreaHeight() { return this.data.length <= MAX_ITEMS_DISPLAY ? TABLE_ROW_SIZE * this.data.length : TABLE_ROW_SIZE * MAX_ITEMS_DISPLAY; diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html index 8234cbb1c..1b45af6e6 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html @@ -4,7 +4,11 @@
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html index 63287b276..1acb8a0e6 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html @@ -10,6 +10,7 @@
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts index ed69238b7..42094db60 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts @@ -73,6 +73,10 @@ export class RemoveRedactionDialogComponent extends IqserDialogComponent< return DialogHelpModeKeys.REDACTION_REMOVE; } + get hasFalsePositiveOption() { + return !!this.options.find(option => option.value === RemoveRedactionOptions.FALSE_POSITIVE); + } + get defaultOption() { const removeHereOption = this.options.find(option => option.value === RemoveRedactionOptions.ONLY_HERE); if (!!removeHereOption && !removeHereOption.disabled) return removeHereOption;
+
+ {{ cell.label }}