-
Notifications
You must be signed in to change notification settings - Fork 30
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
Dmirano/4570 new prev activities mmis #4588
Conversation
Codecov Report
@@ Coverage Diff @@
## main #4588 +/- ##
==========================================
- Coverage 94.28% 91.92% -2.36%
==========================================
Files 271 268 -3
Lines 8622 8450 -172
Branches 1721 1707 -14
==========================================
- Hits 8129 7768 -361
- Misses 469 649 +180
- Partials 24 33 +9
... and 25 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
…es component together
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.
Looks good! Thanks for tackling this!
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.
Looks good! I just have a few questions mentioned in comments
{apdType === 'HITECH' && <HitechApdPreviousActivityTables isViewOnly />} | ||
{apdType === 'HITECH' && <HitechPreviousActivityTotalsTable />} | ||
|
||
{apdType === 'MMIS' && <MmisApdPreviousActivityTable isViewOnly />} | ||
{apdType === 'MMIS' && <MmisPreviousActivityTotalsTable isViewOnly />} |
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.
This totally works, so no need to change! Just wanted to offer another option for handling this kind of logic- I love a good mapping, so you could add an object like:
const activityTableMapping = {
[APD_TYPE.HITECH]: <HitechApdPreviousActivityTables isViewOnly />,
[APD_TYPE.MMIS]: <MmisApdPreviousActivityTable isViewOnly />
}
and then in the render you can reference the correct component by activityTableMapping[apdType]
.
Ultimately it's just a nice way to be able to simplify number of lines in the render and also set the code up for easy expansion of adding more options to the mapping in the future.
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.
will make this change, thanks!
expense | ||
expense, | ||
level, | ||
fundingType |
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.
It looks like we've been referring to "DDI" and "M&O" as a fundingCategory
. I wonder if we can make that consistent?
) | ||
); | ||
|
||
export const selectPreviousActivityExpensesTotalsMMIS = createSelector( |
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.
Good use of selectors here!
[selectApdData], | ||
({ previousActivities }) => | ||
Object.entries(previousActivities.actualExpenditures).reduce( | ||
(o, [year, expenses]) => ({ | ||
...o, | ||
[year]: expenses.mmis | ||
[year]: expenses |
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.
Wouldn't this still be referenced the same for hitech? As in, don't we still need the .mmis
?
Or it looks like you're getting all the expenses with this selector. So maybe taking MMIS out of the name?
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.
For MMIS, the mmis object was replaced with ddi and m&o. So I had to remove the .mmis
For HITECH, there is a mmis and hithie object, so I'm using this selector to pass in both of those and just reference them in the file
[year]: { | ||
ddi: { | ||
50: { | ||
federalActual: 0, |
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.
Is the migration script supposed to populate the value of the previous activity in here or is it just to create the structure and have it all zeroed out?
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.
I believe create the structure and zero it out. Since the previous values would have the wrong structure so their actual values would be irrelevant
…irano/4570-new-prev-activities-mmis
…irano/4570-new-prev-activities-mmis
See this pull request in action: https://ec2-18-206-78-121.compute-1.amazonaws.com |
Everything looks good!
|
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.
Reviewed and good to go!
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.
The changes look fantastic, and the values populate correctly. Excellent work!
…irano/4570-new-prev-activities-mmis
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.
@mirano-darren before I sign off on this, can you verify that this went through a screen reader? I did it through NVDA and when it reads to the form fields it gives a really long description of the field and includes the language "object, object" -- I also can't get the screen reader to pick up the "Approved XX% FFP" column either, but I know my version of NVDA doesn't seem to work with all the cheatsheet commands.
Everything else looks right + the math appears to be calculating correctly.
So I can get the Approved XX% FFP column read out. It says FFP quite a lot so I had to listen closely but it did read out the column. I also do also get the "object, object" read out loud too. I will look into it |
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.
OK - the object, object narrative is done and it seems to be reading correctly.
…irano/4570-new-prev-activities-mmis
…irano/4570-new-prev-activities-mmis
Resolves #4570
Description
Updates the Results of Previous Activities page for MMIS. This adds DDI and M&O funding types.
Significant changes or possible side effects
Created a brand new file vs adapting the current HITECH one.
Also changed the selector to not be specific to ffp level. (6 functions re-factored into 2)
Automated test cases written
Steps to manually verify this change
This pull request is ready to code review when
tests, refactor
screenreader, text scaling) OR an exemption is documented
This pull request is ready to test when
This pull request is ready to review when the QA has
This pull request can be merged when