wip: modernized edit flow

This commit is contained in:
Björn Fromme
2025-10-08 21:09:53 +02:00
parent c3008d7f7a
commit cba0f747cd
75 changed files with 1662 additions and 747 deletions
@@ -6,7 +6,7 @@ namespace App\Form\Service;
use App\BusProNet\Constants;
use App\BusProNet\Model\Service;
use App\Form\Model\BookingDtoInterface;
use App\Form\Model\BookingDto;
use App\Form\Service\Abstract\AbstractParticipantFieldHandler;
/**
@@ -74,10 +74,10 @@ class ParticipantRentalInsuranceFieldHandler extends AbstractParticipantFieldHan
* is no longer appropriate for the participant's age, it is automatically cleared.
*
* @param array<string, mixed> $submittedData The submitted participant form data
* @param BookingDtoInterface $bookingDto The booking DTO to update (create or edit)
* @param BookingDto $bookingDto The booking DTO to update (create or edit)
* @param int $participantIndex The index of the participant being processed
*/
public function processField(array $submittedData, BookingDtoInterface $bookingDto, int $participantIndex): void
public function processField(array $submittedData, BookingDto $bookingDto, int $participantIndex): void
{
// Safely get the participant object, returning early if not found
$participant = $this->getParticipant($bookingDto, $participantIndex);
@@ -118,11 +118,11 @@ class ParticipantRentalInsuranceFieldHandler extends AbstractParticipantFieldHan
* Gets the first (and typically only) rental insurance service.
* Returns null if no rental insurance services are available.
*
* @param BookingDtoInterface $bookingDto The booking DTO containing travel data
* @param BookingDto $bookingDto The booking DTO containing travel data
*
* @return Service|null The rental insurance service object, or null if not found
*/
private function findRentalInsuranceService(BookingDtoInterface $bookingDto): ?Service
private function findRentalInsuranceService(BookingDto $bookingDto): ?Service
{
$rentalInsuranceServices = $bookingDto->travel->getAdditionalServicesBySubTypes(Constants::TOKEN_RENTAL_INSURANCE, true, true);