Skip to content

Commit

Permalink
filter by 4 credits
Browse files Browse the repository at this point in the history
only include coreqs for classes that have 4 or more credits
  • Loading branch information
Ameeka-Patel committed Feb 11, 2025
1 parent c62567f commit 52c5688
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ export const AddCourseModal: React.FC<AddCourseModalProps> = ({
for (const course of courses) {
const coreqs = (
await getRequiredCourseCoreqs(course, catalogYear)
).filter((coreq) => !isCourseAlreadyAdded(coreq));
).filter(
(coreq) => !isCourseAlreadyAdded(coreq) && course.numCreditsMax >= 4
);

if (coreqs.length === 1) {
newCourseCoreqsMap.set(getCourseDisplayString(course), coreqs);
Expand Down Expand Up @@ -283,7 +285,7 @@ export const AddCourseModal: React.FC<AddCourseModalProps> = ({
/>
{courseCoreqsMap.has(
getCourseDisplayString(course)
) && <Text>hi</Text>}
) && <Text color="red">hi</Text>}
</>
)
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export const SearchResult: React.FC<SearchResultProps> = ({
</GraduateToolTip>
</Flex>
{/* {course.coreqs && (
{/* (
<Collapse in={opened} animateOpacity>
<Box px="sm" py="xs" borderRadius="lg" backgroundColor="transparent">
<Text fontSize="sm">boo</Text>
Expand Down

0 comments on commit 52c5688

Please sign in to comment.