From e58a880f3424d29e88d0c11c8a265db4a36ff73a Mon Sep 17 00:00:00 2001 From: Maurice Date: Mon, 9 Nov 2026 13:07:50 +0100 Subject: [PATCH] fix(mobile): the detail sheet reads its edit permission off the live booking, not the held one --- client/src/mobile/screens/trip/sheets/MTransportSheet.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/mobile/screens/trip/sheets/MTransportSheet.tsx b/client/src/mobile/screens/trip/sheets/MTransportSheet.tsx index 5bdadf4b8..e6c6f9abc 100644 --- a/client/src/mobile/screens/trip/sheets/MTransportSheet.tsx +++ b/client/src/mobile/screens/trip/sheets/MTransportSheet.tsx @@ -120,8 +120,9 @@ export default function MTransportSheet({ planner, shell }: MTripSheetsProps) { const meta = parseMetadata(res) // A transport is part of the day plan, a stay, a table or a ticket a booking: - // each is edited under its own permission, as in the tab it belongs to. - const canEdit = isTransportReservationType(res.type) ? canEditDays : canEditBookings + // each is edited under its own permission, as in the tab it belongs to. Read off + // the live booking, so a sheet on its way out offers nothing to edit. + const canEdit = liveRes != null && (isTransportReservationType(liveRes.type) ? canEditDays : canEditBookings) const ResIcon = RES_ICONS[res.type as keyof typeof RES_ICONS] || RES_ICONS.other const from = (res.endpoints || []).find(e => e.role === 'from')