feat: implement Feed Quick Capture form (Step 7.4)
Add /feed page with tabbed forms for Give Feed and Purchase Feed: - GET /feed renders page with tabs (Give Feed default, Purchase Feed) - POST /actions/feed-given records feed given to a location - POST /actions/feed-purchased records feed purchases to inventory Also adopts idiomatic FastHTML/HTMX pattern: - Add hx-boost to base template for automatic AJAX on forms - Refactor egg form to use action/method instead of hx_post Spec §22 compliance: - Integer kg only, min=1 - Warn if inventory negative (but allow) - Toast + stay on page after submit - Location/type stick, amount resets to default bag size 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
17
PLAN.md
17
PLAN.md
@@ -279,14 +279,15 @@ Check off items as completed. Each phase builds on the previous.
|
||||
- [x] Write tests: form renders, POST creates event, validation errors (422)
|
||||
- [x] **Commit checkpoint** (e9804cd)
|
||||
|
||||
### Step 7.4: Feed Quick Capture
|
||||
- [ ] Create `web/routes/feed.py`:
|
||||
- [ ] GET /feed - Feed Quick Capture form
|
||||
- [ ] POST /actions/feed-given
|
||||
- [ ] POST /actions/feed-purchased
|
||||
- [ ] Create `web/templates/feed.py` with forms
|
||||
- [ ] Implement defaults per spec §22
|
||||
- [ ] Write tests: form renders, POST creates events, blocked without purchase
|
||||
### Step 7.4: Feed Quick Capture ✓
|
||||
- [x] Create `web/routes/feed.py`:
|
||||
- [x] GET /feed - Feed Quick Capture form
|
||||
- [x] POST /actions/feed-given
|
||||
- [x] POST /actions/feed-purchased
|
||||
- [x] Create `web/templates/feed.py` with forms
|
||||
- [x] Implement defaults per spec §22
|
||||
- [x] Write tests: form renders, POST creates events, blocked without purchase
|
||||
- [x] Adopt hx-boost pattern (idiomatic FastHTML/HTMX)
|
||||
- [ ] **Commit checkpoint**
|
||||
|
||||
### Step 7.5: Move Animals
|
||||
|
||||
Reference in New Issue
Block a user