From 8fb57500404fe659a6e8755ff5acf816349e3688 Mon Sep 17 00:00:00 2001 From: Dennis Wang <66754085+hellolol2016@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:17:07 -0400 Subject: [PATCH] implemented year params to transfer courses modal --- packages/frontend/components/Plan/TransferCourses.tsx | 11 ++++++++++- packages/frontend/pages/home.tsx | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/frontend/components/Plan/TransferCourses.tsx b/packages/frontend/components/Plan/TransferCourses.tsx index f3658937a..7337b73fd 100644 --- a/packages/frontend/components/Plan/TransferCourses.tsx +++ b/packages/frontend/components/Plan/TransferCourses.tsx @@ -1,7 +1,7 @@ import { ChevronDownIcon, ChevronUpIcon } from "@chakra-ui/icons"; import { Flex, Grid, Stack, Text, useDisclosure } from "@chakra-ui/react"; import { API } from "@graduate/api-client"; -import { ScheduleCourse2, StudentModel } from "@graduate/common"; +import { ScheduleCourse2, SeasonEnum, StudentModel } from "@graduate/common"; import { useRouter } from "next/router"; import { fetchStudentAndPrepareForDnd, useStudentWithPlans } from "../../hooks"; import { @@ -19,11 +19,13 @@ import { IsGuestContext } from "../../pages/_app"; interface TransferCoursesToggleProps { isExpanded: boolean; toggleExpanded: () => void; + year: number; } export const TransferCourses: React.FC = ({ isExpanded, toggleExpanded, + year, }) => { const { student, isLoading, mutateStudent } = useStudentWithPlans(); const router = useRouter(); @@ -86,11 +88,13 @@ export const TransferCourses: React.FC = ({ isExpanded={isExpanded} toggleExpanded={toggleExpanded} totalTransferCredits={totalTransferCredits} + year={year} /> {isExpanded && ( )} @@ -102,11 +106,13 @@ interface TransferCoursesBodyProps { updateTransferCourses: ( updateTransferCourses: ScheduleCourse2[] ) => void; + year: number; } const TransferCoursesBody: React.FC = ({ transferCourses, updateTransferCourses, + year, }) => { const { isOpen, onOpen, onClose } = useDisclosure(); @@ -145,6 +151,9 @@ const TransferCoursesBody: React.FC = ({ ))} { /> setIsTransferCoursesExpanded(!isTransferCoursesExpanded)