Skip to content

Conversation

@kegrimes
Copy link
Contributor

@kegrimes kegrimes commented Dec 12, 2025

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.tsx line 96 to this:

  const currentRequest = requests[1] || {};

It has been kept as requests[0] since changing it will affect the tests.

Testing

  • Go to /reports/housingAllowance
  • Click on "Edit Request"
  • Check that it displays correct UI with the appropriate mode AND user is on Step 2
  • Click back arrow icon
  • Click on "View Request"
  • Check that it displays correct UI with the appropriate mode

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels (Add the label "Preview" to automatically create a preview environment)
  • I have run the Claude Code /pr-review command locally and fixed any relevant suggestions
  • I have requested a review from another person on the project
  • I have tested my changes in preview or in staging
  • I have cleaned up my commit history

@github-actions
Copy link
Contributor

github-actions bot commented Dec 12, 2025

Bundle sizes [mpdx-react]

Compared against 4f67f48

Route Size (gzipped) Diff
/accountLists/[accountListId]/reports/housingAllowance/[requestId] 163.28 KB added
/accountLists/[accountListId]/reports/housingAllowance/[...requestId] no change removed

@kegrimes kegrimes added the Preview Environment Add this label to create an Amplify Preview label Dec 12, 2025
@github-actions
Copy link
Contributor

@kegrimes kegrimes closed this Dec 13, 2025
@kegrimes kegrimes reopened this Dec 13, 2025
@kegrimes kegrimes requested a review from dr-bizz December 13, 2025 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Preview Environment Add this label to create an Amplify Preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants