diff --git a/messages/en.json b/messages/en.json index dfc8c08..47b200a 100644 --- a/messages/en.json +++ b/messages/en.json @@ -27,6 +27,10 @@ "booking": { "title": "LPG cylinder order", "intro": "Reserve LPG cylinders for your contingent at the camp. A confirmation will be sent to the email you provide.", + "responsibility": { + "title": "Your responsibility", + "body": "As the orderer you are responsible for ensuring your village/contingent has permission for the quantity of LPG ordered. Guideline: 60 litres per 40 participants." + }, "stepProducts": "Choose products", "stepDetails": "Your details", "stepPickup": "Pickup", diff --git a/messages/sv.json b/messages/sv.json index a843889..564398b 100644 --- a/messages/sv.json +++ b/messages/sv.json @@ -27,6 +27,10 @@ "booking": { "title": "Beställning av gasoltuber", "intro": "Reservera gasoltuber till ert kontingent på lägret. Bekräftelse skickas till angiven e-postadress.", + "responsibility": { + "title": "Beställarens ansvar", + "body": "Som beställare ansvarar du för att din by/kontingent har tillstånd för den mängd gasol som beställs. Riktlinje: 60 liter per 40 deltagare." + }, "stepProducts": "Välj produkter", "stepDetails": "Era uppgifter", "stepPickup": "Upphämtning", diff --git a/src/app/[locale]/booking/[number]/page.tsx b/src/app/[locale]/booking/[number]/page.tsx index c974595..fe947d2 100644 --- a/src/app/[locale]/booking/[number]/page.tsx +++ b/src/app/[locale]/booking/[number]/page.tsx @@ -114,6 +114,15 @@ export default async function BookingConfirmedPage({ )} +
+
+ {t('booking.responsibility.title')} +
+

+ {t('booking.responsibility.body')} +

+
+
{t('email.invoiceInfo')}
diff --git a/src/app/[locale]/page.tsx b/src/app/[locale]/page.tsx index 916101f..2991001 100644 --- a/src/app/[locale]/page.tsx +++ b/src/app/[locale]/page.tsx @@ -50,6 +50,27 @@ export default async function BookingPage({

{t('intro')}

+
+ +
+
+ {t('responsibility.title')} +
+

{t('responsibility.body')}

+
+
({ id: p.id, diff --git a/src/lib/mailjet.ts b/src/lib/mailjet.ts index 46396bc..5cb75f1 100644 --- a/src/lib/mailjet.ts +++ b/src/lib/mailjet.ts @@ -35,6 +35,8 @@ type EmailStrings = { orderSummary: string; pickup: string; invoiceInfo: string; + responsibilityTitle: string; + responsibilityBody: string; questions: string; footer: string; subtotal: string; @@ -53,6 +55,9 @@ function getStrings(locale: 'sv' | 'en', event: string): EmailStrings { orderSummary: 'Beställning', pickup: 'Upphämtning', invoiceInfo: 'Faktura skickas till organisationen efter eventet.', + responsibilityTitle: 'Beställarens ansvar', + responsibilityBody: + 'Som beställare ansvarar du för att din by/kontingent har tillstånd för den mängd gasol som beställs. Riktlinje: 60 liter per 40 deltagare.', questions: 'Har du frågor? Svara på detta mejl så hjälper vi dig.', footer: 'Detta är en automatiserad bekräftelse från Gasol247.', subtotal: 'Delsumma', @@ -69,6 +74,9 @@ function getStrings(locale: 'sv' | 'en', event: string): EmailStrings { orderSummary: 'Order', pickup: 'Pickup', invoiceInfo: 'An invoice will be sent to your organization after the event.', + responsibilityTitle: 'Your responsibility', + responsibilityBody: + 'As the orderer you are responsible for ensuring your village/contingent has permission for the quantity of LPG ordered. Guideline: 60 litres per 40 participants.', questions: 'Questions? Reply to this email and we will help you.', footer: 'This is an automated confirmation from Gasol247.', subtotal: 'Subtotal', @@ -166,7 +174,12 @@ export function renderBookingEmail( ${pickupHtml} -
+
+
${escapeHtml(s.responsibilityTitle)}
+ ${escapeHtml(s.responsibilityBody)} +
+ +
${escapeHtml(s.invoiceInfo)}
@@ -202,6 +215,8 @@ export function renderBookingEmail( `${s.total}: ${fmt(booking.totalOre)}`, ...(slotLabel ? ['', `${s.pickup}: ${slotLabel} – ${slotTime}`] : []), '', + `${s.responsibilityTitle}: ${s.responsibilityBody}`, + '', s.invoiceInfo, '', s.questions,