Skip to content

Commit

Permalink
fix: leftpad section codes
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinWu098 committed Dec 22, 2024
1 parent e454cee commit 6775a9e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/antalmanac/src/stores/Schedules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ export class Schedules {
for (const shortCourse of shortCourseSchedule.courses) {
const courseInfoMap = courseInfoDict.get(shortCourse.term);
if (courseInfoMap !== undefined) {
const courseInfo = courseInfoMap[shortCourse.sectionCode];
const courseInfo = courseInfoMap[shortCourse.sectionCode.padStart(5, '0')];
if (courseInfo === undefined) {
// Class doesn't exist/was cancelled
continue;
Expand All @@ -556,6 +556,13 @@ export class Schedules {
this.scheduleNoteMap[scheduleNoteId] = '';
}

console.log({
scheduleName: shortCourseSchedule.scheduleName,
courses: courses,
customEvents: shortCourseSchedule.customEvents,
scheduleNoteId: scheduleNoteId,
});

this.schedules.push({
scheduleName: shortCourseSchedule.scheduleName,
courses: courses,
Expand Down

0 comments on commit 6775a9e

Please sign in to comment.