feat: extract booking participant count service
This commit is contained in:
@@ -9,6 +9,7 @@ use App\Controller\Booking\Traits\BookingExceptionHandlerTrait;
|
||||
use App\Form\BookingCreateStep2Type;
|
||||
use App\Form\Model\BookingDto;
|
||||
use App\Service\BookingService;
|
||||
use App\Service\BookingParticipantCountService;
|
||||
use App\Service\BookingSessionService;
|
||||
use App\Service\BookingSummaryDataService;
|
||||
use App\Service\ParticipantCardDataService;
|
||||
@@ -33,6 +34,7 @@ class Step2Controller extends AbstractController
|
||||
|
||||
public function __construct(
|
||||
private readonly BookingService $bookingService,
|
||||
private readonly BookingParticipantCountService $participantCountService,
|
||||
private readonly BookingSessionService $bookingSessionService,
|
||||
private readonly BookingSummaryDataService $summaryDataService,
|
||||
private readonly TravelDataService $travelDataService,
|
||||
@@ -64,7 +66,7 @@ class Step2Controller extends AbstractController
|
||||
$this->travelDataService->enrichWithFreshAvailabilities($bookingCreateDto->travel);
|
||||
|
||||
// Ensure correct number of participants with prepopulation callback
|
||||
$this->bookingService->ensureCorrectNumberOfParticipants(
|
||||
$this->participantCountService->ensureCorrectNumberOfParticipants(
|
||||
$bookingCreateDto,
|
||||
$this->getUser(),
|
||||
fn ($user, $participant) => $this->prepopulationService->prepopulateApplicantFromUser($user, $participant)
|
||||
|
||||
Reference in New Issue
Block a user