Add manual food item entry and update food item management

Introduces a new route and template for manually adding food items. Updates food item edit and delete operations to use the food item's ID instead of barcode and adds ownership checks. Adjusts form and model to make barcode optional, and updates navigation and dashboard templates to reflect these changes.
This commit is contained in:
2025-06-29 17:41:58 +02:00
parent e00bfee948
commit a6f6cdf346
8 changed files with 114 additions and 35 deletions

View File

@@ -23,11 +23,9 @@
<li class="nav-item">
<a class="nav-link" href="{{ url_for('scan') }}">Scan</a>
</li>
{% if current_user.is_admin %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('admin.food_items') }}">Food Items</a>
<a class="nav-link" href="{{ url_for('user.add_food_item_manual') }}">Add Manually</a>
</li>
{% endif %}
</ul>
<ul class="navbar-nav ms-auto">
{% if current_user.is_authenticated %}