Admin suite: monitoring dashboard, user management/ban, broadcast, reports, SMS test
- /Admin/Overview: platform monitoring stats (users by role, facilities, listings, applies, push subs, queue, reports, bans) - /Admin/Users: search/filter + ban/unban (User.IsBanned + reason); banned users blocked at login - /Admin/Broadcast: send announcement (in-app + web push) to all / staff / employers via NotificationService - Reports: report button on shift/job detail → /report endpoint → /Admin/Reports (resolve/dismiss) - Settings: 'send test SMS' button; admin cross-nav links; SMS API config already in place - migration AdminBanReports; verified overview/users/broadcast/report persist Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,10 @@ public class NotificationService
|
||||
await _db.Notifications.Where(n => n.UserId == userId && !n.IsRead)
|
||||
.ExecuteUpdateAsync(s => s.SetProperty(n => n.IsRead, true));
|
||||
|
||||
/// <summary>Admin broadcast: notify a set of users (in-app + push) with a custom message.</summary>
|
||||
public Task BroadcastAsync(IReadOnlyCollection<int> userIds, string title, string? body, string? url)
|
||||
=> AddAsync(userIds.ToList(), title, body, url ?? "/");
|
||||
|
||||
public async Task NotifyNewShiftAsync(int shiftId)
|
||||
{
|
||||
var s = await _db.Shifts.Include(x => x.Facility).Include(x => x.Role)
|
||||
|
||||
Reference in New Issue
Block a user