Add tappable calendar event detail view - #6
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
getCareTypeByType)How
app/event/[id].tsxscreen. Follows the existing edit-care-event modal-vs-route pattern: opens as a centered modal on desktop web (registered inWebModalContext) and as a pushed route (/event/[id]) on mobile/narrow.useEvent+useEventPhotoshooks andevent/eventPhotosquery keys. Single-event cache is invalidated on update and removed on delete.DayEventsListonEventPressin the global Calendar tab (was navigating straight to the plant) and the per-plant Calendar section (previously passed nothing).useAlertthen dismisses.Testing
npx tsc --noEmitcleannpm test— 74 passed