Skip to content
Snippets Groups Projects
Commit aa2e57d0 authored by Scott Berg's avatar Scott Berg
Browse files

Update course map to work with the API updates.

parent b567cc50
No related branches found
No related tags found
No related merge requests found
Pipeline #28797 failed
......@@ -59,7 +59,7 @@ export class DegreePlannerComponent {
}
// Overwrite the default term with the current term
this.termsByAcademicYear[year].terms[termCode] = {...term, courses: []};
this.termsByAcademicYear[year].terms[termCode] = { ...term, courses: [] };
});
......@@ -70,13 +70,12 @@ export class DegreePlannerComponent {
}
updateCourses() {
for (const term of this.degreePlanCourses) {
// console.log(term);
const yearCode = term.termCode.substring(0, 3);
const termCode = term.termCode.substring(3);
for (const course of this.degreePlanCourses) {
const yearCode = course.termCode.substring(0, 3);
const termCode = course.termCode.substring(3);
if (this.termsByAcademicYear[yearCode] && this.termsByAcademicYear[yearCode].terms[termCode]) {
this.termsByAcademicYear[yearCode].terms[termCode].courses = term.courses;
this.termsByAcademicYear[yearCode].terms[termCode].courses.push(course);
}
}
}
......
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