feat: Update nutrition metrics and energy balance calculations
- Introduced a single TDEE calculation based on current weight, replacing the fixed 2500 kcal value. - Updated `get_energy_balance_data` to use daily totals for intake calculations and improved energy balance logic. - Enhanced `get_nutrition_average_data` to calculate averages over calendar days instead of raw log entries. - Adjusted placeholder resolution to ensure consistent metadata usage across requests. - Fixed issues in the charts router to reflect the new energy balance logic and TDEE calculations. These changes improve the accuracy of nutritional assessments and streamline data handling in the application.
This commit is contained in:
1 parent
549c31431e
commit
61a5bb39ae
7 files changed
+305
-231
No files matched your search
@@ -1133,7 +1133,7 @@ PLACEHOLDER_MAP: Dict[str, Callable[[str], str]] = {
|
||||
|
||||
# --- Top-Weighted Goals/Focus Areas (Ebene 2: statt Primary) ---
|
||||
'{{top_goal_name}}': lambda pid: _safe_str('top_goal_name', pid),
|
||||
'{{top_goal_progress_pct}}': lambda pid: _safe_str('top_goal_progress_pct', pid),
|
||||
'{{top_goal_progress_pct}}': lambda pid: _safe_int('top_goal_progress_pct', pid),
|
||||
'{{top_goal_status}}': lambda pid: _safe_str('top_goal_status', pid),
|
||||
'{{top_focus_area_name}}': lambda pid: _safe_str('top_focus_area_name', pid),
|
||||
'{{top_focus_area_progress}}': lambda pid: _safe_int('top_focus_area_progress', pid),
|
||||
|
||||
Reference in new issue
Block a user