From 668c8d00756a5e3e3daaade46380967c74eec1ae Mon Sep 17 00:00:00 2001 From: Derek Chen Date: Sun, 6 Oct 2024 20:15:18 -0500 Subject: [PATCH] feat: async course adding and async/other course block adjustments (#273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: we do al il check to move sat and 7 am classes to async * feat: it is 5 am ohhhhh boy i could go for some mighty mo's rn * feat: a derek * feat: undo * chore: lint * chore: lint x2 * feat: horizontal line * feat: dash changed to — * feat: remove conditional centering if no timeAndLocation found * style: his majestys style changes * style: 2 * style: x3 * style: x4 * style: x5 --- src/views/components/calendar/CalendarBottomBar.tsx | 7 ++++++- src/views/components/calendar/CalendarCourseCell.tsx | 6 +----- src/views/hooks/useFlattenedCourseSchedule.ts | 10 ++++++++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/views/components/calendar/CalendarBottomBar.tsx b/src/views/components/calendar/CalendarBottomBar.tsx index 588c7de18..b116c26e8 100644 --- a/src/views/components/calendar/CalendarBottomBar.tsx +++ b/src/views/components/calendar/CalendarBottomBar.tsx @@ -36,7 +36,12 @@ export default function CalendarBottomBar({ courseCells, setCourse }: CalendarBo > {displayCourses && ( <> - Async/Other: + + ASYNC./OTHER + + + — +
{asyncCourseCells.map(block => { const { courseDeptAndInstr, status, colors, className } = block.componentProps; diff --git a/src/views/components/calendar/CalendarCourseCell.tsx b/src/views/components/calendar/CalendarCourseCell.tsx index 2137b1f67..a1aa123bd 100644 --- a/src/views/components/calendar/CalendarCourseCell.tsx +++ b/src/views/components/calendar/CalendarCourseCell.tsx @@ -74,11 +74,7 @@ export default function CalendarCourseCell({ }} onClick={onClick} > -
+
processInPersonMeetings(meeting, courseDeptAndInstr, status, course)); + return meetings.flatMap(meeting => { + if (meeting.days.includes(DAY_MAP.S) || meeting.startTime < 480) { + return processAsyncCourses({ courseDeptAndInstr, status, course }); + } + + return processInPersonMeetings(meeting, courseDeptAndInstr, status, course); + }); }) .sort(sortCourses);