skill-level: junior
status: done
Task: Implement Notification Preferences
End Goal
User-configurable notification preferences stored in Firestore with a settings UI, allowing per-category control over push notifications.
Currently
- No notification preferences exist
- No UI for managing notification settings
- Settings view has no notification section
Should
NotificationPreferencesDto stores per-category toggles
- Preferences stored in
users/{userId}/settings/notifications
- Settings UI shows toggles for Shopping, Cleaning, and global enable
- Cloud Functions respect preferences before sending push notifications
Constraints
- [ ] Follow existing settings patterns (SettingsDto, SettingsService)
- [ ] Use existing TFormConfig pattern for form management
- [ ] Default all preferences to enabled for new users
- [ ] Preferences only affect push notifications, not in-app storage
Acceptance Criteria
- [ ]
NotificationPreferencesDto is created with category toggles
- [ ] Preferences are persisted to Firestore
- [ ] Settings UI displays notification preference toggles
- [ ] Toggle changes are saved immediately
- [ ] Cloud Functions check preferences before sending FCM
Implementation Checklist
- [ ] 6.1 Create
NotificationPreferencesDto with category fields
- [ ] 6.2 Add
notificationPreferences to FirestoreCollection enum (as subcollection path)
- [ ] 6.3 Create
NotificationPreferencesApi
- [ ] 6.4 Create
NotificationPreferencesService as LazySingleton
- [ ] 6.5 Implement default preferences creation for new users
- [ ] 6.6 Create notification settings view
- [ ] 6.7 Create notification settings ViewModel
- [ ] 6.8 Add navigation to notification settings from main settings
- [ ] 6.9 Update Cloud Functions to check preferences before FCM send
- [ ] 6.10 Add Firestore security rules for preferences subcollection
- [ ] 6.11 Add ARB strings for notification preference labels
Notes
- Categories:
shoppingEnabled, cleaningEnabled, globalEnabled
- Global toggle takes precedence over category toggles
- In-app notifications are always created regardless of preference
Reacties