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

Refactor/childcare cat header value #729

Merged
merged 5 commits into from
Nov 14, 2023

Conversation

ivonne-hernandez
Copy link
Collaborator

@ivonne-hernandez ivonne-hernandez commented Nov 9, 2023

What (if anything) did you refactor?

  • I refactored the renderAllCategoryValues and useEffect functions in Results.tsx by capping the preschool and child care total.

Were there any issues that arose?

  • No issues arose but what do we think about breaking out the Youth and Education Programs like the Pell Grant, My Spark and My Denver Card into their own category? This would help make capping much more straight forward instead of having this const isPreschoolOrChildCareProgram = ['upk', 'dpp', 'chs', 'cccap'].includes(program.short_name) hard coded condition that will need to be updated every time we add a new childcare or preschool program.

New Child Care, Youth, and Education category header on desktop:
Screenshot 2023-11-09 at 10 47 50 AM

New Child Care, Youth, and Education category header on mobile:
Screenshot 2023-11-09 at 11 00 53 AM

@ivonne-hernandez ivonne-hernandez added the impact-low Minimal possible impact on data, security or user experience. Req 1 review. label Nov 9, 2023
}
}
}

if (preschoolPrograms.totalEstVal > 8640 && preschoolPrograms.numOfPreSchoolPrograms > 1) {
categoryValues[preschoolProgramCategoryString] = 8640;
if (childCareTotalEstVal > 8640) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you mean to remove the logic for if there is one preschool program to not cap the value?

@CalebPena CalebPena merged commit e7e9d74 into main Nov 14, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact-low Minimal possible impact on data, security or user experience. Req 1 review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants