Merge branch 'VM/DM-598' into 'master'

DM-598 - Component values cannot be changed manually

Closes DM-598

See merge request redactmanager/red-ui!203
This commit is contained in:
Nicoleta Panaghiu 2023-11-24 11:46:38 +01:00
commit c89824f83a
2 changed files with 4 additions and 1 deletions

View File

@ -13,7 +13,7 @@
<div class="bold">{{ entry.name }}</div> <div class="bold">{{ entry.name }}</div>
<div [id]="getValueCellId(index)"> <div [id]="getValueCellId(index)">
<iqser-editable-input <iqser-editable-input
(save)="saveEdit($event, entry.name)" (save)="saveEdit($event, entry.originalKey)"
[canEdit]="canEdit" [canEdit]="canEdit"
[cancelTooltip]="'component-log-dialog.actions.cancel-edit' | translate" [cancelTooltip]="'component-log-dialog.actions.cancel-edit' | translate"
[editTooltip]="'component-log-dialog.actions.edit' | translate" [editTooltip]="'component-log-dialog.actions.edit' | translate"

View File

@ -4,15 +4,18 @@ export type ComponentDetails = Record<string, Record<'componentValues', ICompone
export interface IComponentLogEntry { export interface IComponentLogEntry {
name: string; name: string;
originalKey: string;
componentValues: IComponentValue[]; componentValues: IComponentValue[];
} }
export class ComponentLogEntry implements IComponentLogEntry { export class ComponentLogEntry implements IComponentLogEntry {
readonly name: string; readonly name: string;
readonly originalKey: string;
readonly componentValues: ComponentValue[]; readonly componentValues: ComponentValue[];
constructor(entry: IComponentLogEntry) { constructor(entry: IComponentLogEntry) {
this.name = entry.name.replaceAll('_', ' '); this.name = entry.name.replaceAll('_', ' ');
this.originalKey = entry.name;
this.componentValues = entry.componentValues; this.componentValues = entry.componentValues;
} }
} }