Add EOI automation system with email processing and document management

- Implement automated EOI processing from sales emails
- Add EOI document upload and management capabilities
- Enhance email thread handling with better parsing and grouping
- Add retry logic and error handling for file operations
- Introduce Documeso integration for document processing
- Create server tasks and plugins infrastructure
- Update email composer with improved attachment handling
This commit is contained in:
2025-06-10 13:59:09 +02:00
parent 5c30411c2b
commit 218705da52
25 changed files with 2351 additions and 71 deletions

View File

@@ -0,0 +1,19 @@
import { scheduleEOIReminders } from '~/server/tasks/eoi-reminders';
import { scheduleEmailProcessing } from '~/server/tasks/process-sales-emails';
export default defineNitroPlugin((nitroApp) => {
// Schedule EOI reminders when server starts
console.log('[Plugin] Initializing EOI reminder scheduler...');
// Add a small delay to ensure all services are ready
setTimeout(() => {
scheduleEOIReminders();
}, 5000);
// Schedule email processing for EOI attachments
console.log('[Plugin] Initializing email processing scheduler...');
setTimeout(() => {
scheduleEmailProcessing();
}, 7000);
});