Challenge Overview
This is another challenge in the series for Cloud Hub, where we want to add some email alert jobs to our API project. These emails are designed to alert a user to new and important events happening in the cloud hub application. In a previous challenge we added an alert when an application was up for renewal. In this challenge we want to clean up the HTML for that email and add a second email. This second email will be sent when a large charge has been recorded for the system.
Large Charge
Right now the large charge should be triggered on add or update in the charge service. There is code to now send these charges to elasticsearch. This code is duplicated and probably should be moved to a common function with this new code. Here we want to check for any users of that company that have settings.chargeAlert. We import old data and only want to send a charge that has a timestamp within 48 hours of the current time. You will need to update the last charge in prokure_charges.csv to enable send when running the seed script. Also, if chargeAlert is greater than 0, and chargeAlert is greater than the charge.amount we should send the email.
Logo Cleanup
We were made aware during the last challenge that SVG files aren’t supported in all major email clients. We want to have all of the SVGs processed in to PNG files. In the email templates if the logo has .svg, we want to replace that with .png. Ideal sizing should be around 500x500 pixels for the updated PNGs.
Requirements
1. Build HTML for large charge email using provided PNG design. Current email template is very similar, see views/renewal_email.ejs
2. Wire up sending of large charge email using details above.
3. Process all current SVG images in to PNG images.
4. Clean up HTML, testing with Litmus.com against the free views: Outlook 2013, iPhone 6s, and Gmail. Some current issues exist:
1. In gmail the contact button doesn’t hide if user isn’t known.
2. In outlook the buttons aren’t displaying as buttons.
5. Video can just show the large transaction and renewal emails inside a litmus test account.
2. Provide your code and documentation in a single zip file. Please include a git patch for easier integration of changes.
3. The bulk of your documentation should be in the Readme.md and you should assume that this will be open source so make sure you cover all the steps to set up, If you have specific information that should not be included in a public readme (like links to your video) put them in a file called submission.txt and they will be omitted from the project if it is open sourced.
4. Provide a quick video of your solution in action (feel free to annotate your video if you are not comfortable with spoken English or don’t like the sound of your own voice). Video may be private on youtube or added to the submission files.
Large Charge
Right now the large charge should be triggered on add or update in the charge service. There is code to now send these charges to elasticsearch. This code is duplicated and probably should be moved to a common function with this new code. Here we want to check for any users of that company that have settings.chargeAlert. We import old data and only want to send a charge that has a timestamp within 48 hours of the current time. You will need to update the last charge in prokure_charges.csv to enable send when running the seed script. Also, if chargeAlert is greater than 0, and chargeAlert is greater than the charge.amount we should send the email.
Logo Cleanup
We were made aware during the last challenge that SVG files aren’t supported in all major email clients. We want to have all of the SVGs processed in to PNG files. In the email templates if the logo has .svg, we want to replace that with .png. Ideal sizing should be around 500x500 pixels for the updated PNGs.
Requirements
1. Build HTML for large charge email using provided PNG design. Current email template is very similar, see views/renewal_email.ejs
2. Wire up sending of large charge email using details above.
3. Process all current SVG images in to PNG images.
4. Clean up HTML, testing with Litmus.com against the free views: Outlook 2013, iPhone 6s, and Gmail. Some current issues exist:
1. In gmail the contact button doesn’t hide if user isn’t known.
2. In outlook the buttons aren’t displaying as buttons.
5. Video can just show the large transaction and renewal emails inside a litmus test account.
Final Submission Guidelines
1. Any additions or modifications to the code project pass on "npm run lint" and "npm run test".2. Provide your code and documentation in a single zip file. Please include a git patch for easier integration of changes.
3. The bulk of your documentation should be in the Readme.md and you should assume that this will be open source so make sure you cover all the steps to set up, If you have specific information that should not be included in a public readme (like links to your video) put them in a file called submission.txt and they will be omitted from the project if it is open sourced.
4. Provide a quick video of your solution in action (feel free to annotate your video if you are not comfortable with spoken English or don’t like the sound of your own voice). Video may be private on youtube or added to the submission files.