wip: booking process, refactor participant room assignment logic

This commit is contained in:
Björn Fromme committed 2025-07-18 16:43:02 +02:00
1 parent b4db0cb8f2
commit b3c633dccb
2 files changed
+6 -11

No files matched your search

+4 -8
View File
@@ -22,16 +22,12 @@ class BookingCreateStep2Type extends AbstractType
public function onPreSetData(FormEvent $event): void
{
/** @var BookingCreateDto $bookingCreateDto */
$bookingCreateDto = $event->getData();
/** @var BookingCreateDto $data */
$data = $event->getData();
$form = $event->getForm();
if (null === $bookingCreateDto) {
return;
}
$adapter = new ParticipantDataAdapter($bookingCreateDto->participants);
$roomChoices = $this->generateRoomChoices($adapter, $bookingCreateDto->getSelectedRooms());
$adapter = new ParticipantDataAdapter($data->participants);
$roomChoices = $this->generateRoomChoices($adapter, $data->getSelectedRooms());
$this->addParticipantsField($form, $roomChoices);
}