Skip to content

Add tappable calendar event detail view - #6

Merged
myaschmitz merged 2 commits into
mainfrom
myaschmitz-calendar-event-detail
Aug 1, 2026
Merged

Add tappable calendar event detail view#6
myaschmitz merged 2 commits into
mainfrom
myaschmitz-calendar-event-detail

Conversation

@myaschmitz

Copy link
Copy Markdown
Owner

Stacked on #5.

What

Tapping an event in the calendar now opens a read-only event detail view with Edit and Delete actions.

The detail shows:

  • Event type (icon + label + color via getCareTypeByType)
  • Plant name (tappable → plant screen)
  • Date
  • Fertilizer concentration (fertilize/fertigate)
  • Pest severity (color-coded)
  • Notes
  • Event photos

How

  • New app/event/[id].tsx screen. Follows the existing edit-care-event modal-vs-route pattern: opens as a centered modal on desktop web (registered in WebModalContext) and as a pushed route (/event/[id]) on mobile/narrow.
  • Place is preserved on back: pushing the route keeps the calendar screen mounted, so its month + selected day are retained; on desktop web the detail is an overlay modal so the calendar is never unmounted.
  • Added useEvent + useEventPhotos hooks and event/eventPhotos query keys. Single-event cache is invalidated on update and removed on delete.
  • Wired DayEventsList onEventPress in the global Calendar tab (was navigating straight to the plant) and the per-plant Calendar section (previously passed nothing).
  • Edit routes to the existing edit-care-event screen; Delete confirms via useAlert then dismisses.

Testing

  • npx tsc --noEmit clean
  • npm test — 74 passed

Tapping a calendar event (global Calendar tab or per-plant Calendar
toggle) now opens a read-only event detail showing type, plant, date,
notes, photos, fertilizer concentration and pest severity, with Edit
and Delete actions.

- New app/event/[id].tsx detail screen, opened as a desktop-web modal
  via WebModalContext or a pushed route on mobile (mirrors the
  edit-care-event pattern). Backing out preserves the calendar month +
  selected day since the calendar screen stays mounted.
- Add useEvent and useEventPhotos hooks plus event/eventPhotos query
  keys; invalidate the single-event cache on update/delete.
- Wire DayEventsList onEventPress in the global tab and per-plant
  section.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rooted Ready Ready Preview Aug 1, 2026 5:55am

@myaschmitz
myaschmitz changed the base branch from myaschmitz-plant-calendar-view to main August 1, 2026 05:53
@myaschmitz
myaschmitz merged commit a2cea57 into main Aug 1, 2026
4 checks passed
@myaschmitz
myaschmitz deleted the myaschmitz-calendar-event-detail branch August 1, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant