feat: extended insurance parsing, pass info urls to view
This commit is contained in:
@@ -39,13 +39,14 @@ class InsuranceParser extends AbstractParser
|
||||
// Parse all individual insurances for reference lookup
|
||||
$insurance = $this->parseInsuranceNode($node, false);
|
||||
if (null !== $insurance && null !== $insurance->id) {
|
||||
// Set complementary flag from XML attribute
|
||||
$insurance->complementary = $isComplementary;
|
||||
|
||||
$individualInsurances[$insurance->id] = $insurance;
|
||||
|
||||
// Include only if it's NOT a complementary insurance (zusatzversicherung)
|
||||
// Complementary insurances are only available as part of packages, never standalone
|
||||
if (!$isComplementary) {
|
||||
$insurances[$insurance->id] = $insurance;
|
||||
}
|
||||
// Include ALL insurances in the result array
|
||||
// Complementary insurances will be filtered out at the form field level
|
||||
$insurances[$insurance->id] = $insurance;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -56,6 +57,15 @@ class InsuranceParser extends AbstractParser
|
||||
if (null !== $insurance && null !== $insurance->id) {
|
||||
// Parse contained insurance IDs
|
||||
$insurance->containedInsuranceIds = $this->parseContainedInsuranceIds($node);
|
||||
|
||||
// Populate containedInsurances with actual Insurance objects
|
||||
$insurance->containedInsurances = [];
|
||||
foreach ($insurance->containedInsuranceIds as $containedId) {
|
||||
if (isset($individualInsurances[$containedId])) {
|
||||
$insurance->containedInsurances[] = $individualInsurances[$containedId];
|
||||
}
|
||||
}
|
||||
|
||||
$insurances[$insurance->id] = $insurance;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user