| 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 TimesheetSubmittedEmailProps { |
| 14 | entryCount: number |
| 15 | memberName: string |
| 16 | orgSlug: string |
| 17 | projectName: string |
| 18 | projectSlug: string |
| 19 | recipientName: string |
| 20 | totalHours: string |
| 21 | weekLabel: string |
| 22 | } |
| 23 | |
| 24 | export default function TimesheetSubmittedEmail |
| 25 | recipientName = 'John Doe' |
| 26 | memberName = 'Jane Smith' |
| 27 | projectName = 'Website Redesign' |
| 28 | totalHours = '32.5' |
| 29 | weekLabel = 'Mar 3 – Mar 9, 2026' |
| 30 | entryCount = 8, |
| 31 | orgSlug = 'acme' |
| 32 | projectSlug = 'website-redesign' |
| 33 | }: TimesheetSubmittedEmailProps) |
| 34 | return ( |
| 35 | <EmailLayout |
| 36 | accentColor='#7c3aed' |
| 37 | heading='Timesheet submitted for review' |
| 38 | preview={`${memberName |
| 39 | > |
| 40 | <Text style={ |
| 41 | Hi {recipientName}, <span |
| 42 | submitted a timesheet for <span style={text |
| 43 | that needs your approval. |
| 44 | </Text> |
| 45 | <Section style={ |
| 46 | <Text style={ |
| 47 | <Text style={ |
| 48 | </Section> |
| 49 | <InfoCard> |
| 50 | <InfoRow label=' |
| 51 | <InfoRow label=' |
| 52 | <InfoRow |
| 53 | label='Entries' |
| 54 | value={`${entryCount |
| 55 | /> |
| 56 | </InfoCard> |
| 57 | <ActionButton href={ |
| 58 | Review Timesheet |
| 59 | </ActionButton> |
| 60 | </EmailLayout> |
| 61 | ) |
| 62 | } |
| 63 | |
| 64 | const hoursSection = { |
| 65 | textAlign: 'center' as |
| 66 | padding: '20px 0 8px', |
| 67 | } |
| 68 | |
| 69 | const hoursLabel = { |
| 70 | fontSize: '13px', |
| 71 | color: '#71717a', |
| 72 | fontWeight: '500' as |
| 73 | margin: '0 0 4px', |
| 74 | textAlign: 'center' as |
| 75 | textTransform: 'uppercase' as |
| 76 | letterSpacing: '0.5px', |
| 77 | } |