Trips to Deliver
Trips to Deliver is a supplier-facing Filament resource that surfaces the bookings a supplier needs to deliver. It is backed by the Booking model but exposes only the operational information a supplier cares about — passengers, hotels, activities, transfers, pick-up details — and explicitly hides pricing, payment status, sales attribution, and the rest of the checkout funnel.
Volare staff continue to use the full BookingResource at /admin/bookings. Suppliers do not get access to that resource.
Who Can Use It
Section titled “Who Can Use It”Only supplier-managers (User::isSupplierManager()). Navigation, list, and view are all gated through that check; create / edit / delete are disabled at the resource level.
Scoping
Section titled “Scoping”Two filters are applied in getEloquentQuery() (and reused for route binding in getRecordRouteBindingEloquentQuery()):
- Supplier scoping —
whereHas('offer.supplierTourRate.tour.suppliers', ...)restricted to the manager’ssupplier_id. A multi-supplier tour is visible to all attached suppliers. - Status filter — only post-payment, committed statuses are visible:
PendingFlightBookingFlightBookingInProgressFlightBookingFailedFlightsConfirmedPendingLandConfirmationConfirmedAwaitingBalanceFullyPaidCompleted
Bookings still in Draft, Checkout, PendingPayment, PaymentProcessing, and the terminal negative outcomes (Cancelled, Expired) are hidden — suppliers only see trips a customer has actually paid for and committed to.
Default list sort is booked_at desc.
Source: backend/app/Filament/Resources/TripsToDeliver/TripToDeliverResource.php
What the Infolist Shows
Section titled “What the Infolist Shows”The view page renders an infolist with the trip’s services pulled from the offer’s tour itinerary (hotels, activities, transfers), arrival pickup info, contract link, allotment, and a “Stop sale” badge derived from Offer::isStopped() against any active stop sale on the tour.
Flight info source of truth: flight times and routes are read from the offer’s bound DynamicFlightCache (via Offer::offerFlights → flightCache → segments), not from Booking::flight_selection. The cache binding is the canonical state of what was actually booked; flight_selection may be stale or incomplete.
Source: backend/app/Filament/Resources/TripsToDeliver/Schemas/TripToDeliverInfolist.php
Entry Points
Section titled “Entry Points”- Sidebar — “Suppliers” group, “Trips to Deliver” (
/admin/trips-to-deliver) - Email CTA — the
BookingSubmittedToSupplierNotification“Open trip” action links directly to the resource’s view page - Filament bell — the database notification’s “Open trip” action does the same
See Notifications — Booking Submitted.