the-difference-engine / ksf

7 stars 1 forks source link

Create Application Survey Email Template #192

Closed hmichele closed 3 years ago

hmichele commented 3 years ago

As an admin, Bill, sends out an application survey for the family to complete as a part of the nomination process.

Acceptance Criteria: [] Create the following email template:

image.png

Email is located here: https://drive.google.com/file/d/1JkbjXlEn8aimdLMFy_vrqzbZ3cPs14sz/view?usp=sharing Email header: https://drive.google.com/file/d/1YB4l6oxrlPYV9LgG7u7mEnYNDsxsTg_3/view?usp=sharing

Mark-Edwards-II commented 3 years ago

Updates: ~In nomination.js we added a conditional statement in updateNomination method, if nomination.status === 'Document Review' then we call our sendSurveyEmail method with the nomination object as the argument. In the other calls to email methods an updateNom variable was passed, but never assigned; instead we passed nomination the nomination object after state is updated. No need to create new variable.

Mark-Edwards-II commented 3 years ago

Update: sendSurveyEmail method accepts nomination object and successfully sends email object. Survey folder created with html.pug and subject.pug with updated text, we are now linking images and styling data to reflect wireframe.

Mark-Edwards-II commented 3 years ago

Image: Header image is rendering successfully. Style: We were able to integrate Style block at the top of the html.pug, currently we reviewing imported style sheet options.

Mark-Edwards-II commented 3 years ago

Style Sheet successfully imported.

jwestbrookjr commented 3 years ago

CSS encoded into email html.pug template.

JigSays commented 3 years ago

Official (final version) text for email:

FINAL STEP: SUPPORTING SURVEY Hi Tina Turner,

If you are receiving this message, both your online application and HIPAA Authorization Form have been processed in our system and we are interested in learning more about your family’s current medical circumstance.

This is the final step of the nomination process in which the patient’s family is involved. All future communications will occur between Keep Swimming Foundation and the member of your medical staff who nominated your family. The final decision regarding the families who will be provided grants will be announced in April 2020.

Below you will find a link to Keep Swimming Foundation’s Supporting Survey. In order to be considered for a Keep Swimming Foundation grant, we need either the patient or a member of their Immediate Family to complete our Supporting Survey and submit it to Keep Swimming Foundation by the deadline, which is provided below. In addition, your nominating healthcare provider (social worker, nurse, physician) must sign off on your completed submission.

Please Note: If you do not have the appropriate technology (scanner, computer, printer, etc.) to complete this submission, your hospital's social worker may be able to assist you.

While the survey is designed to be very simple, if you have any questions about our Supporting Survey, please do not hesitate to send us your questions via email at: info@keepswimmingfoundation.org.

The below link will take you to a Dropbox file. Simply click the "Download" box on the top right and then select "Direct Download" to complete the document on your computer. We look forward to finalizing this nomination process with you. Thank you for your time.

Sincerely, -Keep Swimming Foundation

DEADLINE: Deadline: Tuesday, March 31, 2020 at 11:59 PM CT (All Supporting Surveys submitted after this time will not be considered). The completion of this Supporting Survey does not guarantee the nominated individual family a Keep Swimming Foundation grant.

DOWNLOAD THE SUPPORTING SURVEY (still waiting on this link)

Keep Swimming Foundation | N9W30025 Lang Udsigt Cir., Waukesha, WI 53188

hmichele commented 3 years ago

@Mark-Edwards-II @jwestbrookjr Please update the email text from Jordan's comment above.

hmichele commented 3 years ago

@Mark-Edwards-II @jwestbrookjr

image.png

Mark-Edwards-II commented 3 years ago

Code updated to match text.

Mark-Edwards-II commented 3 years ago

Created sendSurveyEmail method in api/helper/mailer.js with corresponding survey template folder in api/emails/survey. Pug best supports embedded CSS styling especially when used in conjunction with nodemailer. The updateNomination method in api/controllers/nomination.js is used to make changes and update the nomination object that is where the call to sendSurveyEmail method is invoked. Pug used to be called Jade, due to copy right issues it was changed, if you work with Pug the only useful documentation I found was for Jade.

