| 1 | import { Text } from '@react-email/components' |
| 2 | import { env } |
| 3 | import { |
| 4 | ActionButton, |
| 5 | EmailLayout, |
| 6 | InfoCard, |
| 7 | InfoRow, |
| 8 | QuoteBlock, |
| 9 | text, |
| 10 | } from '../components/layout' |
| 11 | |
| 12 | const baseUrl = env |
| 13 | |
| 14 | interface TimesheetRejectedEmailProps { |
| 15 | orgSlug: string |
| 16 | projectName: string |
| 17 | projectSlug: string |
| 18 | reason: string |
| 19 | recipientName: string |
| 20 | rejectorName: string |
| 21 | totalHours: string |
| 22 | weekLabel: string |
| 23 | } |
| 24 | |
| 25 | export default function TimesheetRejectedEmail |
| 26 | recipientName = 'Jane Smith' |
| 27 | rejectorName = 'John Doe' |
| 28 | projectName = 'Website Redesign' |
| 29 | totalHours = '32.5' |
| 30 | weekLabel = 'Mar 3 – Mar 9, 2026' |
| 31 | reason = 'The hours logged against the API integration requirement seem too high. Could you break down what was done on Thursday and Friday?' |
| 32 | orgSlug = 'acme' |
| 33 | projectSlug = 'website-redesign' |
| 34 | }: TimesheetRejectedEmailProps) |
| 35 | return ( |
| 36 | <EmailLayout |
| 37 | accentColor='#ef4444' |
| 38 | heading='Timesheet rejected' |
| 39 | preview={`Your timesheet for ${projectName |
| 40 | > |
| 41 | <Text style={ |
| 42 | Hi {recipientName}, <span |
| 43 | reviewed your timesheet ({totalHours}h) for{' |
| 44 | <span style={text |
| 45 | changes. |
| 46 | </Text> |
| 47 | <QuoteBlock borderColor=' |
| 48 | <Text |
| 49 | style={{ |
| 50 | fontSize: '14px', |
| 51 | color: '#3f3f46', |
| 52 | lineHeight: '22px', |
| 53 | margin: '0', |
| 54 | fontStyle: 'italic', |
| 55 | }} |
| 56 | > |
| 57 | "{reason}" |
| 58 | </Text> |
| 59 | </QuoteBlock> |
| 60 | <InfoCard> |
| 61 | <InfoRow label=' |
| 62 | <InfoRow label=' |
| 63 | </InfoCard> |
| 64 | <Text style={ |
| 65 | You can edit your time entries and resubmit for approval. |
| 66 | </Text> |
| 67 | <ActionButton |
| 68 | color='#ef4444' |
| 69 | href={`${baseUrl |
| 70 | > |
| 71 | Edit & Resubmit |
| 72 | </ActionButton> |
| 73 | </EmailLayout> |
| 74 | ) |
| 75 | } |