Skip to content

Conversation

@kegrimes
Copy link
Contributor

@kegrimes kegrimes commented Dec 4, 2025

Description

Add graphQL delete, submit, and duplicate mutations to MHA. Also, updates UI based on new figma designs.

This PR also addresses these issues:

  • When we save the form, we need to alert the user (ex. the Goal Calculator shows a snackbar every time it sends a mutation to the server to keep the user informed that the form is autosaving)
  • Added loading states
  • Disabled edit button if user is not allowed to edit
  • Added "no edit access" component incase a user saves Edit page when they do not have permission
  • Added "no request access" component incase a user saves New page when they are ineligible

Note: Dialog for past deadline date, pending status, and permission denied components are under review by Ryan and stakeholders.

Testing

  • Go to /reports/housingAllowance
  • Create a new request, enter in values, and cancel request
  • Create a new request and test submit functionality
  • Check edit access after submitting request
  • Check that each mutation works as intended
  • Check updated current approved mha card design

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Bundle sizes [mpdx-react]

Compared against cfa6ff2

Route Size (gzipped) Diff
/accountLists/[accountListId]/reports/housingAllowance 126.44 KB +3.26 KB
/accountLists/[accountListId]/reports/housingAllowance/[requestId] 164.83 KB +1.36 KB

@kegrimes kegrimes changed the base branch from main to add-autosave-to-mha December 5, 2025 15:45
Base automatically changed from add-autosave-to-mha to main December 8, 2025 16:03
@kegrimes kegrimes force-pushed the add-mutations-to-mha branch from 5ae68fc to 7693cd8 Compare December 8, 2025 16:25
@kegrimes kegrimes added the Preview Environment Add this label to create an Amplify Preview label Dec 9, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

Preview branch generated at https://add-mutations-to-mha.d3dytjb8adxkk5.amplifyapp.com

kegrimes

This comment was marked as outdated.

@kegrimes kegrimes requested a review from dr-bizz December 10, 2025 12:49
@wjames111 wjames111 self-requested a review December 18, 2025 19:40
Copy link
Contributor

@wjames111 wjames111 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, thanks for doing all this work! Found a few minor things but nothing serious.

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.

Sorry, I've been super busy with SIT functionality. I passed this to Will to review. Will will be in on Dec 29th, and you can ask him to review, so I'm not blocking you.

@kegrimes kegrimes requested a review from wjames111 December 31, 2025 14:10
Copy link
Contributor

@wjames111 wjames111 left a comment

Choose a reason for hiding this comment

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

These updates look great! I'm struggling to get it working locally for me though, not sure if I'm missing something.

@kegrimes kegrimes requested a review from wjames111 December 31, 2025 19:57
@kegrimes
Copy link
Contributor Author

kegrimes commented Dec 31, 2025

@wjames111 I am having trouble testing as well because I only have two requests that do not have the statuses I need in order to test. The first one is PENDING and the second is BOARD_APPROVED. I need a request to be IN_PROGRESS or ACTION_REQUIRED but I am not 100% sure how to do that. The update mutation only allows updates on the request attributes, so I can't update the status using graphQL.

The current data I am talking about comes from MinistryHousingAllowanceRequests query. Let me know your thoughts.

Copy link
Contributor

@wjames111 wjames111 left a comment

Choose a reason for hiding this comment

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

Thanks for making these changes, it looks great! I did notice last I checked there was a failing test. Also this may be a side affect of not being able to update the status but I noticed the create MHA button bugs out a little after an existing MHA is cancelled.

Screen.Recording.2026-01-05.at.9.53.54.AM.mov

Comment on lines 16 to 18
if (!effectiveDates) {
return [];
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I might remove this block and update effectiveDates to just be an empty array when there's no data?.payrollDates. Should affectively do the same thing but with less 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.

I can make this change, but I also don't think I ever edited this file!

Comment on lines 36 to 38
const effectiveDates = data?.payrollDates.map(
(payrollDate) => payrollDate.regularProcessDate,
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const effectiveDates = data?.payrollDates.map(
(payrollDate) => payrollDate.regularProcessDate,
);
const effectiveDates = data?.payrollDates.map(
(payrollDate) => payrollDate.regularProcessDate,
) ?? [];

@wjames111
Copy link
Contributor

@wjames111 I am having trouble testing as well because I only have two requests that do not have the statuses I need in order to test. The first one is PENDING and the second is BOARD_APPROVED. I need a request to be IN_PROGRESS or ACTION_REQUIRED but I am not 100% sure how to do that. The update mutation only allows updates on the request attributes, so I can't update the status using graphQL.

The current data I am talking about comes from MinistryHousingAllowanceRequests query. Let me know your thoughts.

@canac do you have any thoughts on this?

@canac
Copy link
Contributor

canac commented Jan 5, 2026

@wjames111 @kegrimes I'd probably update the database directly or use stage-console if you need to make those changes. I can help you set that up if you need.

@kegrimes kegrimes requested a review from dr-bizz January 12, 2026 20:02
@kegrimes
Copy link
Contributor Author

kegrimes commented Jan 12, 2026

@dr-bizz Will has already reviewed some of this PR, but I added some mini updates to the MHA here. The process should now be very smooth in between each mutation. To test some changes, you may have to update status in the database. Let me know if you find something I missed!

Changing the View page and print functionality will be done in #1557.

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.

5 participants