wip: insurance booking in edit flow

This commit is contained in:
Björn Fromme committed 2025-10-07 18:09:16 +02:00
1 parent 7304fb50c6
commit c3008d7f7a
10 files changed
+1215

No files matched your search

@@ -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;
}