2021-07-18 19:12:35 +00:00
|
|
|
import dayjs, { Dayjs } from "dayjs";
|
2021-09-22 19:52:38 +00:00
|
|
|
import localizedFormat from "dayjs/plugin/localizedFormat";
|
2021-07-18 19:12:35 +00:00
|
|
|
import timezone from "dayjs/plugin/timezone";
|
|
|
|
import toArray from "dayjs/plugin/toArray";
|
2021-09-22 19:52:38 +00:00
|
|
|
import utc from "dayjs/plugin/utc";
|
|
|
|
|
2021-07-18 19:12:35 +00:00
|
|
|
import EventOrganizerRequestMail from "@lib/emails/EventOrganizerRequestMail";
|
|
|
|
|
|
|
|
dayjs.extend(utc);
|
|
|
|
dayjs.extend(timezone);
|
|
|
|
dayjs.extend(toArray);
|
|
|
|
dayjs.extend(localizedFormat);
|
|
|
|
|
|
|
|
export default class EventOrganizerRequestReminderMail extends EventOrganizerRequestMail {
|
|
|
|
protected getBodyHeader(): string {
|
|
|
|
return "An event is still waiting for your approval.";
|
|
|
|
}
|
|
|
|
|
|
|
|
protected getSubject(): string {
|
2021-09-22 19:52:38 +00:00
|
|
|
const organizerStart: Dayjs = dayjs(this.calEvent.startTime).tz(this.calEvent.organizer.timeZone);
|
2021-07-18 19:12:35 +00:00
|
|
|
return `Event request is still waiting: ${this.calEvent.attendees[0].name} - ${organizerStart.format(
|
|
|
|
"LT dddd, LL"
|
|
|
|
)} - ${this.calEvent.type}`;
|
|
|
|
}
|
|
|
|
}
|