feat: always show all available ski passes but readonly if age doesn't match

This commit is contained in:
Björn Fromme
2026-03-16 12:00:56 +01:00
parent b57d849ecd
commit 1fd9f8d1f8
6 changed files with 191 additions and 18 deletions
+5 -4
View File
@@ -55,14 +55,15 @@ class AppRuntime implements RuntimeExtensionInterface
/**
* Formats a service price, showing "inkl." for zero-priced (included) services.
*
* @param float|int|null $price The price to format
* @param float|int|null $price The price to format
* @param bool $showIncludedLabel Whether to show "inkl." for zero prices (default: true)
*
* @return string The formatted price or "inkl." for zero/null prices
* @return string The formatted price, "inkl." for zero/null prices (if enabled), or empty string
*/
public function formatServicePrice(float|int|null $price): string
public function formatServicePrice(float|int|null $price, bool $showIncludedLabel = true): string
{
if (null === $price || 0 === $price || 0.0 === $price) {
return 'inkl.';
return $showIncludedLabel ? 'inkl.' : '';
}
return $this->intlExtension->formatCurrency((float) $price, 'EUR');