wip: reconcile assigned family insurance rate on updated participant

This commit is contained in:
Björn Fromme committed 2026-07-16 17:00:17 +02:00
1 parent 00eaea57f6
commit e35a7ab881
11 files changed
+723 -8

No files matched your search

+7 -3
View File
@@ -67,9 +67,9 @@ class ParticipantEditDto
* Validates that insurance is selected when required.
*
* Insurance is required for all participants in create mode, EXCEPT for dependent
* participants when the applicant has enabled bulk insurance booking. In that case,
* the insurance field is hidden and will be automatically assigned by the bulk
* insurance handler.
* participants when the applicant has enabled bulk insurance booking, or when the
* applicant has a family insurance selected. In both cases, the insurance field is
* hidden and coverage is derived from the applicant instead.
*
* In edit submissions, this validation is skipped entirely because insurance
* data is readonly and preserved as-is from the BPN API.
@@ -90,6 +90,10 @@ class ParticipantEditDto
if (true === $applicant?->bulkInsuranceBooking) {
return;
}
if (null !== $applicant?->insurance && true === $applicant->insurance->familyInsurance) {
return;
}
}
if (null === $this->participant->insurance) {