feat: create email template for TTO reservation confirmation

feat: implement order notifications service with TTO reservation confirmation handling

feat: create migration for TTO booking email webhook trigger
This commit is contained in:
Danel Kungla
2025-09-30 16:05:43 +03:00
parent 4003284f3a
commit 72f6f2b716
56 changed files with 3692 additions and 294 deletions

View File

@@ -6,22 +6,28 @@ import { EmailFooter } from './footer';
export default function CommonFooter({ t }: { t: TFunction }) {
const namespace = 'common';
const lines = [
t(`${namespace}:footer.lines1`),
t(`${namespace}:footer.lines2`),
t(`${namespace}:footer.lines3`),
t(`${namespace}:footer.lines4`),
];
return (
<EmailFooter>
{lines.map((line, index) => (
<Text
key={index}
className="text-[16px] leading-[24px] text-[#242424]"
dangerouslySetInnerHTML={{ __html: line }}
/>
))}
<Text className="text-[16px] leading-[24px] text-[#242424]">
{t(`${namespace}:footer.title`)}
</Text>
<Text className="text-[16px] leading-[24px] text-[#242424]">
{t(`${namespace}:footer.emailField`)}{' '}
<a href={`mailto:${t(`${namespace}:footer.title`)}`}>
{t(`${namespace}:footer.email`)}
</a>
</Text>
<Text className="text-[16px] leading-[24px] text-[#242424]">
{t(`${namespace}:footer.phoneField`)}{' '}
<a href={`tel:${t(`${namespace}:footer.phone`)}`}>
{t(`${namespace}:footer.phone`)}
</a>
</Text>
<Text className="text-[16px] leading-[24px] text-[#242424]">
<a href={`https://${t(`${namespace}:footer.website`)}`}>
{t(`${namespace}:footer.website`)}
</a>
</Text>
</EmailFooter>
);
}

View File

@@ -1,11 +1,11 @@
import { Container, Text } from '@react-email/components';
import { Container, Section } from '@react-email/components';
export function EmailFooter(props: React.PropsWithChildren) {
return (
<Container className="mt-[24px]">
<Text className="px-4 text-[12px] leading-[20px] text-gray-300">
<Section className="px-4 text-[12px] leading-[20px] text-gray-300">
{props.children}
</Text>
</Section>
</Container>
);
}