feat: move scope of enforced 'option' status to full booking
addresses #869chtfeq
This commit is contained in:
@@ -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 ?? '',
|
||||
|
||||
Reference in New Issue
Block a user