Add admin Sales report page

This commit is contained in:
Troll (Hermes Agent) 2026-08-04 01:20:56 +00:00
parent d02d0b3d25
commit da917692f0
3 changed files with 87 additions and 1 deletions

View file

@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sales Report — Admin</title>
<style>
body{
font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
background:#111827;
color:#f3f4f6;
margin:0;
padding:1rem;
line-height:1.5;
}
.container{max-width:1100px;margin:0 auto;}
h1{color:#60a5fa;margin-top:0;}
a{color:#93c5fd;}
table{
width:100%;
border-collapse:collapse;
background:#1f2937;
border-radius:.5rem;
overflow:hidden;
}
th,td{padding:.7rem;text-align:left;border-bottom:1px solid #374151;}
th{background:#111827;color:#9ca3af;}
tr:hover{background:#2d3748;}
.topbar{float:right;display:flex;gap:.75rem;align-items:center;}
.topbar a{color:#93c5fd;text-decoration:none;}
.empty{padding:1rem;color:#9ca3af;}
</style>
</head>
<body>
<div class="container">
<div class="topbar">
<a href="{{ url_for('admin_dashboard') }}">Dashboard</a>
<a href="{{ url_for('admin_settings') }}">Settings</a>
<a href="{{ url_for('admin_logout') }}" style="color:#f87171">Log out</a>
</div>
<h1>Sales Report</h1>
{% if sales %}
<table>
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Email</th>
<th>Picked</th>
<th>Payment Reference</th>
</tr>
</thead>
<tbody>
{% for s in sales %}
<tr>
<td>#{{ s.id }}</td>
<td>{{ s.name }}</td>
<td>{{ s.email }}</td>
<td>{% if s.customer_approved == 'both' %}Both Versions{% else %}Version {{ s.customer_approved.upper() }}{% endif %}</td>
<td>{{ s.square_payment_ref or '-' }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="empty">No delivered requests yet.</p>
{% endif %}
</div>
</body>
</html>