Fixes bug: start new dmp dialog remained open

This commit is contained in:
apapachristou 2020-09-29 18:20:00 +03:00
parent c150d50c33
commit ec59f9d495
1 changed files with 11 additions and 6 deletions

View File

@ -60,8 +60,13 @@ export class StartNewDmpDialogComponent extends BaseComponent {
if (result && result.success) {
this.dmpService.uploadXml(result.fileList[0], result.dmpTitle, result.dmpProfiles)
.pipe(takeUntil(this._destroyed))
.subscribe((complete) => this.onCallbackImportComplete(),
(error) => this.onCallbackImportFail(error.error));
.subscribe(
(complete) => {
this.onCallbackImportComplete();
this.dialog.closeAll();
},
(error) => this.onCallbackImportFail(error.error)
);
}
});
}