Summary report UI improvements and JS preview logic

This commit is contained in:
Swapnil9693
2026-02-05 14:57:38 +05:30
parent 438f84e284
commit a8e47af61c
35 changed files with 585 additions and 242 deletions

View File

@@ -1,32 +1,37 @@
{% extends "base.html" %}
{% block title %}Download Summary Report{% endblock %}
{% 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 %}
<link
rel="stylesheet"
href="{{ url_for('static', filename='css/summary.css') }}"
/>
{% endblock %} {% block content %}
<div class="container">
<div class="head">
<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>
<div class="select-download-wrapper">
<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>
<a id="downloadBtn" href="#">Download Summary Report</a>
</div>
</div>
<!-- Preview Section -->
<div id="preview" style="display: none">
<h3>Summary Preview</h3>
<div id="previewContent"></div>
</div>
</div>
{% endblock %}
{% endblock %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/summary_preview.js') }}"></script>
{% endblock %}

View File

@@ -9,7 +9,7 @@
{% block content %}
<div class="container">
<h2>Upload Income Tax Documents</h2>
<form id="income_tax_documents" method="POST" enctype="multipart/form-data">
<form id="documents" method="POST" enctype="multipart/form-data">
<label>Year:</label>
<select id="year" name="year" required></select>
<div id="yearError" style="color: red; display: none; margin-bottom: 10px;"></div>