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
1 change: 1 addition & 0 deletions connect/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ module.exports = {
DEFAULT_REPLY_EMAIL: process.env.DEFAULT_REPLY_EMAIL,

CONNECT_URL: process.env.CONNECT_URL || 'https://connect.topcoder-dev.com',
ACCOUNTS_APP_URL: process.env.ACCOUNTS_APP_URL || "https://accounts.topcoder-dev.com",
};
2 changes: 2 additions & 0 deletions connect/notificationServices/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ function handleScheduledEvents(events, setEventsStatus) {
const bundleData = {
subject: 'Your Topcoder project updates',
connectURL: config.CONNECT_URL,
accountsAppURL: config.ACCOUNTS_APP_URL,
projects: _.chain(userEvents)
.groupBy('data.data.projectId')
.mapValues(projectUserEvents => ({
Expand Down Expand Up @@ -165,6 +166,7 @@ function wrapIndividualNotification(data) {
return {
subject,
connectURL: config.CONNECT_URL,
accountsAppURL: config.ACCOUNTS_APP_URL,
projects: [{
id: data.data.data.projectId,
name: data.data.data.projectName,
Expand Down
124 changes: 65 additions & 59 deletions emails/src/partials/invites.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,73 +24,79 @@
</td>
</tr>

{{#if [isSSO]}}

<tr class="post-details">
<td class="main-td">
<table class="main-child">
<tr class="post-details">
<td class="main-td">
<table class="main-child">
<tr>
<td class="empty-child-one"></td>
<td>You have been invited to a project by {{initiator.firstName}} {{initiator.lastName}}. Please use the link below to sign in and join the project.</td>
</tr>
</table>
</td>
</tr>

<tr class="empty-50">
<td class="main-td">
<table class="main-child">
<tr><td></td></tr>
</table>
</td>
</tr>

<tr class="button-row button-one">
<td class="main-td">
<table class="main-child">
<tr>
<td class="empty-child-one"></td>
<td>You have been invited to a project by {{initiator.firstName}} {{initiator.lastName}}. To join, please register with Topcoder.</td>
<td class="second-child" align="center">
<a href="{{@root.accountsAppURL}}/sso-login/?app=connect&retUrl={{@root.connectURL}}/projects/{{projectId}}">
SSO Login
</a>
</td>
<td class="empty-child-one"></td>
</tr>
</table>
</td>
</tr>

</table>
</td>
</tr>

{{else}}
<tr class="post-details">
<td class="main-td">
<table class="main-child">
<tr>
<td class="empty-child-one"></td>
<td>You have been invited to a project by {{initiator.firstName}} {{initiator.lastName}}. To join, please register with Topcoder.</td>
</tr>
</table>
</td>
</tr>

<tr class="empty-50">
<td class="main-td">
<table class="main-child">
<tr><td></td></tr>
</table>
</td>
</tr>
<tr class="button-row button-one">
<td class="main-td">
<table class="main-child">
<tr>
<td class="empty-child-one"></td>
<td class="second-child" align="center">
<a href="{{@root.accountsAppURL}}/connect/registration?retUrl={{@root.connectURL}}/projects/{{projectId}}">
Register
</a>
</td>
<td class="empty-child-one"></td>
</tr>
</table>
</td>
</tr>
<tr class="empty-20">
<td class="main-td">
<table class="main-child">
<tr><td></td></tr>
</table>
</td>
</tr>
<tr class="post-details">
<td class="main-td">
<table class="main-child">
<tr class="empty-50">
<td class="main-td">
<table class="main-child">
<tr><td></td></tr>
</table>
</td>
</tr>
<tr class="button-row button-one">
<td class="main-td">
<table class="main-child">
<tr>
<td class="empty-child-one"></td>
<td>If you are enterprise client with SSO, please use the link below to sign in and join the project.</td>
<td class="second-child" align="center">
<a href="{{@root.accountsAppURL}}/connect/registration?retUrl={{@root.connectURL}}/projects/{{projectId}}">
Register
</a>
</td>
<td class="empty-child-one"></td>
</tr>
</table>
</td>
</tr>
<tr class="button-row button-one">
<td class="main-td">
<table class="main-child">
<tr>
<td class="empty-child-one"></td>
<td class="second-child" align="center">
<a href="{{@root.accountsAppURL}}/sso-login/?app=connect&retUrl={{@root.connectURL}}/projects/{{projectId}}">
SSO Login
</a>
</td>
<td class="empty-child-one"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
{{/if}}

<tr class="empty-20">
<td class="main-td">
<table class="main-child">
Expand Down
10 changes: 10 additions & 0 deletions emails/src/partials/project-team.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
<strong>{{userFullName}}</strong> joined the project
{{/if}}
{{#if [notifications.connect.project.member.invite.created]}}
{{#if [isSSO]}}
Hi <strong>{{userFullName}}</strong>, you are invited to join the project {{projectName}}. Please use the link below to sign in and join the project.
{{else}}
Hi <strong>{{userFullName}}</strong>, you are invited to join the project {{projectName}}. Please click on the button ("View project on Connect") below to join.
{{/if}}
{{/if}}
{{#if [notifications.connect.project.member.invite.requested]}}
You are requested to add <strong>{{userFullName}}</strong> as a copilot
Expand Down Expand Up @@ -107,9 +111,15 @@
Manage project team
</a>
{{else}}
{{#if notifications.[0].[isSSO]}}
<a href="{{@root.accountsAppURL}}/sso-login/?app=connect&retUrl={{@root.connectURL}}/projects/{{notifications.[0].projectId}}">
SSO Login
</a>
{{else}}
<a href="{{@root.connectURL}}/projects/{{notifications.[0].projectId}}">
View project on Connect
</a>
{{/if}}
{{/if}}
</td>
<td class="empty-child-one"></td>
Expand Down