Add per-sport location settings and clarify recovery groups
This commit is contained in:
+7
-1
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user