Skip to content

MPDX-9341 - SC: Improve MHA eligibility checks to correctly handle non-existent spouse#1655

Merged
zweatshirt merged 2 commits intomainfrom
MPDX-9341
Mar 20, 2026
Merged

MPDX-9341 - SC: Improve MHA eligibility checks to correctly handle non-existent spouse#1655
zweatshirt merged 2 commits intomainfrom
MPDX-9341

Conversation

@zweatshirt
Copy link
Contributor

@zweatshirt zweatshirt commented Mar 18, 2026

Description

I noticed that the ineligible message for spouses was being displayed for single users, since some of the checks were not ensuring that the spouse existed first.

Testing

  • Go to reports/salaryCalculator
  • Navigate to the MHA Request section with a single user.
  • Check that the text in this section displays correctly.

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 Mar 18, 2026
@zweatshirt zweatshirt added the Preview Environment Add this label to create an Amplify Preview label Mar 18, 2026
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 18, 2026

Bundle sizes [mpdx-react]

Compared against fa6e937

No significant changes found

@zweatshirt zweatshirt requested a review from dr-bizz March 18, 2026 14:35
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.

I added 1 comment, but this works great

Comment on lines +19 to +21
const hasSpouse = !!hcmSpouse;
const spouseEligible =
hasSpouse && (hcmSpouse.mhaEit.mhaEligibility ?? false);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is great. what are your thoughts about putting const hasSpouse = !!hcmSpouse; in the context as it might be needed elsewhere?

@zweatshirt zweatshirt enabled auto-merge March 20, 2026 14:19
@zweatshirt zweatshirt merged commit 14a1c22 into main Mar 20, 2026
23 of 24 checks passed
@zweatshirt zweatshirt deleted the MPDX-9341 branch March 20, 2026 14:27
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