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

HIPP-885: New Email templates #1122

Merged
merged 7 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions app/preview/TemplateParams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,22 @@ object TemplateParams {
object TemplateParams2 {
val exampleLinkWithRandomId = s"http://host:8080/your/link/${UUID.randomUUID}"
val exampleParams = Map(
"hipp_production_access_approved_email" -> Map(
"applicationname" -> "Test-Hipp-App",
"apispecificationname" -> "Test-Hipp-Api"
),
"hipp_production_access_rejected_email" -> Map(
"applicationname" -> "Test-Hipp-App",
"apispecificationname" -> "Test-Hipp-Api"
),
"hipp_new_production_access_request_email" -> Map(
"applicationname" -> "Test-Hipp-App",
"apispecificationname" -> "Test-Hipp-Api"
),
"hipp_production_access_request_submitted_email" -> Map(
"applicationname" -> "Test-Hipp-App",
"apispecificationname" -> "Test-Hipp-Api"
),
"hipp_add_team_member_to_app_email" -> Map(
"applicationname" -> "Test-Hipp-App",
"creatorusername" -> "Test-Hipp-Member"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,42 @@ object HippTemplates {
plainTemplate = txt.ApplicationDeletedTeam.f,
htmlTemplate = html.ApplicationDeletedTeam.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_production_access_approved_email",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "Your production access request has been approved",
plainTemplate = txt.ProductionAccessRequestApproved.f,
htmlTemplate = html.ProductionAccessRequestApproved.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_production_access_rejected_email",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "Your production access request has been rejected",
plainTemplate = txt.ProductionAccessRequestRejected.f,
htmlTemplate = html.ProductionAccessRequestRejected.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_new_production_access_request_email",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "A new production access request has been submitted for your review",
plainTemplate = txt.NewProductionAccessRequest.f,
htmlTemplate = html.NewProductionAccessRequest.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "hipp_production_access_request_submitted_email",
fromAddress = FromAddress.noReply("Do not reply"),
service = Hipp,
subject = "Your production access request was successfully submitted",
plainTemplate = txt.ProductionAccessRequestSubmitted.f,
htmlTemplate = html.ProductionAccessRequestSubmitted.f,
priority = Some(MessagePriority.Urgent)
)
)
}
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, "A new production access request has been submitted for your review"){
<p style="margin: 0 0 30px; font-size: 19px;">A request was submitted for the application @params("applicationname") to access the @params("apispecificationname") in the production environment.</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])
A request was submitted for the application @{params("applicationname")} to access the @{params("apispecificationname")} in the production environment.
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, "Your production access request has been approved"){
<p style="margin: 0 0 30px; font-size: 19px;">A request was submitted for your application @params("applicationname") to access the @params("apispecificationname") in the production environment. This request has now been approved.</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])
A request was submitted for your application @{params("applicationname")} to access the @{params("apispecificationname")} in the production environment. This request has now been approved.
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, "Your production access request has been rejected"){
<p style="margin: 0 0 30px; font-size: 19px;">A request was submitted for your application @params("applicationname") to access the @params("apispecificationname") in the production environment. This request has been rejected.</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])
A request was submitted for your application @{params("applicationname")} to access the @{params("apispecificationname")} in the production environment. This request has been rejected.
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, "Your production access request was successfully submitted"){
<p style="margin: 0 0 30px; font-size: 19px;">Your request for your application @params("applicationname") to access the @params("apispecificationname") in the production environment has been successfully submitted for review.</p>
<p style="margin: 0 0 30px; font-size: 19px;">To access the request, 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])
Your request for your application @{params("applicationname")} to access the @{params("apispecificationname")} in the production environment has been successfully submitted for review.
To access the request, visit /api-hub on the MDTP admin network.
From HMRC The API Hub
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,11 @@ class TemplateLocatorSpec extends AnyWordSpecLike with should.Matchers with Opti
"vishing_code_submission",
"vishing_code_submission_cy",
"xiEORI_change_confirmation",
"xiEORI_confirmation"
"xiEORI_confirmation",
"hipp_production_access_approved_email",
"hipp_production_access_rejected_email",
"hipp_new_production_access_request_email",
"hipp_production_access_request_submitted_email"
)
}
}
Expand Down