Fixes bug: start new dmp dialog remained open
This commit is contained in:
parent
c150d50c33
commit
ec59f9d495
|
@ -9,13 +9,13 @@ import { takeUntil } from 'rxjs/operators';
|
|||
import { BaseComponent } from '@common/base/base.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-start-new-dmp',
|
||||
templateUrl: './start-new-dmp-dialog.component.html',
|
||||
styleUrls: ['./start-new-dmp-dialog.component.scss']
|
||||
selector: 'app-start-new-dmp',
|
||||
templateUrl: './start-new-dmp-dialog.component.html',
|
||||
styleUrls: ['./start-new-dmp-dialog.component.scss']
|
||||
})
|
||||
export class StartNewDmpDialogComponent extends BaseComponent {
|
||||
|
||||
public isDialog: boolean = false;
|
||||
public isDialog: boolean = false;
|
||||
|
||||
constructor(
|
||||
public dialogRef: MatDialogRef<StartNewDmpDialogComponent>,
|
||||
|
@ -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)
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue