fix(schedule): wire booking buttons for workshops, appointments, and retreats#22
fix(schedule): wire booking buttons for workshops, appointments, and retreats#22TaylorONeal wants to merge 1 commit intomainfrom
Conversation
Ensure workshop, appointment, and retreat booking buttons open the booking flow instead of doing nothing. Centralize selected booking payload and keep class detail flow intact. https://claude.ai/code/session_codex
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 04176f9a83
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| setSelectedClass(null); | ||
| setSelectedBooking({ | ||
| id: workshopItem.id, | ||
| type: "workshop", |
There was a problem hiding this comment.
Gate quick-book coverage by booking type
This branch now routes workshops/appointments/retreats into BookingModal, but that modal’s payment logic is still class-centric: primaryCoveringSource always picks the mock membership/class pack (src/components/booking/BookingModal.tsx) and starts in quick-book mode, so paid non-class offerings can be confirmed as “included” instead of requiring payment. Since this commit is what enables non-class CTAs to open that flow, users can now book expensive items (for example retreats) under incorrect coverage.
Useful? React with 👍 / 👎.
| studio: `${retreatItem.destination}, ${retreatItem.country}`, | ||
| location: `${retreatItem.destination}, ${retreatItem.country}`, | ||
| dateTime: `${retreatItem.startDate} - ${retreatItem.endDate}`, | ||
| duration: 7 * 24 * 60, |
There was a problem hiding this comment.
Keep retreat duration accurate in booking payload
The retreat booking payload hardcodes duration to 7 * 24 * 60, and BookingModal renders duration in minutes, so retreat bookings now show a misleading 10080 min duration and ignore any retreat length that differs from 7 nights. This was introduced with the new retreat wiring and will produce incorrect booking summaries as soon as retreat durations vary.
Useful? React with 👍 / 👎.
Motivation
BookingModalcan be opened from any schedule card type.\Description
handleBookinsrc/pages/Schedule.tsxto resolve the clicked id forclass,workshop,appointment, andretreat, build a normalizedSelectedBookingpayload, and open the booking modal for non-class items.\SelectedBookingtype andselectedBookingstate and wired theBookingModalto receiveselectedBooking(preserving the existing class detail → booking flow).\ClassDetailModalfirst, then route to booking) while routing workshop/appointment/retreat CTAs directly to booking.\Testing
npm run lint— FAILED due to missing dev dependency (@eslint/js) in the environment.\npm install— FAILED due to registry access error (403 Forbiddenfetchingpicomatch) so dependencies could not be installed.\npm run dev— NOT RUN / failed becausevitewas not available without successful dependency installation.Codex Task