feat: improved mutability checks for personal data in edit or create mode

This commit is contained in:
Björn Fromme
2026-03-16 11:59:11 +01:00
parent ff39bf365c
commit 43823dbda1
27 changed files with 435 additions and 233 deletions
@@ -145,6 +145,19 @@ class ParticipantInsuranceFieldHandler extends AbstractParticipantFieldHandler
// Handle explicit new insurance selection from user
if ($isNewSelection) {
// Handle synthetic "no insurance" option
if (Insurance::NO_INSURANCE_ID === $selectedInsuranceId) {
// Create synthetic insurance object to satisfy validation
// This will be excluded from BPN XML transmission
$noInsurance = new Insurance();
$noInsurance->id = Insurance::NO_INSURANCE_ID;
$noInsurance->label = 'keine Versicherung gewünscht';
$noInsurance->price = 0.0;
$participant->insurance = $noInsurance;
return; // Skip all other processing for "no insurance"
}
$selectedInsurance = $this->findInsuranceById($selectableInsurances, $selectedInsuranceId);
if (null !== $selectedInsurance) {