add day-detail view to monthly history calendar

날짜 셀 클릭 시 그 날 예정된 습관별 완료/실패/미완료 상태를 htmx로 불러와 보여준다.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-21 13:21:49 +09:00
co-authored by Claude Sonnet 5
parent 800f42eab1
commit 9dfcbcec8f
8 changed files with 228 additions and 2 deletions
+14
View File
@@ -367,6 +367,20 @@ def _week_context(db: Session, user_id: int, week_start: date) -> dict:
}
@router.get("/history/day/{log_date}")
def history_day_detail(request: Request, log_date: date, db: Session = Depends(get_db)):
current = _current_user_or_redirect(request, db)
if isinstance(current, RedirectResponse):
return current
items = log_service.get_day_detail(db, current.id, log_date)
return templates.TemplateResponse(
request,
"partials/day_detail.html",
{"log_date": log_date, "items": items},
)
@router.get("/history")
def history_page(
request: Request,