From 6d215b1871c184e8417fbf32a67a593fb47eab9c Mon Sep 17 00:00:00 2001
From: Damian <37555910+DCRepublic@users.noreply.github.com>
Date: Sun, 17 Nov 2024 14:12:32 -0500
Subject: [PATCH] Calendar: Format for mobile, Fix events to show course
number, Add Footer info Auth: change to allow admin access again
---
app/admin/page.tsx | 7 ++--
app/calendar/page.tsx | 14 +++++--
app/layout.tsx | 30 ++-----------
app/page.tsx | 4 +-
components/Calendar.tsx | 9 +++-
components/CreatePlan.tsx | 10 +++--
components/FooterInfo.tsx | 88 +++++++++++++++++++++++++++++++++++++++
lib/auth.ts | 2 +-
8 files changed, 123 insertions(+), 41 deletions(-)
create mode 100644 components/FooterInfo.tsx
diff --git a/app/admin/page.tsx b/app/admin/page.tsx
index 1d0af0b..482a547 100644
--- a/app/admin/page.tsx
+++ b/app/admin/page.tsx
@@ -94,14 +94,15 @@ export default function AdminPage() {
return cellValue;
}
}, []);
-
+ console.log(status);
+ console.log(session?.user);
if (status === "authenticated") {
if (session.user?.role === "admin") {
return (
-
+
diff --git a/app/calendar/page.tsx b/app/calendar/page.tsx
index 8c04e77..46bc057 100644
--- a/app/calendar/page.tsx
+++ b/app/calendar/page.tsx
@@ -18,7 +18,11 @@ export default async function CalendarPage() {
id: parseInt(planCookie),
},
include: {
- courses: true,
+ courses: {
+ include: {
+ instructor: true,
+ },
+ },
},
});
@@ -42,6 +46,8 @@ export default async function CalendarPage() {
title: courses[i]?.courseTitle,
daColor: color,
subject: courses[i]?.subject,
+ courseNumber: courses[i]?.courseNumber,
+ instructor: courses[i]?.instructor.displayName,
color: "rgba(0,0,0,0)",
borderWidth: "0px",
@@ -104,11 +110,11 @@ export default async function CalendarPage() {
//let times = await getUniqueStartEndTimes();
return (
-
-
+
+
-
diff --git a/app/layout.tsx b/app/layout.tsx
index fd0fe63..72cafba 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -8,6 +8,7 @@ import { NextAuthProvider } from "../components/providers/NextAuthProvider";
import { siteConfig } from "../config/site";
import { fontSans } from "../config/fonts";
import { Navbar } from "../components/navbar";
+import FooterInfo from "../components/FooterInfo";
import { Providers } from "./providers";
@@ -54,35 +55,10 @@ export default function RootLayout({
>