fix: applicant split in edit mode, drop create-mode agency checks
This commit is contained in:
1 parent
1ff293f41f
commit
5b75938c73
12 files changed
+167
-68
No files matched your search
@@ -14,7 +14,8 @@ use App\Form\Service\Abstract\AbstractParticipantFieldHandler;
|
||||
* BusPro requires a Mail-Adresse for every participant once a room is present and rejects the
|
||||
* step-3 Anfrage with 650 otherwise, children included. It does accept an address identical to
|
||||
* the Anmelder's, so children inherit the applicant's rather than being asked for one they
|
||||
* typically do not have. The value stays editable and stays mandatory.
|
||||
* typically do not have. The value stays editable and stays mandatory. This happens in the
|
||||
* create flow only; in edit mode the handler just stores what was submitted.
|
||||
*
|
||||
* The copy only ever fills a blank, so an address somebody typed is never overwritten. A later
|
||||
* correction to the applicant's own address therefore does not propagate to children who already
|
||||
@@ -65,6 +66,13 @@ class ParticipantEmailFieldHandler extends AbstractParticipantFieldHandler
|
||||
*/
|
||||
public function applyApplicantEmail(BookingDto $bookingDto, ParticipantDto $participant): void
|
||||
{
|
||||
// Create mode only. An existing booking already carries whatever BusPro accepted, a
|
||||
// blank may be intended where personal data is optional, and participant[0] is not
|
||||
// reliably the applicant there.
|
||||
if (BookingDto::MODE_CREATE !== $bookingDto->getMode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (false === $participant->isChild()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user