Skip to content

Commit

Permalink
104686: Live Import preview only shows first metadata value per field
Browse files Browse the repository at this point in the history
  • Loading branch information
MarieVerdonck committed Apr 18, 2024
1 parent 404ccd9 commit 00d7b83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ <h2>{{'submission.import-external.preview.title.' + labelPrefix | translate}}</h
</div>
</div>
<div *ngFor="let metadata of metadataList" class="row">
<div class="col-md-12">
<strong>{{'item.preview.' + metadata.key | translate}}</strong>
<p>{{metadata.value.value}}</p>
</div>
<p class="col-md-12">
<strong class="">{{'item.preview.' + metadata.key | translate}}</strong><br>
<ng-container *ngFor="let metadatum of metadata.values">
<span>{{metadatum.value}}</span><br>
</ng-container>
</p>
</div>
<div class="row">
<div class="col-md-12">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class SubmissionImportExternalPreviewComponent implements OnInit {
/**
* The entry metadata list
*/
public metadataList: { key: string, value: MetadataValue }[];
public metadataList: { key: string, values: MetadataValue[] }[];
/**
* The label prefix to use to generate the translation label
*/
Expand Down Expand Up @@ -62,7 +62,7 @@ export class SubmissionImportExternalPreviewComponent implements OnInit {
metadataKeys.forEach((key) => {
this.metadataList.push({
key: key,
value: Metadata.first(this.externalSourceEntry.metadata, key)
values: Metadata.all(this.externalSourceEntry.metadata, key)
});
});
}
Expand Down

0 comments on commit 00d7b83

Please sign in to comment.