Compare commits

...

2 Commits

Author SHA1 Message Date
b85d316491
feat: Download a csv for the report
All checks were successful
Build Docker / Build Image (push) Successful in 57s
2024-02-17 11:57:04 +11:00
43c5b5c3ba
fix: Bids page title and remove report 2024-02-17 11:42:33 +11:00
4 changed files with 9 additions and 3 deletions

Binary file not shown.

View File

@ -26,7 +26,7 @@ python3 main.py
On Windows:
```bash
python main.py
python3 main.py
```

View File

@ -1237,8 +1237,14 @@ def report():
return redirect("/login")
account = account_module.check_account(request.cookies.get("account"))
csv = '\n'.join(account_module.generateReport(account))
# Create a download
response = make_response(csv)
response.headers["Content-Disposition"] = "attachment; filename=report.csv"
response.headers["Content-Type"] = "text/csv"
return response
return jsonify(account_module.generateReport(account))
#endregion

View File

@ -65,7 +65,7 @@
</nav>
<div class="container-fluid">
<div class="d-sm-flex justify-content-between align-items-center mb-4">
<h3 class="text-dark mb-0">Dashboard</h3><a class="btn btn-primary btn-sm d-none d-sm-inline-block" role="button" href="/report"><i class="fas fa-download fa-sm text-white-50"></i>&nbsp;Generate Report</a>
<h3 class="text-dark mb-0">Bids</h3>
</div>
<h1 class="text-center">{{message}}</h1>
<div class="row">