mirror of
https://github.com/sstent/foodplanner.git
synced 2026-01-25 19:21:37 +00:00
updated the tracker to have more features
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user