fix: resolve stale dependent selections after booking family insurance

This commit is contained in:
Björn Fromme committed 2026-08-24 16:58:09 +02:00
1 parent 35826088cb
commit c9c28792e5
11 files changed
+490 -173

No files matched your search

@@ -7,6 +7,7 @@ namespace App\Controller\Booking\Create;
use App\Form\BookingParticipantType;
use App\Form\Model\BookingDto;
use App\Htmx\HxTrait;
use App\Service\ApplicantInsuranceCascade;
use App\Service\BookingConfigurator;
use App\Service\BookingCreateContextFactory;
use App\Service\BookingSessionManager;
@@ -34,6 +35,7 @@ class Step2ParticipantController extends AbstractController
private readonly TravelDataProvider $travelDataService,
private readonly ParticipantDataPrefiller $prepopulationService,
private readonly ParticipantFormSupport $participantFormSupportService,
private readonly ApplicantInsuranceCascade $applicantInsuranceCascade,
) {
}
@@ -70,6 +72,7 @@ class Step2ParticipantController extends AbstractController
$this->prepopulationService->fillDummyParticipant($bookingDto->participants[$index], $index);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->applicantInsuranceCascade->apply($bookingDto);
$this->bookingService->applyCreateBookingStatusRules($bookingDto);
$this->bookingSessionService->saveBookingDto($request, $bookingDto, BookingDto::MODE_CREATE);
@@ -80,6 +83,7 @@ class Step2ParticipantController extends AbstractController
if (true === $isSubmitted) {
$this->bookingService->preselectDefaultServices($bookingDto);
$this->applicantInsuranceCascade->apply($bookingDto);
$this->bookingService->applyCreateBookingStatusRules($bookingDto);
}
@@ -195,6 +199,7 @@ class Step2ParticipantController extends AbstractController
$form->handleRequest($request);
$this->bookingService->preselectDefaultServices($bookingDto);
$this->applicantInsuranceCascade->apply($bookingDto);
if (BookingDto::MODE_CREATE === $bookingDto->getMode()) {
$this->bookingService->applyCreateBookingStatusRules($bookingDto);
}