* Adjusted GUI of daily dashboard to better deal with float values
* Change password + New base (#10)
* created a new Base template to test with
* Changed out the base and added a new password page
* Password change works, UI needs redisgn
Migrated add_meal_v2 routes and templates to add_meal, renaming endpoints and updating references throughout the app. Removed legacy daily_log2 route and template, consolidating to daily_log. Moved macro_arr_to_json to utils.py for reuse. Updated navigation and redirect logic to use new routes. Improved item finding and barcode scanning UI.
Refactored add_meal_v2 routes to simplify and clarify the meal addition process, including renaming endpoints and templates, and introducing decorators for date and item selection. Updated daily_log2 to use user's timezone and display the selected date. Adjusted templates and barcode scan logic to match new routes and improved user experience.
Introduces a new add_meal_v2 blueprint with barcode scanning, item search, and improved meal logging UI. Adds user timezone support: login form now captures timezone, User model and database schema updated, and timezone is set on login. Refactors templates and forms to support these changes, and removes the old login template.
Introduces a new route and template for an enhanced daily log dashboard with macro nutrient summary. Refactors FoodItem model to add type annotations and a macros() method, and updates form handling to default missing values to zero. Also adds a navigation link to the new dashboard in the base template.
The logout route was relocated from the main app to the auth blueprint for better organization. The logout link in the base template was updated to reference the new route location.
Introduces a change password route, form, and template, allowing authenticated users to update their password. Updates the User model with a method to set the must_change_password flag. Adjusts login and navigation logic to support the new flow and ensures users are redirected to change their password if required.
Moved login route and logic from app.py to application/auth/routes.py under the 'auth' blueprint. Updated all references to the login route to use 'auth.login'. Added a dedicated login.html template under application/auth/templates. Adjusted login_required utility and default_return logic for consistency.
Moved the login_required logic to a new utils.py for reuse. Added a new auth blueprint and registered it in app.py. Updated user blueprint to use the shared login_required function.
Deleted the /food_items and /barcode_test routes from admin, along with their associated templates and the delete_food functionality. This streamlines the admin blueprint by removing unused or deprecated features.
Added a route to serve /favicon.ico using send_from_directory and included the favicon.ico file in the static directory. This improves browser tab display and branding.
Refactored add_meal routes to check for existing FoodItems by name or barcode and improved form handling. Made barcode optional in FoodItemForm. Added a unique constraint on (name, owner_id) for FoodItem in both the model and database migrations, while retaining the (barcode, owner_id) constraint. Updated FoodItem relationship to cascade deletes.
Updated app.py to run the server on port 80 without SSL context. Enhanced the log removal route to redirect with the current offset if present in the session.
Adds session storage of the 'offset' parameter to ensure the correct date is used when adding meals and redirecting to the daily log. Updates the add_meal and user routes to handle and validate the offset, improving navigation and data consistency for users logging meals on different days.
Updated the daily log route and template to support viewing logs for previous and next days using an offset parameter. The default redirect now points to the daily log instead of the dashboard. The daily_log.html template includes navigation buttons for moving between days.
Deleted the /overview route from user routes and removed the associated overview.html template. This cleans up unused code related to the daily nutrition overview feature.
Calculates and displays total calories, protein, carbs, and fat for the current day on the daily log page. Updates both the route logic and the template to show these nutritional totals in a formatted overview.
Introduced a new route and backend logic to allow users to delete their own food log entries. Updated the daily_log.html template to display delete buttons for each log entry, improving user control over their daily food logs.
Reorganized the search input and suggestions into a single container with improved positioning and removed the duplicate suggestions list. Also removed the start/stop scanning buttons section for a cleaner UI.
Enhanced the barcode scanner page with a search box and autocomplete suggestions for food items. Updated backend routes to support searching by both barcode and name, and added a new /query endpoint for AJAX search. Refactored step3 and step3_alt1 routes to handle both barcode and name inputs.
Deleted routes and templates related to manual food item entry and barcode scanning, including add_food_item, add_food_item_manual, food_item, log_food, and related session-based selection routes. Updated navigation in base.html to remove links to these features and added links to overview, daily log, and dashboard. Simplified daily_log.html to format log amounts, and removed unused imports and forms from routes.py.
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.
Updated routes and templates to improve the process of adding and logging food items by barcode. The add_food_item route now accepts a barcode parameter, and barcode lookups redirect to item creation if not found. The log_food flow now uses session variables for item and meal selection, and the get_item.html template uses fetch to handle barcode lookups and redirects accordingly.
Introduces a barcode scanner page using the camera for food item entry, adds routes for selecting meal types and scanning products, and updates the test.html template to allow adding items to specific meals. Also updates branding in base.html, changes the Flask secret key, and enables SSL by default in app.py.
Introduces 'overview' and 'test' routes and templates for daily nutrition summaries. Updates FoodLog model to include 'part_of_day' and 'date_' fields for better log categorization. Adjusts log creation and seed data to support new fields. Removes SSL context from app run for local development.
Introduces a new FoodLogForm and a /log_food/<item_id> route to allow users to log food consumption. Updates the food item route to redirect to the log page, adds a log_food.html template, and updates the Bootstrap CDN version in base.html.
Introduces the FoodLog model to track user food consumption, adds relationships between User, FoodItem, and FoodLog, and updates seed.py to include sample FoodLog data. Also fixes route redirection to use the correct blueprint namespace.
Updated the camera selection logic to prioritize devices labeled as 'back' or 'rear' when initializing the video input for scanning. Falls back to the first available device if no rear camera is found.
Refactored food item related routes from app.py to application/user/routes.py under the user blueprint. Updated template and JS references to use the blueprint route names, improving code organization and modularity.
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.
Standardized field names for nutritional values in FoodItem model and throughout the codebase, changing 'fats_100g' to 'fat_100', 'saturated_fats_100g' to 'saturated_fat_100', and similar updates for other fields. Updated all references in models, templates, routes, and seed data to match the new naming convention for improved clarity and consistency.