Jun 29 - Admin view user's notes

This commit is contained in:
2026-06-29 17:27:36 -04:00
parent 56a256633b
commit 1a88eb0251
3 changed files with 79 additions and 3 deletions
+35 -1
View File
@@ -63,7 +63,7 @@
<div class="flex gap-1">
<button class="btn btn-ghost btn-sm" onclick="location.reload()">↻ Refresh</button>
<form method="post" action="{{ url_for('admin_shifts.send_incomplete_reminders') }}" style="display:inline"
onsubmit="return confirm('Send reminder emails to all staff with incomplete checks in shifts ending within 40 minutes?')">
onsubmit="return confirm('Send reminder emails to all staff with incomplete checks in shifts ending within 45 minutes?')">
<button class="btn btn-secondary btn-sm" type="submit">📧 Remind Incomplete</button>
</form>
</div>
@@ -99,6 +99,40 @@
</table>
</div>
<!-- Today's Check Notes -->
{% if check_notes %}
<div class="card mt-4">
<div class="card-header">
<h2 class="card-title">Today's Check Notes</h2>
<span class="text-muted text-sm">{{ check_notes|length }} note{{ 's' if check_notes|length != 1 }}</span>
</div>
<table class="table">
<thead>
<tr>
<th>Time</th>
<th>User</th>
<th>Website</th>
<th>Note</th>
</tr>
</thead>
<tbody>
{% for n in check_notes %}
<tr>
<td class="text-muted text-sm" style="white-space:nowrap">
{{ n.checked_at.strftime('%H:%M') if n.checked_at else '' }}
</td>
<td style="white-space:nowrap">{{ n.full_name }}</td>
<td>
<a href="{{ n.website_url }}" target="_blank" rel="noopener" class="link">{{ n.website_name }}</a>
</td>
<td style="white-space:pre-wrap; word-break:break-word">{{ n.user_note }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
<script>
document.getElementById('today-date').textContent =
new Date().toLocaleDateString('en-US', {weekday:'long', year:'numeric', month:'long', day:'numeric'});