docs: note Salary auto-scope picker (rides paused bundle)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
bf3b63fc6b
commit
b397cdf46c
10
CLAUDE.md
10
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);
|
the must-stay-payable invariant). DB value `fixed`/`daily` (Path-A);
|
||||||
labels "Managers (Salaried)" / "Daily workers".
|
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
|
## Payroll Constants
|
||||||
Defined at top of views.py — used in dashboard calculations and payment processing:
|
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
|
- **ADDITIVE_TYPES** = `['Bonus', 'Overtime', 'New Loan', 'Advance Payment', 'Salary']` — increase worker's net pay
|
||||||
|
|||||||
@ -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
|
it ships bundled with the rest of the paused Manager/Salaried work
|
||||||
in one push, his call.
|
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)
|
#### Follow-ups from code review (parked, out of scope for this feature)
|
||||||
|
|
||||||
1. **Atomicity hardening (cross-cutting, pre-existing).**
|
1. **Atomicity hardening (cross-cutting, pre-existing).**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user