5393feefc5
- webapp/: FastAPI dashboard to add/remove participants and exclusions, view draw history, and trigger the draw (reuses main.run_draw()). Optional HTTP basic auth via WEBAPP_USERNAME/WEBAPP_PASSWORD. - file_io.py: add add/remove_participant, add/remove_exclusion, load_year helpers backing the web GUI's CRUD actions. - Dockerfile + docker-compose.yml: containerize the web GUI, with CSV_PATH bind-mounted to a host folder so participant data persists outside the container. Verified with a local docker compose build/up smoke test. - README: document the web GUI, Docker usage, and the exclusions CSV file (existing feature that wasn't documented yet). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
28 lines
836 B
HTML
28 lines
836 B
HTML
{% extends "base.html" %}
|
|
{% block title %}Draw result - Random Christmas Bot{% endblock %}
|
|
{% block content %}
|
|
|
|
<section class="card">
|
|
<h2>Draw result</h2>
|
|
{% if error %}
|
|
<p class="error">The draw failed: {{ error }}</p>
|
|
{% else %}
|
|
<p>Draw complete — emails sent to {{ new_draw|length }} participant(s).</p>
|
|
<table>
|
|
<thead><tr><th>Giver</th><th>Email</th><th>Recipients</th></tr></thead>
|
|
<tbody>
|
|
{% for row in new_draw %}
|
|
<tr>
|
|
<td>{{ row[0] }}</td>
|
|
<td>{{ row[1] }}</td>
|
|
<td>{{ row[2:]|join(", ") }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
<p><a href="/">← Back to dashboard</a></p>
|
|
</section>
|
|
|
|
{% endblock %}
|