mirror of
https://github.com/sstent/foodplanner.git
synced 2026-03-13 08:45:24 +00:00
tryiong to fix the details page
This commit is contained in:
1
main.py
1
main.py
@@ -1997,6 +1997,7 @@ async def remove_from_plan(plan_id: int, db: Session = Depends(get_db)):
|
||||
@app.get("/detailed", response_class=HTMLResponse)
|
||||
async def detailed(request: Request, person: str = "Sarah", plan_date: str = None, template_id: int = None, db: Session = Depends(get_db)):
|
||||
from datetime import datetime, date
|
||||
logging.info(f"DEBUG: Detailed page requested with url: {request.url.path}, query_params: {request.query_params}")
|
||||
logging.info(f"DEBUG: Detailed page requested with person={person}, plan_date={plan_date}, template_id={template_id}")
|
||||
|
||||
# Get all templates for the dropdown
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<h3>
|
||||
Detailed View for
|
||||
<div class="btn-group">
|
||||
<a href="{{ url_for('detailed', person='Sarah', plan_date=plan_date.isoformat() if plan_date else '') }}"
|
||||
<a href="{{ url_for('detailed') }}?person=Sarah{% if plan_date %}&plan_date={{ plan_date.isoformat() }}{% endif %}"
|
||||
class="btn btn-sm {% if person == 'Sarah' %}btn-primary{% else %}btn-outline-primary{% endif %}">Sarah</a>
|
||||
<a href="{{ url_for('detailed', person='Stuart', plan_date=plan_date.isoformat() if plan_date else '') }}"
|
||||
<a href="{{ url_for('detailed') }}?person=Stuart{% if plan_date %}&plan_date={{ plan_date.isoformat() }}{% endif %}"
|
||||
class="btn btn-sm {% if person == 'Stuart' %}btn-primary{% else %}btn-outline-primary{% endif %}">Stuart</a>
|
||||
</div>
|
||||
</h3>
|
||||
|
||||
Reference in New Issue
Block a user