feat: cleanup, log successful bookings
This commit is contained in:
@@ -110,8 +110,6 @@ class Step1Controller extends AbstractController
|
|||||||
]);
|
]);
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
$this->bookingService->saveBookingDto($request, $bookingCreateDto, BookingDto::MODE_CREATE);
|
|
||||||
|
|
||||||
// Get complete summary data (pricing, rooms, CMS data)
|
// Get complete summary data (pricing, rooms, CMS data)
|
||||||
$summaryData = $this->summaryDataService->getSummaryData($bookingCreateDto);
|
$summaryData = $this->summaryDataService->getSummaryData($bookingCreateDto);
|
||||||
$availableRooms = $bookingCreateDto->travel->getAvailableRooms();
|
$availableRooms = $bookingCreateDto->travel->getAvailableRooms();
|
||||||
|
|||||||
@@ -192,8 +192,6 @@ class Step3Controller extends AbstractController
|
|||||||
]);
|
]);
|
||||||
$form->handleRequest($request);
|
$form->handleRequest($request);
|
||||||
|
|
||||||
$this->bookingService->saveBookingDto($request, $bookingCreateDto, BookingDto::MODE_CREATE);
|
|
||||||
|
|
||||||
return $this->renderStepForm($bookingCreateDto, $form);
|
return $this->renderStepForm($bookingCreateDto, $form);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,12 @@ class Step4Controller extends AbstractController
|
|||||||
$this->clearTravelDataCache($bookingCreateDto);
|
$this->clearTravelDataCache($bookingCreateDto);
|
||||||
$this->bookingService->clearBookingDto($request, BookingDto::MODE_CREATE);
|
$this->bookingService->clearBookingDto($request, BookingDto::MODE_CREATE);
|
||||||
|
|
||||||
|
$this->logger->info('Booking successfully created.', [
|
||||||
|
'date_id' => $bookingCreateDto->travel->id,
|
||||||
|
'hotel_id' => $bookingCreateDto->hotelId,
|
||||||
|
'booking_number' => $bookingResponse->transactionNumber,
|
||||||
|
]);
|
||||||
|
|
||||||
return $this->redirectToRoute('app_booking_create_success');
|
return $this->redirectToRoute('app_booking_create_success');
|
||||||
} catch (TimeoutException $e) {
|
} catch (TimeoutException $e) {
|
||||||
return $this->handleApiError(
|
return $this->handleApiError(
|
||||||
@@ -156,10 +162,5 @@ class Step4Controller extends AbstractController
|
|||||||
// Clear travel data cache (both local and remote variants)
|
// Clear travel data cache (both local and remote variants)
|
||||||
$this->cache->delete(sprintf('travel_unified_%d_%d_local', $dateId, $hotelId));
|
$this->cache->delete(sprintf('travel_unified_%d_%d_local', $dateId, $hotelId));
|
||||||
$this->cache->delete(sprintf('travel_unified_%d_%d_remote', $dateId, $hotelId));
|
$this->cache->delete(sprintf('travel_unified_%d_%d_remote', $dateId, $hotelId));
|
||||||
|
|
||||||
$this->logger->info('Cleared travel data cache after successful booking', [
|
|
||||||
'dateId' => $dateId,
|
|
||||||
'hotelId' => $hotelId,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user