wip: booking process, refactor participant room assignment logic
This commit is contained in:
@@ -49,7 +49,7 @@ class BookingParser extends AbstractParser
|
||||
$booking->applicant = $this->parsePersonalData($node->filterXPath('//anmelder'));
|
||||
|
||||
$participantsStatus = $this->getArrayValue($node->filterXPath('//status_teilnehmer'), '/');
|
||||
$booking->participantsStatus = array_combine(range(1, count($participantsStatus)), $participantsStatus);
|
||||
$booking->participantsStatus = array_combine(range(0, count($participantsStatus) - 1), $participantsStatus);
|
||||
|
||||
$booking->participants = $this->parseParticipants($node->filterXPath('//teilnehmerliste/teilnehmer'));
|
||||
|
||||
@@ -110,7 +110,7 @@ class BookingParser extends AbstractParser
|
||||
|
||||
$node->each(function (Crawler $node) use (&$participants) {
|
||||
$id = (int) $node->attr('id');
|
||||
$participants[$id] = $this->parsePersonalData($node);
|
||||
$participants[$id - 1] = $this->parsePersonalData($node);
|
||||
});
|
||||
|
||||
return $participants;
|
||||
|
||||
Reference in New Issue
Block a user