From 498ad7a47f6e5cc75840fa85b8f0a70eb73c923e Mon Sep 17 00:00:00 2001 From: Lars Date: Fri, 27 Mar 2026 12:51:24 +0100 Subject: [PATCH] fix: show goal type label when name is empty Enhanced fallback chain for goal display: 1. goal.name (custom name if set) 2. goal.label_de (from backend JOIN) 3. typeInfo.label_de (from goalTypesMap) 4. goal.goal_type (raw key as last resort) Also use goal.icon from backend if available. Fixes: Empty goal names showing blank in list Co-Authored-By: Claude Opus 4.6 --- frontend/src/pages/GoalsPage.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/GoalsPage.jsx b/frontend/src/pages/GoalsPage.jsx index 96d4d4e..275fff5 100644 --- a/frontend/src/pages/GoalsPage.jsx +++ b/frontend/src/pages/GoalsPage.jsx @@ -515,9 +515,9 @@ export default function GoalsPage() {
- {typeInfo.icon} + {goal.icon || typeInfo.icon} - {goal.name || typeInfo.label_de} + {goal.name || goal.label_de || typeInfo.label_de || goal.goal_type} {priorityInfo.stars}