Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,17 @@
<td
style="color:#151516;font-size:13px;line-height:20px;margin:0;padding:0;vertical-align:middle">
<br/>
You have an interview coming up for a Topcoder gig! See the job and get the meeting link <a href={{interviewLink}} target="_blank" rel="noopener noreferrer">here</a>.
You have an interview coming up for a Topcoder gig!
<br/>
<br/>
<div><strong>Job: </strong><span>{{this.jobTitle}}</span></div>
<div><strong>Interviewer: </strong><span>{{this.host}}</span></div>
<div><strong>Zoom link: </strong> <span>
<a href="{{this.zoomLink}}" target="_blank" rel="noopener noreferrer">zoom link</a>
</span></div>
<div><strong>Start: </strong><span>{{this.start}}</span></div>
<div><strong>End: </strong><span>{{this.end}}</span></div>
<div><strong>Timezone: </strong><span>{{this.guestTimezone}}</span></div>
<br/>
If you’re signed in to your Topcoder account, you can also find this information on the My Gigs <a href={{applicationUrl}} target="_blank" rel="noopener noreferrer">Applications</a> page.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
<br/>
<br/>
<table style="font-size:13px;border:1px solid black;border-collapse:collapse;width:100%;">
<tr style="font-weight:bold;border:1px solid black;border-collapse:collapse">
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Job title</td>
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Candidate Handle</td>
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Interviews</td>
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">Date and Time</td>
</tr>
<tr>
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">
<a href={{this.jobUrl}} target="_blank" rel="noopener noreferrer">{{this.jobTitle}}</a>
</td>
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.handle}}</td>
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">
<a href={{this.interviewLink}} target="_blank" rel="noopener noreferrer">Link</a></td>
<td style="border:1px solid black;border-collapse:collapse;text-align:center;line-height:1.5;">{{this.startTime}}</td>
</tr>
</table>

<br/>
<a href={{this.interviewLink}} target="_blank" rel="noopener noreferrer">Candidate resume and profile</a>
<p>Can’t wait to hear how it goes,<br/>
The Topcoder Team
</p>
</td>
<td
style="color:#151516;font-size:13px;height:20px;line-height:20px;margin:0;padding:0;vertical-align:middle;width:20px">
</td>
</tr>

<div><strong>Job: </strong><span>{{this.jobTitle}}</span></div>
<div><strong>Interviewer: </strong><span>{{this.guest}}</span></div>
<div><strong>Zoom link: </strong> <span>
<a href="{{this.zoomLink}}" target="_blank" rel="noopener noreferrer">zoom link</a>
</span></div>
<div><strong>Start: </strong><span>{{this.start}}</span></div>
<div><strong>End: </strong><span>{{this.end}}</span></div>
<div><strong>Timezone: </strong><span>{{this.hostTimezone}}</span></div>
<br/>
<a href={{this.interviewLink}} target="_blank" rel="noopener noreferrer">Candidate resume and profile</a>
<p>Can’t wait to hear how it goes,<br/>
The Topcoder Team
</p>
</td>
<td
style="color:#151516;font-size:13px;height:20px;line-height:20px;margin:0;padding:0;vertical-align:middle;width:20px">
</td>
</tr>
</tbody>
</table>
</td>
Expand Down
29 changes: 25 additions & 4 deletions src/services/NotificationsSchedulerService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand All @@ -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++
Expand Down