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
|
// There's only ever one parking type, so check readonly state against the single service
|
||||||
$parkingService = reset($parkingServices);
|
$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')) {
|
if ($this->shouldMakeServiceReadonly($parkingService, $bookingDto, $participantIndex, 'parking')) {
|
||||||
$fieldOptions['attr'] = [
|
$fieldOptions['attr']['readonly'] = true;
|
||||||
'readonly' => true,
|
$fieldOptions['attr']['data-tooltip'] = 'ausgebucht';
|
||||||
'data-tooltip' => 'ausgebucht',
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $fieldOptions;
|
return $fieldOptions;
|
||||||
|
|||||||
@@ -610,9 +610,10 @@
|
|||||||
form.parking,
|
form.parking,
|
||||||
'Parkplatz',
|
'Parkplatz',
|
||||||
parkingService.price|default(null),
|
parkingService.price|default(null),
|
||||||
null,
|
form.parking.vars.attr['data-description']|default(null),
|
||||||
null,
|
'Info',
|
||||||
htmxAttr
|
htmxAttr,
|
||||||
|
false
|
||||||
) }}
|
) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
Reference in New Issue
Block a user