Skip to content

Commit

Permalink
DC-6712 Trader Goods Profile Email notification on file available to …
Browse files Browse the repository at this point in the history
…download (#1185)

* Added email

* linting

* linting again
  • Loading branch information
besscerule authored Sep 30, 2024
1 parent 9bf1edd commit 44859e9
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 2 deletions.
6 changes: 6 additions & 0 deletions app/preview/TemplateParams.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3782,6 +3782,12 @@ object TemplateParams3 {
"agencyName" -> "Test Agent",
"failedChecks" -> "Agent (individual) is deceased | Agent is present on the 'Refuse to Deal With' list",
"dateTime" -> "26 April 2024 08:34am"
),
"tgp_download_record_notification_email" -> Map(
"expiredDate" -> "18 August 2024"
),
"tgp_download_record_notification_email_cy" -> Map(
"expiredDate" -> "18 Awst 2024"
)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ object ServiceIdentifier {
case object EconomicCrimeLevy extends ServiceIdentifier { override val name = "ecl" }
case object Hipp extends ServiceIdentifier { override val name = "hipp" }
case object PenReform extends ServiceIdentifier { override val name = "penaltyReform" }
case object Tgp extends ServiceIdentifier { override val name = "tgp" }

case object Feedback extends ServiceIdentifier { override val name = "feedback" }
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ import uk.gov.hmrc.hmrcemailrenderer.templates.ioss.IossTemplates
import uk.gov.hmrc.hmrcemailrenderer.templates.penaltyreform.PenReformTemplates
import uk.gov.hmrc.hmrcemailrenderer.templates.tctr.TctrTemplates
import uk.gov.hmrc.hmrcemailrenderer.templates.tctr.TctrTemplates.tctrGroup
import uk.gov.hmrc.hmrcemailrenderer.templates.tgp.TgpTemplates

trait TemplateLocator {
def templateGroups: Map[String, Seq[MessageTemplate]] =
Expand Down Expand Up @@ -172,6 +173,7 @@ trait TemplateLocator {
"ECL" -> EclTemplates.templates,
"HIPP" -> HippTemplates.templates,
"Penalty Reform" -> PenReformTemplates.templates,
"TGP" -> TgpTemplates.templates,
FeedbackTemplates.id -> FeedbackTemplates.templates
)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@*
* 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 Trader Goods Profile (TGP) records file is ready to download", showHeading1 = false) {
<p style="margin: 0 0 30px; font-size: 19px;">Dear customer</p>
<p style="margin: 0 0 30px; font-size: 19px;">Your records file that you asked for is ready to download.</p>
<p style="margin: 0 0 30px; font-size: 19px;">To get your file:</p>
<ol>
<li style="margin: 0 0 30px; font-size: 19px;">Go to GOV.UK</li>
<li style="margin: 0 0 30px; font-size: 19px;">Search for 'Trader Goods Profile'</li>
<li style="margin: 0 0 30px; font-size: 19px;">Log in to your profile</li>
<li style="margin: 0 0 30px; font-size: 19px;">Select the new notification on your homepage.</li>
</ol>
<p style="margin: 0 0 30px; font-size: 19px;">The file will be available until @params("expiredDate").</p>
<p style="margin: 0 0 30px; font-size: 19px;">To get the file again, you can find a link on your goods records page.</p>
<p style="margin: 0 0 30px; font-size: 19px;">From the Trader Goods Profile team</p>

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@(params: Map[String, Any])
Dear customer
Your records file that you asked for is ready to download.
To get your file:
1. Go to GOV.UK
2. Search for 'Trader Goods Profile'
3. Log in to your profile
4. Select the new notification on your homepage.
The file will be available until @params("expiredDate").
To get the file again, you can find a link on your goods records page.
From the Trader Goods Profile team
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@*
* 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, "Mae’r ffeil sy’n cynnwys cofnodion eich Proffil Nwyddau Masnachwr (TGP) yn barod i’w lawrlwytho", showHeading1 = false) {
<p style="margin: 0 0 30px; font-size: 19px;">Annwyl gwsmer</p>
<p style="margin: 0 0 30px; font-size: 19px;">Mae’r ffeil y gofynnoch amdano, sy’n cynnwys eich cofnodion TGP, yn barod i’w lawrlwytho.</p>
<p style="margin: 0 0 30px; font-size: 19px;">Er mwyn cael mynediad at eich ffeil:</p>
<ol>
<li style="margin: 0 0 30px; font-size: 19px;">Ewch i GOV.UK</li>
<li style="margin: 0 0 30px; font-size: 19px;">Chwiliwch am ‘Trader Goods Profile’</li>
<li style="margin: 0 0 30px; font-size: 19px;">Mewngofnodwch i’ch proffil</li>
<li style="margin: 0 0 30px; font-size: 19px;">Dewiswch yr hysbysiad newydd sy’n ymddangos ar eich hafan.</li>
</ol>
<p style="margin: 0 0 30px; font-size: 19px;">Bydd y ffeil ar gael ta @params("expiredDate").</p>
<p style="margin: 0 0 30px; font-size: 19px;">I gael mynediad at y ffeil eto, gweler y cysylltiad sydd ar eich tudalen Cofnodion Nwyddau.</p>
<p style="margin: 0 0 30px; font-size: 19px;">Y Tîm Proffil Nwyddau Masnachwyr</p>
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@(params: Map[String, Any])
Annwyl gwsmer
Mae’r ffeil y gofynnoch amdano, sy’n cynnwys eich cofnodion TGP, yn barod i’w lawrlwytho.
Er mwyn cael mynediad at eich ffeil:
1. Ewch i GOV.UK
2. Chwiliwch am ‘Trader Goods Profile’
3. Mewngofnodwch i’ch proffil
4. Dewiswch yr hysbysiad newydd sy’n ymddangos ar eich hafan.
Bydd y ffeil ar gael ta @params("expiredDate").
I gael mynediad at y ffeil eto, gweler y cysylltiad sydd ar eich tudalen Cofnodion Nwyddau.
Y Tîm Proffil Nwyddau Masnachwyr
45 changes: 45 additions & 0 deletions app/uk/gov/hmrc/hmrcemailrenderer/templates/tgp/TgpTemplates.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* 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.
*/

package uk.gov.hmrc.hmrcemailrenderer.templates.tgp

import uk.gov.hmrc.hmrcemailrenderer.domain.{ MessagePriority, MessageTemplate }
import uk.gov.hmrc.hmrcemailrenderer.templates.FromAddress
import uk.gov.hmrc.hmrcemailrenderer.templates.ServiceIdentifier.Tgp

object TgpTemplates {

val templates = Seq(
MessageTemplate.create(
templateId = "tgp_download_record_notification_email",
fromAddress = FromAddress.noReply("Do not reply"),
service = Tgp,
subject = "Your TGP records file is ready to download",
plainTemplate = txt.DownloadRecordNotification.f,
htmlTemplate = html.DownloadRecordNotification.f,
priority = Some(MessagePriority.Urgent)
),
MessageTemplate.create(
templateId = "tgp_download_record_notification_email_cy",
fromAddress = FromAddress.noReply("Do not reply"),
service = Tgp,
subject = "Mae’r ffeil sy’n cynnwys cofnodion eich TGP yn barod i’w lawrlwytho",
plainTemplate = txt.DownloadRecordNotification_cy.f,
htmlTemplate = html.DownloadRecordNotification_cy.f,
priority = Some(MessagePriority.Urgent)
)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ class TemplateLocatorSpec extends AnyWordSpecLike with should.Matchers with Opti
"Penalty Reform",
FeedbackTemplates.id,
"DASS",
"IOSS"
"IOSS",
"TGP"
)
}

Expand Down Expand Up @@ -1049,7 +1050,9 @@ class TemplateLocatorSpec extends AnyWordSpecLike with should.Matchers with Opti
"new_message_alert_m08_ioss",
"new_message_alert_m08_ioss_cy",
"new_message_alert_m08a_ioss",
"new_message_alert_m08a_ioss_cy"
"new_message_alert_m08a_ioss_cy",
"tgp_download_record_notification_email",
"tgp_download_record_notification_email_cy"
)
}
}
Expand Down

0 comments on commit 44859e9

Please sign in to comment.