From 0e8b905fabd79f646dcdf167db135550c209f4f8 Mon Sep 17 00:00:00 2001 From: gkolokythas Date: Wed, 15 Jan 2020 17:43:41 +0200 Subject: [PATCH] Fixes bug on not displaying source properly when "Internal", on "Funder", "Grant", "Project" at "New DMP" wizard view. --- .../funder-editor/funder-editor-wizard.component.ts | 2 +- .../quick-wizard/grant-editor/grant-editor-wizard.component.ts | 2 +- .../project-editor/project-editor-wizard.component.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dmp-frontend/src/app/ui/quick-wizard/funder-editor/funder-editor-wizard.component.ts b/dmp-frontend/src/app/ui/quick-wizard/funder-editor/funder-editor-wizard.component.ts index 9fb39f429..9f0de44d1 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/funder-editor/funder-editor-wizard.component.ts +++ b/dmp-frontend/src/app/ui/quick-wizard/funder-editor/funder-editor-wizard.component.ts @@ -33,7 +33,7 @@ export class FunderEditorWizardComponent implements OnInit { initialItems: (extraData) => this.searchFunder(''), displayFn: (item) => item['label'], titleFn: (item) => item['label'], - 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['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')) }; if (!this.funderFormGroup) { diff --git a/dmp-frontend/src/app/ui/quick-wizard/grant-editor/grant-editor-wizard.component.ts b/dmp-frontend/src/app/ui/quick-wizard/grant-editor/grant-editor-wizard.component.ts index 55b6f6fcc..222d35445 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/grant-editor/grant-editor-wizard.component.ts +++ b/dmp-frontend/src/app/ui/quick-wizard/grant-editor/grant-editor-wizard.component.ts @@ -68,7 +68,7 @@ export class GrantEditorWizardComponent extends BaseComponent implements OnInit, initialItems: (extraData) => this.searchGrant(''), displayFn: (item) => item['label'] + this.getGrantIdText(item), titleFn: (item) => item['label'] + this.getGrantIdText(item), - 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['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')) }; if (this.funderFormGroup && this.funderFormGroup.valid) { diff --git a/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.ts b/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.ts index bc81cbc21..3734ca29d 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.ts +++ b/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.ts @@ -30,7 +30,7 @@ export class ProjectEditorWizardComponent implements OnInit { initialItems: (extraData) => this.searchProject(''), displayFn: (item) => item['label'], titleFn: (item) => item['label'], - 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['key'] ? this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.SOURCE:') + item['key'] : this.language.instant('TYPES.EXTERNAL-DATASET-TYPE.NO-SOURCE')) }; if (!this.formGroup) {