Files
WooNooW/admin-spa
dwindown 0cc19fb2e7 refactor: Simplify notification UI and improve UX
##  UI/UX Improvements

### Channels Page

**Changes:**
1.  Removed "Active/Inactive" badge (redundant with color)
2.  Renamed "Built-in Channels" → "Channels"
3.  Moved "Built-in" badge inline with title
4.  Removed redundant "Subscribe" toggle for push
5.  Unified "Enable/Disable" toggle for all channels
6.  Auto-subscribe when enabling push channel

**Layout:**
- Title + Built-in badge (inline)
- Description
- Enable/Disable toggle + Configure button
- Green icon when enabled, gray when disabled

**Addon Channels:**
- Will show "Addon" badge instead of "Built-in"
- Same consistent layout

### Events Page

**Changes:**
1.  Removed event-level toggle (too dense)
2.  Cleaner header layout
3.  Focus on per-channel toggles only

**Logic:**
- Each event can enable/disable specific channels
- Channel-level toggle (Channels page) = global on/off
- Per-event toggle (Events page) = event-specific on/off
- Both must be enabled for notification to send

### Expected Behavior

**Channel Toggle (Channels Page):**
- Disables/enables channel globally
- Affects all events
- Stored in `woonoow_email_notifications_enabled`
- Stored in `woonoow_push_notifications_enabled`

**Per-Event Channel Toggle (Events Page):**
- Enables/disables channel for specific event
- Stored in `woonoow_notification_settings`
- Independent per event

**Notification Sending Logic:**
```
if (channel_globally_enabled && event_channel_enabled) {
  send_notification();
}
```

---

**UI is now cleaner and more intuitive!** 
2025-11-11 15:29:03 +07:00
..