mirror of
https://github.com/sstent/foodplanner.git
synced 2026-01-25 11:11:36 +00:00
trying to fix detailed tab
This commit is contained in:
@@ -179,7 +179,7 @@ async def remove_from_plan(plan_id: int, db: Session = Depends(get_db)):
|
||||
db.rollback()
|
||||
return {"status": "error", "message": str(e)}
|
||||
|
||||
@router.get("/detailed", response_class=HTMLResponse)
|
||||
@router.get("/detailed", response_class=HTMLResponse, name="detailed")
|
||||
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}")
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="templateDropdown">
|
||||
{% for t in templates %}
|
||||
<li><a class="dropdown-item" href="{{ url_for('detailed', person=person, plan_date=plan_date, template_id=t.id) }}">{{ t.name }}</a></li>
|
||||
<li><a class="dropdown-item" href="/detailed?person={{ person }}{% if plan_date %}&plan_date={{ plan_date.isoformat() }}{% endif %}&template_id={{ t.id }}">{{ t.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user