Skip to content

MPDX-9129 - MHA Form Ineligible Display logic#1624

Open
zweatshirt wants to merge 17 commits intomainfrom
MPDX-9129-redone
Open

MPDX-9129 - MHA Form Ineligible Display logic#1624
zweatshirt wants to merge 17 commits intomainfrom
MPDX-9129-redone

Conversation

@zweatshirt
Copy link
Contributor

@zweatshirt zweatshirt commented Feb 10, 2026

Description

  • This PR dynamically renders the dashboard depending on which spouse is ineligible, also considering the case where the user is ineligible and the spouse is ineligible.
  • This PR does not consider the changes to the query and mutations since that is still a work in progress.

Jira ticket

Testing

  • Go to the MHA Form dashboard
  • Test the different view possibilities:
    • Both users eligible
    • User eligible, spouse ineligible
    • User ineligible, spouse eligible
    • Single user eligible
    • Single user ineligible

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

@zweatshirt zweatshirt self-assigned this Feb 10, 2026
@zweatshirt zweatshirt added the Preview Environment Add this label to create an Amplify Preview label Feb 10, 2026
@github-actions
Copy link
Contributor

Preview branch generated at https://MPDX-9129-redone.d3dytjb8adxkk5.amplifyapp.com

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

Bundle sizes [mpdx-react]

Compared against ffa449f

No significant changes found

@github-actions
Copy link
Contributor

Bundle sizes [mpdx-react]

Compared against cec3bdd

No significant changes found

@zweatshirt zweatshirt marked this pull request as ready for review February 10, 2026 15:05
@zweatshirt zweatshirt requested review from dr-bizz and removed request for dr-bizz February 10, 2026 15:16
@zweatshirt
Copy link
Contributor Author

zweatshirt commented Feb 10, 2026

@dr-bizz I rewrote this PR in favor of the old one since significant changes have been made. No query or mutations work is in this PR since you're still iterating on that, and I'll open a new PR to integrate that when you're done.

Copy link
Contributor

@dr-bizz dr-bizz left a comment

Choose a reason for hiding this comment

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

Thank you for adding this.

I don't think it's quite working right. Can we huddle at somepoint today, tomorrow or this week, where we update info on HCM and test each scenario?

}
/>
) : !userEligibleForMHA ? (
) : !userEligibleForMHA && !spouseEligibleForMHA ? (
Copy link
Contributor

Choose a reason for hiding this comment

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

I know you did't code this, but if NoRequestAccess is only used here. We should include this as part of it:

<PanelLayout
      panelType={PanelTypeEnum.Empty}
      sidebarTitle={t('Your MHA')}
      percentComplete={0}
      backHref={`/accountLists/${accountListId}/reports/housingAllowance`}
      mainContent={
        <Container sx={{ ml: 5 }}>
          <Stack direction="column" width={permissionDeniedWidth}>
          ....

Also it looks like this is the same of the others, so I wonder if we can make that into a component to prevent duplicated code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unsure what you mean here, but if you mean to deduplicate the PanelLayout(s) here I can work on that

Copy link
Contributor Author

@zweatshirt zweatshirt Feb 11, 2026

Choose a reason for hiding this comment

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

I removed NoRequestAccess entirely. I think there was a discussion about adding it a while back, but I'm really not sure how helpful leading a user to a dead end is. I think in the case where both users are ineligible it was best to not render the 'Create New MHA Request' button. I can revert that though.

Copy link
Contributor

@dr-bizz dr-bizz Feb 13, 2026

Choose a reason for hiding this comment

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

Sorry, I wasn't clear.

if NoRequestAccess is only used here. We should include this as part of it:
I'm referring to the PanelLayout component. Why don't we just put the PanelLayout component inside NoRequestAccess?

Also, it looks like this is the same as the others, so I wonder if we can make that into a component to prevent duplicated code.
Here I'm saying where we have <NoRequestAccess/> <NoEditAccess/>, <Calculation/> we could just make the PanelLayout component into a shared component so we don't have to duplicate code.

Please readd the NoRequestAccess component

@zweatshirt zweatshirt requested a review from dr-bizz February 11, 2026 15:46
Copy link
Contributor

@dr-bizz dr-bizz left a comment

Choose a reason for hiding this comment

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

Please read my comment here #1624 (comment)

Please re-add NoRequestAccess component

@zweatshirt zweatshirt requested a review from dr-bizz February 13, 2026 19:18
Copy link
Contributor

@dr-bizz dr-bizz left a comment

Choose a reason for hiding this comment

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

Looks great! I have one recommendation, but that is it.

).not.toBeInTheDocument();
});

it('renders fully ineligible married couple and hides request details', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we create a test for when the user is eligible, but the spouse is not.

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