Adds a /flush-cache web page with a button to clear all cached Google Sheets data and reset refresh timers. Link added to Tools nav across all templates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
268 lines
7.1 KiB
HTML
268 lines
7.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>FUJ Fees Dashboard</title>
|
|
<style>
|
|
body {
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
|
background-color: #0c0c0c;
|
|
/* Deeper black */
|
|
color: #cccccc;
|
|
/* Base gray terminal text */
|
|
padding: 10px;
|
|
margin: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
font-size: 11px;
|
|
/* Even smaller font */
|
|
line-height: 1.2;
|
|
}
|
|
|
|
h1 {
|
|
color: #00ff00;
|
|
/* Terminal green */
|
|
font-family: inherit;
|
|
/* Use monospace for header too */
|
|
margin-top: 10px;
|
|
margin-bottom: 20px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 1px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.table-container {
|
|
background-color: transparent;
|
|
/* Remove the card background */
|
|
border: 1px solid #333;
|
|
/* Just a thin outline if needed, or none */
|
|
box-shadow: none;
|
|
overflow-x: auto;
|
|
width: 100%;
|
|
max-width: 1200px;
|
|
}
|
|
|
|
table {
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
table-layout: auto;
|
|
}
|
|
|
|
th,
|
|
td {
|
|
padding: 2px 8px;
|
|
/* Extremely tight padding */
|
|
text-align: right;
|
|
border-bottom: 1px dashed #222;
|
|
/* Dashed lines for terminal feel */
|
|
white-space: nowrap;
|
|
}
|
|
|
|
th:first-child,
|
|
td:first-child {
|
|
text-align: left;
|
|
}
|
|
|
|
th {
|
|
background-color: transparent;
|
|
color: #888888;
|
|
font-weight: normal;
|
|
border-bottom: 1px solid #555;
|
|
/* Stronger border for header */
|
|
text-transform: lowercase;
|
|
}
|
|
|
|
tr:hover {
|
|
background-color: #1a1a1a;
|
|
/* Very subtle hover */
|
|
}
|
|
|
|
.total {
|
|
font-weight: bold;
|
|
background-color: transparent;
|
|
color: #00ff00;
|
|
/* Highlight total row */
|
|
border-top: 1px solid #555;
|
|
}
|
|
|
|
.total:hover {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.cell-empty {
|
|
color: #444444;
|
|
/* Darker gray for empty cells */
|
|
}
|
|
|
|
.cell-paid {
|
|
color: #aaaaaa;
|
|
/* Light gray for normal cells */
|
|
}
|
|
|
|
.cell-overridden {
|
|
color: #ffa500 !important;
|
|
/* Orange for overrides */
|
|
}
|
|
|
|
.nav {
|
|
margin-bottom: 20px;
|
|
font-size: 12px;
|
|
color: #555;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
align-items: center;
|
|
}
|
|
|
|
.nav > div {
|
|
display: flex;
|
|
gap: 15px;
|
|
align-items: center;
|
|
}
|
|
|
|
.nav a {
|
|
color: #00ff00;
|
|
text-decoration: none;
|
|
padding: 2px 8px;
|
|
border: 1px solid #333;
|
|
}
|
|
|
|
.nav a.active {
|
|
color: #000;
|
|
background-color: #00ff00;
|
|
border-color: #00ff00;
|
|
}
|
|
|
|
.nav a:hover {
|
|
color: #fff;
|
|
border-color: #555;
|
|
}
|
|
|
|
.nav-archived a {
|
|
font-size: 10px;
|
|
color: #666;
|
|
border-color: #222;
|
|
}
|
|
|
|
.nav-archived a.active {
|
|
color: #ccc;
|
|
background-color: #333;
|
|
border-color: #555;
|
|
}
|
|
|
|
.nav-archived a:hover {
|
|
color: #999;
|
|
border-color: #444;
|
|
}
|
|
|
|
.description {
|
|
margin-bottom: 20px;
|
|
text-align: center;
|
|
color: #888;
|
|
max-width: 800px;
|
|
}
|
|
|
|
.description a {
|
|
color: #00ff00;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.description a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.footer {
|
|
margin-top: 50px;
|
|
margin-bottom: 20px;
|
|
color: #333;
|
|
font-size: 9px;
|
|
text-align: center;
|
|
width: 100%;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.perf-breakdown {
|
|
display: none;
|
|
margin-top: 5px;
|
|
color: #222;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="nav">
|
|
<div>
|
|
<a href="/adults">[Adults]</a>
|
|
<a href="/juniors">[Juniors]</a>
|
|
</div>
|
|
<div class="nav-archived">
|
|
<span style="color: #666; margin-right: 5px;">Archived:</span>
|
|
<a href="/fees" class="active">[Adult - Attendance/Fees]</a>
|
|
<a href="/fees-juniors">[Junior Attendance/Fees]</a>
|
|
<a href="/reconcile">[Adult Payment Reconciliation]</a>
|
|
<a href="/reconcile-juniors">[Junior Payment Reconciliation]</a>
|
|
<a href="/payments">[Payments Ledger]</a>
|
|
</div>
|
|
<div class="nav-archived">
|
|
<span style="color: #666; margin-right: 5px;">Tools:</span>
|
|
<a href="/sync-bank">[Sync Bank Data]</a>
|
|
<a href="/flush-cache">[Flush Cache]</a>
|
|
</div>
|
|
</div>
|
|
|
|
<h1>FUJ Fees Dashboard</h1>
|
|
|
|
<div class="description">
|
|
Calculated monthly fees based on attendance markers.<br>
|
|
Source: <a href="{{ attendance_url }}" target="_blank">Attendance Sheet</a> |
|
|
<a href="{{ payments_url }}" target="_blank">Payments Ledger</a>
|
|
</div>
|
|
|
|
<div class="table-container">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Member</th>
|
|
{% for m in months %}
|
|
<th>{{ m }}</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for row in results %}
|
|
<tr>
|
|
<td>{{ row.name }}</td>
|
|
{% for mdata in row.months %}
|
|
<td
|
|
class="{% if mdata.cell == '-' %}cell-empty{% elif mdata.overridden %}cell-overridden{% else %}cell-paid{% endif %}">
|
|
{{ mdata.cell }}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr class="total">
|
|
<td>TOTAL</td>
|
|
{% for t in totals %}
|
|
<td>{{ t }}</td>
|
|
{% endfor %}
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
{% set rt = get_render_time() %}
|
|
<div class="footer"
|
|
onclick="document.getElementById('perf-details').style.display = (document.getElementById('perf-details').style.display === 'block' ? 'none' : 'block')">
|
|
{{ build_meta.tag }}@{{ build_meta.commit }} | render time: {{ rt.total }}s
|
|
<div id="perf-details" class="perf-breakdown">
|
|
{{ rt.breakdown }}
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |