-
Notifications
You must be signed in to change notification settings - Fork 0
DTR-4472 Feat: Screen VH-02a/b/c Verification request submitted #153
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
Open
abhinavgupta-hmrc
wants to merge
36
commits into
main
Choose a base branch
from
DTR-4472
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
fb9dd8c
DTR-4472 Feat: Screen VH-02a/b/c Verification request submitted
abhinavgupta-hmrc 03f3185
DTR-4472 Fix: remove commented code line
abhinavgupta-hmrc bc5a71f
DTR-4472 Fix: commented code removed and full stop issue fixed
abhinavgupta-hmrc 40f48e7
DTR-4472 Fix: resolve merge issues
abhinavgupta-hmrc 0fdbf79
DTR-4472 refactor: integration implmented for two data source
abhinavgupta-hmrc a2e5d3d
[DTR-4461] - add comma to stub data fopr lastname, firstname
jassalrichy 4491a5b
DTR-4694: CIS VSF: Screen SM-07 Verification failure (departmental er…
edpau-hmrc f7763eb
DTR-4160: update GetNewestVerificationBatchResponse and GetCurrentVer…
codeneto-hmrc d3d0160
DTR-4160: move files from verification folder to verify
codeneto-hmrc 5c8de2e
DTR-4160: fix integration test
codeneto-hmrc bf86503
[DTR-000-FIX] - fix intermittently failing test for VerificationServi…
jassalrichy 4cd6e70
[DTR-000-FIX] - scala formatting
jassalrichy d34ada6
DTR-4806 business function F4 - conditional routing (#158)
Mounkumar 994fc0d
DTR-4694Fix: update heading to Large (L) heading size (#162)
edpau-hmrc 90ea150
DTR-4484 - Screen VF-03c Which subcontractors do you want to reverify?
Juely-Kaikade-HMRC 1bae393
DTR-4484 - updated controller and view to save the id & name
Juely-Kaikade-HMRC 96cb9a0
DTR-4484 - view model spec file
Juely-Kaikade-HMRC bec29c7
DTR-4484 - Save id & name in the mongo
Juely-Kaikade-HMRC 00764e0
DTR-4484 - view & message file updated
Juely-Kaikade-HMRC a611f94
DTR-4484 - Message file is upadated
Juely-Kaikade-HMRC 7da56a9
DTR-4484 - Files updated for pagination and error messages conditions
Juely-Kaikade-HMRC 22896bb
DTR-4484 - Controller unit test added
Juely-Kaikade-HMRC 0a20eec
DTR-4484 - Css is updated
Juely-Kaikade-HMRC 3338905
DTR-4484 - view file is updated
Juely-Kaikade-HMRC ca08bb2
DTR-4472 Feat: Screen VH-02a/b/c Verification request submitted
abhinavgupta-hmrc ccaf7b6
DTR-4472 Fix: resolve merge issues
abhinavgupta-hmrc e95703a
Merge branch 'main' into DTR-4472
abhinavgupta-hmrc c6d4bcf
Sync messages.en from main
abhinavgupta-hmrc 4aa7f40
DTR-4472 Fix: merge issues resolved in messages file
abhinavgupta-hmrc 427edae
DTR-4472 Fix: merge issues resolved in messages file
abhinavgupta-hmrc 99e053c
DTR-4472 Fix: merge issues resolved in app routes file
abhinavgupta-hmrc 42a8680
DTR-4472 Fix: subcontractors to reverify data integration
abhinavgupta-hmrc a539810
DTR-4472 Fix: subcontractors to reverify data integration
abhinavgupta-hmrc 140820f
DTR-4472 merge issues for app route page
abhinavgupta-hmrc f06cc75
DTR-4472 Fix: deleting redundant refactored files
abhinavgupta-hmrc efbf1bd
DTR-4472 Fix: removed commented code
abhinavgupta-hmrc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
app/controllers/verify/VerificationRequestSubmittedController.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
| * Copyright 2026 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 controllers.verify | ||
|
|
||
| import config.FrontendAppConfig | ||
| import controllers.actions.* | ||
| import play.api.i18n.{I18nSupport, MessagesApi} | ||
| import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} | ||
| import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController | ||
| import viewmodels.checkAnswers.verify.VerificationRequestSubmittedViewModel | ||
| import views.html.verify.VerificationRequestSubmittedView | ||
| import javax.inject.Inject | ||
|
|
||
| class VerificationRequestSubmittedController @Inject() ( | ||
| override val messagesApi: MessagesApi, | ||
| identify: IdentifierAction, | ||
| getData: DataRetrievalAction, | ||
| requireData: DataRequiredAction, | ||
| val controllerComponents: MessagesControllerComponents, | ||
| view: VerificationRequestSubmittedView | ||
| )(implicit appConfig: FrontendAppConfig) | ||
| extends FrontendBaseController | ||
| with I18nSupport { | ||
|
|
||
| def onPageLoad(): Action[AnyContent] = | ||
| (identify andThen getData andThen requireData) { implicit request => | ||
| val vm = | ||
| VerificationRequestSubmittedViewModel | ||
| .fromUserAnswers(request.userAnswers) | ||
| Ok(view(vm)) | ||
| } | ||
| } |
53 changes: 53 additions & 0 deletions
53
app/viewmodels/checkAnswers/verify/VerificationRequestSubmittedViewModel.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| /* | ||
| * Copyright 2026 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 viewmodels.checkAnswers.verify | ||
| import models.UserAnswers | ||
| import pages.verify._ | ||
| import java.time.LocalDateTime | ||
|
|
||
| case class VerificationRequestSubmittedViewModel( | ||
| referenceNumber: String, | ||
| submittedAt: LocalDateTime, | ||
| subcontractorsToVerify: Seq[String], | ||
| subcontractorsToReverify: Seq[String] = Seq.empty, | ||
| confirmationEmail: Option[String] = None | ||
| ) { | ||
| def showEmail: Boolean = confirmationEmail.isDefined | ||
| def showVerify: Boolean = subcontractorsToVerify.nonEmpty | ||
| def showReverify: Boolean = subcontractorsToReverify.nonEmpty | ||
| } | ||
|
|
||
| object VerificationRequestSubmittedViewModel { | ||
|
|
||
| def fromUserAnswers(userAnswers: UserAnswers): VerificationRequestSubmittedViewModel = | ||
| VerificationRequestSubmittedViewModel( | ||
| // TODO: Replace below with actuals - 1. referenceNumber 2. submittedAt | ||
| referenceNumber = "Reference Number 12345", | ||
| submittedAt = LocalDateTime.now(), | ||
| subcontractorsToVerify = userAnswers | ||
| .get(SelectSubcontractorPage) | ||
| .getOrElse(Seq.empty) | ||
| .map(_.name) | ||
| .toSeq, | ||
| subcontractorsToReverify = userAnswers | ||
| .get(SelectSubcontractorsToReverifyPage) | ||
| .getOrElse(Seq.empty) | ||
| .map(_.name) | ||
| .toSeq, | ||
| confirmationEmail = userAnswers.get(EmailAddressPage) | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| @* | ||
| * Copyright 2026 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. | ||
| *@ | ||
|
|
||
| @this() | ||
|
|
||
| @(textKey: String, id: String = "print-link", extraClasses: String = "")(implicit messages: play.api.i18n.Messages) | ||
|
|
||
| <p class="govuk-body"> | ||
| <a | ||
| id="@id" | ||
| href="#" | ||
| class="govuk-link hmrc-!-js-visible govuk-!-display-none-print@if(extraClasses.nonEmpty){ @extraClasses}" | ||
| data-module="hmrc-print-link"> | ||
| @messages(textKey) | ||
| </a> | ||
| </p> |
181 changes: 181 additions & 0 deletions
181
app/views/verify/VerificationRequestSubmittedView.scala.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,181 @@ | ||
| @* | ||
| * Copyright 2026 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. | ||
| *@ | ||
|
|
||
| @import config.FrontendAppConfig | ||
| @import java.time.LocalDateTime | ||
| @import java.time.format.DateTimeFormatter | ||
| @import uk.gov.hmrc.govukfrontend.views.viewmodels.panel.Panel | ||
| @import uk.gov.hmrc.govukfrontend.views.Aliases.* | ||
|
|
||
| @import uk.gov.hmrc.govukfrontend.views.viewmodels.summarylist._ | ||
| @import viewmodels.govuk.summarylist.SummaryListViewModel | ||
|
|
||
| @import views.html.components._ | ||
| @import viewmodels.checkAnswers.verify.VerificationRequestSubmittedViewModel | ||
|
|
||
|
|
||
| @this( | ||
| layout: templates.Layout, | ||
| govukPanel: GovukPanel, | ||
| govukInsetText: GovukInsetText, | ||
| govukSummaryList: GovukSummaryList, | ||
| heading: H1, | ||
| subHeading: H2, | ||
| paragraph: Paragraph, | ||
| printLink: PrintLink, | ||
| link: Link | ||
| ) | ||
|
|
||
| @(vm: VerificationRequestSubmittedViewModel | ||
| )(implicit request: Request[_],appConfig: FrontendAppConfig, messages: Messages) | ||
|
|
||
| @layout(pageTitle = titleNoForm(messages("verify.verificationRequestSubmitted.title"))) { | ||
|
|
||
| @govukPanel( | ||
| Panel( | ||
| title = Text(messages("verify.verificationRequestSubmitted.heading")), | ||
| content = HtmlContent( | ||
| s""" | ||
| <p>${messages("verify.verificationRequestSubmitted.reference")}</p> | ||
| <strong>(${HtmlFormat.escape(vm.referenceNumber)})</strong> | ||
| """ | ||
| ) | ||
| ) | ||
| ) | ||
|
|
||
| @paragraph( | ||
| messages( | ||
| "verify.verificationRequestSubmitted.submittedAt", | ||
| vm.submittedAt.format(DateTimeFormatter.ofPattern("HH:mm 'on' dd MMMM yyyy")) | ||
| ) | ||
| ) | ||
|
|
||
| @subHeading( | ||
| messages( | ||
| "verify.verificationRequestSubmitted.details.subHeading" | ||
| ) | ||
| ) | ||
|
|
||
| @if(vm.showVerify) { | ||
| @govukSummaryList( | ||
| SummaryListViewModel( | ||
| rows = Seq( | ||
| SummaryListRowViewModel( | ||
| key = messages("verify.verificationRequestSubmitted.subcontractorsToVerify.label"), | ||
| value = ValueViewModel( | ||
| HtmlContent( | ||
| vm.subcontractorsToVerify | ||
| .map(name => s"<li>$name</li>") | ||
| .mkString("<ul class='govuk-list govuk-list--bullet'>", "", "</ul>") | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| } | ||
|
|
||
| @if(vm.showReverify) { | ||
| @govukSummaryList( | ||
| SummaryListViewModel( | ||
| rows = Seq( | ||
| SummaryListRowViewModel( | ||
| key = messages("verify.verificationRequestSubmitted.subcontractorsToReverify.label"), | ||
| value = ValueViewModel( | ||
| HtmlContent( | ||
| vm.subcontractorsToReverify | ||
| .map(name => s"<li>$name</li>") | ||
| .mkString("<ul class='govuk-list govuk-list--bullet'>", "", "</ul>") | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| ) | ||
| } | ||
|
|
||
|
|
||
| @if(vm.showEmail) { | ||
| @vm.confirmationEmail.map { email => | ||
| @paragraph( | ||
| messages( | ||
| "verify.verificationRequestSubmitted.email.confirmation", | ||
| <strong>{email}</strong>, | ||
| "verify.verificationRequestSubmitted.fullStop" | ||
| ) | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @link( | ||
| linkTextKey = "verify.verificationRequestSubmitted.email.verification.link", | ||
| linkUrl = appConfig.cisGeneralEnquiries, // TODO: Link to be updated later | ||
| hasFullStop = true, | ||
| prefixTextKey = "verify.verificationRequestSubmitted.email.verification" | ||
| ) | ||
|
|
||
| @govukInsetText( | ||
| InsetText( | ||
| content = HtmlContent( | ||
| s""" | ||
| ${paragraph(messages("verify.verificationRequestSubmitted.print.text"))} | ||
| ${printLink("verify.verificationRequestSubmitted.print.link")} | ||
| """ | ||
| ) | ||
| ) | ||
| ) | ||
|
|
||
| @subHeading( | ||
| messages( | ||
| "verify.verificationRequestSubmitted.needHelp.subHeading") | ||
| ) | ||
|
|
||
| @link( | ||
| linkTextKey = "verify.verificationRequestSubmitted.needHelp.contactHMRC.link", | ||
| linkUrl = appConfig.cisGeneralEnquiries, | ||
| hasFullStop = true, | ||
| prefixTextKey = "verify.verificationRequestSubmitted.needHelp.p1", | ||
| ) | ||
|
|
||
| @paragraph( | ||
| messages( | ||
| "verify.verificationRequestSubmitted.needHelp.p2" | ||
| ) | ||
| ) | ||
|
|
||
| @link( | ||
| linkTextKey = "verify.verificationRequestSubmitted.needHelp.manageSubcontractors.link", | ||
| linkUrl = appConfig.manageSubcontractorsUrl, // TODO: Link to be updated later. | ||
| hasFullStop = true, | ||
| prefixTextKey = "verify.verificationRequestSubmitted.needHelp.p3", | ||
| ) | ||
|
|
||
| @subHeading( | ||
| messages("verify.verificationRequestSubmitted.feedback.subHeading") | ||
| ) | ||
|
|
||
| @paragraph( | ||
| messages( | ||
| "verify.verificationRequestSubmitted.feedback.p1" | ||
| ) | ||
| ) | ||
|
|
||
| @link( | ||
| "verify.verificationRequestSubmitted.feedback.survey.link", | ||
| appConfig.exitSurveyUrl, // TODO: Link to be confirmed & verified | ||
| suffixTextKey = "verify.verificationRequestSubmitted.feedback.p2" | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.