diff --git a/data/notification-email-templates/taas.notification.interview-coming-up-guest.html b/data/notification-email-templates/taas.notification.interview-coming-up-guest.html index d24ab4f5..a1f04758 100644 --- a/data/notification-email-templates/taas.notification.interview-coming-up-guest.html +++ b/data/notification-email-templates/taas.notification.interview-coming-up-guest.html @@ -96,8 +96,17 @@
- You have an interview coming up for a Topcoder gig! See the job and get the meeting link here. + You have an interview coming up for a Topcoder gig!
+
+
Job: {{this.jobTitle}}
+
Interviewer: {{this.host}}
+
Zoom link: + zoom link +
+
Start: {{this.start}}
+
End: {{this.end}}
+
Timezone: {{this.guestTimezone}}

If you’re signed in to your Topcoder account, you can also find this information on the My Gigs Applications page. diff --git a/data/notification-email-templates/taas.notification.interview-coming-up-host.html b/data/notification-email-templates/taas.notification.interview-coming-up-host.html index cf92d52f..aff85d53 100644 --- a/data/notification-email-templates/taas.notification.interview-coming-up-host.html +++ b/data/notification-email-templates/taas.notification.interview-coming-up-host.html @@ -102,35 +102,24 @@ This is your reminder that you have an interview coming up with an awesome Topcoder freelance candidate. Click the link below to review their resume and profile before the big event.

- - - - - - - - - - - - - -
Job titleCandidate HandleInterviewsDate and Time
- {{this.jobTitle}} - {{this.handle}} - Link{{this.startTime}}
- -
- Candidate resume and profile -

Can’t wait to hear how it goes,
- The Topcoder Team -

- - - - - +
Job: {{this.jobTitle}}
+
Interviewer: {{this.guest}}
+
Zoom link: + zoom link +
+
Start: {{this.start}}
+
End: {{this.end}}
+
Timezone: {{this.hostTimezone}}
+
+ Candidate resume and profile +

Can’t wait to hear how it goes,
+ The Topcoder Team +

+ + + + diff --git a/src/services/NotificationsSchedulerService.js b/src/services/NotificationsSchedulerService.js index 93219aaf..920f56f2 100644 --- a/src/services/NotificationsSchedulerService.js +++ b/src/services/NotificationsSchedulerService.js @@ -275,12 +275,25 @@ async function sendInterviewComingUpNotifications () { const data = await getDataForInterview(interview) if (!data) { continue } + const TIME_FORMAT = 'dddd MMM. Do, hh:mm a' + const hostZoomToken = helper.signZoomLink({ type: constants.ZoomLinkType.HOST, id: interview.id }) + const hostZoomLink = `${config.TAAS_API_BASE_URL}/getInterview/${interview.id}/zoom-link?type=${constants.ZoomLinkType.HOST}&token=${hostZoomToken}` + + const guestZoomToken = helper.signZoomLink({ type: constants.ZoomLinkType.GUEST, id: interview.id }) + const guestZoomLink = `${config.TAAS_API_BASE_URL}/getInterview/${interview.id}/zoom-link?type=${constants.ZoomLinkType.GUEST}&token=${guestZoomToken}` if (!_.isEmpty(data.hostEmail)) { - data.startTime = formatInterviewTime(interview, { forInterviewHost: true }) sendNotification({}, { template: 'taas.notification.interview-coming-up-host', recipients: [{ email: data.hostEmail }], - data + data: { + guest: data.guestFullName, + jobTitle: data.jobTitle, + zoomLink: hostZoomLink, + start: moment(interview.startTimestamp).tz(interview.hostTimezone).format(TIME_FORMAT) + ` ${interview.hostTimezone}`, + end: moment(interview.endTimestamp).tz(interview.hostTimezone).format(TIME_FORMAT) + ` ${interview.hostTimezone}`, + hostTimezone: interview.hostTimezone, + interviewLink: data.interviewLink + } }) sentHostCount++ @@ -289,12 +302,20 @@ async function sendInterviewComingUpNotifications () { } if (!_.isEmpty(data.guestEmail)) { - data.startTime = formatInterviewTime(interview, { forInterviewGuest: true }) + // fallback to host timezone if by some reason we didn't obtain guest timezone + const guestTimezone = interview.guestTimezone || interview.hostTimezone // send guest emails sendNotification({}, { template: 'taas.notification.interview-coming-up-guest', recipients: [{ email: data.guestEmail }], - data + data: { + host: data.hostFullName, + jobTitle: data.jobTitle, + zoomLink: guestZoomLink, + start: moment(interview.startTimestamp).tz(guestTimezone).format(TIME_FORMAT) + ` ${guestTimezone}`, + end: moment(interview.endTimestamp).tz(guestTimezone).format(TIME_FORMAT) + ` ${guestTimezone}`, + guestTimezone + } }) sentGuestCount++