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 4, 2023
1 parent 20164e9 commit 0faf6e1
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 0faf6e1

Please sign in to comment.