Merge branch 'RED-8904' into 'master'
RED-8904: adjusted the table columns width for specific cases. See merge request redactmanager/red-ui!399
This commit is contained in:
commit
f23c671f69
@ -1,14 +1,14 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th *ngFor="let column of columns" [ngClass]="{ hide: !column.show }">
|
||||
<th *ngFor="let column of columns" [ngClass]="{ hide: !column.show, 'w-50': staticColumns }">
|
||||
<label>{{ column.label }}</label>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody [ngStyle]="{ height: redactedTextsAreaHeight + 'px' }">
|
||||
<tr *ngFor="let row of data">
|
||||
<td *ngFor="let cell of row" [ngClass]="{ hide: !cell.show, bold: cell.bold }">
|
||||
<td *ngFor="let cell of row" [ngClass]="{ hide: !cell.show, bold: cell.bold, 'w-50': staticColumns }">
|
||||
{{ cell.label }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -4,7 +4,11 @@
|
||||
<div *ngIf="isHintDialog" class="dialog-header heading-l" [translate]="'manual-annotation.dialog.header.force-hint'"></div>
|
||||
|
||||
<div class="dialog-content">
|
||||
<redaction-selected-annotations-table [columns]="tableColumns" [data]="tableData"></redaction-selected-annotations-table>
|
||||
<redaction-selected-annotations-table
|
||||
[columns]="tableColumns"
|
||||
[data]="tableData"
|
||||
[staticColumns]="true"
|
||||
></redaction-selected-annotations-table>
|
||||
<div *ngIf="!isHintDialog && !isDocumine" class="iqser-input-group required w-400">
|
||||
<label [translate]="'manual-annotation.dialog.content.reason'"></label>
|
||||
<mat-form-field>
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
<redaction-selected-annotations-table
|
||||
[columns]="tableColumns()"
|
||||
[data]="tableData()"
|
||||
[staticColumns]="!hasFalsePositiveOption"
|
||||
></redaction-selected-annotations-table>
|
||||
</div>
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user