Events & Booking

Booking List

Customer-facing booking history screen - fetches upcoming bookings from the backend, surfaces inline detail modals and WhatsApp-style chat per booking, auto-completes past bookings on mount, and supports cancellation requests via chat.

Data sourceBackend · prefetch shortcut

Fetches from the bookings API. If the parent context already has data, hydrates from _prefetchedBookings without a second API call.

Chat pollingEvery 5 seconds

The chat modal polls for new messages every 5 s while open. Stops when the modal closes.

TierFree

Available on all plans.

What it does

Four things worth knowing

Cancelled and completed bookings are filtered out by default

The displayItems filter hides both cancelled and completed statuses so the list shows only active bookings. Auto-completion of past bookings happens on mount - the component finds entries whose end time has passed, marks them Completed locally, and pushes the status update to the backend so future API fetches are consistent.

Booking detail and chat open as inline modals

Tapping a booking card opens a detail modal showing title, date/time, location, duration, price, provider, and status. From there, the user can open a WhatsApp-style chat modal for that booking. Alternatively, set detailScreenId or chatScreenId to navigate to full screens instead of modals.

Cancellation goes through chat for customers

Customers cannot cancel directly. Tapping cancel sends a pre-written cancellation request as a chat message (requestCancellationViaChat). This keeps the audit trail in the conversation and avoids accidental cancellations. The booking status is not changed until a provider acts on it.

navigationParams can auto-open a specific booking

If the screen is navigated to with a bookingId in navigationParams, the component automatically opens that booking’s detail or chat modal on mount. This is how Booking Calendar hands off to Booking List after a successful confirmation.

Builder setup

Find it, drop it, wire the screens

Where to find itAdd it to any account screen

  1. Component picker → Events & BookingBooking List.
  2. Drop it on the screen users land on after confirming a booking.
  3. Set this screen as the bookingListScreenId in Booking Calendar.

Before you publishThree things to check

  1. Optionally set detailScreenId if you want booking detail to open on a full screen instead of the inline modal.
  2. Optionally set chatScreenId if you want chat to open on a full screen instead of the inline modal.
  3. Leave both unset to keep everything in modals - the default experience requires no navigation wiring.
Category: Events & BookingComponent: BuilderBookingListRegistry key: booking-listTier: Free
Props

Navigation and header text

PropTypeDefaultDescription
detailScreenIdstring-Navigate to a full detail screen on card tap. Leave unset to use the inline modal.
chatScreenIdstring-Navigate to a standalone chat screen. Leave unset to use the inline chat modal.
headerTextstring’My Bookings’Heading shown at the top of the list.
emptyMessagestring’No bookings yet’Message shown when the booking list is empty.
Toggles & colours

Make it yours

Every colour and visibility toggle below is yours to change. The defaults are a neutral starting point - adjust them to match the brand without touching anything else.

PropDefaultWhat it controls
showImagetrueService image on each booking card.
showStatustrueStatus badge on each booking card.
showPricetruePrice shown on each booking card.
showDurationtrueDuration shown on each booking card.
showLocationtrueLocation shown on each booking card.
showMessagingtrueMessage icon on each booking card that opens the chat modal.
backgroundColor#F9FAFBScreen background colour.
cardBackgroundColor#FFFFFFIndividual booking card background.
titleColor#111827Booking title text colour.
metaColor#6B7280Date, duration, and location text colour.
priceColor#111827Price text colour.
statusTextColor#FFFFFFStatus badge label colour.
statusBadgeColor#007AFFStatus badge background colour.
borderColor#E5E7EBCard border colour.
borderRadius12Card corner radius.
headerTextColor#111827Screen header text colour.
Tips

Common mistakes to avoid

List is empty even though bookings exist

Completed and cancelled bookings are filtered out of displayItems by default. If past bookings were auto-completed on a previous mount, they will not appear. To show completed bookings, remove the status !== ‘completed’ check from the displayItems filter in BuilderBookingList.tsx.

Set this screen as bookingListScreenId in Booking Calendar

After a successful booking confirmation, Booking Calendar navigates to bookingListScreenId with the new bookingId in navigationParams. If that prop is not set, the user stays on the calendar screen with no feedback. Always wire the two screens together.

Chat polling stops when the modal closes

The 5-second message polling interval is cleared when the chat modal closes. If you extend the component and keep a reference to the chat open outside the modal, call closeChat() explicitly to stop the interval and avoid memory leaks.

Adding a new field to a booking card requires four changes

Add the field to the BookingItem interface, map it in the fetchBookingsFromBackend list map, map it again in the _prefetchedBookings hydration block, then render it inside renderBookingCard. Missing any one of these four steps will cause the field to show for live fetches but not prefetched data, or vice versa.