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