Skip to content

feat: add gross up modal to PayrollConfiguration kebab menu#1210

Draft
jeffredodd wants to merge 3 commits intomainfrom
jdj/feat/gross-up-kebab-menu
Draft

feat: add gross up modal to PayrollConfiguration kebab menu#1210
jeffredodd wants to merge 3 commits intomainfrom
jdj/feat/gross-up-kebab-menu

Conversation

@jeffredodd
Copy link
Contributor

@jeffredodd jeffredodd commented Mar 6, 2026

Summary

  • Adds a Gross Up modal accessible from the employee kebab menu on the PayrollConfiguration page for off-cycle bonus and correction payrolls
  • Allows partners to enter a desired net pay amount, calculate the required gross pay via the payrolls/calculate_gross_up API, and apply it to the employee's compensation
  • Includes loading state on both Calculate and Apply buttons
  • Fixes a bug where applying gross up silently failed when the target compensation (e.g. Bonus) didn't already exist in the employee's fixedCompensations array

Changes

  • GrossUpModal: New modal component with net pay input, calculate/apply flow, error handling, and warning about tax estimate accuracy
  • PayrollConfiguration: Wires up gross up calculate and apply handlers, including the updatePayroll call to persist the gross amount
  • grossUpHelpers: Utility to determine gross up eligibility (off-cycle bonus/correction only) and map reason to target compensation name
  • PayrollConfigurationPresentation: Adds "Set net earnings" kebab menu item and modal rendering
  • OffCycleTaxWithholdingModal: Minor style cleanup (shared modal pattern)

Review process

This PR has two review passes:

  1. Design review -- UI/UX feedback on the gross up modal flow
  2. Engineering review -- code quality, API usage, edge cases

Screenshots

Screenshot 2026-03-06 at 12 44 24 PM Screenshot 2026-03-06 at 11 41 16 AM Screenshot 2026-03-06 at 11 41 13 AM Screenshot 2026-03-06 at 11 41 06 AM Screenshot 2026-03-06 at 11 41 22 AM

Test plan

  • Design review: modal layout, copy, warning banner, loading states
  • Open off-cycle bonus payroll, click kebab menu on employee, select "Set net earnings"
  • Enter net pay amount, click Calculate, verify gross pay result appears
  • Click Apply, verify spinner shows, modal closes, and employee compensation updates
  • Verify gross up menu item only appears for off-cycle bonus/correction payrolls
  • Unit tests pass for GrossUpModal and PayrollConfiguration

Made with Cursor

- Move GrossUpModal from PayrollEditEmployee inline text to kebab menu
- Add "Set net earnings" menu item for bonus/correction off-cycle payrolls
- Fix gross up apply: set excluded=false and only send valid API fields
- Cancel in-flight prepare queries on unmount to prevent concurrent requests
- Add retry logic for payrollsPrepare when server reports processing conflict

Made-with: Cursor
… entry

Add spinner to the Apply button while the gross up amount is being saved.
Fix a bug where applying gross up had no effect when the target
compensation (e.g. Bonus) didn't already exist in the employee's
fixedCompensations array -- the .map() only transformed existing entries
so the amount was silently dropped. Now creates the entry if missing.

Made-with: Cursor
@jeffredodd jeffredodd requested a review from aaronlee777 March 6, 2026 20:12
Align the dropdown menu to the trigger button's right edge and normalize
icon sizes to a uniform 20x20 within menu items for visual consistency.

Made-with: Cursor
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