wip: insurance booking in edit flow

This commit is contained in:
Björn Fromme
2025-10-07 18:09:16 +02:00
parent 7304fb50c6
commit c3008d7f7a
10 changed files with 1215 additions and 0 deletions
@@ -16,6 +16,7 @@ class BookingParser extends AbstractParser
private readonly RoomsParser $roomsParser;
private readonly PickupsParser $pickupsParser;
private readonly SurchargesParser $surchargesParser;
private readonly BookingInsurancesParser $insurancesParser;
public function __construct()
{
@@ -23,6 +24,7 @@ class BookingParser extends AbstractParser
$this->roomsParser = new RoomsParser();
$this->pickupsParser = new PickupsParser();
$this->surchargesParser = new SurchargesParser();
$this->insurancesParser = new BookingInsurancesParser();
}
public function parse(Crawler $node): Booking
@@ -101,6 +103,11 @@ class BookingParser extends AbstractParser
$booking->surcharges = $this->surchargesParser->parse($surchargesData);
}
$insurancesData = $node->filterXPath('//versicherungen/versicherung');
if (0 < $insurancesData->count()) {
$booking->insurances = $this->insurancesParser->parse($insurancesData);
}
return $booking;
}