From ce0df0e6889c13194a6ddd26e4b96b3fb1fc14b8 Mon Sep 17 00:00:00 2001 From: Timofey Obraztsov Date: Fri, 6 Dec 2024 17:46:12 -0800 Subject: [PATCH] fix: transfer courses now counted for prereqs in search --- .../component/SearchHitContainer/SearchHitContainer.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/site/src/component/SearchHitContainer/SearchHitContainer.tsx b/site/src/component/SearchHitContainer/SearchHitContainer.tsx index 4e705722..31c51a48 100644 --- a/site/src/component/SearchHitContainer/SearchHitContainer.tsx +++ b/site/src/component/SearchHitContainer/SearchHitContainer.tsx @@ -29,10 +29,16 @@ const SearchResults = ({ quarter.courses.map((course) => course.department + ' ' + course.courseNumber), ), ); + const transfers = roadmap?.transfers.map((transfer) => transfer.name); if (index === 'courses') { return (results as CourseGQLData[]).map((course, i) => { const requiredCourses = Array.from( - validateCourse(new Set(allExistingCourses), course.prerequisiteTree, new Set(), course.corequisites), + validateCourse( + new Set([...allExistingCourses, ...transfers]), + course.prerequisiteTree, + new Set(), + course.corequisites, + ), ); return ( 0 && { requiredCourses })} />