Skip to content
Snippets Groups Projects
Commit 960aeaac authored by jvanboxtel@wisc.edu's avatar jvanboxtel@wisc.edu Committed by Joe Van Boxtel
Browse files

ROENROLL-1977 what if degree plan fix

parent 69718349
No related branches found
No related tags found
No related merge requests found
......@@ -256,8 +256,14 @@ export class NewWhatIfAuditDialogComponent implements OnInit {
public degreePlannerPlanName<T>(fallback: T): string | T {
const control = this.chosenAuditSettings.get('degreePlan');
if (control && control.value !== null) {
return control.value.name;
const coursesControl = this.chosenAuditSettings.get('includeCoursesFrom');
if (coursesControl && coursesControl.value === 'planned') {
if (control && control.value !== null) {
return control.value.name;
} else {
return fallback;
}
} else {
return fallback;
}
......@@ -274,14 +280,9 @@ export class NewWhatIfAuditDialogComponent implements OnInit {
// If a degree plan name is included in the request we do not need this property
public includeCoursesFrom<T>(fallback: T): string | T {
const controlDegreePlan = this.chosenAuditSettings.get('degreePlan');
if (controlDegreePlan && controlDegreePlan.status === 'DISABLED') {
const control = this.chosenAuditSettings.get('includeCoursesFrom');
if (control !== null) {
return control.value.toString();
} else {
return fallback;
}
const control = this.chosenAuditSettings.get('includeCoursesFrom');
if (control && control.value !== 'planned') {
return control.value.toString();
} else {
return fallback;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment