Skip to content

Commit

Permalink
add a care team with alerting placeholder email
Browse files Browse the repository at this point in the history
This email will be sent to notify a user of an invitation to receive alert
notifications via the care partner app.

Part of BACK-2500
  • Loading branch information
ewollesen committed Sep 6, 2023
1 parent 71a204a commit 8d660cf
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
12 changes: 12 additions & 0 deletions templates/careteam-invite-with-alerting.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
</head>
<body>
<h1>Care Team Invitation with Alerting</h1>
<p>Contents TBD</p>
</body>
</html>
17 changes: 17 additions & 0 deletions templates/careteam_invite_with_alerting.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package templates

import (
_ "embed"

"github.com/tidepool-org/hydrophone/models"
)

const careteamInviteWithAlertingSubject string = "Diabetes care team invitation"

//go:embed careteam-invite-with-alerting.html
var careteamInviteWithAlerting string

func NewCareteamInviteWithAlertingTemplate() (models.Template, error) {
return models.NewPrecompiledTemplate(models.TemplateNameCareteamInviteWithAlerting,
careteamInviteWithAlerting, careteamInviteWithAlertingSubject)
}
6 changes: 6 additions & 0 deletions templates/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ func New() (models.Templates, error) {
templates[template.Name()] = template
}

if template, err := NewCareteamInviteWithAlertingTemplate(); err != nil {
return nil, fmt.Errorf("templates: failure to create careteam invite with alerting template: %w", err)
} else {
templates[template.Name()] = template
}

if template, err := NewNoAccountTemplate(); err != nil {
return nil, fmt.Errorf("templates: failure to create no account template: %s", err)
} else {
Expand Down

0 comments on commit 8d660cf

Please sign in to comment.