Skip to content

Commit

Permalink
Added generate button to navbar; Removed dbms lab collision from time…
Browse files Browse the repository at this point in the history
…table ddata
  • Loading branch information
pranav-suri committed May 6, 2024
1 parent 1eecfa7 commit 144273f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 2 additions & 4 deletions SAMPLE_DATA/timetable.csv
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ sy,cs,a1,Engineering Mathematics III,core,[email protected],401,2,4
sy,cs,a2,Engineering Mathematics III,core,[email protected],401,2,4,,
sy,cs,a3,Engineering Mathematics III,core,[email protected],401,2,4,,
sy,cs,a1,Data Base Management Systems Lab,core,[email protected],DBMS Lab,1,1,,`
sy,cs,a2,Data Base Management Systems Lab,core,[email protected],DBMS Lab,1,1,,
sy,cs,a3,Data Base Management Systems Lab,core,[email protected],DBMS Lab,2,1,,
sy,cs,a1,Engineering Mathematics III Tut,core,[email protected],Tut Room,3,1,,
sy,cs,a2,Engineering Mathematics III Tut,core,[email protected],Tut Room,2,1,,
Expand All @@ -33,7 +32,6 @@ sy,cs,a1,FlexiCredit Course OOPs with JAVA,core,[email protected]
sy,cs,a2,FlexiCredit Course OOPs with JAVA,core,[email protected],CL 02,4,1,,
sy,cs,a3,FlexiCredit Course OOPs with JAVA,core,[email protected],CL 02,4,1,,
sy,cs,a1,Data Base Management Systems Lab,core,[email protected],DBMS Lab,1,2,,
sy,cs,a2,Data Base Management Systems Lab,core,[email protected],DBMS Lab,1,2,,
sy,cs,a3,Operating Systems Lab,core,[email protected],OS Lab,1,2,,
sy,cs,a1,Basic German Div 1,elective,[email protected],401,1,7,,
sy,cs,a2,Basic German Div 1,elective,[email protected],401,1,7,,
Expand All @@ -57,9 +55,9 @@ sy,cs,a1,Engineering Mathematics III Tut,core,[email protected],Tut
sy,cs,a1,Operating Systems,core,[email protected],401,3,4,,
sy,cs,a2,Operating Systems,core,[email protected],401,3,4,,
sy,cs,a3,Operating Systems,core,[email protected],401,3,4,,
sy,cs,a1,Data Base Management Systems Lab,core,[email protected],DBMS Lab,3,6,,`
,,,,,,,,,,
sy,cs,a2,Data Base Management Systems Lab,core,[email protected],DBMS Lab,3,6,,
sy,cs,a1,Data Base Management Systems Lab,core,[email protected],DBMS Lab,3,7,,`
,,,,,,,,,,
sy,cs,a2,Data Base Management Systems Lab,core,[email protected],DBMS Lab,3,7,,
sy,cs,a1,FlexiCredit Course OOPs with JAVA,core,[email protected],CL 02,2,6,,
sy,cs,a2,FlexiCredit Course OOPs with JAVA,core,[email protected],CL 02,2,6,,
Expand Down
4 changes: 3 additions & 1 deletion src/frontend/Components/NavBar/NavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
TimetableType as TimetableTypeButton,
Teacher as TeacherButton,
Classroom as ClassroomButton,
Generate as GenerateButton
} from "../Buttons";

const NavBar = () => {
Expand All @@ -24,9 +25,10 @@ const NavBar = () => {
<BatchButton />
<DepartmentButton />
<DivisionButton />
<ViewButton />
{/* Spacer element to push the next elements to the right */}
<div style={{ flexGrow: 1 }}></div>
<ViewButton />
<GenerateButton />
</Toolbar>
</AppBar>
);
Expand Down
8 changes: 5 additions & 3 deletions src/frontend/Components/Sidebar/SubjectAutocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ export function SubjectAutocomplete({
useEffect(() => {
// This has to be changed, department can divisionId must come from props or somewhere
if (!departmentId) return;
edenFetch<SubjectResponse>(api.departments({ id: 2 }).subjects.get()).then((data) => {
setSubjects(data.subjects);
});
edenFetch<SubjectResponse>(api.departments({ id: departmentId }).subjects.get()).then(
(data) => {
setSubjects(data.subjects);
},
);
}, [departmentId]);

return (
Expand Down

0 comments on commit 144273f

Please sign in to comment.