feat: move scope of enforced 'option' status to full booking
addresses #869chtfeq
This commit is contained in:
1 parent
45d05786da
commit
df8566e1b5
19 files changed
+388
-329
No files matched your search
@@ -4,7 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Controller\Booking\Create;
|
||||
|
||||
use App\BusProNet\Constants;
|
||||
use App\Controller\Booking\Traits\BookingCreateTrait;
|
||||
use App\Controller\Booking\Traits\BookingExceptionHandlerTrait;
|
||||
use App\Controller\Booking\Traits\ParticipantCardFlowTrait;
|
||||
@@ -86,6 +85,7 @@ class Step2Controller extends AbstractController
|
||||
|
||||
// Preselect mandatory services
|
||||
$this->bookingService->preselectDefaultServices($bookingCreateDto);
|
||||
$this->bookingService->applyCreateBookingStatusRules($bookingCreateDto);
|
||||
|
||||
// Save BookingDto to session
|
||||
$this->bookingService->saveBookingDto($request, $bookingCreateDto, BookingDto::MODE_CREATE);
|
||||
@@ -162,8 +162,7 @@ class Step2Controller extends AbstractController
|
||||
// Keep behavior consistent with cards view: newly filled participant data
|
||||
// (especially dateOfBirth) must immediately trigger mandatory service preselection.
|
||||
$this->bookingService->preselectDefaultServices($bookingDto);
|
||||
|
||||
$bookingDto->bookingStatus = Constants::BOOKING_STATUS_OPEN;
|
||||
$this->bookingService->applyCreateBookingStatusRules($bookingDto);
|
||||
$this->bookingService->saveBookingDto($request, $bookingDto, BookingDto::MODE_CREATE);
|
||||
|
||||
// Recreate form with filled DTO so the view shows the dummy data
|
||||
@@ -176,6 +175,7 @@ class Step2Controller extends AbstractController
|
||||
// Re-run default preselection after participant form input changes (e.g. DOB).
|
||||
// This ensures auto-book defaults are applied as soon as eligibility becomes known.
|
||||
$this->bookingService->preselectDefaultServices($bookingDto);
|
||||
$this->bookingService->applyCreateBookingStatusRules($bookingDto);
|
||||
}
|
||||
|
||||
// Collect notifications from field handlers (run during PRE_SUBMIT)
|
||||
|
||||
Reference in new issue
Block a user