From 7286b0016a4a4b31b7345bcfd28d18568c184bb1 Mon Sep 17 00:00:00 2001
From: Scott Berg <saberg3@wisc.edu>
Date: Mon, 8 Jul 2019 09:59:31 -0500
Subject: [PATCH] Update new audit dialog to submit user data rather than being
 hard coded.

---
 src/app/dars/dars-view/dars-view.component.ts | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/app/dars/dars-view/dars-view.component.ts b/src/app/dars/dars-view/dars-view.component.ts
index d6f023e..123e713 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() {
-- 
GitLab