feat: accommodation booking type and status as dedicated properties

This commit is contained in:
Björn Fromme committed 2026-08-06 08:52:09 +02:00
1 parent 2cfa87f44b
commit aa8fa5c1b2
22 files changed
+218 -151

No files matched your search

@@ -127,9 +127,9 @@ class EditController extends AbstractController
$this->entityManager->persist($booking);
$this->entityManager->flush();
// Entering Anfrage or Buchung is what the customer needs to hear about: the offer
// Entering Offen or Bestätigt is what the customer needs to hear about: the offer
// becomes viewable, or the booking is confirmed. Entwurf and Absage stay silent.
$notifiableStatuses = [AccommodationBookingStatus::Inquiry, AccommodationBookingStatus::Booking];
$notifiableStatuses = [AccommodationBookingStatus::Open, AccommodationBookingStatus::Accepted];
if ($previousStatus !== $booking->getStatus() && in_array($booking->getStatus(), $notifiableStatuses, true)) {
$this->bookingService->issueAccessLink($booking);
$this->bookingService->sendCustomerConfirmationEmail($booking);
+1 -1
View File
@@ -93,7 +93,7 @@ class OfferController extends AbstractController
return $this->redirectToOfferPage($request, $uuid);
}
if (!$booking->isInquiry()) {
if (!$booking->isInquiry() || !$booking->isOpen()) {
return $this->redirectToOfferPage($request, $uuid);
}
+1 -1
View File
@@ -153,7 +153,7 @@ class Step4Controller extends AbstractAccommodationController
{
$prices = $this->bookingService->loadPrices($dto, $accommodation);
$booking = $this->bookingService->finalizeBooking($dto, $accommodation, $prices, $services);
$this->addFlash('groups_booking_result', $booking->getStatus()->value);
$this->addFlash('groups_booking_result', $booking->getType()->value);
$this->sessionManager->clear($request);
}
}