diff --git a/package.json b/package.json
index d4c4fc9..9165ccd 100644
--- a/package.json
+++ b/package.json
@@ -23,9 +23,11 @@
"@trpc/server": "^10.43.6",
"@types/bcrypt": "^5.0.2",
"@types/jsonwebtoken": "^9.0.5",
+ "@types/papaparse": "^5.3.14",
"bcrypt": "^5.1.1",
"jsonwebtoken": "^9.0.2",
"next": "^14.0.3",
+ "papaparse": "^5.4.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hook-form": "^7.49.2",
diff --git a/src/components/DashboardHeader.tsx b/src/components/DashboardHeader.tsx
index d335fb6..316b1c0 100644
--- a/src/components/DashboardHeader.tsx
+++ b/src/components/DashboardHeader.tsx
@@ -15,7 +15,7 @@ export default function DashboardHeader({ url }: { url: string }) {
}, [logout.isSuccess])
useEffect(() => {
- if (session.data?.rosterOnly && !url.startsWith("/dash/admin/roster"))
+ if (session.data?.rosterOnly && !(url.startsWith("/dash/admin/roster") || url.startsWith("/dash/admin/attendance") || url.startsWith("/dash/chgPassword")))
push("/dash/admin/roster");
}, [session.data])
@@ -34,7 +34,7 @@ export default function DashboardHeader({ url }: { url: string }) {
{
- !session?.data?.rosterOnly && (<>
+ !session?.data?.rosterOnly && (
-
-
-
-
- >)
+ )
}
+
+
+
{
session?.data?.isAdmin && (
<>
@@ -64,6 +63,14 @@ export default function DashboardHeader({ url }: { url: string }) {
Roster
+
+
+
{
!session?.data?.rosterOnly && (<>
diff --git a/src/components/admin/Config.tsx b/src/components/admin/Config.tsx
index 8d7f475..26fc9f3 100644
--- a/src/components/admin/Config.tsx
+++ b/src/components/admin/Config.tsx
@@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod";
+import { useState } from "react";
import { SubmitHandler, useForm } from "react-hook-form";
import { z } from "zod";
import { api } from "~/utils/api";
@@ -56,10 +57,10 @@ export default function Config() {
-
+
|
-
+
|
diff --git a/src/components/admin/Periods.tsx b/src/components/admin/Periods.tsx
index 641d25f..fc1e0a1 100644
--- a/src/components/admin/Periods.tsx
+++ b/src/components/admin/Periods.tsx
@@ -83,7 +83,7 @@ export default function Periods() {
-
+
{errors.date && {errors.date.message}}
|