mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-21 14:21:46 +00:00
fix(plan): show tour and non-hotel bookings under their assigned day
getTransportForDay was rejecting any reservation type not in TRANSPORT_TYPES (flight/train/bus/car/cruise), silently dropping tours, restaurants, events, and other bookings before day_id matching ran. The server already resolves day_id from reservation_time for all non-hotel types (added in reservationService). The merged-item renderer already handles non-transport types via RES_ICONS and onEditReservation — only the filter was wrong. Also broaden DayDetailPanel's per-day reservation filter to match by day_id in addition to assignment_id, so tours appear in the day-detail popup too. Fixes #1008
This commit is contained in:
@@ -55,7 +55,7 @@ export function getTransportForDay(opts: {
|
||||
const thisDayOrder = getDayOrder(dayId)
|
||||
|
||||
return reservations.filter(r => {
|
||||
if (!TRANSPORT_TYPES.has(r.type)) return false
|
||||
if (r.type === 'hotel') return false
|
||||
if (r.assignment_id && dayAssignmentIds.includes(r.assignment_id)) return false
|
||||
|
||||
const startDayId = r.day_id
|
||||
|
||||
Reference in New Issue
Block a user