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:
@@ -36,7 +36,12 @@ export default function CalendarBottomBar({ courseCells, setCourse }: CalendarBo
|
|||||||
>
|
>
|
||||||
{displayCourses && (
|
{displayCourses && (
|
||||||
<>
|
<>
|
||||||
<Text variant='h4'>Async/Other:</Text>
|
<Text variant='p' className='text-ut-black'>
|
||||||
|
ASYNC./OTHER
|
||||||
|
</Text>
|
||||||
|
<Text variant='h4' className='text-gray-300'>
|
||||||
|
—
|
||||||
|
</Text>
|
||||||
<div className='inline-flex gap-2.5'>
|
<div className='inline-flex gap-2.5'>
|
||||||
{asyncCourseCells.map(block => {
|
{asyncCourseCells.map(block => {
|
||||||
const { courseDeptAndInstr, status, colors, className } = block.componentProps;
|
const { courseDeptAndInstr, status, colors, className } = block.componentProps;
|
||||||
|
|||||||
@@ -74,11 +74,7 @@ export default function CalendarCourseCell({
|
|||||||
}}
|
}}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<div
|
<div className={clsx('flex flex-1 flex-col gap-0.25 overflow-hidden max-h-full')}>
|
||||||
className={clsx('flex flex-1 flex-col gap-0.25 overflow-hidden max-h-full', {
|
|
||||||
'self-center': !timeAndLocation,
|
|
||||||
})}
|
|
||||||
>
|
|
||||||
<Text
|
<Text
|
||||||
variant='h1-course'
|
variant='h1-course'
|
||||||
as='p'
|
as='p'
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Course, StatusType } from '@shared/types/Course';
|
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 { UserSchedule } from '@shared/types/UserSchedule';
|
||||||
import type { CalendarCourseCellProps } from '@views/components/calendar/CalendarCourseCell';
|
import type { CalendarCourseCellProps } from '@views/components/calendar/CalendarCourseCell';
|
||||||
|
|
||||||
@@ -68,7 +68,13 @@ export function useFlattenedCourseSchedule(): FlattenedCourseSchedule {
|
|||||||
return processAsyncCourses({ courseDeptAndInstr, status, course });
|
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);
|
.sort(sortCourses);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user