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>
50 lines
1.2 KiB
HTML
50 lines
1.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Dashboard -- SneakySwole{% endblock %}
|
|
|
|
{% block head_extra %}
|
|
<script src="https://cdn.jsdelivr.net/npm/chart.js@4"></script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<hgroup>
|
|
<h1>Progress Dashboard</h1>
|
|
{% if active_profile %}
|
|
<p>{{ active_profile.display_name }}'s training overview</p>
|
|
{% else %}
|
|
<p>No profile selected -- <a href="/profiles">select one</a></p>
|
|
{% endif %}
|
|
</hgroup>
|
|
|
|
{% if stats %}
|
|
<!-- Summary Stats -->
|
|
<div class="grid">
|
|
{% include "partials/stats_card.html" %}
|
|
</div>
|
|
|
|
<!-- Volume by Day Chart -->
|
|
<article>
|
|
<header><h3>Volume by Workout Day</h3></header>
|
|
{% include "partials/volume_chart.html" %}
|
|
</article>
|
|
|
|
<!-- Exercise Progress Links -->
|
|
<article>
|
|
<header><h3>Per-Exercise Progress</h3></header>
|
|
<ul>
|
|
{% for exercise in exercises %}
|
|
<li>
|
|
<a href="/dashboard/exercise/{{ exercise.id }}">
|
|
{{ exercise.name }}
|
|
</a>
|
|
<small> -- {{ exercise.workout_day }} Day</small>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</article>
|
|
|
|
<!-- Export -->
|
|
{% include "partials/export_form.html" %}
|
|
{% endif %}
|
|
{% endblock %}
|