Skip to content

feat(employee): rehire form with active/dismissed status badges#2455

Draft
serikjensen wants to merge 2 commits into
mainfrom
feat/employee-rehire-form
Draft

feat(employee): rehire form with active/dismissed status badges#2455
serikjensen wants to merge 2 commits into
mainfrom
feat/employee-rehire-form

Conversation

@serikjensen

Copy link
Copy Markdown
Member

Summary

Implements the rehire flow for terminated employees (SDK-1147) plus the supporting status badges and a tab-classification fix.

  • RehireEmployee form (container + presentation) wired to useEmployeeEmploymentsCreateRehireMutation, added as a rehire state in the EmployeeListFlow state machine and exported from the EmployeeManagement namespace.
  • Dismissed tab actions: surface Rehire and Edit on dismissed employees' menu.
  • Status badges:
    • 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.
    • Shared badge date formatting (badgeDate.ts, conditional-year) between both.
  • Tab filter fix: the Dismissed tab now queries terminatedToday instead of terminated. terminated includes scheduled-future terminations, which wrongly pulled soon-to-be-dismissed employees into Dismissed; terminatedToday keeps them on Active (matching the gws-flows reference implementation).

Testing

  • Unit tests for RehireEmployee (submit/cancel/validation), RehireStatusBadge, LastDayStatusBadge, and extended EmployeeListFlow + useEmployeeList coverage.
  • npm run test green for touched suites (35 tests); tsc --noEmit clean.

Notes

  • Last-day badge uses status="warning" to distinguish an upcoming departure from the info rehire badge — easy to change if a neutral pill is preferred.
  • Not yet done (flagged for follow-up): the upcoming-termination badge on the Onboarding tab (flows renders it there too).

Made with Cursor

serikjensen and others added 2 commits July 22, 2026 17:09
- 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>
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.

1 participant