From 8d9913c229aa33034d38999fa1e410d23ef4a41f Mon Sep 17 00:00:00 2001 From: George Kalampokis Date: Tue, 16 Jun 2020 18:46:38 +0300 Subject: [PATCH] If data repositories have no source then use it's tag --- .../dataset-external-references-editor.component.ts | 2 +- .../components/form-field/form-field.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/external-references/dataset-external-references-editor.component.ts b/dmp-frontend/src/app/ui/dataset/dataset-wizard/external-references/dataset-external-references-editor.component.ts index 517fe5af0..d4319f40b 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/external-references/dataset-external-references-editor.component.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/external-references/dataset-external-references-editor.component.ts @@ -63,7 +63,7 @@ export class DatasetExternalReferencesEditorComponent extends BaseComponent impl initialItems: (type) => this.searchDatasetExternalDataRepositories('', type), displayFn: (item) => item ? item.name : null, titleFn: (item) => item ? item.name : null, - subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE') + subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE') }; servicesAutoCompleteConfiguration: SingleAutoCompleteConfiguration = { diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-field/form-field.component.ts b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-field/form-field.component.ts index 076dc1156..20fbfec3f 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-field/form-field.component.ts +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-field/form-field.component.ts @@ -130,7 +130,7 @@ export class FormFieldComponent extends BaseComponent implements OnInit { initialItems: () => this.searchDatasetExternalDataRepositories(''), displayFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, titleFn: (item) => typeof (item) == 'string' ? JSON.parse(item)['name'] : item.name, - subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'), + subtitleFn: (item) => item.source ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.source : item.tag ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item.tag : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE'), valueAssign: (item) => typeof (item) == 'string' ? item : JSON.stringify(item) }; break;