feat: inform user about automatic reassignments or reset selections
This commit is contained in:
@@ -77,6 +77,11 @@ class ParticipantDto
|
||||
// Bulk insurance booking flag (applicant only: when checked, assigns same insurance type to all participants)
|
||||
public bool $bulkInsuranceBooking = false;
|
||||
|
||||
/**
|
||||
* @var array<array{type: string, message: string}> Notification messages for user feedback
|
||||
*/
|
||||
public array $notifications = [];
|
||||
|
||||
public static function fromPersonalData(PersonalData $personalData): static
|
||||
{
|
||||
$instance = new static();
|
||||
@@ -164,4 +169,18 @@ class ParticipantDto
|
||||
{
|
||||
return $this->insurance?->price ?? 0.0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a notification message for user feedback.
|
||||
*
|
||||
* @param string $type The notification type (info, warning, success)
|
||||
* @param string $message The notification message
|
||||
*/
|
||||
public function addNotification(string $type, string $message): void
|
||||
{
|
||||
$this->notifications[] = [
|
||||
'type' => $type,
|
||||
'message' => $message,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user