diff --git a/packages/frontend/components/ScheduleCourse/ScheduleCourse.tsx b/packages/frontend/components/ScheduleCourse/ScheduleCourse.tsx index fd5c4656b..67a060adf 100644 --- a/packages/frontend/components/ScheduleCourse/ScheduleCourse.tsx +++ b/packages/frontend/components/ScheduleCourse/ScheduleCourse.tsx @@ -7,6 +7,7 @@ import { INEUReqError, IRequiredCourse, ScheduleCourse2, + SeasonEnum, } from "@graduate/common"; import { forwardRef, PropsWithChildren, useEffect, useState } from "react"; import { @@ -370,6 +371,17 @@ const ScheduleCourseDraggedContents: React.FC< {`${courseToString(scheduleCourse)} `} {scheduleCourse.name} +

+ {scheduleCourse != null && ( + + Find on NUSearch! + + )}

@@ -383,3 +395,33 @@ const ScheduleCourseDraggedContents: React.FC< const ScheduleCourseSpacer: React.FC = () => { return
; }; + +function getSearchLink( + catalogYear: number, + szn: SeasonEnum, + course: ScheduleCourse2 +): string { + let sznInt = -1; + switch (szn) { + case SeasonEnum.FL: + sznInt = 1; + break; + case SeasonEnum.SP: + sznInt = 3; + break; + case SeasonEnum.S1: + sznInt = 4; + break; + case SeasonEnum.SM: + sznInt = 5; + break; + case SeasonEnum.S2: + sznInt = 6; + break; + default: + sznInt = 1; + } + return `https://searchneu.com/NEU/${catalogYear}${sznInt}${0}/search/${ + course.subject + }${course.classId}`; +}