fix: invalidate booking data caches after updating personal data

This commit is contained in:
Björn Fromme
2026-03-16 12:01:09 +01:00
parent 8887b06583
commit e5781fbabc
7 changed files with 62 additions and 46 deletions
@@ -94,7 +94,7 @@ class IndexController extends AbstractController
}
// Fetch booking data for display (surcharges, canceled status, etc.)
$bookingData = $this->dataLoader->fetchBookingData($email, $password, $id);
$bookingData = $this->dataLoader->fetchBookingData($email, $password, $id, $user);
if (null === $bookingData || $bookingData instanceof Notification) {
$this->addFlash('error', 'Buchungsdaten nicht (mehr) verfügbar');
@@ -166,7 +166,7 @@ class IndexController extends AbstractController
}
// Fetch booking data to check for canceled status
$bookingData = $this->dataLoader->fetchBookingData($email, $password, $id);
$bookingData = $this->dataLoader->fetchBookingData($email, $password, $id, $user);
if (null === $bookingData || $bookingData instanceof Notification) {
$this->addFlash('error', 'Buchungsdaten nicht (mehr) verfügbar');
@@ -269,7 +269,7 @@ class IndexController extends AbstractController
$this->travelDataService->enrichWithFreshAvailabilities($bookingDto->travel);
// Fetch booking data and mutable data
$bookingData = $this->dataLoader->fetchBookingData($email, $password, $id);
$bookingData = $this->dataLoader->fetchBookingData($email, $password, $id, $user);
$mutableData = null !== $bookingData && !($bookingData instanceof Notification)
? $this->travelDataService->getMutabilityData($bookingData->dateId)
: null;