mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
30 lines
943 B
TypeScript
30 lines
943 B
TypeScript
import { WEBAPP_URL } from "@calcom/lib/constants";
|
|
import type { CalendarEvent, Person } from "@calcom/types/Calendar";
|
|
|
|
import SMSManager from "../sms-manager";
|
|
|
|
export default class AwaitingPaymentSMS extends SMSManager {
|
|
constructor(calEvent: CalendarEvent) {
|
|
super(calEvent);
|
|
}
|
|
|
|
getMessage(attendee: Person) {
|
|
const t = attendee.language.translate;
|
|
|
|
const messageText = `${t("meeting_awaiting_payment")}: ${t("complete_your_booking_subject", {
|
|
title: this.calEvent.title,
|
|
date: this.getFormattedDate(attendee.timeZone, attendee.language.locale),
|
|
interpolation: { escapeValue: false },
|
|
})}`;
|
|
|
|
const bookingUrl = `${this.calEvent.bookerUrl ?? WEBAPP_URL}/booking/${this.calEvent.uid}?changes=true`;
|
|
|
|
const urlText = t("you_can_view_booking_details_with_this_url", {
|
|
url: bookingUrl,
|
|
interpolation: { escapeValue: false },
|
|
});
|
|
|
|
return `${messageText}\n\n${urlText}`;
|
|
}
|
|
}
|