-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
4,160 additions
and
424 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* .body { | ||
display: block !important; | ||
} */ | ||
.content { | ||
display: flex; | ||
flex: 1; | ||
padding: 16px; | ||
overflow: auto; | ||
box-sizing: border-box; | ||
} | ||
|
||
.semester-layout { | ||
margin-left: 32px; | ||
margin-right: 32px; | ||
} | ||
|
||
.semester-title { | ||
color: var(--Primary-Text, #000); | ||
/* Web UI/Heading/Heading Large */ | ||
font-family: "Inter Variable"; | ||
font-size: 28px; | ||
font-style: normal; | ||
font-weight: 580; | ||
line-height: 36px; /* 128.571% */ | ||
letter-spacing: -0.28px; | ||
text-align: left; | ||
margin-left: 32px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import React from 'react'; | ||
import { useLocation } from 'react-router-dom'; | ||
import SemesterBlock from "../../../components/SemesterBlock" | ||
import { Flex, Button } from '@radix-ui/themes'; | ||
import SidePanel from "../../../components/SidePanel/SidePanel" | ||
import "./SemesterHome.css" | ||
|
||
type DegreeOption = { | ||
label: string; | ||
value: string; | ||
}; | ||
|
||
function SemesterHome() { | ||
const location = useLocation(); | ||
const state = location.state as { | ||
startYear: string; | ||
gradYear: string; | ||
summerCheck: boolean; | ||
selectedDegreeList: DegreeOption[]; | ||
}; | ||
const { startYear, gradYear, summerCheck, selectedDegreeList } = state; | ||
const selectedDegreeStrings: string[] = selectedDegreeList.map((degree) => degree.value); | ||
|
||
|
||
// Pretend this is the queried data | ||
const user = { | ||
"name": "Khankamol Chor Kongrukgreatiyos", | ||
"majors": selectedDegreeStrings, | ||
"minors": [] | ||
} | ||
|
||
const numStartYear = parseInt(startYear, 10); | ||
const numGradYear = parseInt(gradYear, 10); | ||
const yearCount = numGradYear - numStartYear + 1; | ||
const years = Array.from( | ||
{ length: yearCount }, | ||
(_, i) => numStartYear + i | ||
); | ||
|
||
return ( | ||
<> | ||
<Flex direction="row" height="100vh" className='semester-home'> | ||
{/* Side panel */} | ||
<SidePanel | ||
name={user.name} | ||
majors={user.majors} | ||
minors={user.minors} | ||
totalUnits={140} | ||
transferUnits={40} | ||
pnpTotal={15} | ||
/> | ||
|
||
{/* Page body */} | ||
<Flex direction="column" gap="32px"> | ||
<h3 className='semester-title'>Semesters</h3> | ||
<Flex direction="row" gap="12px" className='semester-layout'> | ||
<SemesterBlock selectedSemester={"Miscellaneous"} selectedYear={""}></SemesterBlock> | ||
{years.map((year) => ( | ||
<Flex key={year} className="year-element" direction="row" gap="12px"> | ||
<SemesterBlock selectedSemester={"Fall"} selectedYear={year}></SemesterBlock> | ||
<SemesterBlock selectedSemester={"Spring"} selectedYear={year}></SemesterBlock> | ||
{summerCheck && | ||
<SemesterBlock selectedSemester={"Summer"} selectedYear={year}></SemesterBlock> | ||
} | ||
</Flex> | ||
))} | ||
</Flex> | ||
</Flex> | ||
</Flex> | ||
</> | ||
); | ||
} | ||
|
||
export default SemesterHome; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
/* .body { | ||
display: block !important; | ||
} */ | ||
.semester-home-body { | ||
display: flex; | ||
flex-direction: column; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.