[Admin] Notification channel toggles (web/SMS/push active-deactive)
CI/CD / CI · dotnet build (push) Successful in 50s
CI/CD / Deploy · hamkadr (push) Successful in 1m1s

Add a 'notification channels' card at the top of admin Settings with three master on/off checkboxes: web/in-app (new WebNotificationsEnabled, default true), SMS (existing SmsEnabled), and Web Push (existing PushEnabled). Removed the duplicate enable checkboxes from the SMS and Push sections so each binds once. NotificationService now gates the in-app + live SSE channel on WebNotificationsEnabled; push self-gates on PushEnabled. Migration defaults the new column to true so existing installs keep web notifications on.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-04 15:56:40 +03:30
parent 91c953ff5d
commit 8fad9c1bb6
8 changed files with 1154 additions and 22 deletions
@@ -54,6 +54,7 @@ public class SettingsService
s.SmsTemplate = incoming.SmsTemplate?.Trim();
s.SmsSender = incoming.SmsSender?.Trim();
s.NeshanMapKey = incoming.NeshanMapKey?.Trim();
s.WebNotificationsEnabled = incoming.WebNotificationsEnabled;
s.PushEnabled = incoming.PushEnabled;
s.VapidPublicKey = incoming.VapidPublicKey?.Trim();
s.VapidPrivateKey = incoming.VapidPrivateKey?.Trim();