diff --git a/CLAUDE.md b/CLAUDE.md index 5d349ad..8d6d3a3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -269,6 +269,16 @@ modal's `all_workers` queryset is NOT narrowed server-side (preserves the must-stay-payable invariant). DB value `fixed`/`daily` (Path-A); labels "Managers (Salaried)" / "Daily workers". +**Salary picker safety:** in the Add-Adjustment modal, choosing +type=`Salary` auto-sets the pay-type filter to Managers-only, hides +daily rows, and **unticks** any already-selected daily worker (so a +`Salary` can never silently be created for a `pay_type='daily'` +worker). Switching to any other type resets the filter to "All" and +re-shows everyone (no auto-re-tick). Pure JS in `toggleProjectField()` +(`payroll_dashboard.html`); not a hard lock — manually switching the +filter back to "All" is still allowed (deliberate override, not the +silent footgun). + ## Payroll Constants Defined at top of views.py — used in dashboard calculations and payment processing: - **ADDITIVE_TYPES** = `['Bonus', 'Overtime', 'New Loan', 'Advance Payment', 'Salary']` — increase worker's net pay diff --git a/docs/plans/parked-work.md b/docs/plans/parked-work.md index b9e4874..2d2b5c0 100644 --- a/docs/plans/parked-work.md +++ b/docs/plans/parked-work.md @@ -82,6 +82,14 @@ STOP — all of it is un-pushed until Konrad's local verification; it ships bundled with the rest of the paused Manager/Salaried work in one push, his call. +Also now: setting the Add-Adjustment **type = Salary** auto-scopes +the picker — pay-type filter → "Managers only", daily rows hidden, +and any selected daily worker auto-unticked (UI guard so a `Salary` +can never silently target a daily worker). Design +`docs/plans/2026-05-16-salary-autoscope-picker-design.md`, plan +`docs/plans/2026-05-16-salary-autoscope-picker-plan.md`. Same HARD +STOP — bundled into the one push on Konrad's say-so. + #### Follow-ups from code review (parked, out of scope for this feature) 1. **Atomicity hardening (cross-cutting, pre-existing).**