feat(employee): rehire form with active/dismissed status badges#2455
Draft
serikjensen wants to merge 2 commits into
Draft
feat(employee): rehire form with active/dismissed status badges#2455serikjensen wants to merge 2 commits into
serikjensen wants to merge 2 commits into
Conversation
- Add RehireEmployee form + flow state to rehire terminated employees - Export RehireEmployee from the EmployeeManagement namespace - Surface Rehire and Edit actions on the Dismissed tab - Add RehireStatusBadge (dismissed) and LastDayStatusBadge (active) for upcoming rehire/termination dates, sharing badge date helpers - Fix Dismissed tab filter to terminatedToday so scheduled-future terminations stay on the Active tab (matches gws-flows) Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the rehire flow for terminated employees (SDK-1147) plus the supporting status badges and a tab-classification fix.
useEmployeeEmploymentsCreateRehireMutation, added as arehirestate in theEmployeeListFlowstate machine and exported from theEmployeeManagementnamespace.RehireStatusBadge— badge on the Dismissed tab for employees with an upcoming rehire.LastDayStatusBadge— badge on the Active tab for employees with a scheduled (today-or-future) termination.badgeDate.ts, conditional-year) between both.terminatedTodayinstead ofterminated.terminatedincludes scheduled-future terminations, which wrongly pulled soon-to-be-dismissed employees into Dismissed;terminatedTodaykeeps them on Active (matching the gws-flows reference implementation).Testing
RehireEmployee(submit/cancel/validation),RehireStatusBadge,LastDayStatusBadge, and extendedEmployeeListFlow+useEmployeeListcoverage.npm run testgreen for touched suites (35 tests);tsc --noEmitclean.Notes
status="warning"to distinguish an upcoming departure from theinforehire badge — easy to change if a neutral pill is preferred.Made with Cursor