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

Fix funding response type on /can-funding-summary #3329

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

maiyerlee
Copy link
Contributor

@maiyerlee maiyerlee commented Jan 21, 2025

What changed

Funding types in the /can-funding-summary response will be numbers instead of strings.

No impact on the frontend, as the data is already handled as numbers:

  • CANFundingCard.jsx : uses Number() to convert values.
  • CanList.jsx : passes funding data (total_funding, new_funding, carry_forward_funding, planned_funding, obligated_funding, and in_execution_funding) to CANSummaryCards.
    • planned_funding, obligated_funding, and in_execution_funding are converted using Number().
    • carry_forward_funding, new_funding, and total_funding are used in the calculatePercent method where Math.round in utils.js (line 20) rounds the values to the nearest integer.

Issue

fix type on can funding summary response #3234

How to test

All test passes.

Screenshots

N/A

Definition of Done Checklist

  • OESA: Code refactored for clarity
  • OESA: Dependency rules followed
  • Automated unit tests updated and passed
  • Automated integration tests updated and passed
  • Automated quality tests updated and passed
  • Automated load tests updated and passed
  • Automated a11y tests updated and passed
  • Automated security tests updated and passed
  • 90%+ Code coverage achieved
  • Form validations updated

Links

None

@maiyerlee maiyerlee linked an issue Jan 21, 2025 that may be closed by this pull request
@maiyerlee maiyerlee self-assigned this Jan 21, 2025
@maiyerlee maiyerlee marked this pull request as ready for review January 22, 2025 05:25
Copy link
Contributor

@fpigeonjr fpigeonjr left a comment

Choose a reason for hiding this comment

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

🏆Looks good. Would it be possible to update our TypeScript CANTypes.d.ts to match the new schema?

Copy link
Contributor

@Santi-3rd Santi-3rd left a comment

Choose a reason for hiding this comment

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

All tests passed 👍

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.

fix type on can funding summary response
4 participants