From 0faf6e1bff170ea8b9ef3aebd7fb9ee38415d2f8 Mon Sep 17 00:00:00 2001 From: Zhao Wei Liew Date: Fri, 4 Aug 2023 16:52:48 +0800 Subject: [PATCH] feat(timetable): display asterisk on module list as well --- website/src/views/timetable/TimetableModulesTable.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/src/views/timetable/TimetableModulesTable.tsx b/website/src/views/timetable/TimetableModulesTable.tsx index 655bc97cfe8..1dd122de066 100644 --- a/website/src/views/timetable/TimetableModulesTable.tsx +++ b/website/src/views/timetable/TimetableModulesTable.tsx @@ -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; @@ -135,7 +136,7 @@ export const TimetableModulesTableComponent: React.FC = (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 ; @@ -167,6 +168,7 @@ export const TimetableModulesTableComponent: React.FC = (props) => { {!readOnly && renderModuleActions(module)} {module.moduleCode} {module.title} + {customisedModules.includes(module.moduleCode) && '*'}
{intersperse(secondRowText, BULLET_NBSP)}