feat: indicate family insurance eligibility

This commit is contained in:
Björn Fromme
2026-08-05 15:11:58 +02:00
parent 0b642dcfe4
commit 2cfa87f44b
12 changed files with 327 additions and 234 deletions
@@ -92,7 +92,9 @@ class Step2ParticipantController extends AbstractController
return $this->redirectToRoute('app_booking_create_step_2');
}
return $this->renderParticipantForm($form, $index, $bookingDto);
// Notifications were already cleared from the DTO above, so they have to be handed
// to the render path too - otherwise every invalid submission silently swallows them
return $this->renderParticipantForm($form, $index, $bookingDto, $notifications);
}
/**
@@ -124,17 +126,25 @@ class Step2ParticipantController extends AbstractController
);
}
/** @param FormInterface<mixed> $form */
/**
* @param FormInterface<mixed> $form
* @param array<array{type: string, message: string}> $notifications
*/
private function renderParticipantForm(
FormInterface $form,
int $index,
BookingDto $bookingDto,
array $notifications = [],
): Response {
$bookingCreateContext = $this->createContextFactory->create(
$bookingDto,
RoomPricingCalculator::PRICING_MODE_SELECTION
);
// The rendered template includes _partials/_flashes.html.twig, so flashes added here
// are consumed by this very response instead of leaking into the next page
$this->addNotificationsAsFlashMessages($notifications);
return $this->render('booking/create/step_2_participant.html.twig', [
'form' => $form,
'participantIndex' => $index,