From 743397994e8df6f4c9818c5aca91ba204c053b67 Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 26 Jun 2026 09:56:22 +0200 Subject: [PATCH] fix(import): refresh costs after a booking review so imported expenses appear without a reload Imported bookings auto-create their linked budget items server-side, but the saving client suppresses its own budget:created echo, so the Costs list stayed stale until a manual reload. Reload the budget items when the review session ends. --- client/src/pages/tripPlanner/useTripPlanner.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/pages/tripPlanner/useTripPlanner.ts b/client/src/pages/tripPlanner/useTripPlanner.ts index 686e2d5e..ac0625ad 100644 --- a/client/src/pages/tripPlanner/useTripPlanner.ts +++ b/client/src/pages/tripPlanner/useTripPlanner.ts @@ -716,6 +716,10 @@ export function useTripPlanner() { setShowReservationModal(false); setEditingReservation(null); setReservationPrefill(null) setShowTransportModal(false); setEditingTransport(null); setTransportPrefill(null); setTransportModalDayId(null) accommodationsApi.list(tripId).then(d => setTripAccommodations(d.accommodations || [])).catch(() => {}) + // Imported bookings auto-create their linked costs server-side, but the saving client + // suppresses its own budget:created echo (X-Socket-Id) — so reload the budget items here + // to surface those expenses without a manual page refresh. + tripActions.loadBudgetItems?.(tripId) } const selectedPlace = selectedPlaceId ? places.find(p => p.id === selectedPlaceId) : null