feat: offer non-travelling applicant choice only on selected travels

This commit is contained in:
fromme committed 2026-10-19 09:18:22 +02:00
1 parent 5b75938c73
commit b958d1a371
9 files changed
+320 -26

No files matched your search

+15
View File
@@ -20,6 +20,12 @@ use Symfony\Component\Serializer\Normalizer\DateTimeNormalizer;
class Travel
{
use SortByPriceTrait;
/**
* CRM selection that offers the "I am not travelling myself" choice on a travel date.
*/
private const NON_TRAVELLING_APPLICANT_SELECTION_ID = 1488;
#[Groups(['api:list', 'api:single', 'snapshot'])]
public ?int $id = null;
@@ -240,6 +246,15 @@ class Travel
return false;
}
/**
* Whether a booking for this travel date may be placed by an applicant who does not travel
* along, such as a parent booking for their children.
*/
public function allowsNonTravellingApplicant(): bool
{
return $this->hasSelectionId(self::NON_TRAVELLING_APPLICANT_SELECTION_ID);
}
/**
* Retrieves rooms filtered by their IDs.
*