feat: add delete notification button with confirmation in admin notifications

This commit is contained in:
2026-06-14 10:03:59 -04:00
parent 6b2300de07
commit aea0a4d189
5 changed files with 56 additions and 1 deletions

View File

@@ -29,12 +29,13 @@ $data = $notifications['data'] ?? [];
<th>Message</th>
<th>Target</th>
<th>Read by</th>
<th style="width:60px">Actions</th>
</tr>
</thead>
<tbody>
<?php if (empty($data)): ?>
<tr>
<td colspan="6" class="text-center text-muted">No notifications sent yet.</td>
<td colspan="7" class="text-center text-muted">No notifications sent yet.</td>
</tr>
<?php else: ?>
<?php foreach ($data as $note): ?>
@@ -65,6 +66,13 @@ $data = $notifications['data'] ?? [];
</span>
<?php endif; ?>
</td>
<td>
<button class="btn btn-icon btn-xs" title="Delete"
onclick="confirmDelete(<?= $note['id'] ?>, '<?= htmlspecialchars(addslashes($note['title'] ?? '')) ?>')"
style="color:var(--danger)">
<i class="fas fa-trash"></i>
</button>
</td>
</tr>
<?php endforeach; ?>
<?php endif; ?>