Files
SneakySwole/app/templates/pages/session_detail.html
Phillip Tarrant e35b78ae87 feat: add Phase 4 Logging & Tracking — inline set logging, history views
Add workout logging so users can track sets, reps, weight, and a
"felt easy?" toggle inline from the workout day view via HTMX.
Sessions auto-create on first log. History page shows past sessions
with detailed per-exercise breakdowns.

New services: WorkoutSessionService, LogService
New routes: POST /log, /log/{id}/edit, /log/{id}/delete, GET /history, /history/{id}
New templates: log_form, log_entry, session_card, log_history, session_detail
Modified: exercise_card (inline logging), nav (History link), workouts route (session context)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:12:23 -06:00

52 lines
1.5 KiB
HTML

{% extends "base.html" %}
{% block title %}Session Detail -- SneakySwole{% endblock %}
{% block content %}
<hgroup>
{% set day = days_by_id.get(workout_session.workout_day_id) %}
<h1>
{{ day.name if day else "Workout" }}
-- {{ workout_session.date.strftime('%B %d, %Y') }}
</h1>
{% if workout_session.notes %}
<p>{{ workout_session.notes }}</p>
{% endif %}
</hgroup>
{% for exercise_id, logs in logs_by_exercise.items() %}
{% set exercise = exercises_by_id[exercise_id] %}
<article>
<header>
<h3>{{ exercise.name }}</h3>
</header>
<table>
<thead>
<tr>
<th>Set</th>
<th>Reps</th>
<th>Weight</th>
<th>Easy?</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
{% for log in logs %}
<tr>
<td>{{ log.set_number }}</td>
<td>{{ log.reps_completed }}</td>
<td>{{ log.weight_used }}</td>
<td>{{ "Yes" if log.felt_easy else "No" }}</td>
<td>{{ log.notes or "" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</article>
{% else %}
<p>No exercises logged in this session.</p>
{% endfor %}
<a href="/history" role="button" class="outline">Back to History</a>
{% endblock %}