-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transfer credits now add up to total credits on sidebar #746
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -14,6 +14,8 @@ GraduateNU aims to empower Northeastern students to customize their plan of stud | |||
|
|||
5. Then run the new version of the application by running `yarn dev` at the root of the project. This starts up a NestJS server + a NextJS frontend + a Proxy. The proxy listens on port [3002](http://localhost:3002/), forwards /api requests to the NestJS server running on port 3001, and all other requests to the frontend running on port 3000. | |||
|
|||
5a. For Windows machines, run `yarn concurrently "yarn workspaces foreach --parallel --verbose --interlaced run dev" "yarn dev:proxy"` instead of `yarn dev` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding this!
}) => { | ||
const creditsTaken = totalCreditsInSchedule(selectedPlan.schedule); | ||
const transferCredits = transferCourses.reduce( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the regular sidebar (the one that is not "no major") already support adding transfer course credits? if not, we should abstract the logic and add to both locations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I believe lines 193 - 199 add to the creditsTaken variable for the normal sidebar.
(sum, course) => course.numCreditsMin + sum, | ||
0 | ||
); | ||
const creditsTaken = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we move this logic calculating schedule + transfer courses into one function that returns a credit value?
…urses and calculate everything transferred the calculation logic into the totalcreditsinschedule function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
Shireen and I added the function to calculate the total amount of transfer credit on both types of sidebars (major and non-major). We changed the parameters to take in transferCourses on the non-major sidebar. The function calculates the sum and adds it to the totalCreditsInSchedule to get creditsTaken.
For the future, maybe add AP courses on the "Add transfer courses" modal so the user doesn't have to look up the AP to NEU course transfer policies.
Closes # (issue number)
Type of change
Please tick the boxes that best match your changes.
yarn install
yarn dev:migration:run
Checklist: