Skip to content

Commit

Permalink
Merge pull request #9 from SajjanKarn/feat/sem2routine
Browse files Browse the repository at this point in the history
feat: update routine for sem2
  • Loading branch information
joonshakya authored Jul 18, 2024
2 parents 20df0d5 + f0d26d5 commit 31e2a93
Show file tree
Hide file tree
Showing 3 changed files with 5,179 additions and 12 deletions.
16 changes: 4 additions & 12 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ export default function Index() {
if (semParam) {
const semParamNum = parseInt(semParam);

if (
semParamNum >= 1 ||
semParamNum <= currentJoonSem.split("sem")[1]
) {
if (semParamNum >= 1 || semParamNum <= currentJoonSem.split("sem")[1]) {
localStorage.setItem("sem", semParam);
Router.replace(`/`);
return `sem${semParamNum}`;
Expand All @@ -60,9 +57,7 @@ export default function Index() {
return (
<>
<Navbar
text={`CSIT21 - Sem ${
(sem || currentJoonSem).split("sem")[1]
}`}
text={`CSIT21 - Sem ${(sem || currentJoonSem).split("sem")[1]}`}
/>
<Box
sx={{
Expand Down Expand Up @@ -93,10 +88,7 @@ export default function Index() {
mx: "auto",
}}
>
<Materials
sem={sem || currentJoonSem}
setSem={setSem}
/>
<Materials sem={sem || currentJoonSem} setSem={setSem} />
{sem === "" || sem === currentJoonSem ? (
<>
<ExamRoutine
Expand Down Expand Up @@ -125,7 +117,7 @@ export default function Index() {
</>
) : null}

{sem === "sem4" ? (
{sem === "sem2" ? (
<>
<ClassRoutine sem={sem || currentJoonSem} />
</>
Expand Down
92 changes: 92 additions & 0 deletions utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,98 @@ export const classRoutine = {
// ],
// },
// ],
sem2: [
{
day: "Sun",
a: [
[subjects.sem2.OOP, ""],
[subjects.sem2.Maths2, ""],
[subjects.sem2.DS, ""],
["*", ""],
],
b: [
[subjects.sem2.MP, ""],
[subjects.sem2.OOP, ""],
[subjects.sem2.Stats1, ""],
["*", ""],
],
},
{
day: "Mon",
a: [
[subjects.sem2.OOP, ""],
[subjects.sem2.DS, ""],
[subjects.sem2.MP, ""],
["*", ""],
],
b: [
[subjects.sem2.Maths2, ""],
[subjects.sem2.Stats1, ""],
[subjects.sem2.OOP, ""],
["*", ""],
],
},
{
day: "Tue",
a: [
[subjects.sem2.Maths2, ""],
[subjects.sem2.Stats1, ""],
[subjects.sem2.MP, ""],
["*", ""],
],
b: [
[subjects.sem2.Maths2, ""],
[subjects.sem2.OOP, ""],
[subjects.sem2.DS, ""],
["*", ""],
],
},
{
day: "Wed",
a: [
[subjects.sem2.Maths2, ""],
[subjects.sem2.MP, ""],
[subjects.sem2.Maths2, ""],
["*", ""],
],
b: [
[subjects.sem2.Maths2, ""],
[subjects.sem2.MP, ""],
[subjects.sem2.DS, ""],
["*", ""],
],
},
{
day: "Thu",
a: [
[subjects.sem2.Stats1, ""],
[subjects.sem2.DS, ""],
[subjects.sem2.OOP, ""],
["*", ""],
],
b: [
[subjects.sem2.DS, ""],
[subjects.sem2.Stats1, ""],
[subjects.sem2.MP, ""],
["*", ""],
],
},
{
day: "Fri",
a: [
[subjects.sem2.DS, ""],
[subjects.sem2.Stats1, ""],
["*", ""],
["*", ""],
],
b: [
[subjects.sem2.DS, ""],
[subjects.sem2.Maths2, ""],
["*", ""],
["*", ""],
],
},
],
sem3: [
{
day: "Mon",
Expand Down
Loading

0 comments on commit 31e2a93

Please sign in to comment.