Skip to content

Commit

Permalink
feat: updated email templates and subject lines
Browse files Browse the repository at this point in the history
  • Loading branch information
kriscooke committed May 20, 2021
1 parent 6048ea1 commit ac33582
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 118 deletions.
45 changes: 12 additions & 33 deletions app/server/emailTemplates/amendment.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,50 +33,29 @@ const createAmendmentMail = ({
</tr>
<tr style="border-top: 0px">
<td style="padding: 20px 10px 30px 10px;">
<h3>Hello, ${firstName} ${lastName}.</h3>
<h3>Hello ${firstName} ${lastName},</h3>
<p>
Changes are requested to your CIIP application for facility
<strong>${facilityName}</strong> on behalf of
Changes are requested to your CIIP application (#${applicationId})
for facility <strong>${facilityName}</strong> on behalf of
<strong>${operatorName}</strong>.
</p>
<p>Further steps are necessary to submit your CIIP application:</p>
<ul>
<li>
<strong
>Please log in to the CIIP Portal and address the requested
changes.</strong
>
Your timely attention to this request will reduce the amount of
time required to process your incentive payment.
</li>
<li>
After logging in,
<p>
<strong>
Please
<a
href=${createUrl(
`reporter/application/${encodedAppId}/version/${versionNumber}/view`
)}
>view the submitted application</a
>revise and resubmit your application</a
>
for the facility named above.
</li>
<li>
Review the feedback, including requested changes, which are found
in the communication pane on the right side of the window.
</li>
<li>
To update the application, click the green "Revise Application"
button at the bottom of the page.
</li>
<li>
You will be directed back to your application, which will require
certification, and submission again.
</li>
</ul>
with the requested changes.
</strong>
</p>
<p>
If you have any questions during the application process, please
contact
<a href="mailto:${contactEmail}?subject=CIIP Portal Inquiry"
>${contactEmail}</a
<a href="mailto:${contactEmail}?subject=CIIP Inquiry">
${contactEmail}</a
>
</p>
</td>
Expand Down
23 changes: 13 additions & 10 deletions app/server/emailTemplates/applicationDecision.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const html = require('html-template-tag');
const createUrl = require('../helpers/createUrl');

const createApplicationDecisionMail = ({
applicationId,
firstName,
lastName,
email,
Expand All @@ -11,6 +12,11 @@ const createApplicationDecisionMail = ({
status,
contactEmail
}) => {
const operationFacilitiesUrl = createUrl(
`reporter/facilities?filterArgs=${encodeURIComponent(
JSON.stringify({organisationRowId: organisationId})
)}`
);
return html`
<table
align="center"
Expand All @@ -29,33 +35,30 @@ const createApplicationDecisionMail = ({
</tr>
<tr style="border-top: 0px">
<td style="padding: 20px 10px 30px 10px;">
<h3>Hello, ${firstName} ${lastName}.</h3>
<h3>Hello ${firstName} ${lastName},</h3>
<p>
Your CIIP Application for the
Your CIIP Application (#${applicationId}) for the
<strong>${facilityName}</strong> facility on behalf of
<strong>${operatorName}</strong> has been ${status}.
</p>
<p>
${status === 'approved'
? 'No further action from you is required at this time. Your incentive payment is being processed.'
? 'Your incentive payment is being processed.'
: status === 'rejected'
? 'Thank you for applying to the CIIP. Unfortunately this submission did not meet program requirements and a payment cannot be granted.'
: ''}
</p>
<p>
Your application(s) can be viewed in the
<a
href="${createUrl(
`reporter/facilities?organisationRowId=${organisationId}`
)}"
<a href="${operationFacilitiesUrl}"
>Operation Facilities dashboard</a
>.
</p>
<p>
If you have any questions, please contact
<a href="mailto:${contactEmail}?subject=CIIP Portal Inquiry"
>${contactEmail}</a
>
<a href="mailto:${contactEmail}?subject=CIIP Inquiry">
${contactEmail}
</a>
</p>
</td>
</tr>
Expand Down
34 changes: 19 additions & 15 deletions app/server/emailTemplates/confirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const createConfirmationMail = ({
'base64'
);
const encodedAppId = encodeURIComponent(appId);
const operationFacilitiesUrl = createUrl(
`reporter/facilities?filterArgs=${encodeURIComponent(
JSON.stringify({organisationRowId: organisationId})
)}`
);
return html`
<table
align="center"
Expand All @@ -34,14 +39,15 @@ const createConfirmationMail = ({
</tr>
<tr style="border-top: 0px">
<td style="padding: 20px 10px 30px 10px;">
<h3>Hello, ${firstName} ${lastName}.</h3>
<h4>
<h3>Hello ${firstName} ${lastName},</h3>
<p>
Thank you for your submission to the CleanBC Industrial Incentive
Program.
</h4>
</p>
<p>
Your application on behalf of <strong>${operatorName}</strong> for
facility <strong>${facilityName}</strong> has been received.
Your application (#${applicationId}) for facility
<strong>${facilityName}</strong> on behalf of
<strong>${operatorName}</strong> has been received.
</p>
<p>
You will receive notification via email when a decision on your
Expand All @@ -51,24 +57,22 @@ const createConfirmationMail = ({
You can
<a
href="${createUrl(
`/reporter/application/${encodedAppId}/version/${versionNumber}/view`
`reporter/application/${encodedAppId}/version/${versionNumber}/view`
)}"
>view your submitted application here</a
>
view your submitted application here
</a>
and monitor the status of your application(s)
<a
href="${createUrl(
`reporter/facilities?organisationRowId=${organisationId}`
)}"
>on the Operation Facilities dashboard</a
<a href="${operationFacilitiesUrl}">
on the Operation Facilities dashboard </a
>.
</p>
<p>
If you have any questions during the application process, please
contact
<a href="mailto:${contactEmail}?subject=CIIP Portal Inquiry"
>${contactEmail}</a
>
<a href="mailto:${contactEmail}?subject=CIIP Inquiry">
${contactEmail}
</a>
</p>
</td>
</tr>
Expand Down
6 changes: 3 additions & 3 deletions app/server/emailTemplates/notifyAdminApplicationSubmitted.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const createNotifyAdminApplicationSubmittedMail = ({
<tr style="border-top: 0px">
<td style="padding: 20px 10px 30px 10px;">
<p>
The <strong>${facilityName}</strong> facility of
<strong>${operatorName}</strong> has submitted or updated their
application.
A CIIP application (#${applicationId}) for the
<strong>${facilityName}</strong> facility of
<strong>${operatorName}</strong> has been submitted or updated.
</p>
<p>
An analyst can now
Expand Down
8 changes: 4 additions & 4 deletions app/server/emailTemplates/notifyAdminOrganisationAccess.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ const createNotifyAdminAccessRequestMail = ({
the application for <strong>${operatorName}</strong>.
</p>
<p>
An administrator can now
<a href="${createUrl('analyst/organisation-requests')}"
>review and approve them</a
An analyst can now
<a href="${createUrl('analyst/organisation-requests')}">
review and approve their access</a
>
as an authorized representative for that Operator.
to that Operator.
</p>
</td>
</tr>
Expand Down
46 changes: 16 additions & 30 deletions app/server/emailTemplates/organisationAccessApproved.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ const createOrganisationAccessApprovedMail = ({
organisationId,
contactEmail
}) => {
const operationFacilitiesUrl = createUrl(
`reporter/facilities?filterArgs=${encodeURIComponent(
JSON.stringify({organisationRowId: organisationId})
)}`
);
return html`
<table
align="center"
Expand All @@ -27,42 +32,23 @@ const createOrganisationAccessApprovedMail = ({
</tr>
<tr style="border-top: 0px">
<td style="padding: 20px 10px 30px 10px;">
<h3>Hello, ${firstName} ${lastName}.</h3>
<h3>Hello ${firstName} ${lastName},</h3>
<p>
CleanBC Industrial Incentive Program administrators have approved
you as an authorized representative for an Operation you requested
access to. You can now submit a CIIP application on their behalf:
you to submit a CIIP application on behalf of
<strong>${operatorName}</strong>.
</p>
<p>
<a href=${operationFacilitiesUrl}>
View Operation Facilities and complete a CIIP application</a
>.
</p>
<p><strong>${operatorName}</strong></p>
<p>Further steps are necessary to complete a CIIP application:</p>
<ul>
<li>
Please log in to the CIIP Portal and
<a
href=${createUrl(
`reporter/facilities?organisationRowId=${organisationId}`
)}
>view Operation Facilities</a
>
to access the CIIP application.
</li>
<li>
To complete an application, it must be filled out, certified, and
submitted.
<ul>
<li>
You will be notified via email when each step is complete and
what the next steps are.
</li>
</ul>
</li>
</ul>
<p>
If you have any questions during the application process, please
contact
<a href="mailto:${contactEmail}?subject=CIIP Portal Inquiry"
>${contactEmail}</a
>
<a href="mailto:${contactEmail}?subject=CIIP Inquiry">
${contactEmail}
</a>
</p>
</td>
</tr>
Expand Down
16 changes: 8 additions & 8 deletions app/server/emailTemplates/requestForOrganisationAccess.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ const createOrganisationAccessRequestMail = ({
</tr>
<tr style="border-top: 0px">
<td style="padding: 20px 10px 30px 10px;">
<h3>Hello, ${firstName} ${lastName}.</h3>
<h3>Hello ${firstName} ${lastName},</h3>
<h4>
Thank you for registering for the CleanBC Industrial Incentive
Thank you for registering with the CleanBC Industrial Incentive
Program.
</h4>
<p>
Expand All @@ -38,18 +38,18 @@ const createOrganisationAccessRequestMail = ({
>.
</p>
<p>
Your request is being processed. Please be advised that if you are
not listed as the Operation Representative for GHG reporting,
confirmation that you are authorized to complete this application
will be sought from that representative.
You will be notified once your request for access has been approved.
</p>
<p>
You will be notified once your request for access has been approved.
Please be advised that if you are not listed as the Operation
Representative for GHG reporting, confirmation that you are
authorized to complete this application will be sought from the
Operation Representative.
</p>
<p>
If you have any questions during the application process, please
contact
<a href="mailto:${contactEmail}?subject=CIIP Portal Inquiry"
<a href="mailto:${contactEmail}?subject=CIIP Inquiry"
>${contactEmail}</a
>
</p>
Expand Down
17 changes: 9 additions & 8 deletions app/server/emailTemplates/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ const createWelcomeMail = ({firstName, lastName, email, contactEmail}) => {
</tr>
<tr style="border-top: 0px">
<td style="padding: 20px 10px 30px 10px;">
<h3>Hello, ${firstName} ${lastName}.</h3>
<h3>Hello ${firstName} ${lastName},</h3>
<h4>
Thank you for registering for the CleanBC Industrial Incentive
Thank you for registering with the CleanBC Industrial Incentive
Program.
</h4>
<p>Further steps are necessary to complete a CIIP application:</p>
<ul>
<li>
Please log in to the CIIP Portal to
<a href=${createUrl('reporter')}>request access to an operator</a
Please log in to the CIIP web application to
<a href=${createUrl('reporter')}
>request access to apply on behalf of an operator</a
>.
<ul>
<li>
Expand All @@ -40,15 +41,15 @@ const createWelcomeMail = ({firstName, lastName, email, contactEmail}) => {
</li>
<li>
You will be able to fill out an application once you have been
approved as an authorised representative.
authorized.
</li>
</ul>
<p>
If you have any questions during the application process, please
contact
<a href="mailto:${contactEmail}?subject=CIIP Portal Inquiry"
>${contactEmail}</a
>
<a href="mailto:${contactEmail}?subject=CIIP Inquiry">
${contactEmail}
</a>
</p>
</td>
</tr>
Expand Down
Loading

0 comments on commit ac33582

Please sign in to comment.