fix: applicant split in edit mode, drop create-mode agency checks

This commit is contained in:
fromme committed 2026-10-19 09:18:22 +02:00
1 parent 1ff293f41f
commit 5b75938c73
12 files changed
+167 -68

No files matched your search

@@ -16,8 +16,8 @@ use App\Form\Service\Condition\FamilyInsuranceActiveCondition;
use App\Form\Service\Condition\FieldValueCondition;
use App\Form\Service\Condition\FinalBookingOnlyCondition;
use App\Form\Service\Condition\FirstParticipantCondition;
use App\Form\Service\Condition\FirstParticipantIsApplicantCondition;
use App\Form\Service\Condition\FirstParticipantReadOnlyCondition;
use App\Form\Service\Condition\FirstParticipantSuppliesApplicantDataCondition;
use App\Form\Service\Condition\MultipleParticipantsCondition;
use App\Form\Service\Condition\RentalInsuranceAvailableCondition;
use App\Form\Service\Condition\RentalSelectionCondition;
@@ -88,7 +88,7 @@ class CreateFieldStateProvider extends AbstractFieldStateProvider
);
// First participant read-only condition
// Render personal data fields as static text for first participant in non-internal agency bookings
// Render personal data fields as static text for the first participant where they are the applicant
// when user is logged in (data is prepopulated from BPN account)
$firstParticipantReadOnlyCondition = new FirstParticipantReadOnlyCondition();
@@ -122,7 +122,7 @@ class CreateFieldStateProvider extends AbstractFieldStateProvider
// applicant (guest bookings) — BusPro does not ask a telefonmobil of an ordinary participant.
$this->fieldStateConditions['mobile'] = [
'static_text' => $firstParticipantReadOnlyCondition,
'required' => new FirstParticipantSuppliesApplicantDataCondition(),
'required' => new FirstParticipantIsApplicantCondition(),
];
// Address subfields - must render as static text to prevent creating duplicate BPN records
@@ -319,7 +319,7 @@ class CreateFieldStateProvider extends AbstractFieldStateProvider
// ordinary participant. Also rendered as static text for the applicant when read-only.
$this->fieldStateConditions['address'] = [
'static_text' => $firstParticipantReadOnlyCondition,
'required' => new FirstParticipantSuppliesApplicantDataCondition(),
'required' => new FirstParticipantIsApplicantCondition(),
];
// Room assignment field: