feat: Heat Cycle Calendar — month grid, start-cycle modal, breeding date suggestions, whelping estimate #23

Merged
jason merged 2 commits from feat/heat-cycle-calendar into master 2026-03-09 20:33:42 -05:00
Owner

Heat Cycle Calendar

Complete rewrite of BreedingCalendar.jsx — replaces the placeholder stub with a fully functional heat cycle tracking calendar.


Features

📅 Month Grid Calendar

  • Full month view with Sun–Sat headers and prev/next navigation
  • Today highlighted with a blue outline
  • Each day cell is color-coded by the cycle window it falls in:
    • 🩷 Proestrus — Days 0–8 (bleeding begins, not receptive)
    • 🟢 Optimal Breeding — Days 9–15 (peak fertility)
    • 🟡 Late Estrus — Days 16–21 (declining fertility)
    • Diestrus — Days 22–28 (cycle ending)
  • Dog names shown on active days; green dot marker when a breeding date is logged
  • Click any active day → opens Cycle Detail Modal
  • Click any empty day → opens Start Cycle Modal

Start Heat Cycle Modal

  • Female dog dropdown (filtered from /api/dogs)
  • Date picker (defaults to today)
  • Optional notes
  • POST /api/breeding/heat-cycles

🔬 Cycle Detail Modal

  • Shows all 4 breeding windows with date ranges and descriptions
  • Log/update breeding date inline → PUT /api/breeding/heat-cycles/:id
  • Whelping estimate (earliest/expected/latest) appears automatically once breeding date is logged
  • Delete cycle with confirmation

📋 Active Cycles List

  • Cards below the calendar showing all cycles active in the current month
  • Current window badge, day counter, bred checkmark
  • Click any card → Cycle Detail Modal

Backend Changes — server/routes/breeding.js

  • New GET /api/breeding/heat-cycles — returns all cycles (with optional ?year=&month= filter)
  • New GET /api/breeding/heat-cycles/:id/suggestions — returns 4 window objects + optional whelping estimate
  • Removed progesterone_peak_date from POST/PUT (moved to extended roadmap)
  • Cleaned up GET /heat-cycles/active to include breed and birth_date fields

Not Included (moved to roadmap)

  • Progesterone level tracking
  • Calendar iCal/export
  • Push notification alerts
## Heat Cycle Calendar Complete rewrite of `BreedingCalendar.jsx` — replaces the placeholder stub with a fully functional heat cycle tracking calendar. --- ### Features #### 📅 Month Grid Calendar - Full month view with Sun–Sat headers and prev/next navigation - Today highlighted with a blue outline - Each day cell is **color-coded** by the cycle window it falls in: - 🩷 **Proestrus** — Days 0–8 (bleeding begins, not receptive) - 🟢 **Optimal Breeding** — Days 9–15 (peak fertility) - 🟡 **Late Estrus** — Days 16–21 (declining fertility) - ⬜ **Diestrus** — Days 22–28 (cycle ending) - Dog names shown on active days; green dot marker when a breeding date is logged - Click any **active day** → opens Cycle Detail Modal - Click any **empty day** → opens Start Cycle Modal #### ➕ Start Heat Cycle Modal - Female dog dropdown (filtered from `/api/dogs`) - Date picker (defaults to today) - Optional notes - `POST /api/breeding/heat-cycles` #### 🔬 Cycle Detail Modal - Shows all 4 breeding windows with date ranges and descriptions - Log/update breeding date inline → `PUT /api/breeding/heat-cycles/:id` - Whelping estimate (earliest/expected/latest) appears automatically once breeding date is logged - Delete cycle with confirmation #### 📋 Active Cycles List - Cards below the calendar showing all cycles active in the current month - Current window badge, day counter, bred checkmark - Click any card → Cycle Detail Modal --- ### Backend Changes — `server/routes/breeding.js` - **New** `GET /api/breeding/heat-cycles` — returns all cycles (with optional `?year=&month=` filter) - **New** `GET /api/breeding/heat-cycles/:id/suggestions` — returns 4 window objects + optional whelping estimate - Removed `progesterone_peak_date` from `POST`/`PUT` (moved to extended roadmap) - Cleaned up `GET /heat-cycles/active` to include `breed` and `birth_date` fields --- ### Not Included (moved to roadmap) - Progesterone level tracking - Calendar iCal/export - Push notification alerts
jason added 2 commits 2026-03-09 20:32:51 -05:00
jason merged commit a4135213a9 into master 2026-03-09 20:33:42 -05:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jason/breedr#23