updated the tracker to have more features

This commit is contained in:
2025-09-30 09:40:06 -07:00
parent b6184414c0
commit 9ce2695df5
4 changed files with 18 additions and 19 deletions

View File

@@ -290,7 +290,7 @@ async def detailed(request: Request, person: str = "Sarah", plan_date: str = Non
context = {
"request": request,
"title": f"{person}'s Detailed Plan for {plan_date_obj.strftime('%B %d, %Y')}",
"title": f"Detailed Plan for {person} on {plan_date_obj.strftime('%B %d, %Y')}" if person else "Detailed View",
"meal_details": meal_details,
"day_totals": day_totals,
"person": person,

View File

@@ -87,7 +87,7 @@ async def tracker_add_meal(request: Request, db: Session = Depends(get_db)):
date_str = form_data.get("date")
meal_id = form_data.get("meal_id")
meal_time = form_data.get("meal_time")
quantity = float(form_data.get("quantity", 1.0))
quantity = 1.0 # Default quantity to 1.0 as the field is removed from the UI
logging.info(f"DEBUG: Adding meal to tracker - person={person}, date={date_str}, meal_id={meal_id}, meal_time={meal_time}, quantity={quantity}")