Skip to content

Commit

Permalink
HIPP-769: Additional emails (#1096)
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulCDurham authored Sep 15, 2023
1 parent 6eb5df4 commit 4d814cf
Show file tree
Hide file tree
Showing 9 changed files with 119 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 @@ -1614,6 +1614,15 @@ object TemplateParams2 {
"applicationname" -> "Test-Hipp-App",
"creatorusername" -> "Test-Hipp-Member"
),
"hipp_application_created" -> Map(
"applicationname" -> "Test-Hipp-App"
),
"hipp_application_deleted" -> Map(
"applicationname" -> "Test-Hipp-App"
),
"hipp_application_deleted_team" -> Map(
"applicationname" -> "Test-Hipp-App"
),
"chargeable_return_submit" -> Map(
"first_name" -> "FirstName",
"last_name" -> "SecondName",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@*
* Copyright 2023 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, "You have created an application in The API Hub"){
<p style="margin: 0 0 30px; font-size: 19px;">You have created @params("applicationname") in The API Hub.</p>
<p style="margin: 0 0 30px; font-size: 19px;">To access the application, visit /api-hub on the MDTP admin network.</p>
<p style="margin: 0 0 30px; font-size: 19px;">From HMRC The API Hub</p>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@(params: Map[String, Any])
You have created @{params("applicationname")} in The API Hub.
To access the application, visit /api-hub on the MDTP admin network.
From HMRC The API Hub
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@*
* Copyright 2023 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, "You have deleted an application from The API Hub"){
<p style="margin: 0 0 30px; font-size: 19px;">You have deleted @params("applicationname") from The API Hub.</p>
<p style="margin: 0 0 30px; font-size: 19px;">This application has been removed from The API Hub.</p>
<p style="margin: 0 0 30px; font-size: 19px;">From HMRC The API Hub</p>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@(params: Map[String, Any])
You have deleted @{params("applicationname")} from The API Hub.
This application has been removed from The API Hub.
From HMRC The API Hub
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@*
* Copyright 2023 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, "Application deleted from The API Hub"){
<p style="margin: 0 0 30px; font-size: 19px;">The application @params("applicationname") has been deleted from The API Hub, all application details have been permanently deleted.</p>
<p style="margin: 0 0 30px; font-size: 19px;">Any associated credentials will no longer work.</p>
<p style="margin: 0 0 30px; font-size: 19px;">This application cannot be restored.</p>
<p style="margin: 0 0 30px; font-size: 19px;">From HMRC The API Hub</p>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@(params: Map[String, Any])
The application @{params("applicationname")} has been deleted from The API Hub, all application details have been permanently deleted.
Any associated credentials will no longer work.
This application cannot be restored.
From HMRC The API Hub
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,33 @@ object HippTemplates {
plainTemplate = txt.RemoveTeamMember.f,
htmlTemplate = html.RemoveTeamMember.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_application_created",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "You have created an application in The API Hub",
plainTemplate = txt.ApplicationCreated.f,
htmlTemplate = html.ApplicationCreated.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_application_deleted",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "You have deleted an application from The API Hub",
plainTemplate = txt.ApplicationDeleted.f,
htmlTemplate = html.ApplicationDeleted.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_application_deleted_team",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "Application deleted from The API Hub",
plainTemplate = txt.ApplicationDeletedTeam.f,
htmlTemplate = html.ApplicationDeletedTeam.f,
priority = Some(MessagePriority.Urgent)
)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,9 @@ class TemplateLocatorSpec extends AnyWordSpecLike with should.Matchers with Opti
"ecl_amend_registration_submitted_cy",
"hipp_add_team_member_to_app_email",
"hipp_remove_team_member_from_app_email",
"hipp_application_created",
"hipp_application_deleted",
"hipp_application_deleted_team",
"newMessageAlert_LPP4",
"newMessageAlert_LPP4_cy",
"newMessageAlert_LPi1",
Expand Down

0 comments on commit 4d814cf

Please sign in to comment.