From c391cd5521858e9623d695ae9630295df416bf86 Mon Sep 17 00:00:00 2001 From: George Kalampokis Date: Mon, 2 Nov 2020 17:38:19 +0200 Subject: [PATCH] Fix issue when saving Datasets --- .../ui/dataset/dataset-wizard/dataset-wizard.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts index 5855875f3..b0c9d7d36 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts @@ -624,15 +624,15 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr }); } - onCallbackSuccess(id?: String, saveType?: SaveType): void { + onCallbackSuccess(data?: DatasetWizardEditorModel, saveType?: SaveType): void { this.uiNotificationService.snackBarNotification(this.isNew ? this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-CREATION') : this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-UPDATE'), SnackBarNotificationLevel.Success); - if (id) { + if (data) { if (saveType === this.saveAnd.addNew) { this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'new', this.formGroup.get('dmp').value.id]); }) } else if (saveType === this.saveAnd.close) { this.router.navigate(['/reload']).then(() => { this.router.navigate(['/plans', 'edit', this.formGroup.get('dmp').value.id]); }); } else { - this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', id]); }); + this.router.navigate(['/reload']).then(() => { this.router.navigate(['/datasets', 'edit', data.id]); }); } } else { this.router.navigate(['/datasets']);