updated export to csv file

This commit is contained in:
2025-04-25 14:41:10 +03:00
parent a8f07497a0
commit e6878495a1
2 changed files with 37 additions and 12 deletions

View File

@@ -668,3 +668,25 @@ body.dark-mode .export-description {
font-size: 0.9em; /* Reduce the font size */ font-size: 0.9em; /* Reduce the font size */
border-radius: 3px; /* Slightly smaller border radius */ border-radius: 3px; /* Slightly smaller border radius */
} }
/* Style for the report-table container */
.report-table-container {
max-height: 1000px; /* Set the maximum height */
overflow-y: auto; /* Enable vertical scrolling */
border: 1px solid #ddd; /* Optional: Add a border for better visibility */
margin-top: 10px; /* Optional: Add spacing above the table */
}
/* Ensure the table takes full width */
.report-table-container table {
width: 100%; /* Make the table take the full width of the container */
border-collapse: collapse; /* Optional: Collapse table borders */
}
/* Optional: Add styles for table rows and cells */
.report-table-container th,
.report-table-container td {
padding: 8px;
text-align: left;
border: 1px solid #ddd; /* Add borders to table cells */
}

View File

@@ -29,7 +29,7 @@
<label class="export-description">Export current report as:</label> <label class="export-description">Export current report as:</label>
<div class="button-row"> <div class="button-row">
<button class="btn export-btn" id="export-csv">Export CSV</button> <button class="btn export-btn" id="export-csv">Export CSV</button>
<button class="btn export-btn" id="export-pdf">Export PDF</button> <!-- <button class="btn export-btn" id="export-excel">Export excell</button> -->
</div> </div>
</div> </div>
</div> </div>
@@ -37,16 +37,19 @@
<!-- Data Display Card --> <!-- Data Display Card -->
<div class="card report-table-card"> <div class="card report-table-card">
<h3 id="report-title">No data to display, please select a report.</h3> <h3 id="report-title">No data to display, please select a report.</h3>
<table class="scan-table" id="report-table"> <div class="report-table-container">
<thead> <table class="scan-table" id="report-table">
<tr> <thead>
<!-- Table headers will be dynamically populated --> <tr>
</tr> <!-- Table headers will be dynamically populated -->
</thead> </tr>
<tbody> </thead>
<!-- Table data will be dynamically populated --> <tbody>
</tbody> <!-- Table data will be dynamically populated -->
</table> </tbody>
</table>
</div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}