MPDX-9129 - MHA Form Ineligible Display logic#1624
Conversation
|
Preview branch generated at https://MPDX-9129-redone.d3dytjb8adxkk5.amplifyapp.com |
Bundle sizes [mpdx-react]Compared against ffa449f No significant changes found |
Bundle sizes [mpdx-react]Compared against cec3bdd No significant changes found |
|
@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. |
dr-bizz
left a comment
There was a problem hiding this comment.
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?
src/components/Reports/MinisterHousingAllowance/MainPages/IneligibleDisplay.tsx
Outdated
Show resolved
Hide resolved
src/components/Reports/MinisterHousingAllowance/MainPages/IneligibleDisplay.tsx
Outdated
Show resolved
Hide resolved
src/components/Reports/MinisterHousingAllowance/MainPages/IneligibleDisplay.tsx
Outdated
Show resolved
Hide resolved
| } | ||
| /> | ||
| ) : !userEligibleForMHA ? ( | ||
| ) : !userEligibleForMHA && !spouseEligibleForMHA ? ( |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Unsure what you mean here, but if you mean to deduplicate the PanelLayout(s) here I can work on that
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
src/components/Reports/MinisterHousingAllowance/MinisterHousingAllowance.tsx
Outdated
Show resolved
Hide resolved
src/components/Reports/MinisterHousingAllowance/MinisterHousingAllowance.tsx
Outdated
Show resolved
Hide resolved
…umber, and change Personnel Records number
… existing requests
dr-bizz
left a comment
There was a problem hiding this comment.
Please read my comment here #1624 (comment)
Please re-add NoRequestAccess component
dr-bizz
left a comment
There was a problem hiding this comment.
Looks great! I have one recommendation, but that is it.
| ).not.toBeInTheDocument(); | ||
| }); | ||
|
|
||
| it('renders fully ineligible married couple and hides request details', async () => { |
There was a problem hiding this comment.
Can we create a test for when the user is eligible, but the spouse is not.
Description
Jira ticket
Testing
Checklist:
/pr-reviewcommand locally and fixed any relevant suggestions