Removed old log for new log

This commit is contained in:
2025-08-14 12:29:02 +02:00
parent 4f1b5a5667
commit f7f6d23562
12 changed files with 42 additions and 618 deletions

View File

@@ -17,10 +17,10 @@
<div class="progress rounded" style="height: 24px;">
<div class="progress-bar bg-danger macro-bar" role="progressbar"
style="width: {{ macro.bar_width_overflow }}%">
{{ macro.current - macro.target }}{{ macro.unit }}
{{ (macro.current - macro.target) }}{{ macro.unit }}
</div>
<div class="progress-bar bg-success macro-bar" role="progressbar" style="width: {{ macro.bar_width }}%">
{{ macro.current }}{{ macro.unit }}
{{ min(macro.current, macro.target) }}{{ macro.unit }}
</div>
</div>
</div>
@@ -34,7 +34,7 @@
{% for log in logs %}
<div class="list-group-item item-row d-flex justify-content-between align-items-center bg-dark text-light">
<span>({{ log.amount }}g) {{ log.food_item.name }}</span>
<span>{{ log.food_item.energy_100 }} kcal</span>
<span>{{ log.food_item.energy_100 * log.amount / 100 }} kcal</span>
</div>
{% endfor %}
</div>
@@ -52,7 +52,7 @@
</a>
<!-- Center Button (highlighted) -->
<a id="set_link_date" href="{{ url_for('add_meal_v2.get_barcode', meal_type=0) }}"
<a id="set_link_date" href="{{ url_for('add_meal_v2.get_barcode') }}"
class="btn btn-success flex-fill mx-2 fw-bold rounded-pill">
Add Item
</a>