feat: move scope of enforced 'option' status to full booking

addresses #869chtfeq
This commit is contained in:
Björn Fromme
2026-03-19 16:15:07 +01:00
parent 45d05786da
commit df8566e1b5
19 changed files with 388 additions and 329 deletions
@@ -6,7 +6,6 @@ namespace App\BusProNet\DataProcessor;
use App\BusProNet\Constants;
use App\BusProNet\Model\Booking;
use App\BusProNet\Service\ParticipantStatusRuleRegistry;
use App\Form\Model\BookingDto;
/**
@@ -17,9 +16,10 @@ use App\Form\Model\BookingDto;
*/
class BookingPayloadBuilder
{
private const DEFAULT_PARTICIPANT_STATUS = 'F';
public function __construct(
private readonly ServiceMappingCollector $mappingCollector,
private readonly ParticipantStatusRuleRegistry $statusRuleRegistry,
) {
}
@@ -302,7 +302,7 @@ class BookingPayloadBuilder
foreach ($bookingDto->participants as $index => $participant) {
$participantData = [
'@id' => $index + 1,
'status' => $this->statusRuleRegistry->evaluateStatus($participant),
'status' => self::DEFAULT_PARTICIPANT_STATUS,
'name' => $participant->lastName,
'vorname' => $participant->firstName,
'geschlecht' => $participant->gender ?? '',