feat: add CSV export of workout history to dashboard

Add date range picker and download button to the dashboard page,
backed by GET /dashboard/export endpoint that returns a StreamingResponse
CSV file. Completes Phase 4 (final V2 improvement).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-13 14:22:50 -05:00
parent 0389aef56e
commit ebecfd0b58
5 changed files with 160 additions and 119 deletions

View File

@@ -42,5 +42,8 @@
{% endfor %}
</ul>
</article>
<!-- Export -->
{% include "partials/export_form.html" %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,19 @@
<article>
<header><h3>Export Workout History</h3></header>
<form method="get" action="/dashboard/export">
<div class="grid">
<label>
Start Date
<input type="date" name="start_date" value="{{ export_start_date }}">
</label>
<label>
End Date
<input type="date" name="end_date" value="{{ export_end_date }}">
</label>
<label>
&nbsp;
<button type="submit">Download CSV</button>
</label>
</div>
</form>
</article>