| 1 | import { Section, Text } from '@react-email/components' |
| 2 | import { env } |
| 3 | import { |
| 4 | ActionButton, |
| 5 | EmailLayout, |
| 6 | InfoCard, |
| 7 | InfoRow, |
| 8 | text, |
| 9 | } from '../components/layout' |
| 10 | |
| 11 | const baseUrl = env |
| 12 | |
| 13 | interface TimesheetSentToClientEmailProps { |
| 14 | currency: string |
| 15 | orgSlug: string |
| 16 | projectName: string |
| 17 | projectSlug: string |
| 18 | recipientName: string |
| 19 | reportId: string |
| 20 | reportTitle: string |
| 21 | senderName: string |
| 22 | totalAmount: string |
| 23 | totalHours: string |
| 24 | } |
| 25 | |
| 26 | export default function TimesheetSentToClientEmail |
| 27 | recipientName = 'Jane Smith' |
| 28 | senderName = 'John Doe' |
| 29 | projectName = 'Website Redesign' |
| 30 | reportTitle = 'Week of Mar 3 – Mar 9, 2026' |
| 31 | totalHours = '32.5' |
| 32 | totalAmount = '$2,600.00' |
| 33 | currency = 'USD' |
| 34 | orgSlug = 'acme' |
| 35 | projectSlug = 'website-redesign' |
| 36 | reportId = 'tr_abc123' |
| 37 | }: TimesheetSentToClientEmailProps) |
| 38 | return ( |
| 39 | <EmailLayout |
| 40 | accentColor='#7c3aed' |
| 41 | heading='Timesheet awaiting your review' |
| 42 | preview={`Timesheet for review: ${reportTitle |
| 43 | > |
| 44 | <Text style={ |
| 45 | Hi {recipientName}, <span |
| 46 | you a timesheet to review for{' '} |
| 47 | <span style={text |
| 48 | </Text> |
| 49 | <Section style={ |
| 50 | <Text style={ |
| 51 | <Text style={ |
| 52 | </Section> |
| 53 | <InfoCard> |
| 54 | <InfoRow label=' |
| 55 | <InfoRow label=' |
| 56 | <InfoRow label=' |
| 57 | </InfoCard> |
| 58 | <Text style={ |
| 59 | Review the detailed breakdown and either approve the timesheet or raise |
| 60 | a dispute if anything needs correction. |
| 61 | </Text> |
| 62 | <ActionButton |
| 63 | href={`${baseUrl |
| 64 | > |
| 65 | Review Timesheet |
| 66 | </ActionButton> |
| 67 | </EmailLayout> |
| 68 | ) |
| 69 | } |
| 70 | |
| 71 | const hoursSection = { |
| 72 | textAlign: 'center' as |
| 73 | padding: '20px 0 8px', |
| 74 | } |
| 75 | |
| 76 | const hoursLabel = { |
| 77 | fontSize: '13px', |
| 78 | color: '#71717a', |
| 79 | fontWeight: '500' as |
| 80 | margin: '0 0 4px', |
| 81 | textAlign: 'center' as |
| 82 | textTransform: 'uppercase' as |
| 83 | letterSpacing: '0.5px', |
| 84 | } |