Show email and SMS notification status on customer list and details

Added notification preference indicators to both views so staff can
see at a glance whether a customer has email/SMS enabled without
opening edit mode.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-02 20:27:28 -04:00
parent 3ff6a96bc8
commit a9048dea2e
3 changed files with 40 additions and 0 deletions
@@ -132,6 +132,35 @@
}
</p>
</div>
<div class="col-12">
<label class="text-muted small mb-1">Notifications</label>
<div class="d-flex gap-2">
@if (Model.NotifyByEmail)
{
<span class="badge bg-success bg-opacity-10 text-success border border-success border-opacity-25">
<i class="bi bi-envelope-fill me-1"></i>Email on
</span>
}
else
{
<span class="badge bg-secondary bg-opacity-10 text-secondary border border-secondary border-opacity-25">
<i class="bi bi-envelope-slash me-1"></i>Email off
</span>
}
@if (Model.NotifyBySms)
{
<span class="badge bg-success bg-opacity-10 text-success border border-success border-opacity-25">
<i class="bi bi-chat-fill me-1"></i>SMS on
</span>
}
else
{
<span class="badge bg-secondary bg-opacity-10 text-secondary border border-secondary border-opacity-25">
<i class="bi bi-chat-slash me-1"></i>SMS off
</span>
}
</div>
</div>
</div>
</div>
</div>
@@ -74,6 +74,7 @@
<th>Type</th>
<th sortable="CurrentBalance" current-sort="@ViewBag.SortColumn" current-direction="@ViewBag.SortDirection">Balance</th>
<th sortable="IsActive" current-sort="@ViewBag.SortColumn" current-direction="@ViewBag.SortDirection">Status</th>
<th>Notifications</th>
<th class="text-end pe-4">Actions</th>
</tr>
</thead>
@@ -152,6 +153,14 @@
<td>
@await Html.PartialAsync("_StatusChip", (Kind: StatusChipHelper.Active(customer.IsActive), Text: customer.IsActive ? "Active" : "Inactive"))
</td>
<td>
<span title="@(customer.NotifyByEmail ? "Email notifications on" : "Email notifications off")">
<i class="bi @(customer.NotifyByEmail ? "bi-envelope-fill text-success" : "bi-envelope-slash text-secondary opacity-50")"></i>
</span>
<span class="ms-2" title="@(customer.NotifyBySms ? "SMS notifications on" : "SMS notifications off")">
<i class="bi @(customer.NotifyBySms ? "bi-chat-fill text-success" : "bi-chat-slash text-secondary opacity-50")"></i>
</span>
</td>
<td class="text-end pe-4">
<div class="btn-group btn-group-sm">
<a asp-action="Details" asp-route-id="@customer.Id" class="btn btn-outline-primary" title="View Details">