diff --git a/src/app/dars/dars-view/dars-view.component.ts b/src/app/dars/dars-view/dars-view.component.ts index d6f023e01bb3c14b1630e975de95daf716d6e915..123e7135cf2c5c8c10dedbbf2f8b1a2b9d16b0d1 100644 --- a/src/app/dars/dars-view/dars-view.component.ts +++ b/src/app/dars/dars-view/dars-view.component.ts @@ -62,14 +62,16 @@ export class DARSViewComponent implements OnInit { this.dialog .open<any, any, NewDegreeAuditFields>(NewDegreeAuditDialogComponent) .afterClosed() - .subscribe(event => - this.store.dispatch( - new StartSendingAudit({ - darsInstitutionCode: 'L&S', - darsDegreeProgramCode: 'BA 608', - }), - ), - ); + .subscribe(event => { + if (event) { + return this.store.dispatch( + new StartSendingAudit({ + darsInstitutionCode: event.darsInstitutionCode, + darsDegreeProgramCode: event.darsDegreeProgramCode, + }), + ); + } + }); } public openWhatIfAuditDialog() {