feat: Implement junior fees dashboard and reconciliation
- Add dual-sheet architecture to pull attendance from both adult and junior spreadsheets. - Introduce parsing rules to isolate juniors (e.g. above '# Treneri', tier 'J'). - Add new endpoints `/fees-juniors` and `/reconcile-juniors` to track junior attendances and match bank payments. - Display granular attendance components showing adult vs. junior practices. - Add fee rule configuration supporting custom pricing exceptions for specific months (e.g. Sep 2025) and merging billing periods. - Add `make sync-2025` target to the Makefile for convenience. - Document junior fees implementation logic and rules in prompts/outcomes. Co-authored-by: Antigravity <antigravity@google.com>
This commit is contained in:
216
templates/fees-juniors.html
Normal file
216
templates/fees-juniors.html
Normal file
@@ -0,0 +1,216 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>FUJ Junior Fees Dashboard</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
background-color: #0c0c0c;
|
||||
color: #cccccc;
|
||||
padding: 10px;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-size: 11px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: #00ff00;
|
||||
font-family: inherit;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 20px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.table-container {
|
||||
background-color: transparent;
|
||||
border: 1px solid #333;
|
||||
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;
|
||||
text-align: right;
|
||||
border-bottom: 1px dashed #222;
|
||||
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;
|
||||
text-transform: lowercase;
|
||||
}
|
||||
|
||||
tr:hover {
|
||||
background-color: #1a1a1a;
|
||||
}
|
||||
|
||||
.total {
|
||||
font-weight: bold;
|
||||
background-color: transparent;
|
||||
color: #00ff00;
|
||||
border-top: 1px solid #555;
|
||||
}
|
||||
|
||||
.total:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.cell-empty {
|
||||
color: #444444;
|
||||
}
|
||||
|
||||
.cell-paid {
|
||||
color: #aaaaaa;
|
||||
}
|
||||
|
||||
.cell-overridden {
|
||||
color: #ffa500 !important;
|
||||
}
|
||||
|
||||
.nav {
|
||||
margin-bottom: 20px;
|
||||
font-size: 12px;
|
||||
color: #555;
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.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">
|
||||
<a href="/fees">[Attendance/Fees]</a>
|
||||
<a href="/fees-juniors" class="active">[Junior Fees]</a>
|
||||
<a href="/reconcile">[Payment Reconciliation]</a>
|
||||
<a href="/reconcile-juniors">[Junior Reconciliation]</a>
|
||||
<a href="/payments">[Payments Ledger]</a>
|
||||
</div>
|
||||
|
||||
<h1>FUJ Junior Fees Dashboard</h1>
|
||||
|
||||
<div class="description">
|
||||
Calculated monthly fees based on attendance markers.<br>
|
||||
Source: <a href="{{ attendance_url }}" target="_blank">Junior 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')">
|
||||
render time: {{ rt.total }}s
|
||||
<div id="perf-details" class="perf-breakdown">
|
||||
{{ rt.breakdown }}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user