fixed food details not loading on details tab

This commit is contained in:
2025-10-01 10:58:01 -07:00
parent 617d8f8ca1
commit 63b3575797
4 changed files with 94 additions and 52 deletions

View File

@@ -166,15 +166,15 @@
</td>
<td>
<div class="serving-info">
{{ meal_food.quantity }} × {{ meal_food.serving_size }}{{ meal_food.serving_unit }}
{{ "%.1f"|format(meal_food.num_servings) }} × {{ meal_food.serving_size }}{{ meal_food.serving_unit }} ({{ "%.0f"|format(meal_food.total_grams) }}g)
</div>
</td>
<td class="nutrient-value">{{ "%.0f"|format(meal_food.calories) }}</td>
<td class="nutrient-value">{{ "%.1f"|format(meal_food.protein) }}g</td>
<td class="nutrient-value">{{ "%.1f"|format(meal_food.carbs) }}g</td>
<td class="nutrient-value">{{ "%.1f"|format(meal_food.fat) }}g</td>
<td class="nutrient-value">{{ "%.1f"|format(meal_food['fiber']|float) }}g</td>
<td class="nutrient-value">{{ "%.0f"|format(meal_food['sodium']|float) }}mg</td>
<td class="nutrient-value">{{ "%.1f"|format(meal_food.fiber) }}g</td>
<td class="nutrient-value">{{ "%.0f"|format(meal_food.sodium) }}mg</td>
</tr>
{% endfor %}
<!-- Meal Totals Row -->