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 <noreply@anthropic.com>
This commit is contained in:
parent
9e95fd8416
commit
498ad7a47f
|
|
@ -515,9 +515,9 @@ export default function GoalsPage() {
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: 16 }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', gap: 16 }}>
|
||||||
<div style={{ flex: 1 }}>
|
<div style={{ flex: 1 }}>
|
||||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8, flexWrap: 'wrap' }}>
|
<div style={{ display: 'flex', alignItems: 'center', gap: 8, marginBottom: 8, flexWrap: 'wrap' }}>
|
||||||
<span style={{ fontSize: 20 }}>{typeInfo.icon}</span>
|
<span style={{ fontSize: 20 }}>{goal.icon || typeInfo.icon}</span>
|
||||||
<span style={{ fontWeight: 600, fontSize: 16 }}>
|
<span style={{ fontWeight: 600, fontSize: 16 }}>
|
||||||
{goal.name || typeInfo.label_de}
|
{goal.name || goal.label_de || typeInfo.label_de || goal.goal_type}
|
||||||
</span>
|
</span>
|
||||||
<span style={{ fontSize: 16 }} title={priorityInfo.label}>
|
<span style={{ fontSize: 16 }} title={priorityInfo.label}>
|
||||||
{priorityInfo.stars}
|
{priorityInfo.stars}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user