From 6775a9e95cfbfcf58ae0577a4478a42d08010451 Mon Sep 17 00:00:00 2001 From: Kevin Wu Date: Sat, 21 Dec 2024 20:19:28 -0800 Subject: [PATCH 1/2] fix: leftpad section codes --- apps/antalmanac/src/stores/Schedules.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/antalmanac/src/stores/Schedules.ts b/apps/antalmanac/src/stores/Schedules.ts index 9d14a983e..b2cc70a0c 100644 --- a/apps/antalmanac/src/stores/Schedules.ts +++ b/apps/antalmanac/src/stores/Schedules.ts @@ -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; @@ -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, From 0ffeb750e73a563c548176cd161a95cbd89c0dd1 Mon Sep 17 00:00:00 2001 From: Kevin Wu Date: Sat, 21 Dec 2024 20:26:46 -0800 Subject: [PATCH 2/2] fix: console.log --- apps/antalmanac/src/stores/Schedules.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/apps/antalmanac/src/stores/Schedules.ts b/apps/antalmanac/src/stores/Schedules.ts index b2cc70a0c..8aedc7657 100644 --- a/apps/antalmanac/src/stores/Schedules.ts +++ b/apps/antalmanac/src/stores/Schedules.ts @@ -556,13 +556,6 @@ 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,