diff --git a/src/public/index.html b/src/public/index.html
index c69c4e4..d600b3c 100644
--- a/src/public/index.html
+++ b/src/public/index.html
@@ -2401,6 +2401,19 @@ async function loadDashboard() {
document.getElementById('dashGreeting').textContent = 'Merhaba, ' + (currentUser ? currentUser.name : '') + '!';
renderStats();
await loadWorkout();
+ // Pre-load meal data to fill calorie stat card
+ try {
+ mealData = await api('/api/program/meal');
+ if (mealData && mealData.daily_calories) {
+ var calCard = document.getElementById('calorieStatCard');
+ if (calCard) {
+ calCard.innerHTML = '
P:' + mealData.macros.protein_g + 'g K:' + mealData.macros.carbs_g + 'g Y:' + mealData.macros.fat_g + 'g
';
+ }
+ }
+ }
+ } catch (e) {}
}
function calculateBMI(weight, height) {
@@ -2432,7 +2445,8 @@ function renderStats() {
html += '' + (goalNames[p.goal] || p.goal) + '
Hedef
';
+ var goalDisplay = (p.goal || '').split(',').map(function(g) { return goalNames[g.trim()] || g.trim(); }).join(', ');
+ html += '
' + goalDisplay + '
Hedef
';
if (targetSub) html += '
' + targetSub + '
';
html += '
';
@@ -2445,7 +2459,8 @@ function renderStats() {
if (p.has_injury) {
var injAreas = { knee:'Diz', back:'Sirt', shoulder:'Omuz', elbow:'Dirsek', wrist:'Bilek', ankle:'Ayak Bilegi', hip:'Kalca', neck:'Boyun' };
- html += '
' + (injAreas[p.injury_area] || '-') + '
Sakatlik
';
+ var injDisplay = (p.injury_area || '').split(',').map(function(a) { return injAreas[a.trim()] || a.trim(); }).filter(function(a) { return a && a !== 'none'; }).join(', ') || '-';
+ html += '
' + injDisplay + '
Sakatlik
';
}
if (p.has_disability) {
@@ -2544,7 +2559,7 @@ function renderWorkout(el) {
html += '
';
html += '