Skip to content

feat: add RRoP payroll edit field builders - #2687

Closed
serikjensen wants to merge 3 commits into
claude/rrop-edit-employee-01-schemafrom
claude/rrop-edit-employee-02-fields
Closed

serikjensen wants to merge 3 commits into
claude/rrop-edit-employee-01-schemafrom
claude/rrop-edit-employee-02-fields

Conversation

@serikjensen

Copy link
Copy Markdown
Member

Summary

Second of three stacked PRs for the regular-rate-of-pay (RRoP) UNSTABLE_PayrollEditEmployee form infrastructure. Adds the render-ready field builders the hook exposes on form.Fields. Still no UI wiring and behind the payrollRegularRateOfPay flag, so no default behavior changes.

Stacked on #2686. Review/merge that first; this PR targets its branch, so its diff shows only the field-builder changes.

Changes

  • fields.tsx: builds per-job hours and additional-earnings sections, each either flat (single-workweek or overtime-ineligible) or keyed by workweek start (multi-workweek and eligible), discriminated by isSplitByWorkweek.
  • Flat other, time-off, and dismissal-only final-payout sections.
  • Bound numeric field factories plus the payment-method radio field, present only when direct deposit is set up.

Related

Stack (merge in order):

  1. Schema + helper (feat: add RRoP payroll edit form schema #2686)
  2. This PR — field builders
  3. usePayrollEditEmployeeForm hook + tests (base: this branch)

Testing

Consumes the schema types from #2686; exercised end-to-end by the hook test suite in PR 3 of the stack. npm run tsc and npm run lint:check pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FHcXHWSPAnznxVGqsauQcS


Generated by Claude Code

First slice of the regular-rate-of-pay UNSTABLE_PayrollEditEmployee rebuild
(behind the payrollRegularRateOfPay flag). Pure logic, no UI or hook wiring yet:

- payrollEditEmployeeSchema: workweek-keyed Zod schema and form-data types,
  workweek normalization, defaults derivation from prepared compensation, and
  the PayrollUpdate employee-compensation payload builder with per-workweek
  breakdown tiling and non-negative validation.
- isOvertimeEligibleFlsaStatus helper: gates per-workweek splitting to the
  nonexempt family only.

The field builders and the usePayrollEditEmployeeForm hook that consume this
land in follow-up PRs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHcXHWSPAnznxVGqsauQcS
Second slice of the regular-rate-of-pay UNSTABLE_PayrollEditEmployee rebuild.
Builds the render-ready field collections the hook exposes on form.Fields:

- Per-job hours and additional-earnings sections, each flat (single-workweek or
  overtime-ineligible) or keyed by workweek start (multi-workweek and eligible),
  discriminated by isSplitByWorkweek.
- Flat other, time-off, and dismissal-only final-payout sections.
- Bound numeric field factories and the payment-method radio field, present only
  when direct deposit is set up.

Consumes the schema types from the previous PR; the usePayrollEditEmployeeForm
hook that wires these lands in the next PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FHcXHWSPAnznxVGqsauQcS
@serikjensen
serikjensen force-pushed the claude/rrop-edit-employee-01-schema branch 2 times, most recently from fbd2f76 to 1e848ca Compare September 3, 2026 16:20

Copy link
Copy Markdown
Member Author

Superseding this PR. The stack was restructured to separate the schema from its data-mapping helpers (each now with its own unit tests), which shifted the field builders down a step. This PR's work now lives in #2692, stacked on #2686 (schema) → #2691 (helpers). Closing in favor of that.


Generated by Claude Code

@serikjensen serikjensen closed this Sep 3, 2026
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.

2 participants