feat: unique email addresses of participants unless child, cleanup
addresses #869axbn21
This commit is contained in:
@@ -117,5 +117,4 @@ class BookingFingerprintService
|
||||
|
||||
return $bookingDto->originalFingerprint !== $currentFingerprint;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ class BookingService
|
||||
* Persists the current booking state to the session for retrieval
|
||||
* across multiple HTTP requests during the booking flow.
|
||||
*
|
||||
* @param Request $request The HTTP request with session
|
||||
* @param Request $request The HTTP request with session
|
||||
* @param BookingDto $bookingCreateDto The booking DTO to persist
|
||||
*/
|
||||
public function saveBookingCreateDto(Request $request, BookingDto $bookingCreateDto): void
|
||||
@@ -416,7 +416,7 @@ class BookingService
|
||||
* Compares the current room selection state with a baseline snapshot
|
||||
* to detect changes that would require participant reassignment.
|
||||
*
|
||||
* @param array $oldSnapshot The baseline room selection snapshot
|
||||
* @param array $oldSnapshot The baseline room selection snapshot
|
||||
* @param BookingDto $newDto The current booking DTO
|
||||
*
|
||||
* @return bool True if room selections have changed, false otherwise
|
||||
|
||||
@@ -59,7 +59,7 @@ class InsuranceService
|
||||
array $insurances,
|
||||
ParticipantDto $participant,
|
||||
BookingDto $booking,
|
||||
float $travelPrice
|
||||
float $travelPrice,
|
||||
): array {
|
||||
$travelStartDate = $booking->travel->dateFrom;
|
||||
$travelEndDate = $booking->travel->dateTo;
|
||||
@@ -108,7 +108,7 @@ class InsuranceService
|
||||
Insurance $currentInsurance,
|
||||
ParticipantDto $participant,
|
||||
BookingDto $booking,
|
||||
float $travelPrice
|
||||
float $travelPrice,
|
||||
): ?Insurance {
|
||||
// Group insurances of the same type
|
||||
$sameTypeInsurances = $this->filterByType($availableInsurances, $currentInsurance);
|
||||
@@ -127,10 +127,10 @@ class InsuranceService
|
||||
* (subType + familyInsurance) to all participants, but selects the appropriate price tier
|
||||
* based on each participant's individual travel price.
|
||||
*
|
||||
* @param array<Insurance> $availableInsurances All available insurances
|
||||
* @param Insurance $selectedInsurance The insurance selected by the applicant
|
||||
* @param BookingDto $booking The booking with all participants
|
||||
* @param array<int, float> $participantPrices Map of participant index to travel price (excluding insurance)
|
||||
* @param array<Insurance> $availableInsurances All available insurances
|
||||
* @param Insurance $selectedInsurance The insurance selected by the applicant
|
||||
* @param BookingDto $booking The booking with all participants
|
||||
* @param array<int, float> $participantPrices Map of participant index to travel price (excluding insurance)
|
||||
*
|
||||
* @return array<int, Insurance|null> Array indexed by participant index with assigned insurances
|
||||
*/
|
||||
@@ -138,7 +138,7 @@ class InsuranceService
|
||||
array $availableInsurances,
|
||||
Insurance $selectedInsurance,
|
||||
BookingDto $booking,
|
||||
array $participantPrices
|
||||
array $participantPrices,
|
||||
): array {
|
||||
$assignments = [];
|
||||
|
||||
@@ -280,7 +280,7 @@ class InsuranceService
|
||||
private function checkAgeConstraints(
|
||||
Insurance $insurance,
|
||||
ParticipantDto $participant,
|
||||
\DateTimeImmutable $travelStartDate
|
||||
\DateTimeImmutable $travelStartDate,
|
||||
): bool {
|
||||
$participantAge = $participant->getAge($travelStartDate);
|
||||
|
||||
@@ -305,7 +305,7 @@ class InsuranceService
|
||||
private function checkTravelDateConstraints(
|
||||
Insurance $insurance,
|
||||
\DateTimeImmutable $travelStartDate,
|
||||
\DateTimeImmutable $travelEndDate
|
||||
\DateTimeImmutable $travelEndDate,
|
||||
): bool {
|
||||
// Check travel start date
|
||||
if (null !== $insurance->travelDateFrom && $travelStartDate < $insurance->travelDateFrom) {
|
||||
@@ -368,5 +368,4 @@ class InsuranceService
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ class ParticipantEligibilityService
|
||||
* Results are cached per request to avoid redundant calculations.
|
||||
*
|
||||
* @param BookingDto $bookingDto The current booking data
|
||||
* @param int $participantIndex The index of the participant being evaluated
|
||||
* @param int $participantIndex The index of the participant being evaluated
|
||||
*
|
||||
* @return bool True if participant is eligible (has available skipasses)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user