diff --git a/client/src/components/Planner/DayPlanSidebar.tsx b/client/src/components/Planner/DayPlanSidebar.tsx index 7c44f091..967cbfcc 100644 --- a/client/src/components/Planner/DayPlanSidebar.tsx +++ b/client/src/components/Planner/DayPlanSidebar.tsx @@ -398,7 +398,7 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar({ const getTransportForDay = (dayId: number) => { const dayAssignmentIds = (assignments[String(dayId)] || []).map(a => a.id) return reservations.filter(r => { - if (r.type === 'hotel') return false + if (!TRANSPORT_TYPES.has(r.type)) return false if (r.assignment_id && dayAssignmentIds.includes(r.assignment_id)) return false const startDayId = r.day_id @@ -1726,7 +1726,11 @@ const DayPlanSidebar = React.memo(function DayPlanSidebar({ return (
canEditDays && onEditTransport?.(res)} + onClick={() => { + if (!canEditDays) return + if (TRANSPORT_TYPES.has(res.type)) onEditTransport?.(res) + else onEditReservation?.(res) + }} onDragOver={e => { e.preventDefault(); e.stopPropagation() const rect = e.currentTarget.getBoundingClientRect()