Skip to content

Conversation

@serikjensen
Copy link
Member

Fixes some issues around business contractors and filing a new hire report. The type and self onboarding fields were not being set in the API call for updating the contractor. This ensures that we apply the contractor type and if we are self onboarding correctly along with the new hire report details.

This also updates the Submit component to properly set the invite contractor to self onboarding pending invite now that the above was resolved.

Screen.Recording.2025-08-27.at.11.29.55.AM.mov

}
if (
onboardingStatus === ContractorOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE &&
onboardingStatus === ContractorOnboardingStatus.SELF_ONBOARDING_NOT_INVITED &&
Copy link
Contributor

Choose a reason for hiding this comment

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

for my understanding, why are we changing the enum check here? and is there ever a case where multiple enums would qualify as truthy for this check?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this was messed up previously due to the contractor update endpoint being called incorrectly in the file new hire report. This was a needed change after i corrected that

For the other statuses we wouldn't want to show the invite screen... unless they were changing the recipient email, but that's a case we would probably need some UX around anyway

This is probably still something that will need work on refining moving forward separately as contractor onboarding gets traction with partners, but this at least makes the happy path functional for now.

Copy link
Contributor

@shermango shermango left a comment

Choose a reason for hiding this comment

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

left a question, also should a unit test be included for asserting the request payload for when selfOnboarding is/is not provided?

@serikjensen
Copy link
Member Author

left a question, also should a unit test be included for asserting the request payload for when selfOnboarding is/is not provided?

Yes testing should be considered here! that will require spinning up a lot of the mock infrastructure for contractors which isn't in place yet and could be extensive. We should be better about laying that down as we go through building out the domains moving forward

@serikjensen serikjensen merged commit 82bc9ce into main Aug 27, 2025
3 checks passed
@serikjensen serikjensen deleted the fix/GWS-5437 branch August 27, 2025 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants