Your form has been submitted. Our admin will be in touch with
you soon!
+
There was an error processing your form. Please try again.
) : null}
diff --git a/src/components/PathNav.tsx b/src/components/PathNav.tsx
index d630fe1f..1f86b49e 100644
--- a/src/components/PathNav.tsx
+++ b/src/components/PathNav.tsx
@@ -30,9 +30,7 @@ const PathNav = ({ pathInfo }: PathNavParams) => {
{index !== 0 &&
>
}
{currPath.display}
diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx
index 55c1e052..33e02cf8 100644
--- a/src/components/Sidebar.tsx
+++ b/src/components/Sidebar.tsx
@@ -14,6 +14,7 @@ import Logo from "@public/icons/logo.svg";
import Image from "next/image";
import { RoleAlias } from "@constants/RoleAlias";
import { fullName } from "@utils";
+import { usePathname } from "next/navigation";
interface Button {
name: string;
@@ -28,13 +29,19 @@ export interface ISideBar {
const SidebarItem = ({
label,
iconName,
+ active,
}: {
label: string;
iconName: IconDefinition;
+ active: boolean;
}) => {
return (
-
-
+
+
{label}
@@ -44,6 +51,8 @@ const SidebarItem = ({
const _Sidebar = ({ buttons }: ISideBar) => {
const { user } = React.useContext(UserContext);
+ const path = usePathname();
+
return (
diff --git a/src/components/TabButtons.tsx b/src/components/TabButtons.tsx
index 77befadd..223e4bf3 100644
--- a/src/components/TabButtons.tsx
+++ b/src/components/TabButtons.tsx
@@ -35,7 +35,7 @@ const TabButtons = ({ queries }: TabButtonsProps) => {
{name}
diff --git a/src/components/TileGrid/UserTile.tsx b/src/components/TileGrid/UserTile.tsx
index 84522ca3..70d90941 100644
--- a/src/components/TileGrid/UserTile.tsx
+++ b/src/components/TileGrid/UserTile.tsx
@@ -1,11 +1,10 @@
"use client";
import { Senior, User } from "@prisma/client";
-import Image from "next/legacy/image";
import Link from "next/link";
import React, { ReactNode } from "react";
import "@fontsource/merriweather";
-import { fullName, seniorFullName } from "@utils";
+import { fullName, seniorFullName, seniorInitial, userInitial } from "@utils";
interface UserTileProps {
student?: User;
@@ -30,23 +29,15 @@ export function UserTile({
}
>
- {student ? (
-
- ) : (
-
- )}
+
+
+ {senior != undefined
+ ? seniorInitial(senior)
+ : student != undefined
+ ? userInitial(student)
+ : null}
+
+
diff --git a/src/components/container/HeaderContainer.tsx b/src/components/container/HeaderContainer.tsx
index 6f5814da..786eeb3c 100644
--- a/src/components/container/HeaderContainer.tsx
+++ b/src/components/container/HeaderContainer.tsx
@@ -15,7 +15,7 @@ const HeaderContainer = (props: IHeaderContainer) => {
-
{header}
+ {header}
{showHorizontalLine && (
diff --git a/src/components/selector/Dropdown.tsx b/src/components/selector/Dropdown.tsx
index bc1466df..35675651 100644
--- a/src/components/selector/Dropdown.tsx
+++ b/src/components/selector/Dropdown.tsx
@@ -13,10 +13,11 @@ interface DropdownProps
{
setSelected: React.Dispatch>;
onSave: () => Promise;
multipleChoice?: boolean;
+ tagColor?: string;
}
const Dropdown = (props: DropdownProps) => {
- const { header, display, elements, selected, setSelected } = props;
+ const { header, display, elements, selected, setSelected, tagColor } = props;
const multipleChoice = props.multipleChoice ?? true;
const [displayDropdown, setDisplayDropdown] = React.useState(false);
const [loading, setLoading] = React.useState(false);
@@ -54,35 +55,47 @@ const Dropdown = (props: DropdownProps) => {
};
// TODO(nickbar01234) - Handle click outside
+
+ const hexColor = tagColor ?? "#22555A";
+
return (
- {header}
-
+ {header}
+
{displayDropdown && (
-
+
{elements.map((element, idx) => (
onCheck(e, element)}
+ style={{ color: hexColor }}
>
@@ -97,8 +110,9 @@ const Dropdown = (props: DropdownProps) => {
) : (
diff --git a/src/components/senior/assignment/index.tsx b/src/components/selector/assignment.tsx
similarity index 86%
rename from src/components/senior/assignment/index.tsx
rename to src/components/selector/assignment.tsx
index 2c6aa13a..0aa39148 100644
--- a/src/components/senior/assignment/index.tsx
+++ b/src/components/selector/assignment.tsx
@@ -13,6 +13,7 @@ interface AssignmentProps
{
setSelected: React.Dispatch>;
onSave: () => Promise;
multipleChoice?: boolean;
+ tagColor?: string;
}
const Assignment = (
@@ -27,6 +28,7 @@ const Assignment = (
setSelected,
onSave,
multipleChoice,
+ tagColor,
} = props;
const router = useRouter();
@@ -45,13 +47,17 @@ const Assignment = (
await onSave();
router.refresh();
}}
+ tagColor={tagColor}
/>
)}
{selected.map((elem) => (
{display(elem)}
diff --git a/src/components/selector/index.tsx b/src/components/selector/index.tsx
index 915a928d..3617f28e 100644
--- a/src/components/selector/index.tsx
+++ b/src/components/selector/index.tsx
@@ -1 +1,2 @@
export { default as Dropdown } from "./Dropdown";
+export { default as Assignment } from "./assignment";
diff --git a/src/components/senior/DisplaySenior.tsx b/src/components/senior/DisplaySenior.tsx
index cff63eaf..6837fb77 100644
--- a/src/components/senior/DisplaySenior.tsx
+++ b/src/components/senior/DisplaySenior.tsx
@@ -6,11 +6,10 @@ import { compareUser, formatFileDate, fullName, seniorFullName } from "@utils";
import { File } from "@components/file";
import AddFile from "@components/file/AddFile";
import { v4 as uuid } from "uuid";
-import Assignment from "./assignment";
+import { Assignment } from "@components/selector";
import { patchSenior } from "@api/senior/[id]/route.client";
import React from "react";
import { useApiThrottle } from "@hooks";
-import { UserContext } from "@context/UserProvider";
interface DisplayProps {
editable: boolean;
@@ -23,7 +22,6 @@ interface DisplayProps {
const DisplaySenior = (props: DisplayProps) => {
const { editable, canAddFile, senior } = props;
const addFileId = uuid();
- const userContext = React.useContext(UserContext);
const students = React.useMemo(
() => senior.chapter.students.sort(compareUser),
@@ -56,6 +54,12 @@ const DisplaySenior = (props: DisplayProps) => {
{seniorFullName(senior)}
+ {senior.location.length > 0 && (
+
+ Meeting Location:
+ {senior.location}
+
+ )}
{senior.description}
{
selected={assigned}
setSelected={setAssigned}
onSave={onSave}
+ tagColor="#A96257"
/>
(
diff --git a/src/components/user/DisplayUserSeniors.tsx b/src/components/user/DisplayUserSeniors.tsx
index 2bb2726d..2fdf2c21 100644
--- a/src/components/user/DisplayUserSeniors.tsx
+++ b/src/components/user/DisplayUserSeniors.tsx
@@ -3,7 +3,7 @@
import { editSeniorIDs } from "@api/user/[uid]/edit-seniors/route.client";
import { UserTile } from "@components/TileGrid";
import { CardGrid } from "@components/container";
-import Assignment from "@components/senior/assignment";
+import { Assignment } from "@components/selector";
import { RoleToUrlSegment } from "@constants/RoleAlias";
import { useApiThrottle } from "@hooks";
import { Prisma, Senior } from "@prisma/client";
@@ -58,6 +58,7 @@ const DisplayUserSenior = (props: DisplayProps) => {
selected={assigned}
setSelected={setAssigned}
onSave={onSave}
+ tagColor="#A96257"
/>
(
diff --git a/src/styles/globals.css b/src/styles/globals.css
index b5c61c95..3f3921a0 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -1,3 +1,9 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
+
+@layer base {
+ html {
+ @apply text-[#000022];
+ }
+}
diff --git a/src/utils/index.tsx b/src/utils/index.tsx
index 6dfe7871..97c8e523 100644
--- a/src/utils/index.tsx
+++ b/src/utils/index.tsx
@@ -48,9 +48,18 @@ export const formatFileDate = (date: Date) =>
export const fullName = (user: User) => `${user.firstName} ${user.lastName}`;
+const initials = (firstName: string, lastName: string) =>
+ `${firstName[0] ?? ""}${lastName[0] ?? ""}`;
+
+export const userInitial = (user: User) =>
+ initials(user.firstName, user.lastName);
+
export const seniorFullName = (senior: Senior) =>
`${senior.firstname} ${senior.lastname}`;
+export const seniorInitial = (senior: Senior) =>
+ initials(senior.firstname, senior.lastname);
+
export const sortedStudents = (students: User[]) => {
const positionOrder: PositionOrder = {
"Social Coordinator": 0,