feat: initialize CalBook project with comprehensive scheduling, admin, and deployment infrastructure
This commit is contained in:
29
lib/email/template-engine.ts
Normal file
29
lib/email/template-engine.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
export function renderTemplate(template: string, values: Record<string, string>) {
|
||||
let output = template;
|
||||
for (const [key, value] of Object.entries(values)) {
|
||||
output = output.replaceAll(`{{${key}}}`, value);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
export const EMAIL_TEMPLATE_PREVIEW_VALUES: Record<string, string> = {
|
||||
customerName: "Max Mustermann",
|
||||
date: "20.04.2026",
|
||||
time: "10:15",
|
||||
duration: "60",
|
||||
staffName: "Anna Beispiel",
|
||||
staffNames: "Anna Beispiel, Ben Demo",
|
||||
phone: "+49 170 000000",
|
||||
email: "max@example.com",
|
||||
notes: "Ich möchte mich zu einem Projekt beraten lassen.",
|
||||
companyName: "CalBook",
|
||||
cancelUrl: "https://calbook.example/stornieren?token=demo",
|
||||
rescheduleUrl: "https://calbook.example/buchen?rescheduleToken=demo",
|
||||
meetingUrl: "https://meet.jit.si/calbook-demo-room",
|
||||
meetingButton: "{{meetingButton}}",
|
||||
reminderLabel: "in 24 Stunden",
|
||||
hoursBefore: "24",
|
||||
reminderKind: "primary",
|
||||
timezone: "Europe/Berlin",
|
||||
dashboardUrl: "https://calbook.example/admin/termine"
|
||||
};
|
||||
Reference in New Issue
Block a user