Bo Nix better win the damn super bowl dude he gives me anxiety every time I watch him

This commit is contained in:
Ben Mosley
2025-11-30 22:36:19 -06:00
parent 1398684dec
commit 716e0c1fac
16 changed files with 1802 additions and 0 deletions

148
templates/admin_info.html Normal file
View File

@@ -0,0 +1,148 @@
<section class="grid gap-8">
<header class="flex items-center justify-between">
<h1 class="text-2xl font-bold">Info Admin Console</h1>
<a href="{{ url_for('info_page') }}" class="text-sm underline">Back to Info</a>
</header>
<!-- Contacts -->
<div class="rounded-2xl border border-slate-800 bg-slate-900/60 p-4">
<h2 class="text-lg font-semibold">Contacts</h2>
<form method="post" action="{{ url_for('admin_info_contacts_create') }}" class="mt-3 grid gap-2 sm:grid-cols-[1fr,1fr,160px,100px,100px]">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input name="name" placeholder="Name" class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700" required>
<input name="role" placeholder="Role" class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700">
<input name="phone" placeholder="Phone" class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700">
<input name="priority" type="number" min="1" max="9" value="5" class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700">
<button class="px-4 py-2 rounded-lg bg-brand-600 hover:bg-brand-700">Add</button>
</form>
<div class="mt-4 overflow-x-auto">
<table class="min-w-full text-sm">
<thead class="text-slate-300"><tr><th class="py-2 text-left px-2">Name</th><th class="py-2 text-left px-2">Role</th><th class="py-2 text-left px-2">Phone</th><th class="py-2 text-left px-2">Priority</th><th class="py-2 text-left px-2">Active</th><th class="py-2 text-left px-2">Action</th></tr></thead>
<tbody class="divide-y divide-slate-800">
{% for c in contacts %}
<tr>
<td class="py-2 px-2">{{ c.name }}</td>
<td class="py-2 px-2">{{ c.role or '' }}</td>
<td class="py-2 px-2">{{ c.phone or '' }}</td>
<td class="py-2 px-2">{{ c.priority }}</td>
<td class="py-2 px-2">{{ 'yes' if c.is_active else 'no' }}</td>
<td class="py-2 px-2">
<form method="post" action="{{ url_for('admin_info_contacts_toggle', cid=c.id) }}" class="inline">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button class="px-2 py-1 rounded border border-slate-700 hover:border-slate-500 text-xs">{{ 'Deactivate' if c.is_active else 'Activate' }}</button>
</form>
<form method="post" action="{{ url_for('admin_info_contacts_delete', cid=c.id) }}" class="inline" onsubmit="return confirm('Delete contact?');">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button class="px-2 py-1 rounded border border-red-700 hover:bg-red-700/10 text-xs">Delete</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- Department Extensions -->
<div class="rounded-2xl border border-slate-800 bg-slate-900/60 p-4">
<h2 class="text-lg font-semibold">Department Extensions</h2>
<form method="post" action="{{ url_for('admin_info_exts_create') }}" class="mt-3 grid gap-2 sm:grid-cols-[180px,1fr,120px]">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input name="ext" placeholder="532000" class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700" required>
<input name="dept" placeholder="Service Counter" class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700" required>
<button class="px-4 py-2 rounded-lg bg-brand-600 hover:bg-brand-700">Add</button>
</form>
<div class="mt-4 overflow-x-auto">
<table class="min-w-full text-sm">
<thead class="text-slate-300"><tr><th class="py-2 text-left px-2">Ext</th><th class="py-2 text-left px-2">Department</th><th class="py-2 text-left px-2">Active</th><th class="py-2 text-left px-2">Action</th></tr></thead>
<tbody class="divide-y divide-slate-800">
{% for d in exts %}
<tr>
<td class="py-2 px-2 font-mono">{{ d.ext }}</td>
<td class="py-2 px-2">{{ d.dept }}</td>
<td class="py-2 px-2">{{ 'yes' if d.is_active else 'no' }}</td>
<td class="py-2 px-2">
<form method="post" action="{{ url_for('admin_info_exts_toggle', did=d.id) }}" class="inline">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button class="px-2 py-1 rounded border border-slate-700 hover:border-slate-500 text-xs">{{ 'Deactivate' if d.is_active else 'Activate' }}</button>
</form>
<form method="post" action="{{ url_for('admin_info_exts_delete', did=d.id) }}" class="inline" onsubmit="return confirm('Delete extension?');">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<button class="px-2 py-1 rounded border border-red-700 hover:bg-red-700/10 text-xs">Delete</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- Support Items -->
<div class="rounded-2xl border border-slate-800 bg-slate-900/60 p-4">
<h2 class="text-lg font-semibold">Support & Escalation</h2>
<form method="post" action="{{ url_for('admin_info_support_create') }}" class="mt-3 grid gap-2">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="grid sm:grid-cols-3 gap-2">
<input name="category" placeholder="Guest Services" required class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700">
<input name="email" placeholder="guestservices@…" class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700">
<input name="phone" placeholder="806-791-8181 Option 1" class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700">
</div>
<textarea name="issues" rows="3" placeholder="One issue per line…" class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700"></textarea>
<input name="note" placeholder="Notes / disclaimers (optional)" class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700">
<div class="flex items-center gap-2">
<label class="text-sm inline-flex items-center gap-2">
<input type="checkbox" name="admin_only" class="rounded border-slate-700 bg-slate-950">
<span>Admin only</span>
</label>
<button class="ml-auto px-4 py-2 rounded-lg bg-brand-600 hover:bg-brand-700">Add</button>
</div>
</form>
<div class="mt-4 grid gap-3" style="grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));">
{% for s in supports %}
<article class="rounded-xl border border-slate-800 bg-slate-950/60 p-4">
<div class="flex items-center justify-between">
<h3 class="font-semibold">{{ s.category }}</h3>
<span class="text-xs text-slate-400">{{ s.audience }}</span>
</div>
{% if s.email %}<p class="text-sm text-slate-300 mt-1">{{ s.email }}</p>{% endif %}
{% if s.phone %}<p class="text-sm text-slate-300">{{ s.phone }}</p>{% endif %}
{% if s.note %}<p class="text-xs text-slate-400 mt-2">{{ s.note }}</p>{% endif %}
{% if s.issues() %}
<ul class="mt-3 text-sm list-disc pl-5 space-y-1">{% for it in s.issues() %}<li>{{ it }}</li>{% endfor %}</ul>
{% endif %}
<div class="mt-3 flex gap-2">
<form method="post" action="{{ url_for('admin_info_support_toggle', sid=s.id) }}"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><button class="px-2 py-1 rounded border border-slate-700 hover:border-slate-500 text-xs">{{ 'Deactivate' if s.is_active else 'Activate' }}</button></form>
<form method="post" action="{{ url_for('admin_info_support_delete', sid=s.id) }}" onsubmit="return confirm('Delete support item?');"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><button class="px-2 py-1 rounded border border-red-700 hover:bg-red-700/10 text-xs">Delete</button></form>
</div>
</article>
{% endfor %}
</div>
</div>
<!-- Admin-Only Quick Notes -->
<div class="rounded-2xl border border-slate-800 bg-slate-900/60 p-4">
<h2 class="text-lg font-semibold">Admin Quick Notes (Secrets)</h2>
<form method="post" action="{{ url_for('admin_info_secret_create') }}" class="mt-3 grid gap-2 sm:grid-cols-[1fr,1fr]">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<input name="label" placeholder="Register Login" required class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700">
<input name="value" placeholder="#291 / 0000" required class="px-3 py-2 rounded-lg bg-slate-950 border border-slate-700">
<textarea name="notes" rows="2" placeholder="Notes (optional)" class="sm:col-span-2 px-3 py-2 rounded-lg bg-slate-950 border border-slate-700"></textarea>
<div class="sm:col-span-2"><button class="px-4 py-2 rounded-lg bg-brand-600 hover:bg-brand-700">Add</button></div>
</form>
<div class="mt-4 grid gap-3" style="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));">
{% for s in secrets %}
<article class="rounded-xl border border-slate-800 bg-slate-950/60 p-4">
<h3 class="font-semibold">{{ s.label }}</h3>
<p class="mt-1 font-mono text-sm">{{ s.value }}</p>
{% if s.notes %}<p class="text-xs text-slate-400 mt-2 whitespace-pre-wrap">{{ s.notes }}</p>{% endif %}
<div class="mt-3 flex gap-2">
<form method="post" action="{{ url_for('admin_info_secret_toggle', sid=s.id) }}"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><button class="px-2 py-1 rounded border border-slate-700 hover:border-slate-500 text-xs">{{ 'Deactivate' if s.is_active else 'Activate' }}</button></form>
<form method="post" action="{{ url_for('admin_info_secret_delete', sid=s.id) }}" onsubmit="return confirm('Delete note?');"><input type="hidden" name="csrf_token" value="{{ csrf_token() }}"><button class="px-2 py-1 rounded border border-red-700 hover:bg-red-700/10 text-xs">Delete</button></form>
</div>
</article>
{% endfor %}
</div>
</div>
</section>