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>
42 lines
1.2 KiB
HTML
42 lines
1.2 KiB
HTML
<article>
|
|
<header>
|
|
<hgroup>
|
|
<h3>{{ exercise.name }}</h3>
|
|
<p>{{ exercise.muscle_group }} | {{ exercise.sets }} sets | Tempo: {{ exercise.tempo }}</p>
|
|
</hgroup>
|
|
</header>
|
|
|
|
{% if program %}
|
|
<div class="grid">
|
|
<div>
|
|
<small>Week 1</small>
|
|
<p>{{ program.wk1_reps }} reps @ {{ program.wk1_weight }}</p>
|
|
</div>
|
|
<div>
|
|
<small>Week 4</small>
|
|
<p>{{ program.wk4_reps }} reps @ {{ program.wk4_weight }}</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<details>
|
|
<summary>Form Cues</summary>
|
|
<p>{{ exercise.form_cues }}</p>
|
|
</details>
|
|
|
|
<!-- Inline logging (Phase 4) -->
|
|
{% if active_profile %}
|
|
<div id="logs-exercise-{{ exercise.id }}">
|
|
{% if existing_logs and existing_logs[exercise.id] %}
|
|
{% set logs = existing_logs[exercise.id] %}
|
|
{% set exercise_id = exercise.id %}
|
|
{% set next_set = logs|length + 1 %}
|
|
{% include "partials/log_entry.html" %}
|
|
{% else %}
|
|
{% set next_set = 1 %}
|
|
{% include "partials/log_form.html" %}
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</article>
|