fix: consider parking space availability

This commit is contained in:
Björn Fromme
2026-07-23 17:44:08 +02:00
parent fafc60eba9
commit b323c120f9
7 changed files with 237 additions and 4 deletions
@@ -647,13 +647,24 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
return [];
}
return [
$fieldOptions = [
'label' => $this->serviceLabelFormatter->formatServiceLabelForServices(
Constants::SERVICE_LABELS[Constants::TOKEN_PARKING],
$parkingServices
),
'required' => false,
];
// There's only ever one parking type, so check readonly state against the single service
$parkingService = reset($parkingServices);
if ($this->shouldMakeServiceReadonly($parkingService, $bookingDto, $participantIndex, 'parking')) {
$fieldOptions['attr'] = [
'readonly' => true,
'data-tooltip' => 'ausgebucht',
];
}
return $fieldOptions;
};
// Bulk insurance booking checkbox (applicant only - controls insurance assignment for all participants)