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

View File

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

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