feat: async course adding and async/other course block adjustments (#273)

* 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
This commit is contained in:
2024-10-06 20:15:18 -05:00
committed by GitHub
parent da6d86c785
commit 668c8d0075
3 changed files with 15 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
import type { Course, StatusType } from '@shared/types/Course';
import type { CourseMeeting } from '@shared/types/CourseMeeting';
import { type CourseMeeting, DAY_MAP } from '@shared/types/CourseMeeting';
import type { UserSchedule } from '@shared/types/UserSchedule';
import type { CalendarCourseCellProps } from '@views/components/calendar/CalendarCourseCell';
@@ -68,7 +68,13 @@ export function useFlattenedCourseSchedule(): FlattenedCourseSchedule {
return processAsyncCourses({ courseDeptAndInstr, status, course });
}
return meetings.flatMap(meeting => 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);