From ca2a03d682c0b8a9d216d49f55ea100fee08e852 Mon Sep 17 00:00:00 2001 From: Atharva Sharma <52234477+atharvaSharma17@users.noreply.github.com> Date: Fri, 26 Jun 2026 01:50:27 +0530 Subject: [PATCH 1/6] Update Navbar.tsx --- src/components/ui/Navbar.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/ui/Navbar.tsx b/src/components/ui/Navbar.tsx index 125f91f..8ffb22a 100644 --- a/src/components/ui/Navbar.tsx +++ b/src/components/ui/Navbar.tsx @@ -64,8 +64,7 @@ export default function Navbar({ page }: NavbarProps) { )}
- Can't find faculty for your branch? Remaining Faculty lists will be updated by - tonight. + Can't find faculty for your branch? Remaining Faculty lists will be updated soon.
From 2c3ddf97bb46aae48fb9388d3a2f297900d33af7 Mon Sep 17 00:00:00 2001 From: skywalker-organa Date: Sat, 27 Jun 2026 16:21:06 +0530 Subject: [PATCH 2/6] update --- src/lib/course_codes_map.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/course_codes_map.ts b/src/lib/course_codes_map.ts index 9a10724..a982f0e 100644 --- a/src/lib/course_codes_map.ts +++ b/src/lib/course_codes_map.ts @@ -130,4 +130,8 @@ export const course_type_map: Record = { BACLE303: 'E', BAHIN102: 'E', BAMEE208: 'E', + BAECE203: 'E', + BAECE204: 'E', + + }; From 4d2cfb39612bf440d32dde3ec72d08fb2ec733b8 Mon Sep 17 00:00:00 2001 From: skywalker-organa Date: Sun, 28 Jun 2026 00:05:23 +0530 Subject: [PATCH 3/6] updates --- src/data/SELECT_F/PCC_ECS.ts | 26 ++++++++ src/data/SELECT_F/UCC_ECS.ts | 123 +++++++++++++++++++++++++++++++++++ src/data/SELECT_F/index.ts | 5 ++ src/data/SHINE/DC.ts | 4 +- src/lib/course_codes_map.ts | 4 +- 5 files changed, 158 insertions(+), 4 deletions(-) create mode 100644 src/data/SELECT_F/PCC_ECS.ts create mode 100644 src/data/SELECT_F/UCC_ECS.ts diff --git a/src/data/SELECT_F/PCC_ECS.ts b/src/data/SELECT_F/PCC_ECS.ts new file mode 100644 index 0000000..4da63a9 --- /dev/null +++ b/src/data/SELECT_F/PCC_ECS.ts @@ -0,0 +1,26 @@ +export const PCC_ECS = { + 'BACSE105 - Data Structures and Algorithms': [ + { slot: 'D1+TD1', venue: 'TT201', faculty: 'HIMADRI LALA' }, + { slot: 'L49+L50', venue: 'TT247A', faculty: 'HIMADRI LALA' }, + ], + 'BAEEE202 - Control Systems': [ + { slot: 'L37+L38', venue: 'TT045', faculty: 'MANIMOZHI M' }, + { slot: 'L55+L56', venue: 'TT045', faculty: 'GEETHA M' }, + { slot: 'L33+L34', venue: 'TT045', faculty: 'MANIMOZHI M' }, + { slot: 'L39+L40', venue: 'TT045', faculty: 'GEETHA M' }, + { slot: 'A1+TA1', venue: 'TT201', faculty: 'GEETHA M' }, + { slot: 'L5+L6', venue: 'TT045', faculty: 'DHANAMJAYULU C' }, + { slot: 'L7+L8', venue: 'TT045', faculty: 'DHANAMJAYULU C' }, + ], + 'BAEEE206 - Electrical Machines': [ + { slot: 'B1+TB1', venue: 'TT204', faculty: 'BELWIN EDWARD J' }, + { slot: 'L53+L54', venue: 'TT035', faculty: 'BELWIN EDWARD J' }, + { slot: 'L43+L44', venue: 'TT035', faculty: 'BELWIN EDWARD J' }, + { slot: 'B2+TB2', venue: 'TT204', faculty: 'ANBARASAN P' }, + { slot: 'L31+L32', venue: 'TT035', faculty: 'MAGESHVARAN R' }, + { slot: 'L23+L24', venue: 'TT035', faculty: 'ANBARASAN P' }, + { slot: 'B1+TB1', venue: 'TT201', faculty: 'MAGESHVARAN R' }, + { slot: 'L45+L46', venue: 'TT035', faculty: 'MAGESHVARAN R' }, + { slot: 'L15+L16', venue: 'TT035', faculty: 'ANBARASAN P' }, + ], +}; diff --git a/src/data/SELECT_F/UCC_ECS.ts b/src/data/SELECT_F/UCC_ECS.ts new file mode 100644 index 0000000..f454404 --- /dev/null +++ b/src/data/SELECT_F/UCC_ECS.ts @@ -0,0 +1,123 @@ +export const UCC_ECS = { + 'BACLE104 - Waste Management': [ + { slot: 'F2+TF2', venue: 'CDMM404', faculty: 'KAVITHA M.S' }, + ], + 'BACLE105 - Disaster Mitigation and Management': [ + { slot: 'G2+TG2', venue: 'CDMM104', faculty: 'SURENDAR M' }, + ], + 'BACLE106 - Urban Planning and Development': [ + { slot: 'G1+TG1', venue: 'CDMM405', faculty: 'MEENA T' }, + ], + 'BAEEE291 - Innovative Design Project': [ + { slot: 'NIL', venue: 'NIL', faculty: 'ACADEMICS' }, + ], + 'BAHUM106 - Micro Economics': [ + { slot: 'G1+TG1', venue: 'PRP425', faculty: 'NILAVATHY K' }, + { slot: 'G1+TG1', venue: 'TT621', faculty: 'SRIRAM G' }, + { slot: 'G2+TG2', venue: 'TT313', faculty: 'NILAVATHY K' }, + { slot: 'G2+TG2', venue: 'TT621', faculty: 'SAVITHA N' }, + { slot: 'G1+TG1', venue: 'SJT607', faculty: 'SAVITHA N' }, + { slot: 'C2+TC2', venue: 'SJT126', faculty: 'SALMAN HAIDER' }, + { slot: 'G1+TG1', venue: 'GDN107', faculty: 'SIVAKUMAR S' }, + { slot: 'G2+TG2', venue: 'GDN121', faculty: 'SIVAKUMAR S' }, + { slot: 'C2+TC2', venue: 'SJT617', faculty: 'SUMEETHA M' }, + { slot: 'G1+TG1', venue: 'PRP772', faculty: 'SALMAN HAIDER' }, + { slot: 'G2+TG2', venue: 'SJT324', faculty: 'SALMAN HAIDER' }, + ], + 'BAHUM107 - Macro Economics': [ + { slot: 'C1+TC1', venue: 'PRP333', faculty: 'AQUIB PARVEZ' }, + { slot: 'C2+TC2', venue: 'PRP464', faculty: 'SHAHID HAMID RAINA' }, + { slot: 'G2+TG2', venue: 'PRP238A', faculty: 'AQUIB PARVEZ' }, + { slot: 'G1+TG1', venue: 'PRP426', faculty: 'AQUIB PARVEZ' }, + { slot: 'G1+TG1', venue: 'PRP464', faculty: 'ADIL AHMAD SHAH' }, + ], + 'BAHUM109 - Principles of Sociology': [ + { slot: 'G2+TG2', venue: 'SJT602A', faculty: 'SREYA SEN' }, + { slot: 'C2+TC2', venue: 'TT621', faculty: 'KUBENDRAN A' }, + { slot: 'G1+TG1', venue: 'PRP465', faculty: 'BALAMURUGAN J' }, + { slot: 'C2+TC2', venue: 'SJT709', faculty: 'RAHUL SHUKLA' }, + { slot: 'C2+TC2', venue: 'SJT607', faculty: 'ABHIJIT DASGUPTA' }, + ], + 'BAHUM110 - Sustainability and Society': [ + { slot: 'C2+TC2', venue: 'PRP772', faculty: 'RASHMI M' }, + { slot: 'G2+TG2', venue: 'TT204', faculty: 'RAJAMEENAKSHI J' }, + { slot: 'G2+TG2', venue: 'PRP575', faculty: 'RASHMI M' }, + { slot: 'G1+TG1', venue: 'PRP575', faculty: 'RASHMI M' }, + { slot: 'G1+TG1', venue: 'PRP378', faculty: 'SREYA SEN' }, + { slot: 'G2+TG2', venue: 'SJT222', faculty: 'RAHUL SHUKLA' }, + { slot: 'C1+TC1', venue: 'PRP378', faculty: 'SREYA SEN' }, + { slot: 'G1+TG1', venue: 'PRP569', faculty: 'RAHUL SHUKLA' }, + ], + 'BAHUM111 - Introduction to Psychology': [ + { slot: 'C2+TC2', venue: 'TT204', faculty: 'TANU KUKREJA' }, + { slot: 'G1+TG1', venue: 'SJT324', faculty: 'JENEEFER JEBA RAJA SELVI N' }, + { slot: 'G2+TG2', venue: 'SJT617', faculty: 'TONY P JOSE' }, + { slot: 'G1+TG1', venue: 'PRP471', faculty: 'TONY P JOSE' }, + { slot: 'G1+TG1', venue: 'PRP568', faculty: 'MOHD OWAIS KHAN' }, + { slot: 'C2+TC2', venue: 'SJT619', faculty: 'MOHD OWAIS KHAN' }, + ], + 'BAHUM112 - Psychology in Everyday Life': [ + { slot: 'C2+TC2', venue: 'SJT521', faculty: 'TONY P JOSE' }, + { slot: 'G2+TG2', venue: 'SMV121', faculty: 'BHUVANESWARI M' }, + { slot: 'G1+TG1', venue: 'GDNG07', faculty: 'BHUVANESWARI M' }, + ], + 'BAHUM114 - Literature Through Films': [ + { slot: 'G2+TG2', venue: 'TT434', faculty: 'AJANTA SIRCAR' }, + ], + 'BAHUM118 - Indian Heritage and Culture': [ + { slot: 'G1+TG1', venue: 'PRP371', faculty: 'RIZWAN AHMAD' }, + { slot: 'G2+TG2', venue: 'SJT627', faculty: 'RIZWAN AHMAD' }, + { slot: 'C2+TC2', venue: 'PRP371', faculty: 'RIZWAN AHMAD' }, + { slot: 'C2+TC2', venue: 'SMV217', faculty: 'BANGALORE MORARJI' }, + ], + 'BAHUM119 - International Relations': [ + { slot: 'G2+TG2', venue: 'SMV219', faculty: 'BANGALORE MORARJI' }, + { slot: 'G1+TG1', venue: 'GDN122', faculty: 'BANGALORE MORARJI' }, + { slot: 'C1+TC1', venue: 'CDMM405', faculty: 'BANGALORE MORARJI' }, + { slot: 'C2+TC2', venue: 'SJT627', faculty: 'RAMNATH REGHUNADHAN' }, + { slot: 'G1+TG1', venue: 'PRP576', faculty: 'MULUGU S NEELOTPAL' }, + { slot: 'C2+TC2', venue: 'SMV218', faculty: 'MULUGU S NEELOTPAL' }, + ], + 'BASTS101 - Qualitative and Quantitative Skills Practice I': [ + { slot: 'E1+TE1', venue: 'SMV116', faculty: 'TIME (APT)' }, + { slot: 'E2+TE2', venue: 'SMV101', faculty: 'TIME (APT)' }, + { slot: 'E2+TE2', venue: 'TT201', faculty: 'TIME (APT)' }, + { slot: 'E1+TE1', venue: 'TT204', faculty: 'TIME (APT)' }, + { slot: 'E2+TE2', venue: 'PRP251', faculty: 'SIXPHRASE (APT)' }, + { slot: 'E2+TE2', venue: 'SMV116', faculty: 'TIME (APT)' }, + { slot: 'E1+TE1', venue: 'SMV101', faculty: 'TIME (APT)' }, + { slot: 'E1+TE1', venue: 'CDMM403', faculty: 'TIME (APT)' }, + { slot: 'E1+TE1', venue: 'TT201', faculty: 'TIME (APT)' }, + { slot: 'E2+TE2', venue: 'TT204', faculty: 'TIME (APT)' }, + { slot: 'E1+TE1', venue: 'MB211', faculty: 'ETHNUS (APT)' }, + { slot: 'E2+TE2', venue: 'MB211', faculty: 'ETHNUS (APT)' }, + { slot: 'E1+TE1', venue: 'MB212', faculty: 'FACE (APT)' }, + { slot: 'E2+TE2', venue: 'MB212', faculty: 'FACE (APT)' }, + { slot: 'E1+TE1', venue: 'MB213', faculty: 'SIXPHRASE (APT)' }, + { slot: 'E1+TE1', venue: 'MB214', faculty: 'ETHNUS (APT)' }, + { slot: 'E2+TE2', venue: 'CDMM403', faculty: 'TIME (APT)' }, + { slot: 'E1+TE1', venue: 'PRP251', faculty: 'SIXPHRASE (APT)' }, + { slot: 'E2+TE2', venue: 'MB214', faculty: 'ETHNUS (APT)' }, + { slot: 'E2+TE2', venue: 'SJT215', faculty: 'FACE (APT)' }, + { slot: 'E1+TE1', venue: 'PRP426', faculty: 'SIXPHRASE (APT)' }, + { slot: 'E2+TE2', venue: 'PRP426', faculty: 'SIXPHRASE (APT)' }, + { slot: 'E1+TE1', venue: 'PRP427', faculty: 'ETHNUS (APT)' }, + { slot: 'E2+TE2', venue: 'PRP427', faculty: 'ETHNUS (APT)' }, + { slot: 'E2+TE2', venue: 'PRP429', faculty: 'FACE (APT)' }, + { slot: 'E2+TE2', venue: 'MB213', faculty: 'SIXPHRASE (APT)' }, + { slot: 'E1+TE1', venue: 'SJT215', faculty: 'FACE (APT)' }, + { slot: 'E1+TE1', venue: 'SJT222', faculty: 'ETHNUS (APT)' }, + { slot: 'E2+TE2', venue: 'SJT222', faculty: 'ETHNUS (APT)' }, + { slot: 'E2+TE2', venue: 'SJT223', faculty: 'FACE (APT)' }, + { slot: 'E2+TE2', venue: 'SJT224', faculty: 'SIXPHRASE (APT)' }, + { slot: 'E1+TE1', venue: 'SJT221', faculty: 'SIXPHRASE (APT)' }, + { slot: 'E2+TE2', venue: 'SJT221', faculty: 'SIXPHRASE (APT)' }, + { slot: 'E1+TE1', venue: 'SJT223', faculty: 'FACE (APT)' }, + { slot: 'E2+TE2', venue: 'PRP424', faculty: 'ETHNUS (APT)' }, + { slot: 'E1+TE1', venue: 'PRP425', faculty: 'FACE (APT)' }, + { slot: 'E1+TE1', venue: 'SJT224', faculty: 'SIXPHRASE (APT)' }, + { slot: 'E1+TE1', venue: 'PRP429', faculty: 'FACE (APT)' }, + { slot: 'E1+TE1', venue: 'PRP424', faculty: 'ETHNUS (APT)' }, + { slot: 'E2+TE2', venue: 'PRP425', faculty: 'FACE (APT)' }, + ], +}; diff --git a/src/data/SELECT_F/index.ts b/src/data/SELECT_F/index.ts index 869dd31..65c6cd7 100644 --- a/src/data/SELECT_F/index.ts +++ b/src/data/SELECT_F/index.ts @@ -2,10 +2,15 @@ import { PCC } from './PCC'; import { UCC } from './UCC'; import { CON } from './FCON'; import { OE } from './OE'; +import { PCC_ECS } from './PCC_ECS'; +import { UCC_ECS } from './UCC_ECS'; + export const SELECT_F = { UniversityCoreCourses: UCC, ProfessionalCoreCourses: PCC, ConcentrationCourses: CON, OpenElectiveCourses: OE, + 'UCC_ECS' : UCC_ECS, + 'PCC_ECS' : PCC_ECS, }; diff --git a/src/data/SHINE/DC.ts b/src/data/SHINE/DC.ts index dd6a0bd..94e470f 100644 --- a/src/data/SHINE/DC.ts +++ b/src/data/SHINE/DC.ts @@ -3,7 +3,7 @@ export const DC = { { slot: 'A2+TA2', venue: 'PRP251', faculty: 'VIJAYALAKSHMI S' }, ], 'BHST308P - Microbiology and Pathology Lab': [ - { slot: 'L5+L6', venue: 'PRP150', faculty: 'VIJAYALAKSHMI S' }, - { slot: 'L35+L36', venue: 'PRP150', faculty: 'VIJAYALAKSHMI S' }, + { slot: 'L41+L42', venue: 'PRP150', faculty: 'VIJAYALAKSHMI S' }, + { slot: 'L59+L60', venue: 'PRP150', faculty: 'VIJAYALAKSHMI S' }, ], }; diff --git a/src/lib/course_codes_map.ts b/src/lib/course_codes_map.ts index a982f0e..c4215df 100644 --- a/src/lib/course_codes_map.ts +++ b/src/lib/course_codes_map.ts @@ -132,6 +132,6 @@ export const course_type_map: Record = { BAMEE208: 'E', BAECE203: 'E', BAECE204: 'E', - - + BAHST103: 'E', + BAHST201: 'E', }; From b03b1f54cf656a8c7c3ce2617cb901d6477a3346 Mon Sep 17 00:00:00 2001 From: Diya Bajoria Date: Wed, 7 Oct 2026 01:22:57 +0530 Subject: [PATCH 4/6] feat: show venue on slot hover --- src/components/ui/CompoundTable.tsx | 2 +- src/components/ui/TimeTable.tsx | 22 ++++++++++++++++++++-- src/lib/utils.ts | 2 ++ 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/src/components/ui/CompoundTable.tsx b/src/components/ui/CompoundTable.tsx index 1b1978f..af78d13 100644 --- a/src/components/ui/CompoundTable.tsx +++ b/src/components/ui/CompoundTable.tsx @@ -36,7 +36,7 @@ export default function CompoundTable({ data, large }: CompoundTableProps) { const groupedData = getGroupedData(data); const tfs = data.map(d => { - return { slotName: d.slot, showName: true }; + return { slotName: d.slot, showName: true, venue: d.venue }; }); return ( diff --git a/src/components/ui/TimeTable.tsx b/src/components/ui/TimeTable.tsx index cdb647a..fe5d807 100644 --- a/src/components/ui/TimeTable.tsx +++ b/src/components/ui/TimeTable.tsx @@ -8,12 +8,14 @@ import Image from 'next/image'; export type tableFacingSlot = { slotName: string; showName: boolean; + venue?: string; }; export default function TimeTable({ slotNames }: { slotNames: tableFacingSlot[] }) { - const slots: slot[] = slotNames - .map(slotNames => getSlot(slotNames.slotName, slotNames.showName)) + const slots: (slot & { venue?: string })[] = slotNames + .map(s => getSlot(s.slotName, s.showName).map(sl => ({ ...sl, venue: s.venue }))) .flat(); + const [tip, setTip] = React.useState<{ text: string; x: number; y: number } | null>(null); const ROWS = 17; const COLUMNS = 69; @@ -176,6 +178,13 @@ export default function TimeTable({ slotNames }: { slotNames: tableFacingSlot[] {slots.map((slot, i) => (
{ + if (slot.venue) setTip({ text: slot.venue, x: e.clientX, y: e.clientY }); + }} + onMouseMove={e => { + if (slot.venue) setTip({ text: slot.venue, x: e.clientX, y: e.clientY }); + }} + onMouseLeave={() => setTip(null)} className={`border-black border-[0.5px] box-border flex items-center justify-center w-full h-full overflow-hidden ${ LAB_ROWS.includes(slot.rowStart) ? 'bg-[#96FFCA]' : 'bg-[#86d7FF]' }`} @@ -191,6 +200,15 @@ export default function TimeTable({ slotNames }: { slotNames: tableFacingSlot[]
))} + + {tip && ( +
+ {tip.text} +
+ )} ); } diff --git a/src/lib/utils.ts b/src/lib/utils.ts index a5efd05..d4516a8 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -158,12 +158,14 @@ function breakClubbed(combinations: timetableDisplayData[][]): timetableDisplayD courseName: thName, slotName: thSlot, facultyName: item.facultyName, + venue: item.venue, }, { courseCode: labCode, courseName: labName, slotName: labSlots, facultyName: item.facultyName, + venue: item.venue, }, ]; } From 7cc5927da876212753f7e533e69e06af59720590 Mon Sep 17 00:00:00 2001 From: Diya Bajoria Date: Wed, 7 Oct 2026 02:08:29 +0530 Subject: [PATCH 5/6] feat: add hover tooltip with slot and faculty name on timetable --- src/components/cards/ViewTimeTable.tsx | 10 ++++- src/components/ui/CompoundTable.tsx | 18 ++++---- src/components/ui/TimeTable.tsx | 58 ++++++++++++++++++++------ 3 files changed, 64 insertions(+), 22 deletions(-) diff --git a/src/components/cards/ViewTimeTable.tsx b/src/components/cards/ViewTimeTable.tsx index fa53207..c14565a 100644 --- a/src/components/cards/ViewTimeTable.tsx +++ b/src/components/cards/ViewTimeTable.tsx @@ -313,12 +313,18 @@ export default function ViewTimeTable() { const selectedData = allTimetables[selectedIndex] || []; const visibleIndexes = getVisibleIndexes(timetableNumber, timetableCount); + console.log('selectedData', selectedData); const convertedData = selectedData.map( - (item: { courseCode?: string; slotName?: string; facultyName?: string; venue?: string }) => ({ + (item: { + courseCode?: string; + courseName?: string; + slotName?: string; + facultyName?: string; + }) => ({ code: item.courseCode || '00000000', + subject: item.courseName || '', slot: item.slotName || 'NIL', name: item.facultyName || 'Unknown', - venue: item.venue || '', }) ); diff --git a/src/components/ui/CompoundTable.tsx b/src/components/ui/CompoundTable.tsx index af78d13..e8445d5 100644 --- a/src/components/ui/CompoundTable.tsx +++ b/src/components/ui/CompoundTable.tsx @@ -7,11 +7,11 @@ type dataProps = { code: string; slot: string; name: string; - venue?: string; + subject?: string; }; type groupedDataProps = { - [name: string]: { code: string; slot: string; venue?: string }[]; + [name: string]: { code: string; slot: string }[]; }; type CompoundTableProps = { @@ -24,10 +24,10 @@ const sortData = (data: dataProps[]): dataProps[] => { }; const getGroupedData = (data: dataProps[]): groupedDataProps => { - return sortData(data).reduce((acc, { code, slot, name, venue }) => { + return sortData(data).reduce((acc, { code, slot, name }) => { const codePrefix = code.slice(0, -1); const groupKey = `${name}__${codePrefix}`; - (acc[groupKey] ||= []).push({ code, slot, venue }); + (acc[groupKey] ||= []).push({ code, slot }); return acc; }, {} as groupedDataProps); }; @@ -35,9 +35,13 @@ const getGroupedData = (data: dataProps[]): groupedDataProps => { export default function CompoundTable({ data, large }: CompoundTableProps) { const groupedData = getGroupedData(data); - const tfs = data.map(d => { - return { slotName: d.slot, showName: true, venue: d.venue }; - }); + const tfs = data.map(d => ({ + slotName: d.slot, + showName: true, + code: d.code, + subject: d.subject, + faculty: d.name, + })); return (
diff --git a/src/components/ui/TimeTable.tsx b/src/components/ui/TimeTable.tsx index fe5d807..c31bb36 100644 --- a/src/components/ui/TimeTable.tsx +++ b/src/components/ui/TimeTable.tsx @@ -8,14 +8,41 @@ import Image from 'next/image'; export type tableFacingSlot = { slotName: string; showName: boolean; - venue?: string; + code?: string; + subject?: string; + faculty?: string; }; +type HoverSlot = slot & { code?: string; subject?: string; faculty?: string }; + export default function TimeTable({ slotNames }: { slotNames: tableFacingSlot[] }) { - const slots: (slot & { venue?: string })[] = slotNames - .map(s => getSlot(s.slotName, s.showName).map(sl => ({ ...sl, venue: s.venue }))) + const slots: HoverSlot[] = slotNames + .map(s => + getSlot(s.slotName, s.showName).map(sl => ({ + ...sl, + code: s.code, + subject: s.subject, + faculty: s.faculty, + })) + ) .flat(); - const [tip, setTip] = React.useState<{ text: string; x: number; y: number } | null>(null); + const [tip, setTip] = React.useState<{ + title: string; + faculty?: string; + slotName: string; + color: string; + x: number; + y: number; + } | null>(null); + const showTip = (e: React.MouseEvent, s: HoverSlot) => + setTip({ + title: s.subject || s.code || s.slotName, + faculty: s.faculty, + slotName: s.slotName, + color: LAB_ROWS.includes(s.rowStart) ? '#96FFCA' : '#86d7FF', + x: e.clientX, + y: e.clientY, + }); const ROWS = 17; const COLUMNS = 69; @@ -178,12 +205,8 @@ export default function TimeTable({ slotNames }: { slotNames: tableFacingSlot[] {slots.map((slot, i) => (
{ - if (slot.venue) setTip({ text: slot.venue, x: e.clientX, y: e.clientY }); - }} - onMouseMove={e => { - if (slot.venue) setTip({ text: slot.venue, x: e.clientX, y: e.clientY }); - }} + onMouseEnter={e => showTip(e, slot)} + onMouseMove={e => showTip(e, slot)} onMouseLeave={() => setTip(null)} className={`border-black border-[0.5px] box-border flex items-center justify-center w-full h-full overflow-hidden ${ LAB_ROWS.includes(slot.rowStart) ? 'bg-[#96FFCA]' : 'bg-[#86d7FF]' @@ -203,10 +226,19 @@ export default function TimeTable({ slotNames }: { slotNames: tableFacingSlot[] {tip && (
- {tip.text} +
+ {tip.slotName} +
+
+
{tip.title}
+ {tip.faculty &&
{tip.faculty}
} +
)}
From 1e0e562926a066ce3a33350bbb941a76ce538d2c Mon Sep 17 00:00:00 2001 From: Diya Bajoria Date: Thu, 8 Oct 2026 02:14:37 +0530 Subject: [PATCH 6/6] fix: reset subject and slot dropdowns on parent change (#248) --- src/components/cards/FacultySelector.tsx | 3 +++ src/components/ui/ComboBox.tsx | 1 + 2 files changed, 4 insertions(+) diff --git a/src/components/cards/FacultySelector.tsx b/src/components/cards/FacultySelector.tsx index 212eef6..6c15a7f 100644 --- a/src/components/cards/FacultySelector.tsx +++ b/src/components/cards/FacultySelector.tsx @@ -648,6 +648,7 @@ export default function FacultySelector({ renderOption={prettifyDomain} /> { @@ -671,6 +673,7 @@ export default function FacultySelector({ /> ) : ( a.localeCompare(b))} diff --git a/src/components/ui/ComboBox.tsx b/src/components/ui/ComboBox.tsx index b8d49fe..5c25d77 100644 --- a/src/components/ui/ComboBox.tsx +++ b/src/components/ui/ComboBox.tsx @@ -39,6 +39,7 @@ export default function ComboBox({ label, value, options, onChange, renderOption useEffect(() => { if (value) setInputValue(renderOption ? renderOption(value) : value); + else setInputValue(''); }, [value, renderOption]); return (