MPDX-9130 Combine MHA Pages #1547
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Combine new, edit, and view pages into a single page that routes to
/housingAllowance/[requestId]. This page displays different UI based on the mode query parameter.Implementation: I have used query params (?mode=new, ?mode=edit, ?mode=view) to determine which UI to display. I was thinking about using
status(MhaStatusEnum), but there wouldn't be a solid way to determine which display is needed. When a user clicks the navigation buttons, they will be directed to the appropriate mode.NOTE: In order to test this properly, you need to change
MinisterHousingAllowance.tsxline 96 to this:It has been kept as
requests[0]since changing it will affect the tests.Testing
/reports/housingAllowanceChecklist:
/pr-reviewcommand locally and fixed any relevant suggestions