diff --git a/docs/plans/2026-05-16-managers-paytype-filter-plan.md b/docs/plans/2026-05-16-managers-paytype-filter-plan.md new file mode 100644 index 0000000..1fb2ef3 --- /dev/null +++ b/docs/plans/2026-05-16-managers-paytype-filter-plan.md @@ -0,0 +1,482 @@ +# Managers Pay-Type Filter — Implementation Plan + +> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development to implement this plan task-by-task (in-session, fresh subagent + 2-stage review per task). Each subagent MUST use superpowers:test-driven-development. + +**Goal:** Add a display-only `pay_type` filter so `Worker(pay_type='fixed')` managers are fast to find on `/workers/` and in the Add-Adjustment modal picker — no model/migration/URL/money-math changes. + +**Architecture:** One new `?pay_type=` GET branch in `worker_list` mirroring the existing `?status=`/`?team=` pattern; one extra `` + JS handler in the Add-Adjustment modal (reusing the existing `.add-adj-worker` / team-quick-select pattern). Server-side worker querysets are NEVER narrowed for the modal (preserves the must-stay-payable invariant). + +**Tech Stack:** Django 5.2.7, Python 3.13, SQLite local (`USE_SQLITE=true`), Bootstrap 5 templates, vanilla JS. + +**Design doc:** `docs/plans/2026-05-16-managers-paytype-filter-design.md` (commit `4aac2c1`). + +**Branch / baseline:** `ai-dev`, HEAD `4aac2c1`, **201/201 tests passing**. Builds on top of the **paused, un-pushed Manager/Salaried commits**. + +**Test command (Git Bash, per CLAUDE.md):** +```bash +USE_SQLITE=true DJANGO_DEBUG=true python manage.py test core.tests -v 2 +``` +Single class: append `.ClassName` → `core.tests.WorkerListPayTypeFilterTests`. + +> ⛔ **HARD STOP after Task 4.** Do NOT `git push`, do NOT deploy. After all +> 4 tasks pass locally, STOP and hand back to Konrad to run the manual +> verification checklist in the design doc. Pushing happens only on +> Konrad's explicit say-so, bundled with the rest of the paused +> Manager/Salaried feature. + +**Path-A reminder:** the DB value is `'fixed'` (used in querysets, the +`data-pay-type` attribute, and `