feat: proper determination of agency initiated bookings

For booking that are agency initiated (groups) different rules apply
concerning mutability and requirement of personal data and whether the
first participant is the applicant or not. This commit adds logic to
evaluate the agency id assigned to the booking data to decide.
This commit is contained in:
Björn Fromme committed 2026-03-16 12:02:27 +01:00
1 parent f55ed3dc4c
commit e222f448bb
20 files changed
+201 -137

No files matched your search

+8 -3
View File
@@ -36,7 +36,7 @@ class ParticipantCardDataService
}
// Extract participant name with fallback
$name = $this->getParticipantName($participant, $index);
$name = $this->getParticipantName($bookingDto, $participant, $index);
// Extract email
$email = $participant->email ?? '';
@@ -78,7 +78,7 @@ class ParticipantCardDataService
/**
* Get participant name with fallback to generic label.
*/
private function getParticipantName(object $participant, int $index): string
private function getParticipantName(BookingDto $bookingDto, object $participant, int $index): string
{
$firstName = $participant->firstName ?? '';
$lastName = $participant->lastName ?? '';
@@ -86,7 +86,12 @@ class ParticipantCardDataService
$name = trim($firstName.' '.$lastName);
if ('' === $name) {
return 0 === $index ? 'Anmelder:in' : 'Teilnehmer:in';
// For internal agency bookings, first participant is not the applicant
if (0 === $index && false === $bookingDto->isInternalAgencyBooking()) {
return 'Anmelder:in';
}
return 'Teilnehmer:in';
}
return $name;