Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: email templates updated #4562

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

chore: email templates updated #4562

wants to merge 23 commits into from

Conversation

gitanjli525
Copy link

@gitanjli525 gitanjli525 commented May 6, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

  • Updated the HTML templates to new designs in backend

  • Look at the below screenshots

  • Old
    image
    image
    WhatsApp Image 2024-05-27 at 5 16 33 PM (1)

  • New
    image
    image
    image
    image
    image
    image
    image
    WhatsApp Image 2024-05-27 at 5 16 32 PM (2)
    WhatsApp Image 2024-05-27 at 5 16 32 PM (1)
    WhatsApp Image 2024-05-27 at 5 16 32 PM
    WhatsApp Image 2024-05-27 at 5 41 57 PM

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

  • Currently used email templates were following Juspay old email structure, modified them to the new updated designs

How did you test it?

  • Tested using AWS SES email service & Postdrop, attached the screenshots

Please find below curls for same :

curl --location 'http://localhost:8080/user/connect_account'
--header 'Content-Type: application/json'
--data-raw '{
"email": "gitanjli524@gmail.com"
}'

curl --location 'http://localhost:8080/user/user/invite_multiple?is_token_only=true'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNGMyMjUyMTktZGVjNC00M2VlLTgyOTktMTBjMDRmYzkxYWYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzA2ODY5OTYzIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTcxNjk4MTMwNSwib3JnX2lkIjoib3JnX2dMbEJuQzgwVTgxNzlVTnozdm5sIn0.JsZr4aSFm_2C8si9byvS02kIAaYvpNNF_xidZSRm1sU'
--header 'Cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNGMyMjUyMTktZGVjNC00M2VlLTgyOTktMTBjMDRmYzkxYWYzIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzA2ODY5OTYzIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTcxNjk4MTMwNSwib3JnX2lkIjoib3JnX2dMbEJuQzgwVTgxNzlVTnozdm5sIn0.JsZr4aSFm_2C8si9byvS02kIAaYvpNNF_xidZSRm1sU'
--data-raw '[
{
"email": "gitanjli524+098763@gmail.com",
"name": "25",
"role_id": "merchant_view_only"
}
]'

curl --location 'http://localhost:8080/user/forgot_password'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZDM2NzMyMTUtYWU3NS00NGMzLWJiYzEtMGY3YmMxYmYwMjdmIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzEyMjE0NDE5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTcxMjM4NzMyOSwib3JnX2lkIjoib3JnXzhLb2lWNmhrcG9KSGZNcllER1ZhIn0.H2G9oGp_JBoz3k5S7fMvaaJ9T0cG5VtUjM0hU3ltM3g'
--data-raw '{
"email": "gitanjli524@gmail.com"
}'

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@gitanjli525 gitanjli525 requested review from a team as code owners May 6, 2024 12:17
@gitanjli525 gitanjli525 self-assigned this May 7, 2024
@gitanjli525 gitanjli525 added the S-waiting-on-author Status: This PR is incomplete or needs to address review comments label May 7, 2024
@gitanjli525 gitanjli525 added S-waiting-on-review Status: This PR has been implemented and needs to be reviewed and removed S-waiting-on-author Status: This PR is incomplete or needs to address review comments labels May 8, 2024
@@ -76,7 +76,7 @@ pub mod html {
EmailBody::MagicLink { link, user_name } => {
format!(
include_str!("assets/magic_link.html"),
user_name = user_name,
username = user_name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this change ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To maintain the consistency, as in other emails, if you see, we use username for html files and user_name is what we are assigning to username. No other reason. Hence utilised "username" in the Magiclink.html file where it was required rather than user_name.

@PritishBudhiraja
Copy link
Contributor

I don't think so head tag is required just check once it was previously working.

@ThisIsMani ThisIsMani added C-feature Category: Feature request or enhancement A-users Area: Users labels May 27, 2024
<td>
Hi {username}, You have received this email because your
administrator has invited you as a new user on
Hyperswitch.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sometimes we are using Hyperswitch and sometimes HyperSwitch. Can we make this consistent.

>
<tr>
<td>
Hi {username}, You have received this email because your
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Hi {username}, You have received this email because your
Hi {username}, you have received this email because your

>
<tr>
<td>
Dear {username}, We are thrilled to welcome you into our
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Dear {username}, We are thrilled to welcome you into our
Dear {username}, we are thrilled to welcome you into our

>
<tr>
<td>
This link provides instant access to hyperswitch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This link provides instant access to hyperswitch
This link provides instant access to Hyperswitch

</li>
<li>Click on the "Login" button.</li>
<li>Enter your login credentials to log in.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<li>Enter your login credentials to log in.</li>
<li>Enter your login credentials.</li>

@ThisIsMani
Copy link
Contributor

Create and link an issue.

@gitanjli525 gitanjli525 linked an issue May 27, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-users Area: Users C-feature Category: Feature request or enhancement S-waiting-on-review Status: This PR has been implemented and needs to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Creating new email templates for Hyperswitch
4 participants