mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-19 13:36:48 +00:00
70f4f7cef3
Saving an imported booking in the desktop booking dialog when the dialog had no upload handler but the import carried source files rejected the save: the files were handed to the missing handler, the promise rejected with nothing to catch it, and the expense editor the user asked for never opened. The transport dialog already skipped the upload in that case, the booking dialog did not. The shared uploadBookingFiles helper now takes an optional handler and does nothing without one, so every form gets the same guard. Red test: FE-PLANNER-RESMODAL-106 in client/src/components/Planner/ReservationModal.test.tsx failed with "expected spy to be called with arguments" for onOpenExpense, plus the unhandled rejection "TypeError: upload is not a function". The helper case is covered by FE-PLANNER-BOOKINGFORM-008. No existing assertions changed.