feat: implement screendesign

This commit is contained in:
Björn Fromme committed 2026-03-16 11:59:12 +01:00
1 parent 39e6cc4d68
commit 4a2d1f4a02
84 files changed
+2807 -2603

No files matched your search

@@ -68,17 +68,30 @@ class BookingDataProcessor
$participantData = ParticipantDto::fromPersonalData($participant);
$participantData->index = $index;
// First participant (applicant): copy address from applicant if participant address is empty
// BPN API may return full address only in <anmelder> but minimal/empty address in <teilnehmer id="1">
// Only copy if first participant has no street (indicating empty/incomplete address)
// This allows applicant and first participant to be different people with different addresses
if (0 === $index && null !== $booking->applicant->address) {
$isEmpty = null === $participantData->address
|| null === $participantData->address->street
|| '' === trim($participantData->address->street);
// First participant (applicant): copy data from applicant if participant data is empty
// BPN API may return full data only in <anmelder> but minimal/empty data in <teilnehmer id="1">
if (0 === $index) {
// Copy address if first participant has no street (indicating empty/incomplete address)
// This allows applicant and first participant to be different people with different addresses
if (null !== $booking->applicant->address) {
$isEmpty = null === $participantData->address
|| null === $participantData->address->street
|| '' === trim($participantData->address->street);
if ($isEmpty) {
$participantData->address = clone $booking->applicant->address;
if ($isEmpty) {
$participantData->address = clone $booking->applicant->address;
}
}
// Copy body dimensions from applicant if not present in participant
if (null === $participantData->height && null !== $booking->applicant->height) {
$participantData->height = $booking->applicant->height;
}
if (null === $participantData->weight && null !== $booking->applicant->weight) {
$participantData->weight = $booking->applicant->weight;
}
if (null === $participantData->shoeSize && null !== $booking->applicant->shoeSize) {
$participantData->shoeSize = $booking->applicant->shoeSize;
}
}