wip: refactor forms
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user