diff --git a/docs/email-system.md b/docs/email-system.md
index f95ee08..4b6dc53 100644
--- a/docs/email-system.md
+++ b/docs/email-system.md
@@ -1,5 +1,7 @@
# Email System Documentation
+> This doc is partially outdated. New templates can be viewed locally. See routes dir. Example: http://localhost:5173/local-only/e-mail-templates/user-invite Text versions are generated automatically and will be printed to console, when local page is opened.
+
The Open Reception appointment booking platform includes a comprehensive email system for automated communications with clients and staff members. This document provides technical details and administration guidance for managing the email system.
## Overview
diff --git a/project.inlang/messages/de.json b/project.inlang/messages/de.json
index 1ffe690..3d6bbdb 100644
--- a/project.inlang/messages/de.json
+++ b/project.inlang/messages/de.json
@@ -841,7 +841,7 @@
"description": "Wir senden Ihnen eine Bestätigungs-E-Mail mit den Termindetails."
},
"phone": {
- "description": "Format: +491234567890. Wir kontaktieren Sie, falls es Fragen/Anderungen zu Ihrem Termin gibt.",
+ "description": "Format: +491234567890. {name} kontaktiert Sie ggf. telefonisch, falls es Fragen/Änderungen zu Ihrem Termin gibt.",
"optional": "(optional)"
},
"action": "Daten hinzufügen"
@@ -909,5 +909,47 @@
"reserved": "reserviert"
}
}
+ },
+ "emails": {
+ "poweredBy": "Betrieben mit",
+ "greeting": "Hallo {name},",
+ "oclock": "Uhr",
+ "appointmentBooked": {
+ "subject": "{channel} bei {tenant} gebucht",
+ "introduction": "Ihr Termin wurde gebucht.",
+ "action": "Termin absagen",
+ "reason": "Sie erhalten diese E-Mail, weil jemand mit Ihrer E-Mail Adresse einen Termin bei gebucht hat."
+ },
+ "appointmentReminder": {
+ "subject": "Erinnerung: Ihr Termin bei {tenant}",
+ "introduction": "Ihr Termin wurde bei {tenant} steht in Kürze bevor.",
+ "action": "Termin absagen",
+ "reason": "Sie erhalten diese E-Mail, weil jemand mit Ihrer E-Mail Adresse einen Termin bei gebucht hat."
+ },
+ "appointmentRequest": {
+ "subject": "{channel} bei {tenant} angefragt",
+ "introduction": "Ihr Termin wurde angefragt. Sie werden benachrichtigt, sobald der Termin bestätigt wurde.",
+ "reason": "Sie erhalten diese E-Mail, weil jemand mit Ihrer E-Mail Adresse einen Termin bei angefragt hat."
+ },
+ "confirmation": {
+ "subject": "E-Mail Adresse bestätigen",
+ "introduction": "willkommen bei unserem Terminbuchungsportal. Bitte bestätige Deine E-Mail Adresse.",
+ "action": "E-Mail Adresse bestätigen",
+ "hint": "Dieser Link ist nur {expirationMinutes} Minuten gültig und kann nur einmal verwendet werden.",
+ "reason": "Du erhältst diese E-Mail, weil jemand für Deine E-Mail Adresse ein Konto registriert hat."
+ },
+ "pinReset": {
+ "subject": "PIN erfolgreich geändert",
+ "introduction": "Sie haben erfolgreich Ihre PIN beim Terminbuchungsportal von {tenant} geändert und können sich ab sofort mit Ihrer PIN anmelden.",
+ "action": "Anmelden",
+ "reason": "Sie erhalten diese E-Mail, weil jemand für die PIN für Ihr Konto geändert hat."
+ },
+ "userInvite": {
+ "subject": "E-Mail Adresse bestätigen für {tenant}",
+ "introduction": "willkommen beim Terminbuchungsportal von {tenant}. Bitte bestätige Deine E-Mail Adresse.",
+ "action": "E-Mail Adresse bestätigen",
+ "hint": "Dieser Link ist nur {expirationMinutes} Minuten gültig und kann nur einmal verwendet werden.",
+ "reason": "Du erhältst diese E-Mail, weil jemand für Deine E-Mail Adresse ein Konto registriert hat."
+ }
}
}
diff --git a/project.inlang/messages/en.json b/project.inlang/messages/en.json
index 2b6e3ee..9372fa1 100644
--- a/project.inlang/messages/en.json
+++ b/project.inlang/messages/en.json
@@ -562,7 +562,7 @@
"absences": {
"title": "Absences",
"add": {
- "title": "Add Anbsence",
+ "title": "Add Absence",
"description": "Absences are a way to mark you agents as being unavailbale.",
"fields": {
"agent": {
@@ -850,7 +850,7 @@
"description": "We will use this to send you the appointment details."
},
"phone": {
- "description": "Format: +1234567890. We may contact you, if there are questions or changes regarding your appointment.",
+ "description": "Format: +1234567890. {name} may contact you by phone, if there are questions or changes regarding your appointment.",
"optional": "(optional)"
},
"action": "Add personal data"
@@ -918,5 +918,47 @@
"reserved": "reserved"
}
}
+ },
+ "emails": {
+ "poweredBy": "Powered by",
+ "greeting": "Hello {name},",
+ "oclock": "",
+ "appointmentBooked": {
+ "subject": "{channel} at {tenant} booked successfully",
+ "introduction": "your appointment for has been booked.",
+ "action": "Cancel appointment",
+ "reason": "You are receiving this email because someone booked an appointment with your e-mail address."
+ },
+ "appointmentReminder": {
+ "subject": "Reminder: Your appointment with {tenant}",
+ "introduction": "your appointment with {tenant} is soon.",
+ "action": "Cancel appointment",
+ "reason": "You are receiving this email because someone booked an appointment with your e-mail address."
+ },
+ "appointmentRequest": {
+ "subject": "{channel} with {tenant} requested",
+ "introduction": "your appointment was requested. You will be notified once it is confirmed.",
+ "reason": "You are receiving this email because someone requested an appointment with your e-mail address."
+ },
+ "confirmation": {
+ "subject": "Confirm your E-Mail Address",
+ "introduction": "welcome our appointment booking platform. Please confirm your e-mail address.",
+ "action": "Confirm E-Mail Address",
+ "hint": "This link is only valid for {expirationMinutes} minutes and can only be used once.",
+ "reason": "You are receiving this email because someone registered an account with your e-mail address."
+ },
+ "pinReset": {
+ "subject": "PIN successfully changed",
+ "introduction": "you've successfully changed your PIN on the {tenant} appointment booking platform. You can now log-in with your new PIN.",
+ "action": "Login",
+ "reason": "You are receiving this email because someone changed the PIN-Code for your account."
+ },
+ "userInvite": {
+ "subject": "Confirm your E-Mail Address",
+ "introduction": "welcome our appointment booking platform. Please confirm your e-mail address.",
+ "action": "Confirm E-Mail Address",
+ "hint": "This link is only valid for {expirationMinutes} minutes and can only be used once.",
+ "reason": "You are receiving this email because someone registered an account with your e-mail address."
+ }
}
}
diff --git a/src/lib/const/locales.ts b/src/lib/const/locales.ts
index dabcb15..99ced3b 100644
--- a/src/lib/const/locales.ts
+++ b/src/lib/const/locales.ts
@@ -2,6 +2,8 @@ import { m } from "$i18n/messages";
export const supportedLocales = ["en", "de"] as const;
+export type SupportedLocale = (typeof supportedLocales)[number];
+
export const translatedLocales = {
en: m["locales.en"](),
de: m["locales.de"](),
diff --git a/src/lib/emails/AppointmentBooked.svelte b/src/lib/emails/AppointmentBooked.svelte
new file mode 100644
index 0000000..b8290c6
--- /dev/null
+++ b/src/lib/emails/AppointmentBooked.svelte
@@ -0,0 +1,65 @@
+
+
+
+ {renderAppointmentDate(appointment.appointmentDate, locale)}
+ {renderAppointmentTime(appointment.appointmentDate, locale)}
+ {m["emails.oclock"]()}
+
+ {#if address.additionalAddressInfo}{address.additionalAddressInfo}
{/if}
+ {address.zip}
+ {address.city}
+
+ {renderAppointmentDate(appointment.appointmentDate, locale)}
+ {renderAppointmentTime(appointment.appointmentDate, locale)}
+ {m["emails.oclock"]()}
+
+ {#if address.additionalAddressInfo}{address.additionalAddressInfo}
{/if}
+ {address.zip}
+ {address.city}
+
+ {renderAppointmentDate(appointment.appointmentDate, locale)}
+ {renderAppointmentTime(appointment.appointmentDate, locale)}
+ {m["emails.oclock"]()}
+
+ {#if address.additionalAddressInfo}{address.additionalAddressInfo}
{/if}
+ {address.zip}
+ {address.city}
+
it).join(" ")}>{@render children?.()}
+ +