feat: refactored accommodation booking status model
This commit is contained in:
@@ -94,7 +94,9 @@ class OfferController extends AbstractController
|
||||
return $this->redirectToOfferPage($request, $uuid);
|
||||
}
|
||||
|
||||
if (!$booking->isInquiry() || !$booking->isOpen()) {
|
||||
// Offen is the one status that means an offer is out and awaiting acceptance, so it
|
||||
// is the whole guard — mirroring acceptBooking(), which no-ops on anything else.
|
||||
if (!$booking->isOpen()) {
|
||||
return $this->redirectToOfferPage($request, $uuid);
|
||||
}
|
||||
|
||||
@@ -120,12 +122,13 @@ class OfferController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* A draft is not ready to be shown, and a discarded booking must not be viewable
|
||||
* any more — in both cases the link behaves as if it had expired.
|
||||
* A draft and an inquiry the office has not worked through yet are not ready to be
|
||||
* shown, and a discarded booking must not be viewable any more — in all three cases
|
||||
* the link behaves as if it had expired.
|
||||
*/
|
||||
private function isCustomerVisible(AccommodationBooking $booking): bool
|
||||
{
|
||||
return !$booking->isDraft() && !$booking->isDiscarded();
|
||||
return !$booking->isDraft() && !$booking->isRequested() && !$booking->isDiscarded();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user