show who a RR was reassigned to on auto (#17454)
This commit is contained in:
@@ -106,10 +106,10 @@ export const ReassignDialog = ({ isOpenDialog, setIsOpenDialog, teamId, bookingI
|
||||
});
|
||||
|
||||
const roundRobinReassignMutation = trpc.viewer.teams.roundRobinReassign.useMutation({
|
||||
onSuccess: async () => {
|
||||
onSuccess: async (data) => {
|
||||
await utils.viewer.bookings.get.invalidate();
|
||||
setIsOpenDialog(false);
|
||||
showToast(t("booking_reassigned"), "success");
|
||||
showToast(t("booking_reassigned_to_host", { host: data?.reassignedTo.name }), "success");
|
||||
},
|
||||
onError: async (error) => {
|
||||
if (error.message.includes(ErrorCode.NoAvailableUsersFound)) {
|
||||
|
||||
@@ -2744,5 +2744,6 @@
|
||||
"event_end_time_in_attendee_timezone_info": "Event End Time In Attendee Timezone",
|
||||
"salesforce_create_event_on_contact": "Create event on contact, if it exists. Else fallback to lead",
|
||||
"salesforce_owner_name_to_change": "Owner name to change",
|
||||
"booking_reassigned_to_host": "Booking reassigned to {{host}}",
|
||||
"ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑"
|
||||
}
|
||||
|
||||
@@ -519,6 +519,15 @@ export const roundRobinReassignment = async ({
|
||||
hideBranding: !!eventType?.owner?.hideBranding,
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
bookingId,
|
||||
reassignedTo: {
|
||||
id: reassignedRRHost.id,
|
||||
name: reassignedRRHost.name,
|
||||
email: reassignedRRHost.email,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export default roundRobinReassignment;
|
||||
|
||||
@@ -23,7 +23,7 @@ export const roundRobinReassignHandler = async ({ ctx, input }: RoundRobinReassi
|
||||
throw new TRPCError({ code: "FORBIDDEN", message: "You do not have permission" });
|
||||
}
|
||||
|
||||
await roundRobinReassignment({ bookingId, orgId: ctx.user.organizationId });
|
||||
return await roundRobinReassignment({ bookingId, orgId: ctx.user.organizationId });
|
||||
};
|
||||
|
||||
export default roundRobinReassignHandler;
|
||||
|
||||
Reference in New Issue
Block a user