feat(comms): logistics notification types, templates, and email settings
- Add 8 constants to NotificationTypes (FINALIST_CONFIRMED/DECLINED/EXPIRED/ WAITLIST_PROMOTED/REMINDER/WITHDRAWN, TRAVEL_CONFIRMED, VISA_STATUS_UPDATE) with matching icons and priorities in NotificationIcons/NotificationPriorities - Add 4 branded email templates: getFinalistReminderTemplate, getFinalistWithdrawnTemplate, getTravelConfirmedTemplate, getVisaStatusTemplate — registered in NOTIFICATION_EMAIL_TEMPLATES (admin-alert types use generic fallback) - Add 8 logistics seed rows to seed-notification-settings.ts; upserted to dev DB (idempotent) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -95,6 +95,16 @@ export const NotificationTypes = {
|
||||
FINALISTS_ANNOUNCED: 'FINALISTS_ANNOUNCED',
|
||||
WINNERS_ANNOUNCED: 'WINNERS_ANNOUNCED',
|
||||
REPORT_AVAILABLE: 'REPORT_AVAILABLE',
|
||||
|
||||
// Logistics
|
||||
FINALIST_CONFIRMED: 'FINALIST_CONFIRMED',
|
||||
FINALIST_DECLINED: 'FINALIST_DECLINED',
|
||||
FINALIST_EXPIRED: 'FINALIST_EXPIRED',
|
||||
FINALIST_WAITLIST_PROMOTED: 'FINALIST_WAITLIST_PROMOTED',
|
||||
FINALIST_REMINDER: 'FINALIST_REMINDER',
|
||||
FINALIST_WITHDRAWN: 'FINALIST_WITHDRAWN',
|
||||
TRAVEL_CONFIRMED: 'TRAVEL_CONFIRMED',
|
||||
VISA_STATUS_UPDATE: 'VISA_STATUS_UPDATE',
|
||||
} as const
|
||||
|
||||
export type NotificationType = (typeof NotificationTypes)[keyof typeof NotificationTypes]
|
||||
@@ -129,6 +139,14 @@ export const NotificationIcons: Record<string, string> = {
|
||||
[NotificationTypes.AWARD_RESULTS]: 'Trophy',
|
||||
[NotificationTypes.AI_RANKING_COMPLETE]: 'BarChart3',
|
||||
[NotificationTypes.AI_RANKING_FAILED]: 'AlertTriangle',
|
||||
[NotificationTypes.FINALIST_CONFIRMED]: 'CheckCircle',
|
||||
[NotificationTypes.FINALIST_DECLINED]: 'XCircle',
|
||||
[NotificationTypes.FINALIST_EXPIRED]: 'AlertTriangle',
|
||||
[NotificationTypes.FINALIST_WAITLIST_PROMOTED]: 'TrendingUp',
|
||||
[NotificationTypes.FINALIST_REMINDER]: 'Clock',
|
||||
[NotificationTypes.FINALIST_WITHDRAWN]: 'UserMinus',
|
||||
[NotificationTypes.TRAVEL_CONFIRMED]: 'Plane',
|
||||
[NotificationTypes.VISA_STATUS_UPDATE]: 'FileText',
|
||||
}
|
||||
|
||||
// Priority by notification type
|
||||
@@ -155,6 +173,14 @@ export const NotificationPriorities: Record<string, NotificationPriority> = {
|
||||
[NotificationTypes.AWARD_VOTING_OPEN]: 'high',
|
||||
[NotificationTypes.AI_RANKING_COMPLETE]: 'normal',
|
||||
[NotificationTypes.AI_RANKING_FAILED]: 'high',
|
||||
[NotificationTypes.FINALIST_EXPIRED]: 'urgent',
|
||||
[NotificationTypes.FINALIST_REMINDER]: 'high',
|
||||
[NotificationTypes.FINALIST_WITHDRAWN]: 'high',
|
||||
[NotificationTypes.FINALIST_CONFIRMED]: 'normal',
|
||||
[NotificationTypes.FINALIST_DECLINED]: 'high',
|
||||
[NotificationTypes.FINALIST_WAITLIST_PROMOTED]: 'high',
|
||||
[NotificationTypes.TRAVEL_CONFIRMED]: 'high',
|
||||
[NotificationTypes.VISA_STATUS_UPDATE]: 'high',
|
||||
}
|
||||
|
||||
interface CreateNotificationParams {
|
||||
|
||||
Reference in New Issue
Block a user