feat: improved mutability checks for personal data in edit or create mode
This commit is contained in:
@@ -106,6 +106,26 @@ class IndexController extends AbstractController
|
||||
return $agency->id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels the active booking session and returns to the login page.
|
||||
*
|
||||
* This endpoint allows users to exit the booking flow at any time by
|
||||
* clearing the booking session data and redirecting them back to the
|
||||
* regular login screen.
|
||||
*/
|
||||
#[Route('/bookings/cancel', name: 'app_booking_cancel')]
|
||||
public function cancel(Request $request): Response
|
||||
{
|
||||
// Clear the booking session
|
||||
$this->bookingService->clearBookingSession($request);
|
||||
|
||||
// Add a flash message to inform the user
|
||||
$this->addFlash('info', 'Buchung abgebrochen.');
|
||||
|
||||
// Redirect to login page
|
||||
return $this->redirectToRoute('app_login');
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays user-friendly error messages for booking initialization failures.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user