feat: always load fresh api data when starting to edit booking
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user