fix: reconcile assigned family insurance rate on updated participant
This commit is contained in:
1 parent
8a46908856
commit
0b642dcfe4
11 files changed
+723
-8
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user