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

This commit is contained in:
Valentin Mihai 2024-05-22 16:14:39 +03:00
parent a4ed5fd9a7
commit 2da2b36488
7 changed files with 58 additions and 36 deletions

View File

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

View File

@ -60,7 +60,16 @@ ul {
margin-left: auto; margin-left: auto;
} }
.not-editable { .component-value {
margin-top: 8px; display: flex;
margin-bottom: 8px; align-items: center;
justify-content: space-between;
div {
width: 100%;
.not-editable {
margin: 8px 0;
}
}
} }

View File

@ -496,6 +496,7 @@
"actions": { "actions": {
"cancel-edit": "Cancel", "cancel-edit": "Cancel",
"close": "Close", "close": "Close",
"disabled-edit": "",
"display-by-default": "Display by default when opening documents", "display-by-default": "Display by default when opening documents",
"edit": "Edit", "edit": "Edit",
"export-json": "Export JSON", "export-json": "Export JSON",

View File

@ -496,6 +496,7 @@
"actions": { "actions": {
"cancel-edit": "Cancel", "cancel-edit": "Cancel",
"close": "Close", "close": "Close",
"disabled-edit": "Multi-value component Read-only",
"display-by-default": "Display by default when opening documents", "display-by-default": "Display by default when opening documents",
"edit": "Edit", "edit": "Edit",
"export-json": "Export JSON", "export-json": "Export JSON",

View File

@ -496,6 +496,7 @@
"actions": { "actions": {
"cancel-edit": "Cancel", "cancel-edit": "Cancel",
"close": "Close", "close": "Close",
"disabled-edit": "",
"display-by-default": "Display by default when opening documents", "display-by-default": "Display by default when opening documents",
"edit": "Edit", "edit": "Edit",
"export-json": "Export JSON", "export-json": "Export JSON",

View File

@ -496,6 +496,7 @@
"actions": { "actions": {
"cancel-edit": "Cancel", "cancel-edit": "Cancel",
"close": "Close", "close": "Close",
"disabled-edit": "Multi-value component Read-only",
"display-by-default": "Display by default when opening documents", "display-by-default": "Display by default when opening documents",
"edit": "Edit", "edit": "Edit",
"export-json": "Export JSON", "export-json": "Export JSON",

@ -1 +1 @@
Subproject commit 0e7d234c7014531a10b6204fb0c0977846162141 Subproject commit 76c2562d7f401d0b94cd3293abfaf6e2f9168924