mirror of
https://github.com/documenso/documenso.git
synced 2025-11-10 04:22:32 +10:00
Implements a bulk send feature allowing users to upload a CSV file to create multiple documents from a template. Includes CSV template generation, background processing, and email notifications. <img width="563" alt="image" src="https://github.com/user-attachments/assets/658cee71-6508-4a00-87da-b17c6762b7d8" /> <img width="578" alt="image" src="https://github.com/user-attachments/assets/bbfac70b-c6a0-466a-be98-99ca4c4eb1b9" /> <img width="635" alt="image" src="https://github.com/user-attachments/assets/65b2f55d-d491-45ac-84d6-1a31afe953dd" /> ## Changes Made - Added `TemplateBulkSendDialog` with CSV upload/download functionality - Implemented bulk send job handler using background task system - Created email template for completion notifications - Added bulk send option to template view and actions dropdown - Added CSV parsing with email/name validation ## Testing Performed - CSV upload with valid/invalid data - Bulk send with/without immediate sending - Email notifications and error handling - Team context integration - File size and row count limits Resolves #1550
29 lines
1.5 KiB
TypeScript
29 lines
1.5 KiB
TypeScript
import { JobClient } from './client/client';
|
|
import { SEND_CONFIRMATION_EMAIL_JOB_DEFINITION } from './definitions/emails/send-confirmation-email';
|
|
import { SEND_RECIPIENT_SIGNED_EMAIL_JOB_DEFINITION } from './definitions/emails/send-recipient-signed-email';
|
|
import { SEND_SIGNING_REJECTION_EMAILS_JOB_DEFINITION } from './definitions/emails/send-rejection-emails';
|
|
import { SEND_SIGNING_EMAIL_JOB_DEFINITION } from './definitions/emails/send-signing-email';
|
|
import { SEND_TEAM_DELETED_EMAIL_JOB_DEFINITION } from './definitions/emails/send-team-deleted-email';
|
|
import { SEND_TEAM_MEMBER_JOINED_EMAIL_JOB_DEFINITION } from './definitions/emails/send-team-member-joined-email';
|
|
import { SEND_TEAM_MEMBER_LEFT_EMAIL_JOB_DEFINITION } from './definitions/emails/send-team-member-left-email';
|
|
import { BULK_SEND_TEMPLATE_JOB_DEFINITION } from './definitions/internal/bulk-send-template';
|
|
import { SEAL_DOCUMENT_JOB_DEFINITION } from './definitions/internal/seal-document';
|
|
|
|
/**
|
|
* The `as const` assertion is load bearing as it provides the correct level of type inference for
|
|
* triggering jobs.
|
|
*/
|
|
export const jobsClient = new JobClient([
|
|
SEND_SIGNING_EMAIL_JOB_DEFINITION,
|
|
SEND_CONFIRMATION_EMAIL_JOB_DEFINITION,
|
|
SEND_TEAM_MEMBER_JOINED_EMAIL_JOB_DEFINITION,
|
|
SEND_TEAM_MEMBER_LEFT_EMAIL_JOB_DEFINITION,
|
|
SEND_TEAM_DELETED_EMAIL_JOB_DEFINITION,
|
|
SEAL_DOCUMENT_JOB_DEFINITION,
|
|
SEND_SIGNING_REJECTION_EMAILS_JOB_DEFINITION,
|
|
SEND_RECIPIENT_SIGNED_EMAIL_JOB_DEFINITION,
|
|
BULK_SEND_TEMPLATE_JOB_DEFINITION,
|
|
] as const);
|
|
|
|
export const jobs = jobsClient;
|