updated the tracker to have more features

This commit is contained in:
2025-09-30 12:13:05 -07:00
parent 10d3897850
commit 4f41b5d69e
9 changed files with 60 additions and 41 deletions

View File

@@ -61,9 +61,6 @@
<div class="d-flex justify-content-between align-items-center mb-2">
<div>
<strong>{{ tracked_meal.meal.name }}</strong>
{% if tracked_meal.quantity != 1.0 %}
<span class="text-muted">({{ "%.1f"|format(tracked_meal.quantity) }}x)</span>
{% endif %}
</div>
<div>
<button class="btn btn-sm btn-outline-secondary me-1" onclick="editTrackedMeal('{{ tracked_meal.id }}')" title="Edit Meal">
@@ -78,7 +75,6 @@
<!-- Food Breakdown -->
<div class="ms-3 row row-cols-2 g-1">
{% for meal_food in tracked_meal.meal.meal_foods %}
{% set effective_quantity = meal_food.quantity * tracked_meal.quantity %}
<div class="col">
<div class="small text-muted">
• {{ meal_food.food.name }}
@@ -86,7 +82,7 @@
</div>
<div class="col text-end">
<div class="small text-muted">
{{ "%.1f"|format(effective_quantity) }} {{ meal_food.food.serving_unit }}
{{ "%.1f"|format(meal_food.quantity) }} {{ meal_food.food.serving_unit }}
{% if meal_food.food.serving_size %}
({{ meal_food.food.serving_size }})
{% endif %}