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:
@@ -42,5 +42,8 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</article>
|
||||
|
||||
<!-- Export -->
|
||||
{% include "partials/export_form.html" %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
19
app/templates/partials/export_form.html
Normal file
19
app/templates/partials/export_form.html
Normal 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>
|
||||
|
||||
<button type="submit">Download CSV</button>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
</article>
|
||||
Reference in New Issue
Block a user