Skip to content

Commit

Permalink
another constant
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcarvajal committed Feb 2, 2025
1 parent 388de8e commit 8ac9630
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/frontend/components/Plan/ReqErrorModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
} from "@graduate/common";
import { HelperToolTip } from "../Help";
import {
COOP_TITLE,
FALL_1,
SEARCH_NEU_FETCH_COURSE_ERROR_MSG,
SPRING_4,
Expand Down Expand Up @@ -48,7 +49,7 @@ export const ReqErrorModal: React.FC<ReqErrorModalProps> = ({
const { isOpen, onOpen, onClose } = useDisclosure();

const coopErr =
course.name === "Co-op Education" &&
course.name === COOP_TITLE &&
term !== undefined &&
(term.id === FALL_1 || term.id === SPRING_4);
let msg = "This is an error.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from "@graduate/common";
import { forwardRef, PropsWithChildren, useEffect, useState } from "react";
import {
COOP_TITLE,
DELETE_COURSE_AREA_DND_ID,
FALL_1,
SEARCH_NEU_FETCH_COURSE_ERROR_MSG,
Expand Down Expand Up @@ -212,7 +213,7 @@ const ScheduleCourse = forwardRef<HTMLElement | null, ScheduleCourseProps>(
const isCourseError =
coReqErr !== undefined ||
preReqErr !== undefined ||
(scheduleCourse.name === "Co-op Education" &&
(scheduleCourse.name === COOP_TITLE &&
scheduleTerm !== undefined &&
(scheduleTerm.id === FALL_1 || scheduleTerm.id === SPRING_4));

Expand Down
1 change: 1 addition & 0 deletions packages/frontend/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const GEN_PLACEHOLDER_MSG =
"General Placeholderse are generic courses that you can place in your plan if you do not know yet what to take but want the requirements to be fulfilled";
export const FALL_1 = "1-FL";
export const SPRING_4 = "4-SP";
export const COOP_TITLE = "Co-op Education";

export const defaultGuestStudent: GetStudentResponse = {
uuid: undefined,
Expand Down

0 comments on commit 8ac9630

Please sign in to comment.