wip: refactor forms

This commit is contained in:
Björn Fromme
2025-07-23 17:15:39 +02:00
parent f225dac5fe
commit 4ce731bfcb
5 changed files with 54 additions and 29 deletions
@@ -18,9 +18,6 @@ trait BookingCreateTrait
{
/**
* Validates step access and redirects if necessary.
*
* @param BookingCreateDto $bookingCreateDto
* @param int $expectedStep
*/
private function validateStepAccess(BookingCreateDto $bookingCreateDto, int $expectedStep): void
{
@@ -34,8 +31,6 @@ trait BookingCreateTrait
/**
* Redirects to the current step based on the DTO's currentStep.
*
* @param BookingCreateDto $bookingCreateDto
*/
private function redirectToCurrentStep(BookingCreateDto $bookingCreateDto): RedirectResponse
{
@@ -53,4 +48,4 @@ trait BookingCreateTrait
return $this->redirectToRoute($route, $routeParams);
}
}
}
@@ -27,7 +27,8 @@ class CreateStep2Controller extends AbstractController
public function __construct(
private readonly BookingService $bookingService,
) {
)
{
}
/**
@@ -89,6 +90,7 @@ class CreateStep2Controller extends AbstractController
]);
$form->handleRequest($request);
$this->bookingService->saveBookingCreateDto($request, $bookingCreateDto);
$roomAssignmentCounts = $this->bookingService->getRoomAssignmentCounts($bookingCreateDto);