feat: always load fresh api data when starting to edit booking

This commit is contained in:
Björn Fromme
2026-03-16 12:02:28 +01:00
parent a23ff6d119
commit fba3becb06
5 changed files with 28 additions and 7 deletions
@@ -59,6 +59,22 @@ class IndexController extends AbstractController
) {
}
/**
* Entry point for editing a booking from the booking list.
*
* Clears any existing session data and API cache to ensure fresh data
* is loaded, then redirects to the main edit page.
*/
#[Route('/bookings/{id}/edit/start', name: 'app_booking_edit_start', requirements: ['id' => '\d+'])]
#[IsGranted('ROLE_USER')]
public function start(int $id, Request $request): Response
{
$this->bookingService->clearBookingDto($request, BookingDto::MODE_EDIT);
$this->dataLoader->invalidateBookingCache($id);
return $this->redirectToRoute('app_booking_edit', ['id' => $id]);
}
/**
* Display participant cards overview.
*/