fix: reconcile assigned family insurance rate on updated participant

This commit is contained in:
Björn Fromme
2026-08-05 15:11:48 +02:00
parent 8a46908856
commit 0b642dcfe4
11 changed files with 723 additions and 8 deletions
@@ -19,6 +19,7 @@ use App\Service\BookingCreateContextFactory;
use App\Service\BookingPriceCalculator;
use App\Service\BookingPriceMismatchAnalyzer;
use App\Service\BookingSessionManager;
use App\Service\ParticipantFormSupport;
use App\Service\RoomPricingCalculator;
use Psr\Log\LoggerInterface;
use Symfony\Component\Form\FormInterface;
@@ -40,6 +41,7 @@ class Step3Controller extends AbstractBookingCreateController
private readonly BookingPriceCalculator $priceCalculator,
private readonly BookingPriceMismatchAnalyzer $priceMismatchDiagnostics,
private readonly ApiClient $apiClient,
private readonly ParticipantFormSupport $participantFormSupportService,
private readonly LoggerInterface $logger,
) {
}
@@ -76,6 +78,12 @@ class Step3Controller extends AbstractBookingCreateController
// Validate booking data with API by submitting an inquiry booking
$inquiryResponse = $this->apiClient->createBookingInquiry($bookingCreateDto);
// Surface any insurance corrections made during payload building (e.g. a
// stale price tier reassigned/cleared right before submission)
foreach ($this->participantFormSupportService->collectAndClearNotifications($bookingCreateDto) as $notification) {
$this->addFlash($notification['type'], $notification['message']);
}
if ($inquiryResponse instanceof Notification) {
$this->handleApiError(
$this->logger,