Skip to content
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

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

denniwang
Copy link
Contributor

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.

image

Closes # (issue number)

Type of change

Please tick the boxes that best match your changes.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This requires a run of yarn install
  • This has migration changes and requires a run of yarn dev:migration:run

Checklist:

  • I have run the production builds in docker for the frontend/backend and ensure things run fine. Check README of repo on how to run if not sure.
  • I have performed a self-review of my own code
  • I have commented my code where needed
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I've run the end to end tests
  • Any dependent changes have been merged and published in downstream modules

Copy link

vercel bot commented Sep 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
graduatenu-frontend-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 22, 2024 8:41pm

@@ -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`
Copy link
Contributor

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(
Copy link
Contributor

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.

Copy link
Contributor Author

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 =
Copy link
Contributor

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
Copy link
Contributor

@KobeZ123 KobeZ123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@denniwang denniwang merged commit e8ea7af into main Sep 26, 2024
7 checks passed
@denniwang denniwang deleted the transfer-credit-sum branch September 26, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants