Files
The-Workers-Club/templates/admin_avail.html

40 lines
1.5 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<section class="rounded-2xl border border-slate-800 bg-slate-900/60 p-4 overflow-x-auto">
<div class="flex items-center justify-between">
<h1 class="text-xl font-bold mb-3">Team Availability (Weekly)</h1>
<a class="text-sm underline text-slate-300" href="{{ url_for('admin_availability') }}">Refresh</a>
</div>
<table class="min-w-full text-sm">
<thead class="text-slate-300">
<tr>
<th class="py-2 text-left">User</th>
{% for _k,lab in day_names %}<th class="py-2 text-left">{{ lab }}</th>{% endfor %}
</tr>
</thead>
<tbody class="divide-y divide-slate-800">
{% for row in rows %}
<tr>
<td class="py-2 font-semibold">
<div class="flex items-center gap-2">
<span>{{ row.username }}</span>
<a href="{{ url_for('admin_availability_edit', user_id=row.user_id) }}"
class="text-xs underline text-slate-400 hover:text-slate-200">✎ Edit</a>
</div>
</td>
{% for k,_lab in day_names %}
{% set d = row.week.get(k) %}
<td class="py-2">
{% if d and d.avail %}
<span class="inline-flex items-center gap-1 rounded-md border border-emerald-700 bg-emerald-500/15 px-2 py-0.5 text-emerald-200">
{{ d.start }}{{ d.end }}
</span>
{% else %}
<span class="text-slate-500"></span>
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
</section>