feat: improved mutability checks for personal data in edit or create mode
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user