diff --git a/apps/api/src/email/templates/evidence-bulk-review-requested.tsx b/apps/api/src/email/templates/evidence-bulk-review-requested.tsx new file mode 100644 index 000000000..ce37f025f --- /dev/null +++ b/apps/api/src/email/templates/evidence-bulk-review-requested.tsx @@ -0,0 +1,137 @@ +import * as React from 'react'; +import { + Body, + Button, + Container, + Font, + Heading, + Html, + Link, + Preview, + Section, + Tailwind, + Text, +} from '@react-email/components'; +import { Footer } from '../components/footer'; +import { Logo } from '../components/logo'; +import { getUnsubscribeUrl } from '@trycompai/email'; + +interface TaskItem { + title: string; + url: string; +} + +interface Props { + toName: string; + toEmail: string; + taskCount: number; + submittedByName: string; + organizationName: string; + tasksUrl: string; + tasks: TaskItem[]; +} + +export const EvidenceBulkReviewRequestedEmail = ({ + toName, + toEmail, + taskCount, + submittedByName, + organizationName, + tasksUrl, + tasks, +}: Props) => { + const unsubscribeUrl = getUnsubscribeUrl(toEmail); + const taskText = taskCount === 1 ? 'task' : 'tasks'; + + return ( + + + + + + + + {`${taskCount} ${taskText} submitted for your review`} + + + + + + + Evidence Review Requested + + + + Hello {toName}, + + + + {submittedByName} has submitted {taskCount}{' '} + {taskText} for your review in {organizationName}. + + + + Please review the evidence and approve or reject each task: + + +
+ {tasks.map((task, index) => ( + + {'• '} + + {task.title} + + + ))} +
+ +
+ +
+ + + or copy and paste this URL into your browser:{' '} + + {tasksUrl} + + + +
+ + Don't want to receive task assignment notifications?{' '} + + Manage your email preferences + + . + +
+ +
+ +