Add barcode-based meal logging workflow

Introduces a new add_meal blueprint with routes and templates for scanning barcodes, adding new food items, and logging meals. Updates FoodItemForm and FoodLogForm validation, changes FoodLog.amount to float, and integrates the new workflow into the daily log UI. Refactors user routes and templates to support the new meal logging process.
This commit is contained in:
2025-08-07 17:00:56 +02:00
parent 5ae82e379e
commit c552a4571e
10 changed files with 287 additions and 28 deletions

View File

@@ -55,7 +55,7 @@
if (!response.ok) {
throw new Error('Network response was not OK');
}
return response.json(); // or response.text(), response.blob(), etc.
return response.json();
})
.then(data => {
const baseURL2 = "{{url_for('user.select_item', item_id='0')}}"