Add email notifications for task completions

When a task is completed, now sends both:
- Push notification (via Gorush)
- Email notification (via SMTP)

to all residence users except the person who completed the task.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Trey t
2025-11-26 23:29:57 -06:00
parent 5576343175
commit b05ee453c7
3 changed files with 110 additions and 19 deletions

View File

@@ -75,8 +75,9 @@ func SetupRouter(deps *Dependencies) *gin.Engine {
documentService := services.NewDocumentService(documentRepo, residenceRepo)
notificationService := services.NewNotificationService(notificationRepo, gorushClient)
// Wire up notification service to task service (for task completion notifications)
// Wire up notification and email services to task service (for task completion notifications)
taskService.SetNotificationService(notificationService)
taskService.SetEmailService(deps.EmailService)
subscriptionService := services.NewSubscriptionService(subscriptionRepo, residenceRepo, taskRepo, contractorRepo, documentRepo)
// Initialize middleware