feat: extensible participant status determination for booking creation
Adds a rule-based system to determine participant status in CREATE payloads. Participants selecting a 'Begleitperson' service now receive status 'O' (Option), all others default to 'F' (Final). - Add ParticipantStatusRuleInterface for defining status rules - Add ParticipantStatusRuleRegistry for priority-based rule evaluation - Add ChaperonServiceStatusRule for Begleitperson detection - Integrate status evaluation into BookingPayloadBuilder
This commit is contained in:
@@ -18,6 +18,7 @@ use App\BusProNet\Model\Pickup;
|
||||
use App\BusProNet\Model\Room;
|
||||
use App\BusProNet\Model\Service;
|
||||
use App\BusProNet\Model\Travel;
|
||||
use App\BusProNet\Service\ParticipantStatusRuleRegistry;
|
||||
use App\Form\Model\BookingDto;
|
||||
use App\Form\Model\ParticipantDto;
|
||||
use App\Service\BookingPriceCalculatorService;
|
||||
@@ -52,7 +53,8 @@ class BookingDataProcessorTest extends TestCase
|
||||
// Create the new dependencies
|
||||
$mappingCollector = new ServiceMappingCollector();
|
||||
$serviceProcessor = new ParticipantServiceProcessor(new NullLogger());
|
||||
$payloadBuilder = new BookingPayloadBuilder($mappingCollector);
|
||||
$statusRuleRegistry = new ParticipantStatusRuleRegistry([]);
|
||||
$payloadBuilder = new BookingPayloadBuilder($mappingCollector, $statusRuleRegistry);
|
||||
$personalDataSynchronizer = new PersonalDataSynchronizer();
|
||||
|
||||
$this->processor = new BookingDataProcessor(
|
||||
|
||||
Reference in New Issue
Block a user