-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIPR-1276: Added initial views to appeals
* MIPR-1276: Added initial views to appeals * wip * MIPR-1276: Added more views to service * MIPR-1276: Added more views * MIPR-1276: Added tests * MIPR-1276: Added more views and tests * MIPR-1276: added html components * MIPR-1276: Changes to print functionality --------- Co-authored-by: Richard Melvin <[email protected]>
- Loading branch information
Showing
47 changed files
with
2,608 additions
and
61 deletions.
There are no files selected for viewing
This file contains 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,9 @@ | ||
const printlink = document.getElementById('print-button'); | ||
|
||
if(printlink != null && printlink != 'undefined' ) { | ||
|
||
printlink.addEventListener("click", function (e) { | ||
e.preventDefault(); | ||
window.print(); | ||
}); | ||
}; |
This file contains 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,20 @@ | ||
@media print { | ||
|
||
/* Hide unnecessary elements when printing */ | ||
.cbanner-govuk-cookie-banner, | ||
.govuk-footer, | ||
.govuk-link, | ||
.govuk-button, | ||
.govuk-back-link, | ||
.govuk-summary-list__actions, | ||
.govuk-footer__section, | ||
.govuk-footer__inline-list, | ||
.hmrc-report-technical-issue, | ||
.hmrc-language-select, | ||
.hmrc-account-menu__link, | ||
.govuk-phase-banner, | ||
.print-hidden { | ||
display: none !important; | ||
} | ||
|
||
} |
This file contains 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
60 changes: 60 additions & 0 deletions
60
...k/gov/hmrc/incometaxpenaltiesappealsfrontend/controllers/CheckYourAnswersController.scala
This file contains 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,60 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package uk.gov.hmrc.incometaxpenaltiesappealsfrontend.controllers | ||
|
||
import play.api.i18n.I18nSupport | ||
import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} | ||
import uk.gov.hmrc.auth.core.AuthConnector | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.config.AppConfig | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.controllers.auth.AuthenticatedController | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.featureswitch.core.config.FeatureSwitching | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.utils.IncomeTaxSessionKeys | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.views.html._ | ||
|
||
import javax.inject.Inject | ||
import scala.concurrent.{ExecutionContext, Future} | ||
|
||
|
||
class CheckYourAnswersController @Inject()(checkYourAnswers: CheckYourAnswersPage, | ||
val authConnector: AuthConnector | ||
)(implicit mcc: MessagesControllerComponents, | ||
ec: ExecutionContext, | ||
val appConfig: AppConfig) extends AuthenticatedController(mcc) with I18nSupport with FeatureSwitching { | ||
def onPageLoad(): Action[AnyContent] = isAuthenticated { | ||
implicit request => | ||
implicit currentUser => | ||
val optReasonableExcuse = request.session.get(IncomeTaxSessionKeys.reasonableExcuse) | ||
|
||
optReasonableExcuse match { | ||
case Some(reasonableExcuse) => | ||
Future.successful(Ok(checkYourAnswers( | ||
true, currentUser.isAgent, reasonableExcuse | ||
))) | ||
case _ => | ||
Future.successful(Redirect(routes.ReasonableExcuseController.onPageLoad())) | ||
} | ||
} | ||
|
||
|
||
def submit(): Action[AnyContent] = isAuthenticated { | ||
implicit request => | ||
implicit currentUser => | ||
|
||
Future.successful(Redirect(routes.ConfirmationController.onPageLoad())) | ||
} | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
app/uk/gov/hmrc/incometaxpenaltiesappealsfrontend/controllers/ConfirmationController.scala
This file contains 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,52 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package uk.gov.hmrc.incometaxpenaltiesappealsfrontend.controllers | ||
|
||
import play.api.i18n.I18nSupport | ||
import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} | ||
import uk.gov.hmrc.auth.core.AuthConnector | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.config.AppConfig | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.controllers.auth.AuthenticatedController | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.featureswitch.core.config.FeatureSwitching | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.utils.IncomeTaxSessionKeys | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.views.html._ | ||
|
||
import javax.inject.Inject | ||
import scala.concurrent.{ExecutionContext, Future} | ||
|
||
|
||
class ConfirmationController @Inject()(confirmationPage: ConfirmationPage, | ||
val authConnector: AuthConnector | ||
)(implicit mcc: MessagesControllerComponents, | ||
ec: ExecutionContext, | ||
val appConfig: AppConfig) extends AuthenticatedController(mcc) with I18nSupport with FeatureSwitching { | ||
def onPageLoad(): Action[AnyContent] = isAuthenticated { | ||
implicit request => | ||
implicit currentUser => | ||
val optReasonableExcuse = request.session.get(IncomeTaxSessionKeys.reasonableExcuse) | ||
|
||
optReasonableExcuse match { | ||
case Some(reasonableExcuse) => | ||
Future.successful(Ok(confirmationPage( | ||
true, currentUser.isAgent, reasonableExcuse | ||
))) | ||
case _ => | ||
Future.successful(Redirect(routes.ReasonableExcuseController.onPageLoad())) | ||
} | ||
} | ||
|
||
} |
60 changes: 60 additions & 0 deletions
60
app/uk/gov/hmrc/incometaxpenaltiesappealsfrontend/controllers/CrimeReportedController.scala
This file contains 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,60 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package uk.gov.hmrc.incometaxpenaltiesappealsfrontend.controllers | ||
|
||
import play.api.i18n.I18nSupport | ||
import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} | ||
import uk.gov.hmrc.auth.core.AuthConnector | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.config.AppConfig | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.controllers.auth.AuthenticatedController | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.featureswitch.core.config.FeatureSwitching | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.utils.IncomeTaxSessionKeys | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.views.html._ | ||
|
||
import javax.inject.Inject | ||
import scala.concurrent.{ExecutionContext, Future} | ||
|
||
|
||
class CrimeReportedController @Inject()(hasTheCrimeBeenReportedPage: HasTheCrimeBeenReportedPage, | ||
val authConnector: AuthConnector | ||
)(implicit mcc: MessagesControllerComponents, | ||
ec: ExecutionContext, | ||
val appConfig: AppConfig) extends AuthenticatedController(mcc) with I18nSupport with FeatureSwitching { | ||
def onPageLoad(): Action[AnyContent] = isAuthenticated { | ||
implicit request => | ||
implicit currentUser => | ||
val optReasonableExcuse = request.session.get(IncomeTaxSessionKeys.reasonableExcuse) | ||
|
||
optReasonableExcuse match { | ||
case Some(reasonableExcuse) => | ||
Future.successful(Ok(hasTheCrimeBeenReportedPage( | ||
true, currentUser.isAgent, reasonableExcuse | ||
))) | ||
case _ => | ||
Future.successful(Redirect(routes.ReasonableExcuseController.onPageLoad())) | ||
} | ||
} | ||
|
||
|
||
def submit(): Action[AnyContent] = isAuthenticated { | ||
implicit request => | ||
implicit currentUser => | ||
|
||
Future.successful(Redirect(routes.LateAppealController.onPageLoad())) | ||
} | ||
|
||
} |
60 changes: 60 additions & 0 deletions
60
...gov/hmrc/incometaxpenaltiesappealsfrontend/controllers/HonestyDeclarationController.scala
This file contains 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,60 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package uk.gov.hmrc.incometaxpenaltiesappealsfrontend.controllers | ||
|
||
import play.api.i18n.I18nSupport | ||
import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} | ||
import uk.gov.hmrc.auth.core.AuthConnector | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.config.AppConfig | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.controllers.auth.AuthenticatedController | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.featureswitch.core.config.FeatureSwitching | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.utils.IncomeTaxSessionKeys | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.views.html.HonestyDeclarationPage | ||
|
||
import javax.inject.Inject | ||
import scala.concurrent.{ExecutionContext, Future} | ||
|
||
|
||
class HonestyDeclarationController @Inject()(honestyDeclaration: HonestyDeclarationPage, | ||
val authConnector: AuthConnector | ||
)(implicit mcc: MessagesControllerComponents, | ||
ec: ExecutionContext, | ||
val appConfig: AppConfig) extends AuthenticatedController(mcc) with I18nSupport { | ||
|
||
def onPageLoad(): Action[AnyContent] = isAuthenticated { | ||
implicit request => | ||
implicit currentUser => | ||
val optReasonableExcuse = request.session.get(IncomeTaxSessionKeys.reasonableExcuse) | ||
|
||
optReasonableExcuse match { | ||
case Some(reasonableExcuse) => | ||
Future.successful(Ok(honestyDeclaration( | ||
true, currentUser.isAgent, reasonableExcuse | ||
))) | ||
case _ => | ||
Future.successful(Redirect(routes.ReasonableExcuseController.onPageLoad())) | ||
} | ||
} | ||
|
||
|
||
def submit(): Action[AnyContent] = isAuthenticated { | ||
implicit request => | ||
implicit currentUser => | ||
Future.successful(Redirect(routes.WhenDidEventHappenController.onPageLoad())) | ||
} | ||
|
||
} |
58 changes: 58 additions & 0 deletions
58
app/uk/gov/hmrc/incometaxpenaltiesappealsfrontend/controllers/LateAppealController.scala
This file contains 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,58 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package uk.gov.hmrc.incometaxpenaltiesappealsfrontend.controllers | ||
|
||
import play.api.i18n.I18nSupport | ||
import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} | ||
import uk.gov.hmrc.auth.core.AuthConnector | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.config.AppConfig | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.controllers.auth.AuthenticatedController | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.utils.IncomeTaxSessionKeys | ||
import uk.gov.hmrc.incometaxpenaltiesappealsfrontend.views.html.LateAppealPage | ||
|
||
import javax.inject.Inject | ||
import scala.concurrent.{ExecutionContext, Future} | ||
|
||
|
||
class LateAppealController @Inject()(lateAppeal: LateAppealPage, | ||
val authConnector: AuthConnector | ||
)(implicit mcc: MessagesControllerComponents, | ||
ec: ExecutionContext, | ||
val appConfig: AppConfig) extends AuthenticatedController(mcc) with I18nSupport { | ||
|
||
def onPageLoad(): Action[AnyContent] = isAuthenticated { | ||
implicit request => | ||
implicit currentUser => | ||
val optReasonableExcuse = request.session.get(IncomeTaxSessionKeys.reasonableExcuse) | ||
|
||
optReasonableExcuse match { | ||
case Some(reasonableExcuse) => | ||
Future.successful(Ok(lateAppeal( | ||
true, currentUser.isAgent, reasonableExcuse | ||
))) | ||
case _ => | ||
Future.successful(Redirect(routes.ReasonableExcuseController.onPageLoad())) | ||
} | ||
} | ||
|
||
def submit(): Action[AnyContent] = isAuthenticated { | ||
implicit request => | ||
implicit currentUser => | ||
Future.successful(Redirect(routes.CheckYourAnswersController.onPageLoad())) | ||
} | ||
|
||
} |
Oops, something went wrong.