fix: incorrect rules around family insurances
addresses #869dr80qj
This commit is contained in:
1 parent
736128476b
commit
8a46908856
15 files changed
+859
-50
No files matched your search
@@ -12,6 +12,7 @@ use App\Form\Service\Condition\BookingEligibilityCondition;
|
||||
use App\Form\Service\Condition\BulkInsuranceBookingCondition;
|
||||
use App\Form\Service\Condition\CompositeCondition;
|
||||
use App\Form\Service\Condition\DateOfBirthProvidedCondition;
|
||||
use App\Form\Service\Condition\FamilyInsuranceActiveCondition;
|
||||
use App\Form\Service\Condition\FieldValueCondition;
|
||||
use App\Form\Service\Condition\FinalBookingOnlyCondition;
|
||||
use App\Form\Service\Condition\FirstParticipantCondition;
|
||||
@@ -221,11 +222,13 @@ class CreateFieldStateProvider extends AbstractFieldStateProvider
|
||||
),
|
||||
];
|
||||
|
||||
// Hide insurance field until date of birth is provided OR when bulk insurance booking is active OR when participant is ineligible
|
||||
// Hide insurance field until date of birth is provided OR when bulk insurance booking is active
|
||||
// OR when the applicant has a family insurance active (it already covers dependents) OR when participant is ineligible
|
||||
$this->fieldStateConditions['insurance'] = [
|
||||
'hidden' => CompositeCondition::or(
|
||||
CompositeCondition::not($dateOfBirthProvidedCondition),
|
||||
$bulkInsuranceBookingCondition,
|
||||
new FamilyInsuranceActiveCondition(),
|
||||
$bookingEligibilityCondition
|
||||
),
|
||||
];
|
||||
|
||||
Reference in new issue
Block a user