wip: modernized edit flow
This commit is contained in:
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\BusProNet\Model;
|
||||
|
||||
use App\BusProNet\Constants;
|
||||
|
||||
/**
|
||||
* Represents a booking with participants, services, and pricing information.
|
||||
*
|
||||
@@ -192,6 +194,22 @@ class Booking
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves rental insurance for a specific participant.
|
||||
*/
|
||||
public function getRentalInsuranceForParticipant(int $participantIndex): ?Service
|
||||
{
|
||||
$rentalInsurances = $this->getAdditionalServicesByGroup(Constants::TOKEN_RENTAL_INSURANCE);
|
||||
|
||||
foreach ($rentalInsurances as $service) {
|
||||
if (in_array($participantIndex, $service->mapping)) {
|
||||
return $service;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves room assignment for a specific participant.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user