feat: show tooltips for parking space option and omit price when 0,00
addresses #869ebkmhw
This commit is contained in:
@@ -657,11 +657,15 @@ class ParticipantFieldOptionsProvider extends AbstractFieldOptionsProvider
|
||||
|
||||
// There's only ever one parking type, so check readonly state against the single service
|
||||
$parkingService = reset($parkingServices);
|
||||
|
||||
// Add service description as data attribute for frontend use
|
||||
if (null !== $parkingService->description && '' !== trim($parkingService->description)) {
|
||||
$fieldOptions['attr']['data-description'] = $parkingService->description;
|
||||
}
|
||||
|
||||
if ($this->shouldMakeServiceReadonly($parkingService, $bookingDto, $participantIndex, 'parking')) {
|
||||
$fieldOptions['attr'] = [
|
||||
'readonly' => true,
|
||||
'data-tooltip' => 'ausgebucht',
|
||||
];
|
||||
$fieldOptions['attr']['readonly'] = true;
|
||||
$fieldOptions['attr']['data-tooltip'] = 'ausgebucht';
|
||||
}
|
||||
|
||||
return $fieldOptions;
|
||||
|
||||
@@ -610,9 +610,10 @@
|
||||
form.parking,
|
||||
'Parkplatz',
|
||||
parkingService.price|default(null),
|
||||
null,
|
||||
null,
|
||||
htmxAttr
|
||||
form.parking.vars.attr['data-description']|default(null),
|
||||
'Info',
|
||||
htmxAttr,
|
||||
false
|
||||
) }}
|
||||
{% endif %}
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user