Skip to content

Commit e6a32fd

Browse files
authored
fix(planner): course selection in Exemptions, Plan to Take sections (#3683)
* AddModule: Rename Add course Button to Add Category * PlannerModuleSelect: Fix filter for EXEMPTIONS & PLANNED semesters
1 parent 2f723c6 commit e6a32fd

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

website/src/views/planner/AddModule.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export default class AddModule extends React.PureComponent<Props, State> {
119119

120120
<div className={styles.actions}>
121121
<button className={classnames('btn btn-primary')} type="submit">
122-
Add course
122+
Add Category
123123
</button>
124124
<button
125125
className={classnames(styles.cancel, 'btn btn-svg')}

website/src/views/planner/PlannerModuleSelect.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { State } from 'types/state';
88
import { ModuleCode, ModuleCondensed, Semester } from 'types/modules';
99
import { createSearchPredicate } from 'utils/moduleSearch';
1010
import { takeUntil } from 'utils/array';
11+
import { EXEMPTION_SEMESTER, PLAN_TO_TAKE_SEMESTER } from 'utils/planner';
1112

1213
import styles from './PlannerModuleSelect.scss';
1314

@@ -76,7 +77,7 @@ export function PlannerModuleSelectComponent({
7677
selectedModules = selectedModules.filter(filter);
7778
}
7879

79-
if (semester != null) {
80+
if (semester != null && semester !== PLAN_TO_TAKE_SEMESTER && semester !== EXEMPTION_SEMESTER) {
8081
selectedModules = selectedModules.filter((module) => module.semesters.includes(semester));
8182
}
8283

0 commit comments

Comments
 (0)