feat(digest): add weekly capacity digest email cron

Sends a Monday digest to all ADMIN + MANAGER users with:
- Team utilization % for the next 4 weeks
- Overbooked resource count
- Open demand count
- Upcoming vacation count
- Top 5 most utilized resources

Route: GET /api/cron/weekly-digest (secured by CRON_SECRET).
HTML template and plain-text fallback included.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-09 13:33:12 +02:00
parent 607af1a857
commit ab4ec91e02
4 changed files with 363 additions and 0 deletions
+1
View File
@@ -7,6 +7,7 @@ export { createNotification, createNotificationsForUsers } from "./lib/create-no
export { checkBudgetThresholds } from "./lib/budget-alerts.js";
export { checkPendingEstimateReminders } from "./lib/estimate-reminders.js";
export { checkChargeabilityAlerts } from "./lib/chargeability-alerts.js";
export { sendWeeklyDigest } from "./lib/weekly-digest.js";
export { checkVacationConflicts, checkBatchVacationConflicts } from "./lib/vacation-conflicts.js";
export { lookupRate, type RateCardLookupParams, type RateCardLookupResult } from "./lib/rate-card-lookup.js";
export { autoImportPublicHolidays, type AutoImportResult } from "./lib/holiday-auto-import.js";