Commit Graph

5 Commits

Author SHA1 Message Date
ffef49b931 Fix egg sale form: remove duplicate route, change price to euros
All checks were successful
Deploy / deploy (push) Successful in 2m50s
The egg sale form had two issues:
- Duplicate POST /actions/product-sold route in products.py was
  overwriting the eggs.py handler, causing incomplete page responses
  (no tabs, no recent sales list)
- Price input used cents while feed purchase uses euros, inconsistent UX

Changes:
- Remove duplicate handler from products.py (keep only redirect)
- Change sell form price input from cents to euros (consistent with feed)
- Parse euros in handler, convert to cents for storage
- Add TestEggSale class with 4 tests for the fixed behavior

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 07:35:02 +00:00
fe73363a4b Filter egg harvest events to only include adult female ducks
Males, juveniles, and other non-laying animals were incorrectly being
associated with egg collection events. Added life_stage='adult' and
sex='female' filters to resolve_ducks_at_location() query.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 16:56:08 +00:00
eee8552345 Allow recording zero eggs collected
All checks were successful
Deploy / deploy (push) Successful in 1m37s
Enable recording "checked coop, found 0 eggs" to distinguish from days
when the coop wasn't checked at all. Statistics remain eggs/calendar day.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 06:37:31 +00:00
e42eede010 Add recent events and stats to eggs, feed, and move forms
All checks were successful
Deploy / deploy (push) Successful in 2m40s
- Create recent_events.py helper for rendering event lists with humanized
  timestamps and deleted event styling (line-through + opacity)
- Query events with ORDER BY ts_utc DESC to show newest first
- Join event_tombstones to detect deleted events
- Fix move form to read animal_ids (not resolved_ids) from entity_refs
- Fix feed purchase format to use total_kg from entity_refs
- Use hx_get with #event-panel-content target for slide-over panel
- Add days-since-last stats for move and feed forms

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 21:10:09 +00:00
e9804cdac8 feat: implement Egg Quick Capture form (Step 7.3)
Add the Egg Quick Capture functionality at GET / with POST /actions/product-collected.

Changes:
- Add list_active() to LocationRepository for active locations only
- Create web/templates/eggs.py with MonsterUI form components
- Create web/routes/eggs.py with GET and POST handlers
- Add CSRF bypass in dev_mode for easier development/testing
- Resolve ducks at location server-side for egg collection
- UX: location sticks after submit, quantity clears

Tests: 9 new tests covering form rendering and submission

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 21:17:18 +00:00