From 8257c44f2d26b21cafcccb64fa965f4bb3d68713 Mon Sep 17 00:00:00 2001 From: Damian <37555910+DCRepublic@users.noreply.github.com> Date: Sun, 17 Nov 2024 16:21:55 -0500 Subject: [PATCH] fix cal formatting --- app/calendar/page.tsx | 15 ++++++++++++--- components/Calendar.tsx | 17 +++++++++-------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/app/calendar/page.tsx b/app/calendar/page.tsx index 46bc057..03fc762 100644 --- a/app/calendar/page.tsx +++ b/app/calendar/page.tsx @@ -21,6 +21,11 @@ export default async function CalendarPage() { courses: { include: { instructor: true, + facultyMeet: { + include: { + meetingTimes: true, + }, + }, }, }, }, @@ -48,6 +53,10 @@ export default async function CalendarPage() { subject: courses[i]?.subject, courseNumber: courses[i]?.courseNumber, instructor: courses[i]?.instructor.displayName, + room: + courses[i]?.facultyMeet.meetingTimes.building + + " " + + courses[i]?.facultyMeet.meetingTimes.room, color: "rgba(0,0,0,0)", borderWidth: "0px", @@ -110,11 +119,11 @@ export default async function CalendarPage() { //let times = await getUniqueStartEndTimes(); return ( -
-
+
+
-
+
diff --git a/components/Calendar.tsx b/components/Calendar.tsx index 83b44df..2274217 100644 --- a/components/Calendar.tsx +++ b/components/Calendar.tsx @@ -15,7 +15,7 @@ export default function Calendar(props: any) { return ( {/* @@ -31,14 +31,15 @@ export default function Calendar(props: any) { /> */} - {eventInfo.timeText} -
- {eventInfo.event.extendedProps.subject} {""} - {eventInfo.event.extendedProps.courseNumber} -
-
- {eventInfo.event.title} + + {eventInfo.timeText} {"|"} {eventInfo.event.extendedProps.room} + +
+ {eventInfo.event.extendedProps.subject} + {eventInfo.event.extendedProps.courseNumber} : +

{eventInfo.event.title}

+
{eventInfo.event.extendedProps.instructor.replace("'", "'")}