Skip to content

Commit

Permalink
HIPP-1484: Add email templates for application owning team (#1175)
Browse files Browse the repository at this point in the history
  • Loading branch information
victorarbuesmallada authored Sep 4, 2024
1 parent c9bf402 commit 6435c94
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/preview/TemplateParams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,15 @@ object TemplateParams2 {
"hipp_remove_member_from_team_member" -> Map(
"teamname" -> "Test-Hipp-Team"
),
"hipp_notify_application_new_owning_team" -> Map(
"teamname" -> "Test-Hipp-Team",
"applicationname" -> "Test-Hipp-Application"
),
"hipp_notify_application_old_owning_team" -> Map(
"teamname" -> "Test-Hipp-Team",
"oldteamname" -> "Old Test-Hipp-Team",
"applicationname" -> "Test-Hipp-Application"
),
"chargeable_return_submit" -> Map(
"first_name" -> "FirstName",
"last_name" -> "SecondName",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,24 @@ object HippTemplates {
plainTemplate = txt.RemoveMemberFromTeam.f,
htmlTemplate = html.RemoveMemberFromTeam.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_notify_application_new_owning_team",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "There has been a change of application ownership",
plainTemplate = txt.NotifyApplicationNewOwningTeam.f,
htmlTemplate = html.NotifyApplicationNewOwningTeam.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_notify_application_old_owning_team",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "There has been a change of application ownership",
plainTemplate = txt.NotifyApplicationOldOwningTeam.f,
htmlTemplate = html.NotifyApplicationOldOwningTeam.f,
priority = Some(MessagePriority.Urgent)
)
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@*
* Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*@

@(params: Map[String, Any])@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "There has been a change of application ownership") {
<p style="margin: 0 0 30px; font-size: 19px;">Your team @params("teamname") is the new owner of @params("applicationname").</p>
<p style="margin: 0 0 30px; font-size: 19px;">You will no longer have access to @params("teamname").</p>
<p style="margin: 0 0 30px; font-size: 19px;">To access The Integration Hub, visit /integration-hub on the MDTP admin network.</p>
<p style="margin: 0 0 30px; font-size: 19px;">From HMRC The Integration Hub</p>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@(params: Map[String, Any])
Your team @{params("teamname")} is the new owner of @{params("applicationname")}.
To view this change, visit /integration-hub on the MDTP admin network.
If this is an error, please follow the Get Support link on the Hub.
From HMRC The Integration Hub
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@*
* Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*@

@(params: Map[String, Any])@uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "There has been a change of application ownership") {
<p style="margin: 0 0 30px; font-size: 19px;">Your team @params("oldteamname") is no longer the owner of @params("applicationname"). The team @{params("teamname")} is now the new owner of this application.</p>
<p style="margin: 0 0 30px; font-size: 19px;">To view this change, visit /integration-hub on the MDTP admin network.</p>
<p style="margin: 0 0 30px; font-size: 19px;">If this is an error, please follow the Get Support link on the Hub.</p>
<p style="margin: 0 0 30px; font-size: 19px;">From HMRC The Integration Hub</p>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@(params: Map[String, Any])
Your team @{params("oldteamname")} is no longer the owner of @{params("applicationname")}. The team @{params("teamname")} is now the new owner of this application.
To view this change, visit /integration-hub on the MDTP admin network.
If this is an error, please follow the Get Support link on the Hub.
From HMRC The Integration Hub
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,8 @@ class TemplateLocatorSpec extends AnyWordSpecLike with should.Matchers with Opti
"hipp_api_ownership_added_email",
"hipp_api_ownership_removed_email",
"hipp_remove_member_from_team_member",
"hipp_notify_application_new_owning_team",
"hipp_notify_application_old_owning_team",
"ho10_confirmation_submission",
"ho10_confirmation_submission_cy",
"ho5_code",
Expand Down

0 comments on commit 6435c94

Please sign in to comment.