diff --git a/connect/config.js b/connect/config.js index e0b2ab6..f2c414a 100644 --- a/connect/config.js +++ b/connect/config.js @@ -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", }; diff --git a/connect/notificationServices/email.js b/connect/notificationServices/email.js index cdcdaa2..99cce30 100644 --- a/connect/notificationServices/email.js +++ b/connect/notificationServices/email.js @@ -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 => ({ @@ -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, diff --git a/emails/src/partials/invites.html b/emails/src/partials/invites.html index f616a14..6936d43 100644 --- a/emails/src/partials/invites.html +++ b/emails/src/partials/invites.html @@ -24,73 +24,79 @@ + {{#if [isSSO]}} - - - + + + + + + + + + + - - +
+ + + + + +
You have been invited to a project by {{initiator.firstName}} {{initiator.lastName}}. Please use the link below to sign in and join the project.
+
+ + +
+
+ - + + -
You have been invited to a project by {{initiator.firstName}} {{initiator.lastName}}. To join, please register with Topcoder. + + SSO Login + +
-
+ + + + {{else}} + + + + + + + +
You have been invited to a project by {{initiator.firstName}} {{initiator.lastName}}. To join, please register with Topcoder.
+ + - - - - -
- - - - - - - - - - -
- - Register - -
- - - - - - -
- - - - - + + + + + - - - - +
+ + +
+
+ - + + -
If you are enterprise client with SSO, please use the link below to sign in and join the project. + + Register + +
-
- - - - - - -
- - SSO Login - -
-
+ + + {{/if}} + diff --git a/emails/src/partials/project-team.html b/emails/src/partials/project-team.html index bb250e3..e9a5dc1 100644 --- a/emails/src/partials/project-team.html +++ b/emails/src/partials/project-team.html @@ -58,7 +58,11 @@ {{userFullName}} joined the project {{/if}} {{#if [notifications.connect.project.member.invite.created]}} + {{#if [isSSO]}} + Hi {{userFullName}}, you are invited to join the project {{projectName}}. Please use the link below to sign in and join the project. + {{else}} Hi {{userFullName}}, 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 {{userFullName}} as a copilot @@ -107,9 +111,15 @@ Manage project team {{else}} + {{#if notifications.[0].[isSSO]}} + + SSO Login + + {{else}} View project on Connect + {{/if}} {{/if}}