feat: increase availability cache ttl and ensure fresh data when entering form
This commit is contained in:
@@ -132,8 +132,9 @@ class Step2Controller extends AbstractController
|
||||
throw $this->createNotFoundException(sprintf('Participant at index %d does not exist', $index));
|
||||
}
|
||||
|
||||
// Enrich with fresh availability data
|
||||
$this->travelDataService->enrichWithFreshAvailabilities($bookingDto->travel);
|
||||
// Fetch fresh availabilities when entering participant form
|
||||
// This ensures up-to-date data and populates cache for subsequent HTMX refreshes
|
||||
$this->travelDataService->enrichWithFreshAvailabilities($bookingDto->travel, cached: false);
|
||||
|
||||
// Create form with booking_context option
|
||||
$form = $this->createParticipantForm($bookingDto, $index);
|
||||
|
||||
@@ -169,6 +169,10 @@ class IndexController extends AbstractController
|
||||
return $this->redirectToRoute('app_booking_edit', ['id' => $id]);
|
||||
}
|
||||
|
||||
// Fetch fresh availabilities when entering participant form
|
||||
// This ensures up-to-date data and populates cache for subsequent HTMX refreshes
|
||||
$this->travelDataService->enrichWithFreshAvailabilities($bookingDto->travel, cached: false);
|
||||
|
||||
// Create wrapper DTO for email uniqueness validation
|
||||
$wrapper = new ParticipantEditDto(
|
||||
participant: $participant,
|
||||
|
||||
Reference in New Issue
Block a user