Add export functionality to all reports pages

parent 849b646a
This diff is collapsed.
...@@ -129,10 +129,22 @@ ...@@ -129,10 +129,22 @@
</ol> </ol>
</nav> </nav>
</div> </div>
<div class="d-flex gap-2">
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">
<i class="fas fa-download"></i> Export
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="{{ url_for('main.bet_detail', client_id=client_id, match_id=match_id, bet_uuid=bet_uuid, export='csv', **filters) }}">Export as CSV</a></li>
<li><a class="dropdown-item" href="{{ url_for('main.bet_detail', client_id=client_id, match_id=match_id, bet_uuid=bet_uuid, export='xlsx', **filters) }}">Export as Excel</a></li>
<li><a class="dropdown-item" href="{{ url_for('main.bet_detail', client_id=client_id, match_id=match_id, bet_uuid=bet_uuid, export='pdf', **filters) }}">Export as PDF</a></li>
</ul>
</div>
<a href="{{ url_for('main.match_report_detail', client_id=client_id, match_id=match_id, **filters) }}" class="btn btn-secondary"> <a href="{{ url_for('main.match_report_detail', client_id=client_id, match_id=match_id, **filters) }}" class="btn btn-secondary">
<i class="fas fa-arrow-left"></i> Back to Match <i class="fas fa-arrow-left"></i> Back to Match
</a> </a>
</div> </div>
</div>
<!-- Bet Summary Cards --> <!-- Bet Summary Cards -->
<div class="row mb-3"> <div class="row mb-3">
......
...@@ -186,10 +186,22 @@ ...@@ -186,10 +186,22 @@
</ol> </ol>
</nav> </nav>
</div> </div>
<div class="d-flex gap-2">
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">
<i class="fas fa-download"></i> Export
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="{{ url_for('main.client_report_detail', client_id=client_id, export='csv', **filters) }}">Export as CSV</a></li>
<li><a class="dropdown-item" href="{{ url_for('main.client_report_detail', client_id=client_id, export='xlsx', **filters) }}">Export as Excel</a></li>
<li><a class="dropdown-item" href="{{ url_for('main.client_report_detail', client_id=client_id, export='pdf', **filters) }}">Export as PDF</a></li>
</ul>
</div>
<a href="{{ url_for('main.reports', **filters) }}" class="btn btn-secondary"> <a href="{{ url_for('main.reports', **filters) }}" class="btn btn-secondary">
<i class="fas fa-arrow-left"></i> Back to Reports <i class="fas fa-arrow-left"></i> Back to Reports
</a> </a>
</div> </div>
</div>
<!-- Summary Cards - First Row (3 cards) --> <!-- Summary Cards - First Row (3 cards) -->
<div class="row mb-3"> <div class="row mb-3">
......
...@@ -187,10 +187,22 @@ ...@@ -187,10 +187,22 @@
</ol> </ol>
</nav> </nav>
</div> </div>
<div class="d-flex gap-2">
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown">
<i class="fas fa-download"></i> Export
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="{{ url_for('main.match_report_detail', client_id=client_id, match_id=match_id, export='csv', **filters) }}">Export as CSV</a></li>
<li><a class="dropdown-item" href="{{ url_for('main.match_report_detail', client_id=client_id, match_id=match_id, export='xlsx', **filters) }}">Export as Excel</a></li>
<li><a class="dropdown-item" href="{{ url_for('main.match_report_detail', client_id=client_id, match_id=match_id, export='pdf', **filters) }}">Export as PDF</a></li>
</ul>
</div>
<a href="{{ url_for('main.client_report_detail', client_id=client_id, **filters) }}" class="btn btn-secondary"> <a href="{{ url_for('main.client_report_detail', client_id=client_id, **filters) }}" class="btn btn-secondary">
<i class="fas fa-arrow-left"></i> Back to Client <i class="fas fa-arrow-left"></i> Back to Client
</a> </a>
</div> </div>
</div>
<!-- Match Summary Cards --> <!-- Match Summary Cards -->
<div class="row mb-3"> <div class="row mb-3">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment