feat: prefer discounted transportation services

addresses #869axbjbz
This commit is contained in:
Björn Fromme
2025-10-22 15:53:54 +02:00
parent 7ab60b1048
commit 1949bf9b97
4 changed files with 261 additions and 3 deletions
+6 -2
View File
@@ -48,7 +48,7 @@ class Travel
/**
* Travel booking status from BusProNet API.
* Possible values: 'Frei', 'Anfrage', 'Buchungsstop'
* Possible values: 'Frei', 'Anfrage', 'Buchungsstop'.
*/
#[Groups(['api:single'])]
public ?string $status = null;
@@ -153,8 +153,12 @@ class Travel
* Filters transportation services based on travel direction and optionally
* by availability. Services are sorted by subtype.
*
* Note: PKW/CAR filtering based on booking context is NOT applied here.
* That filtering happens dynamically in ParticipantFieldOptionsProvider using
* per-booking availability calculations from ServiceAvailabilityCalculator.
*
* @param string $direction The travel direction to filter by
* @param bool $filterAvailable Whether to include only available services
* @param bool $filterAvailable Whether to include only available services (API availability)
*
* @return array<int, Service> The filtered and sorted transportation services
*/