{% extends "base.html" %}

{% block title %}Download Summary Report{% endblock %}

{% block extra_css %}
<!-- Optional: Add page-specific CSS -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/summary.css') }}">
{% endblock %}

{% block content %}
<div class="main">
    <div class="container">

<!--        <a href="{{ url_for('index') }}" class="back-btn">← Back to Dashboard</a>-->

        <h2>Download Year-wise Summary Report</h2>

        {% if message %}
        <p class="message">{{ message }}</p>
        {% endif %}

        <form method="GET" action="{{ url_for('summary_report') }}">
            <label>Select Year:</label>
            <select name="year" id="year" required>
                <option value="">-- Select Year --</option>
                {% for year in years %}
                <option value="{{ year }}">AY {{ year }}-{{ year + 1 }}</option>
                {% endfor %}
            </select>

            <button type="submit">Download Summary Report</button>
        </form>

    </div>
</div>
{% block scripts %}
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
<script src="{{ url_for('static', filename='js/toggle.js') }}"></script>
{% endblock %}

{% block extra_js %}  <script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
{% endblock %}
{% endblock %}
