feat: inform user about automatic reassignments or reset selections
This commit is contained in:
1 parent
57843b8a6f
commit
41d8d65d82
10 files changed
+173
-5
No files matched your search
@@ -151,6 +151,13 @@ class ParticipantInsuranceFieldHandler extends AbstractParticipantFieldHandler
|
||||
$bookingDto
|
||||
);
|
||||
$participant->insurance = $reassignedInsurance;
|
||||
|
||||
if (null !== $reassignedInsurance) {
|
||||
$participant->addNotification(
|
||||
'info',
|
||||
sprintf('Versicherung automatisch angepasst: %s', $reassignedInsurance->label)
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Insurance not found - clear selection
|
||||
@@ -174,6 +181,14 @@ class ParticipantInsuranceFieldHandler extends AbstractParticipantFieldHandler
|
||||
$participant,
|
||||
$bookingDto
|
||||
);
|
||||
|
||||
if (null !== $reassignedInsurance && $reassignedInsurance->id !== $currentInsurance->id) {
|
||||
$participant->addNotification(
|
||||
'info',
|
||||
sprintf('Versicherung automatisch angepasst an neuen Preis: %s', $reassignedInsurance->label)
|
||||
);
|
||||
}
|
||||
|
||||
$participant->insurance = $reassignedInsurance; // null if no suitable match found
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user