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>
37 lines
1.2 KiB
HTML
37 lines
1.2 KiB
HTML
{% set admin = request.state.admin %}
|
|
{% set profiles = request.state.profiles %}
|
|
{% set active_profile = request.state.active_profile %}
|
|
{% if admin %}
|
|
<li>
|
|
<details class="dropdown">
|
|
<summary>
|
|
{% if active_profile %}
|
|
{{ active_profile.display_name }}
|
|
{% else %}
|
|
Select Profile
|
|
{% endif %}
|
|
</summary>
|
|
<ul dir="rtl">
|
|
{% for profile in profiles %}
|
|
<li>
|
|
<form method="POST" action="/profiles/switch" style="margin:0;">
|
|
<input type="hidden" name="profile_id" value="{{ profile.id }}">
|
|
<button type="submit" class="outline secondary"
|
|
style="width:100%; text-align:left; border:none;">
|
|
{{ profile.display_name }}
|
|
</button>
|
|
</form>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</details>
|
|
</li>
|
|
<li><a href="/workouts">Workouts</a></li>
|
|
<li><a href="/history">History</a></li>
|
|
<li><a href="/exercises">Exercises</a></li>
|
|
<li><a href="/profiles">Profiles</a></li>
|
|
<li><a href="/logout">Logout</a></li>
|
|
{% else %}
|
|
<li><a href="/login">Login</a></li>
|
|
{% endif %}
|