Add per-sport location settings and clarify recovery groups

This commit is contained in:
2026-04-12 11:57:13 +02:00
parent 80f649c547
commit 1080dd9d82
8 changed files with 104 additions and 9 deletions
+7 -1
View File
@@ -330,6 +330,7 @@ final class App
'authUser' => $user,
'settings' => $settings,
'sportTypePresets' => $sportTypePresets,
'sportLocationOptions' => sport_location_options(),
'users' => $user['is_admin'] ? $this->users->all() : [],
'maxScore' => $this->scoring->evaluate([
'mood' => 10,
@@ -481,7 +482,12 @@ final class App
'sport' => $entry['sport_minutes'],
'walk' => $entry['walk_minutes'],
'sport_labels' => array_values(array_filter(array_map(
static fn (array $type): string => (string) ($type['label'] ?? ''),
static function (array $type): string {
$label = (string) ($type['label'] ?? '');
$location = sport_location_label((string) ($type['location'] ?? ''));
return $location !== '' ? $label . ' · ' . $location : $label;
},
$entry['sport_type_meta'] ?? []
))),
'sport_icons' => array_values(array_filter(array_map(