sierrastephens commented 3 years ago

It looks like the survey email is going to the Healthcare Provider, rather than the Family email. Jordan received this email after moving in the process. @jwestbrookjr @JigSays @hmichele @nancyhlin image.png

jwestbrookjr commented 3 years ago

I have made necessary changes and submitted a new PR for review.

sierrastephens commented 3 years ago

Testing & working as expected, ready for Demo. image.png

sierrastephens commented 3 years ago

new email template can be found here

hmichele commented 3 years ago

@jwestbrookjr Here is the link for the Google drive folder: https://drive.google.com/drive/folders/1_Gbsd5984_INfg4wcAVeIOn55TSHAUyM?usp=sharing

jwestbrookjr commented 3 years ago

As of 5.24.2021, I have update the app/emails/survey/html.pug file to realign the template with the specification as indicated by the product team.

sierrastephens commented 3 years ago

@jwestbrookjr checking in here, is there an update on this ticket? can we move this to UAT?

sierrastephens commented 3 years ago

Verified this is working as expected & going to the family member email. This matches the template provided here: https://docs.google.com/document/d/1v6cNBAOfydzTqIaphiB_POblCFWOBWJJ/edit

image.png

image.png

image.png

hmichele commented 3 years ago

@sierrastephens There are some slight differences in text from the new update that need to be changed:

image.png

This should be on the next line and there should be a green download button in white text. image.png

sierrastephens commented 3 years ago

@hmichele - thanks for the note! regarding #2 the green download button, we (myself & @JigSays) checked with Jon on this one. This was not possible to add to the email template, which caused us to have green text option. If we need to revisit, we may need a tech lead to support - as Jon was mentioning it was not possible in the current solution.

Agreed on point #1, thanks for the catch.

sowmya20189 commented 3 years ago

Tested and missing the following text and link below the word Deadline:

THIS MONTH’S DEADLINE CAN BE FOUND HERE. [“HERE” hyperlinked to: https://www.keepswimmingfoundation.org/monthly-application-deadlines]

Also, add a "/" in the last line between individual and family

@Lcole490 @hedrarowan @hmichele @sierrastephens

Screen Shot 2021-07-14 at 8.43.38 PM.png

nancyhlin commented 3 years ago

Changes have been updated and tested. @sowmya20189

hmichele commented 3 years ago

@Lcole490 @hedrarowan Please change the text color for "Deadline" to black, remove the parentheses highlighted in the screenshot below and move it to another line as shown below.

image.png

This is what it should look like:

image.png

annamot9 commented 3 years ago

@Lcole490 I was testing this ticket today with my personal email and I saw 2 issues: 1) I didn't get the picture and the logo, just a placeholder. 2) The green button (link) doesn't look as nice as it appears in the ticket above. Please see SS: image.png

image.png

Lcole490 commented 3 years ago

Formatting issue in Outlook that probably is occurring with all email templates,. Will get with product to explore possible solution options

annamot9 commented 3 years ago

When sent to a Gmail account, the email looks great. Maybe a new ticket needs to be opened.

hedrarowan commented 3 years ago

When this email is opened in the Outlook Desktop app, the formatting of the button is very minimal, because Outlook doesn't accept a lot of css. The functionality remains intact. This does not affect Outlook.com, just the app. As far as we can tell, this shouldn't be an issue with any other email clients.

Lcole490 commented 3 years ago

this is what the button looks like in outlook desktop app: Capture2.png

annamot9 commented 3 years ago

Since it seems this is outlook limitation, the WA is to have a link in the mail to be able to open it in a browser and there it should present properly.

sierrastephens commented 3 years ago
annamot9 commented 3 years ago

A new ticket will be opened for the Outlook issue.

annamot9 commented 3 years ago

The email seems to be generated correctly. The formatting issue is addressed in ticket #355.