Commit Graph

92 Commits

Author SHA1 Message Date
4f1b5a5667 Refactor meal addition flow and improve date handling
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.
2025-08-14 06:59:29 +02:00
d78f48710e Add meal v2 flow and user timezone support
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.
2025-08-14 06:08:17 +02:00
7ff345d3a2 Do not update pip v0.8.0 2025-08-14 04:07:15 +02:00
Stef
944ba17b31 Merge pull request #4 from StefBuwalda/development
Removed accidental packages from requirements.txt
v0.7.0
2025-08-14 04:05:24 +02:00
8820fc07d7 Removed accidental packages from requirements.txt 2025-08-14 04:04:48 +02:00
Stef
072dd2c651 Merge pull request #3 from StefBuwalda/development
Update requirements.txt
v0.6.0
2025-08-14 03:46:54 +02:00
8acb8453ea Update requirements.txt 2025-08-14 03:46:26 +02:00
Stef
fb160d364a Merge pull request #2 from StefBuwalda/development
Hopefully add caching to docker build action
v0.5.0
2025-08-14 03:42:12 +02:00
fdf264b9c5 Update docker-ghcr.yml 2025-08-14 03:41:34 +02:00
91595ccc11 Caching pip downloads (hopefully) 2025-08-14 03:39:39 +02:00
6c01c6a923 Update Dockerfile 2025-08-14 03:34:31 +02:00
Stef
5a9e1f77c7 Merge pull request #1 from StefBuwalda/development
Adds a new daily log page made with AI assistance.
v0.4.0
2025-08-14 03:18:58 +02:00
2454bc61cb Moved the bar width calculation from jinja to the dashboard values generation 2025-08-14 03:15:02 +02:00
85297daaaf Add new daily log dashboard and macro summary
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.
2025-08-14 02:49:06 +02:00
c7395b07d9 Move logout route to auth blueprint
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.
v0.3.0
2025-08-11 18:05:30 +02:00
97ff4acf02 Add change password functionality for users
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.
2025-08-11 18:03:18 +02:00
0da580faf1 Refactor login flow to use auth blueprint
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.
2025-08-11 17:43:46 +02:00
ea2ea27d9e Refactor login_required and add auth blueprint
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.
2025-08-11 17:33:47 +02:00
cd9ae72864 Reapply "Add must_change_password field to User model"
This reverts commit 47241e341e.
2025-08-11 17:20:45 +02:00
47241e341e Revert "Add must_change_password field to User model"
This reverts commit 42747df92f.
2025-08-11 17:17:30 +02:00
42747df92f Add must_change_password field to User model
Introduces a new boolean column 'must_change_password' to the User model and database schema. This field enforces password change requirements for users and is included in the model's constructor and migration.
2025-08-11 17:17:10 +02:00
fda5f8e17b Update daily_log.html
Added a confirm button
v0.2.0
2025-08-11 16:56:51 +02:00
18fa0fdb2d Remove admin food item and barcode test routes and templates
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.
2025-08-11 16:56:40 +02:00
4d34049850 Change energy_100 column type to Float in food_item
This migration alters the 'energy_100' column in the 'food_item' table from INTEGER to Float to allow for decimal values. The downgrade reverses this change.
2025-08-11 16:52:57 +02:00
3f9bd8984d Change energy field from integer to float
Updated the FoodItem model and FoodItemForm to use float for the energy field instead of integer.
2025-08-11 16:51:31 +02:00
5a0dbef28f Update forms.py
added input mode to form to indicate a decimal value is expected for each value
2025-08-11 16:50:19 +02:00
93406db07e Update add_item.html
Changed the order of macros when adding new item
2025-08-11 16:43:00 +02:00
72fe1b602b Update routes.py
Fixed a bug where redirect was incorrect after adding an item
2025-08-11 16:36:51 +02:00
Stef
79f7364c5a Update auto_bump_main.yml v0.1.0 2025-08-11 16:19:48 +02:00
Stef
5a5a9c5ca3 Create auto_bump_main.yml 2025-08-11 16:08:59 +02:00
Stef
47e725cb4f Update docker-ghcr.yml 2025-08-11 15:42:48 +02:00
5f0312e4f0 Add favicon support and static favicon file
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.
2025-08-11 15:13:45 +02:00
dff722a4af Update base.html 2025-08-11 15:02:44 +02:00
d15ade61f2 Remove barcode scanner feature and template
Deleted the /scan route and its associated scan.html template, removing the barcode scanner functionality from the application.
2025-08-11 15:02:40 +02:00
9f37944af1 Delete docker-compose.yaml 2025-08-11 14:44:26 +02:00
06fe4f22c0 Merge branch 'main' into development 2025-08-11 14:34:23 +02:00
6ad7ffa62b Squashed commit of the following:
commit 7fe30bfebf
Author: Stef <stbuwalda@gmail.com>
Date:   Mon Aug 11 14:32:53 2025 +0200

    Improve FoodItem uniqueness and add name constraint

    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.
2025-08-11 14:33:13 +02:00
7fe30bfebf Improve FoodItem uniqueness and add name constraint
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.
2025-08-11 14:32:53 +02:00
Stef
ad7f787ce5 Update docker-ghcr.yml 2025-08-11 02:46:00 +02:00
Stef
5d86c27bd3 Update docker-ghcr.yml 2025-08-11 02:42:57 +02:00
Stef
d737e808eb Create docker-ghcr.yml 2025-08-11 02:39:17 +02:00
85728c47c1 Update routes.py 2025-08-11 02:12:02 +02:00
1c31b431e4 Update docker-compose.yaml 2025-08-11 02:05:33 +02:00
6ecec986b7 Update app.py 2025-08-11 02:00:42 +02:00
ef2d969654 Create default admin user if no users exist
Adds logic to automatically create an admin account with default credentials if the user table is empty when the app starts. This ensures there is always an admin user available for initial setup.
2025-08-11 01:57:31 +02:00
2f89097219 Update Dockerfile 2025-08-11 01:53:22 +02:00
f9760cae07 Update volume mount and enable shell debug mode
Changed the Docker volume mount to map ./data to /app/instance instead of /app/data in docker-compose.yaml. Also enabled shell debug mode in entrypoint.sh by adding the -x flag to 'set -e' for easier troubleshooting.
2025-08-11 01:31:06 +02:00
135e226db8 Add entrypoint script for Docker container
Introduces entrypoint.sh to handle database migrations before starting the Flask app. Updates Dockerfile to use the new entrypoint script and ensures it is executable.
2025-08-11 01:25:02 +02:00
7f806e52dd Update docker-compose.yaml 2025-08-11 01:13:37 +02:00
b3269c4113 Update docker-compose.yaml 2025-08-11 01:10:42 +02:00