From 8d660cf0732d2232c5b8bfa92b1f86f267dee87e Mon Sep 17 00:00:00 2001 From: Eric Wollesen Date: Wed, 6 Sep 2023 16:54:32 -0600 Subject: [PATCH] add a care team with alerting placeholder email 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 --- templates/careteam-invite-with-alerting.html | 12 ++++++++++++ templates/careteam_invite_with_alerting.go | 17 +++++++++++++++++ templates/templates.go | 6 ++++++ 3 files changed, 35 insertions(+) create mode 100644 templates/careteam-invite-with-alerting.html create mode 100644 templates/careteam_invite_with_alerting.go diff --git a/templates/careteam-invite-with-alerting.html b/templates/careteam-invite-with-alerting.html new file mode 100644 index 000000000..375cef0aa --- /dev/null +++ b/templates/careteam-invite-with-alerting.html @@ -0,0 +1,12 @@ + + + + + + + + +

Care Team Invitation with Alerting

+

Contents TBD

+ + diff --git a/templates/careteam_invite_with_alerting.go b/templates/careteam_invite_with_alerting.go new file mode 100644 index 000000000..e51726320 --- /dev/null +++ b/templates/careteam_invite_with_alerting.go @@ -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) +} diff --git a/templates/templates.go b/templates/templates.go index 6cc5da956..6ea06f1a0 100644 --- a/templates/templates.go +++ b/templates/templates.go @@ -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 {