RED-8342 - Component Editor not showing all values for a multi-value-component

This commit is contained in:
Valentin Mihai 2024-05-20 21:01:30 +03:00
parent 9025bc2a39
commit eed6c2e56e
3 changed files with 36 additions and 28 deletions

View File

@ -12,33 +12,36 @@
<ng-container *ngFor="let entry of componentLogEntries; let index = index"> <ng-container *ngFor="let entry of componentLogEntries; let index = index">
<div class="bold">{{ entry.name }}</div> <div class="bold">{{ entry.name }}</div>
<div [id]="getValueCellId(index)"> <div [id]="getValueCellId(index)">
<iqser-editable-input <ng-container *ngFor="let componentValue of entry.componentValues">
(save)="saveEdit($event, entry.originalKey)" <iqser-editable-input
[canEdit]="canEdit" (save)="saveEdit($event, entry.originalKey)"
[cancelTooltip]="'component-log-dialog.actions.cancel-edit' | translate" [canEdit]="canEdit && entry.componentValues.length === 1"
[editTooltip]="'component-log-dialog.actions.edit' | translate" [cancelTooltip]="'component-log-dialog.actions.cancel-edit' | translate"
[id]="'value-' + index" [editTooltip]="'component-log-dialog.actions.edit' | translate"
[parentId]="getValueCellId(index)" [id]="'value-' + index"
[saveTooltip]="'component-log-dialog.actions.save' | translate" [parentId]="getValueCellId(index)"
[value]="entry.componentValues[0].value ?? entry.componentValues[0].originalValue" [saveTooltip]="'component-log-dialog.actions.save' | translate"
[attr.helpModeKey]="'scm_edit_DIALOG'" [value]="componentValue.value ?? componentValue.originalValue"
> [attr.helpModeKey]="'scm_edit_DIALOG'"
<ng-container slot="editing"> [class.not-editable]="entry.componentValues.length !== 1"
<iqser-circle-button >
(action)="undo(entry.originalKey)" <ng-container slot="editing">
*ngIf="entry.componentValues[0].value !== entry.componentValues[0].originalValue && canEdit" <iqser-circle-button
[showDot]="true" (action)="undo(entry.originalKey)"
[tooltip]=" *ngIf="componentValue.value !== componentValue.originalValue && canEdit"
'component-log-dialog.actions.undo' [showDot]="true"
| translate: { value: entry.componentValues[0].originalValue } [tooltip]="
| replaceNbsp 'component-log-dialog.actions.undo'
" | translate: { value: componentValue.originalValue }
[attr.help-mode-key]="'scm_undo_DIALOG'" | replaceNbsp
class="ml-2" "
icon="red:undo" [attr.help-mode-key]="'scm_undo_DIALOG'"
></iqser-circle-button> class="ml-2"
</ng-container> icon="red:undo"
</iqser-editable-input> ></iqser-circle-button>
</ng-container>
</iqser-editable-input>
</ng-container>
</div> </div>
<div>{{ entry.componentValues[0].valueDescription }}</div> <div>{{ entry.componentValues[0].valueDescription }}</div>
<div> <div>

View File

@ -59,3 +59,8 @@ ul {
.ml-auto { .ml-auto {
margin-left: auto; margin-left: auto;
} }
.not-editable {
margin-top: 8px;
margin-bottom: 8px;
}

@ -1 +1 @@
Subproject commit 54312abb6cc020e6ed213daafdaa2748ab390dec Subproject commit 962458fbf9095893474b7ab509d0ebf4136f64c5