MED-103: add booking functionality

This commit is contained in:
Helena
2025-09-17 18:11:13 +03:00
parent 7c92b787ce
commit 22f7fa134b
44 changed files with 1923 additions and 479 deletions

View File

@@ -0,0 +1,61 @@
import {
Body,
Head,
Html,
Preview,
Tailwind,
Text,
render,
} from '@react-email/components';
import { BodyStyle } from '../components/body-style';
import { EmailContent } from '../components/content';
import { EmailHeader } from '../components/header';
import { EmailHeading } from '../components/heading';
import { EmailWrapper } from '../components/wrapper';
export async function renderBookTimeFailedEmail({
reservationId,
error,
}: {
reservationId: number;
error: string;
}) {
const subject = 'Aja broneerimine ei õnnestunud';
const html = await render(
<Html>
<Head>
<BodyStyle />
</Head>
<Preview>{subject}</Preview>
<Tailwind>
<Body>
<EmailWrapper>
<EmailContent>
<EmailHeader>
<EmailHeading>{subject}</EmailHeading>
</EmailHeader>
<Text className="text-[16px] leading-[24px] text-[#242424]">
Tere
</Text>
<Text>
Broneeringu {reservationId} Connected Online'i saatmine ei
õnnestunud, kliendile tuleb teha tagasimakse.
</Text>
<Text>Saadud error: {error}</Text>
</EmailContent>
</EmailWrapper>
</Body>
</Tailwind>
</Html>,
);
return {
html,
subject,
};
}

View File

@@ -10,3 +10,4 @@ export * from './emails/all-results-received.email';
export * from './emails/order-processing.email';
export * from './emails/patient-first-results-received.email';
export * from './emails/patient-full-results-received.email';
export * from './emails/book-time-failed.email'