Skip to content

adding Target CPA and SGPA calculator#70

Open
tashifkhan wants to merge 7 commits intocodeblech:mainfrom
tashifkhan:feat/gpa-cal
Open

adding Target CPA and SGPA calculator#70
tashifkhan wants to merge 7 commits intocodeblech:mainfrom
tashifkhan:feat/gpa-cal

Conversation

@tashifkhan
Copy link
Contributor

This pull request introduces a CGPA target calculator feature to the grades view and adds new utility functions for consistent decimal formatting. The main changes include integrating the CGPATargetCalculator component, updating imports, and providing helper functions for decimal precision in the utils.js file.

Feature Addition

  • Added the CGPATargetCalculator component to the grades view, allowing users to calculate target CGPA directly from the UI. The component receives w, semesterData, and a guest flag (based on MockWebPortal) as props. (jportal/src/components/Grades.jsx) [1] [2] [3]

UI and Import Updates

  • Updated imports in Grades.jsx to include CalculatorIcon and CGPATargetCalculator for the new calculator feature. (jportal/src/components/Grades.jsx)

Utility Functions

  • Added new utility functions in utils.js for consistent decimal formatting: getDecimalPlaces, formatDecimal, getAttendanceDecimal, getGpaDecimal, and getTargetGpaDecimal, all defaulting to 2 decimal places. (jportal/src/lib/utils.js)

Issues

@tashifkhan
Copy link
Contributor Author

image image image

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.

1 participant