wip: modernized edit flow, fix insurance tier calculation

This commit is contained in:
Björn Fromme
2025-10-09 17:42:39 +02:00
parent cba0f747cd
commit 67c642bc2f
31 changed files with 272 additions and 536 deletions
+6 -8
View File
@@ -15,9 +15,7 @@ use App\BusProNet\Model\PersonalData;
use App\BusProNet\Model\Travel;
use App\BusProNet\Traits\ApiClientTrait;
use App\BusProNet\XmlParser\ApiResponseParser;
use App\Form\Model\BookingCreateDto;
use App\Form\Model\BookingDto;
use App\Form\Model\BookingEditDto;
use App\Form\Model\RegistrationDto;
use League\Flysystem\FilesystemException;
use League\Flysystem\FilesystemOperator;
@@ -215,14 +213,14 @@ class ApiClient
* First phase of the two-phase booking process. Validates all booking data
* and returns pricing information without creating an actual booking.
*
* @param BookingCreateDto $bookingDto The booking creation form data
* @param bool $debug Enable debug mode (XML dumps)
* @param BookingDto $bookingDto The booking creation form data
* @param bool $debug Enable debug mode (XML dumps)
*
* @return Notification|BookingResponse Notification on error, BookingResponse on success
*
* @throws ApiClientException If the API request fails
*/
public function createBookingInquiry(BookingCreateDto $bookingDto, bool $debug = false): Notification|BookingResponse
public function createBookingInquiry(BookingDto $bookingDto, bool $debug = false): Notification|BookingResponse
{
$payload = $this->bookingDataProcessor->createBookingRequestPayload($bookingDto, 'Anfrage');
@@ -242,14 +240,14 @@ class ApiClient
* Second phase of the two-phase booking process. Creates the actual booking
* after successful inquiry validation.
*
* @param BookingCreateDto $bookingDto The booking creation form data
* @param bool $debug Enable debug mode (XML dumps)
* @param BookingDto $bookingDto The booking creation form data
* @param bool $debug Enable debug mode (XML dumps)
*
* @return Notification|BookingResponse Notification on error, BookingResponse with booking number on success
*
* @throws ApiClientException If the API request fails
*/
public function createBooking(BookingCreateDto $bookingDto, bool $debug = false): Notification|BookingResponse
public function createBooking(BookingDto $bookingDto, bool $debug = false): Notification|BookingResponse
{
$payload = $this->bookingDataProcessor->createBookingRequestPayload($bookingDto, 'Buchung');