Add email notification preference for task completion

- Add EmailTaskCompleted field to NotificationPreference model
- Update notification repository to include email preference in queries
- Check email preference before sending task completion emails
- Add email preference toggle to admin panel notification-prefs page
- Update API types for email preference support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-12-04 20:04:24 -06:00
parent 0825fd9a12
commit 5a6fbe0a36
7 changed files with 125 additions and 78 deletions

View File

@@ -20,6 +20,9 @@ type NotificationPreference struct {
// Document notifications
WarrantyExpiring bool `gorm:"column:warranty_expiring;default:true" json:"warranty_expiring"`
// Email preferences
EmailTaskCompleted bool `gorm:"column:email_task_completed;default:true" json:"email_task_completed"`
}
// TableName returns the table name for GORM