DM-327 - Adaptable size of Component Edit value fields
This commit is contained in:
parent
58949e0596
commit
4ca6e05b9f
@ -9,21 +9,24 @@
|
||||
<div class="table-header">{{ 'rss-dialog.table-header.transformation-rule' | translate }}</div>
|
||||
<div class="table-header">{{ 'rss-dialog.table-header.annotation-references' | translate }}</div>
|
||||
|
||||
<ng-container *ngFor="let entry of rssEntry.result | keyvalue : originalOrder">
|
||||
<ng-container *ngFor="let entry of rssEntry.result | keyvalue : originalOrder; let index = index">
|
||||
<div class="bold">{{ entry.key }}</div>
|
||||
<div>
|
||||
<div [id]="getValueCellId(index)">
|
||||
<iqser-editable-input
|
||||
(save)="saveEdit($event, entry.value.originalKey)"
|
||||
[canEdit]="canEdit"
|
||||
[buttonsType]="circleButtonTypes.dark"
|
||||
[cancelTooltip]="'rss-dialog.actions.cancel-edit' | translate"
|
||||
[editTooltip]="'rss-dialog.actions.edit' | translate"
|
||||
[saveTooltip]="'rss-dialog.actions.save' | translate"
|
||||
[value]="entry.value.value ?? entry.value.originalValue"
|
||||
[id]="'value-' + index"
|
||||
[parentId]="getValueCellId(index)"
|
||||
>
|
||||
<ng-container slot="editing">
|
||||
<iqser-circle-button
|
||||
(action)="undo(entry.value.originalKey)"
|
||||
*ngIf="entry.value.value"
|
||||
*ngIf="entry.value.value && canEdit"
|
||||
[showDot]="true"
|
||||
[tooltip]="'rss-dialog.actions.undo' | translate : { value: entry.value.originalValue }"
|
||||
[type]="circleButtonTypes.dark"
|
||||
|
||||
@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, Inject, OnInit, signal } from '@ang
|
||||
import { BaseDialogComponent, CircleButtonTypes } from '@iqser/common-ui';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { RssService } from '@services/files/rss.service';
|
||||
import { IFile, RssEntry } from '@red/domain';
|
||||
import { IFile, RssEntry, RssResult, WorkflowFileStatuses } from '@red/domain';
|
||||
import { firstValueFrom } from 'rxjs';
|
||||
import { FilesMapService } from '@services/files/files-map.service';
|
||||
import { UserPreferenceService } from '@users/user-preference.service';
|
||||
@ -33,10 +33,18 @@ export class RssDialogComponent extends BaseDialogComponent implements OnInit {
|
||||
super(_dialogRef);
|
||||
}
|
||||
|
||||
get canEdit() {
|
||||
return this.data.file.workflowStatus !== WorkflowFileStatuses.APPROVED;
|
||||
}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
await this.#loadData();
|
||||
}
|
||||
|
||||
getValueCellId(index: number) {
|
||||
return `value-cell-${index}`;
|
||||
}
|
||||
|
||||
originalOrder = (): number => 0;
|
||||
|
||||
exportJSON() {
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 28badd45cd6494dec9ab8c1368129cf8589aba42
|
||||
Subproject commit 3b84e73f8060f648e91b61f7df6827778d73917c
|
||||
Loading…
x
Reference in New Issue
Block a user