fix: stop mutating booking state on edit-mode page views

This commit is contained in:
Björn Fromme
2026-08-24 17:13:19 +02:00
parent c9c28792e5
commit 578a21d327
2 changed files with 118 additions and 9 deletions
@@ -10,7 +10,6 @@ use App\Entity\User;
use App\Form\BookingParticipantType;
use App\Form\Model\BookingDto;
use App\Htmx\HxTrait;
use App\Service\ApplicantInsuranceCascade;
use App\Service\BookingConfigurator;
use App\Service\BookingEditContextFactory;
use App\Service\BookingEditDataLoader;
@@ -41,7 +40,6 @@ class ParticipantController extends AbstractController
private readonly BookingSessionManager $bookingSessionService,
private readonly ParticipantDataPrefiller $prepopulationService,
private readonly ParticipantFormSupport $participantFormSupportService,
private readonly ApplicantInsuranceCascade $applicantInsuranceCascade,
private readonly LoggerInterface $logger,
) {
}
@@ -87,7 +85,6 @@ class ParticipantController extends AbstractController
}
$this->editContextFactory->prepareBookingDto($bookingDto);
$this->applicantInsuranceCascade->apply($bookingDto);
$form = $this->createParticipantForm($bookingDto, $index);
@@ -159,7 +156,6 @@ class ParticipantController extends AbstractController
$form->handleRequest($request);
$this->bookingConfigurator->preselectDefaultServices($bookingDto);
$this->applicantInsuranceCascade->apply($bookingDto);
$this->bookingSessionService->saveBookingDto($request, $bookingDto, BookingDto::MODE_EDIT);
$form = $this->createForm(