Implement reminders system with full CRUD and background processors
- Reminders service: create, update, delete, complete, snooze, dismiss - List with filters (status, priority, assignee, entity, date range) - My/overdue/upcoming convenience endpoints - BullMQ processors: auto-follow-up creation (BR-060) and overdue notifications - Snooze with presets (1h, 4h, tomorrow, next week) and custom datetime - Un-snooze logic: snoozed reminders auto-revert to pending when snooze expires - UI: filterable list with my/all toggle, priority badges, overdue indicators - Permission-gated: view_own, view_all, create, assign_others - Entity linking: reminders can link to clients, interests, or berths Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -24,10 +24,17 @@ export const notificationsWorker = new Worker(
|
||||
break;
|
||||
}
|
||||
case 'reminder-check': {
|
||||
const { processDocumentReminders } = await import(
|
||||
'@/jobs/processors/document-reminder'
|
||||
);
|
||||
// Document signing reminders (EOI)
|
||||
const { processDocumentReminders } = await import('@/jobs/processors/document-reminder');
|
||||
await processDocumentReminders();
|
||||
// CRM follow-up reminders (BR-060)
|
||||
const { processFollowUpReminders } = await import('@/lib/services/reminders.service');
|
||||
await processFollowUpReminders();
|
||||
break;
|
||||
}
|
||||
case 'reminder-overdue-check': {
|
||||
const { processOverdueReminders } = await import('@/lib/services/reminders.service');
|
||||
await processOverdueReminders();
|
||||
break;
|
||||
}
|
||||
case 'send-notification-email': {
|
||||
@@ -57,9 +64,7 @@ export const notificationsWorker = new Worker(
|
||||
authUser.email,
|
||||
`[Port Nimara] ${notif.title}`,
|
||||
`<p>${notif.description ?? notif.title}</p>${
|
||||
notif.link
|
||||
? `<p><a href="${process.env.APP_URL}${notif.link}">View in CRM</a></p>`
|
||||
: ''
|
||||
notif.link ? `<p><a href="${process.env.APP_URL}${notif.link}">View in CRM</a></p>` : ''
|
||||
}`,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user