fix: improve cancellation email of reschedule RR booking (#17768)
* fix: improve cancellation email of reschedule RR booking * fix failing test * fix: uses same lucky user when rescheduling RR booking also has a fixed host * chore * chore * better message in the cancelled email * fix * fix * add booker rescheduled in reassigned email to old host * test * add reassigned subtite * fix: use same lucky user when reschedule RR booking has a fixed host * fix: test * fix: subtitle --------- Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
1 parent
a4915184cd
commit
afea724e4d
10 files changed
+107
-44
No files matched your search
@@ -463,9 +463,9 @@ describe("roundRobinManualReassignment test", () => {
|
||||
const roundRobinManualReassignment = (await import("./roundRobinManualReassignment")).default;
|
||||
await mockEventManagerReschedule();
|
||||
|
||||
const sendRoundRobinCancelledEmailsAndSMSSpy = vi.spyOn(
|
||||
const sendRoundRobinReassignedEmailsAndSMSSpy = vi.spyOn(
|
||||
await import("@calcom/emails"),
|
||||
"sendRoundRobinCancelledEmailsAndSMS"
|
||||
"sendRoundRobinReassignedEmailsAndSMS"
|
||||
);
|
||||
|
||||
const testDestinationCalendar = createTestDestinationCalendar();
|
||||
@@ -521,7 +521,7 @@ describe("roundRobinManualReassignment test", () => {
|
||||
reassignedById: 1,
|
||||
});
|
||||
|
||||
expect(sendRoundRobinCancelledEmailsAndSMSSpy).toHaveBeenCalledTimes(1);
|
||||
expect(sendRoundRobinReassignedEmailsAndSMSSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { cloneDeep } from "lodash";
|
||||
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import {
|
||||
sendRoundRobinCancelledEmailsAndSMS,
|
||||
sendRoundRobinReassignedEmailsAndSMS,
|
||||
sendRoundRobinScheduledEmailsAndSMS,
|
||||
sendRoundRobinUpdatedEmailsAndSMS,
|
||||
} from "@calcom/emails";
|
||||
@@ -373,9 +373,9 @@ export const roundRobinManualReassignment = async ({
|
||||
};
|
||||
|
||||
if (previousRRHost && emailsEnabled) {
|
||||
await sendRoundRobinCancelledEmailsAndSMS(
|
||||
cancelledEvt,
|
||||
[
|
||||
await sendRoundRobinReassignedEmailsAndSMS({
|
||||
calEvent: cancelledEvt,
|
||||
members: [
|
||||
{
|
||||
...previousRRHost,
|
||||
name: previousRRHost.name || "",
|
||||
@@ -384,9 +384,9 @@ export const roundRobinManualReassignment = async ({
|
||||
language: { translate: previousRRHostT, locale: previousRRHost.locale || "en" },
|
||||
},
|
||||
],
|
||||
eventType?.metadata as EventTypeMetadata,
|
||||
{ name: newUser.name, email: newUser.email }
|
||||
);
|
||||
reassignedTo: { name: newUser.name, email: newUser.email },
|
||||
eventTypeMetadata: eventType?.metadata as EventTypeMetadata,
|
||||
});
|
||||
}
|
||||
|
||||
if (hasOrganizerChanged) {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { cloneDeep } from "lodash";
|
||||
import { OrganizerDefaultConferencingAppType, getLocationValueForDB } from "@calcom/app-store/locations";
|
||||
import dayjs from "@calcom/dayjs";
|
||||
import {
|
||||
sendRoundRobinCancelledEmailsAndSMS,
|
||||
sendRoundRobinReassignedEmailsAndSMS,
|
||||
sendRoundRobinScheduledEmailsAndSMS,
|
||||
sendRoundRobinUpdatedEmailsAndSMS,
|
||||
} from "@calcom/emails";
|
||||
@@ -420,9 +420,9 @@ export const roundRobinReassignment = async ({
|
||||
}
|
||||
|
||||
if (emailsEnabled) {
|
||||
await sendRoundRobinCancelledEmailsAndSMS(
|
||||
cancelledRRHostEvt,
|
||||
[
|
||||
await sendRoundRobinReassignedEmailsAndSMS({
|
||||
calEvent: cancelledRRHostEvt,
|
||||
members: [
|
||||
{
|
||||
...previousRRHost,
|
||||
name: previousRRHost.name || "",
|
||||
@@ -431,9 +431,9 @@ export const roundRobinReassignment = async ({
|
||||
language: { translate: previousRRHostT, locale: previousRRHost.locale || "en" },
|
||||
},
|
||||
],
|
||||
eventType?.metadata as EventTypeMetadata,
|
||||
{ name: reassignedRRHost.name, email: reassignedRRHost.email }
|
||||
);
|
||||
reassignedTo: { name: reassignedRRHost.name, email: reassignedRRHost.email },
|
||||
eventTypeMetadata: eventType?.metadata as EventTypeMetadata,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user