Skip to content

Commit

Permalink
feat(timetable): display asterisk on module list as well
Browse files Browse the repository at this point in the history
  • Loading branch information
zwliew committed Aug 10, 2023
1 parent 0d1b65c commit f29b21a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion website/src/views/timetable/TimetableModulesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export type Props = {
modules: ModuleWithColor[];
tombstone: TombstoneModule | null; // Placeholder for a deleted module
customiseModule: ModuleCode;
customisedModules: ModuleCode[];

// Actions
selectModuleColor: (semester: Semester, moduleCode: ModuleCode, colorIndex: ColorIndex) => void;
Expand Down Expand Up @@ -135,7 +136,7 @@ export const TimetableModulesTableComponent: React.FC<Props> = (props) => {
};

const renderModule = (module: ModuleWithColor) => {
const { semester, readOnly, tombstone, resetTombstone } = props;
const { semester, readOnly, tombstone, resetTombstone, customisedModules } = props;

if (tombstone && tombstone.moduleCode === module.moduleCode) {
return <ModuleTombstone module={module} resetTombstone={resetTombstone} />;
Expand Down Expand Up @@ -167,6 +168,7 @@ export const TimetableModulesTableComponent: React.FC<Props> = (props) => {
{!readOnly && renderModuleActions(module)}
<Link to={modulePage(module.moduleCode, module.title)}>
{module.moduleCode} {module.title}
{customisedModules.includes(module.moduleCode) && '*'}
</Link>
<div className={styles.moduleExam}>{intersperse(secondRowText, BULLET_NBSP)}</div>
</div>
Expand Down

0 comments on commit f29b21a

Please sign in to comment.