From a1adab5a6bfab297be5237b48868a320ae6eb96e Mon Sep 17 00:00:00 2001 From: David Flynn <128475768+davidfes@users.noreply.github.com> Date: Fri, 25 Oct 2024 16:31:08 +0100 Subject: [PATCH] Split returns into declareDuty, returns and payments packages (#189) * Split returns into declareDuty, returns and payments packages * Further package updates from code review --- .../AlcoholDutyCalculatorConnector.scala | 2 +- .../AlcoholDutyReturnsConnector.scala | 3 +- app/connectors/DutyCalculation.scala | 2 +- .../BeforeStartReturnController.scala | 3 +- .../AdjustmentVolumeController.scala | 2 +- .../AdjustmentVolumeWithSPRController.scala | 2 +- .../DutyDueForThisReturnController.scala | 2 +- .../ReturnSubmittedController.scala | 3 +- .../AlcoholTypeController.scala | 8 +- .../CheckYourAnswersController.scala | 6 +- .../CheckYourAnswersSPRController.scala | 12 +- ...DeclareAlcoholDutyQuestionController.scala | 8 +- .../DeleteMultipleSPREntryController.scala | 11 +- ...ouHaveMultipleSPRDutyRatesController.scala | 8 +- .../DutyCalculationController.scala | 10 +- .../HowMuchDoYouNeedToDeclareController.scala | 12 +- .../MultipleSPRListController.scala | 10 +- .../ReturnController.scala | 2 +- ...TellUsAboutMultipleSPRRateController.scala | 12 +- .../TellUsAboutSingleSPRRateController.scala | 12 +- .../WhatDoYouNeedToDeclareController.scala | 10 +- .../StartDirectDebitController.scala | 2 +- .../StartPaymentController.scala | 6 +- .../ViewPastPaymentsController.scala | 12 +- .../AlcoholTypeFormProvider.scala | 2 +- ...clareAlcoholDutyQuestionFormProvider.scala | 2 +- .../DeleteMultipleSPREntryFormProvider.scala | 2 +- ...HaveMultipleSPRDutyRatesFormProvider.scala | 2 +- ...owMuchDoYouNeedToDeclareFormProvider.scala | 4 +- .../MultipleSPRListFormProvider.scala | 2 +- ...llUsAboutMultipleSPRRateFormProvider.scala | 4 +- ...TellUsAboutSingleSPRRateFormProvider.scala | 4 +- .../WhatDoYouNeedToDeclareFormProvider.scala | 2 +- app/forms/mappings/Mappings.scala | 2 +- .../mappings/VolumesAndRateFormatter.scala | 2 +- app/forms/mappings/VolumesFormatter.scala | 2 +- app/models/audit/AuditReturnSubmitted.scala | 2 +- .../AdrReturnCreatedDetails.scala | 32 --- .../AdrReturnSubmission.scala | 2 +- .../AlcoholDuty.scala | 2 +- .../VolumeAndRateByTaxType.scala | 2 +- .../VolumesByTaxType.scala | 2 +- app/navigation/ReturnsNavigator.scala | 48 ++--- .../AlcoholDutyPage.scala | 4 +- .../AlcoholTypePage.scala | 2 +- .../DeclareAlcoholDutyQuestionPage.scala | 2 +- .../DeleteMultipleSPREntryPage.scala | 2 +- .../DoYouHaveMultipleSPRDutyRatesPage.scala | 2 +- .../DoYouWantToAddMultipleSPRToListPage.scala | 2 +- .../DutyCalculationPage.scala | 4 +- .../HowMuchDoYouNeedToDeclarePage.scala | 4 +- .../MultipleSPRListPage.scala | 4 +- .../TellUsAboutMultipleSPRRatePage.scala | 4 +- .../TellUsAboutSingleSPRRatePage.scala | 4 +- .../WhatDoYouNeedToDeclarePage.scala | 2 +- .../{returns => declareDuty}/package.scala | 2 +- .../AdrReturnSubmissionService.scala | 7 +- .../BeforeStartReturnViewModel.scala | 2 +- .../{returns => }/ReturnPeriodViewModel.scala | 2 +- .../AdjustmentListSummaryHelper.scala | 2 +- .../AdjustmentRepackagedTaxTypeSummary.scala | 2 +- .../adjustment/AdjustmentTaxTypeSummary.scala | 2 +- .../DutyDueForThisReturnHelper.scala | 8 +- .../AlcoholTypeViewModel.scala | 2 +- .../CategoriesByRateTypeHelper.scala | 2 +- ...CheckYourAnswersSPRSummaryListHelper.scala | 2 +- .../CheckYourAnswersSummaryListHelper.scala | 4 +- .../DutyCalculationHelper.scala | 8 +- .../HowMuchDoYouNeedToDeclareSummary.scala | 10 +- .../MultipleSPRListHelper.scala | 10 +- .../MultipleSPRListSummary.scala | 4 +- .../RateBandHelper.scala | 2 +- .../SmallProducerReliefSummary.scala | 8 +- .../TaxBandsViewModel.scala | 2 +- .../TellUsAboutMultipleSPRRateHelper.scala | 2 +- .../TellUsAboutMultipleSPRRateSummary.scala | 6 +- .../TellUsAboutSingleSPRRateSummary.scala | 4 +- .../WhatDoYouNeedToDeclareSummary.scala | 4 +- .../ViewPastPaymentsViewModel.scala | 20 +- .../returns/ViewReturnViewModel.scala | 2 +- .../tasklist/ReturnTaskListCreator.scala | 16 +- app/views/BeforeStartReturnView.scala.html | 2 +- .../ReturnSubmittedView.scala.html | 4 +- .../AlcoholTypeView.scala.html | 4 +- .../CheckYourAnswersSPRView.scala.html | 2 +- .../CheckYourAnswersView.scala.html | 4 +- .../DeclareAlcoholDutyQuestionView.scala.html | 2 +- .../DeleteMultipleSPREntryView.scala.html | 2 +- ...YouHaveMultipleSPRDutyRatesView.scala.html | 2 +- .../DutyCalculationView.scala.html | 2 +- .../HowMuchDoYouNeedToDeclareView.scala.html | 4 +- .../MultipleSPRListView.scala.html | 2 +- .../TellUsAboutMultipleSPRRateView.scala.html | 2 +- .../TellUsAboutSingleSPRRateView.scala.html | 4 +- .../WhatDoYouNeedToDeclareView.scala.html | 4 +- .../ViewPastPaymentsView.scala.html | 0 conf/app.routes | 82 ++++---- .../AlcoholDutyCalculatorConnectorISpec.scala | 2 +- test-utils/common/TestData.scala | 10 +- test-utils/common/TestPages.scala | 4 +- test-utils/generators/ModelGenerators.scala | 2 +- .../AlcoholDutyCalculatorConnectorSpec.scala | 2 +- .../AlcoholDutyReturnsConnectorSpec.scala | 2 +- .../BeforeStartReturnControllerSpec.scala | 3 +- .../DutyDueForThisReturnControllerSpec.scala | 2 +- .../AlcoholTypeControllerSpec.scala | 8 +- .../CheckYourAnswersControllerSpec.scala | 14 +- .../CheckYourAnswersSPRControllerSpec.scala | 26 +-- ...areAlcoholDutyQuestionControllerSpec.scala | 8 +- ...DeleteMultipleSPREntryControllerSpec.scala | 20 +- ...veMultipleSPRDutyRatesControllerSpec.scala | 12 +- .../DutyCalculationControllerSpec.scala | 20 +- ...MuchDoYouNeedToDeclareControllerSpec.scala | 10 +- .../MultipleSPRListControllerSpec.scala | 12 +- ...UsAboutMultipleSPRRateControllerSpec.scala | 12 +- ...llUsAboutSingleSPRRateControllerSpec.scala | 12 +- ...WhatDoYouNeedToDeclareControllerSpec.scala | 10 +- .../StartDirectDebitControllerSpec.scala | 6 +- .../StartPaymentControllerSpec.scala | 30 ++- .../ViewPastPaymentsControllerSpec.scala | 11 +- .../ViewPastReturnsControllerSpec.scala | 5 +- .../returns/ViewReturnControllerSpec.scala | 7 +- .../AlcoholTypeFormProviderSpec.scala | 2 +- ...leteMultipleSPREntryFormProviderSpec.scala | 2 +- ...MultipleSPRDutyRatesFormProviderSpec.scala | 2 +- ...chDoYouNeedToDeclareFormProviderSpec.scala | 4 +- .../MultipleSPRListFormProviderSpec.scala | 2 +- ...AboutMultipleSPRRateFormProviderSpec.scala | 4 +- ...UsAboutSingleSPRRateFormProviderSpec.scala | 2 +- ...atDoYouNeedToDeclareFormProviderSpec.scala | 2 +- test/forms/mappings/MappingsSpec.scala | 2 +- .../AdrReturnSubmissionSpec.scala | 3 +- .../ReturnAdjustmentsRowSpec.scala | 3 +- test/navigation/ReturnsNavigatorSpec.scala | 186 +++++++++--------- .../AdrReturnSubmissionServiceSpec.scala | 4 +- .../BeforeStartReturnViewModelSpec.scala | 2 +- .../CategoriesByRateTypeHelperSpec.scala | 2 +- .../DutyCalculationHelperSpec.scala | 6 +- .../MultipleSPRListSummarySpec.scala | 2 +- .../RateBandHelperSpec.scala | 4 +- .../ReturnPeriodViewModelSpec.scala | 3 +- .../SmallProducerReliefSummarySpec.scala | 2 +- .../TaxBandsViewModelSpec.scala | 2 +- ...TellUsAboutMultipleSPRRateHelperSpec.scala | 2 +- ...ellUsAboutMultipleSPRRateSummarySpec.scala | 2 +- .../TellUsAboutSingleSPRRateSummarySpec.scala | 2 +- .../ViewPastPaymentsViewModelSpec.scala | 6 +- .../returns/ViewPastReturnsHelperSpec.scala | 1 - .../returns/ViewReturnViewModelSpec.scala | 1 - .../AlcoholDutyTaskListHelperSpec.scala | 2 +- .../tasklist/ReturnTaskListCreatorSpec.scala | 22 +-- 151 files changed, 543 insertions(+), 559 deletions(-) rename app/controllers/{returns => declareDuty}/AlcoholTypeController.scala (94%) rename app/controllers/{returns => declareDuty}/CheckYourAnswersController.scala (92%) rename app/controllers/{returns => declareDuty}/CheckYourAnswersSPRController.scala (89%) rename app/controllers/{returns => declareDuty}/DeclareAlcoholDutyQuestionController.scala (93%) rename app/controllers/{returns => declareDuty}/DeleteMultipleSPREntryController.scala (90%) rename app/controllers/{returns => declareDuty}/DoYouHaveMultipleSPRDutyRatesController.scala (92%) rename app/controllers/{returns => declareDuty}/DutyCalculationController.scala (91%) rename app/controllers/{returns => declareDuty}/HowMuchDoYouNeedToDeclareController.scala (93%) rename app/controllers/{returns => declareDuty}/MultipleSPRListController.scala (93%) rename app/controllers/{returns => declareDuty}/ReturnController.scala (97%) rename app/controllers/{returns => declareDuty}/TellUsAboutMultipleSPRRateController.scala (93%) rename app/controllers/{returns => declareDuty}/TellUsAboutSingleSPRRateController.scala (92%) rename app/controllers/{returns => declareDuty}/WhatDoYouNeedToDeclareController.scala (95%) rename app/controllers/{ => payments}/StartDirectDebitController.scala (98%) rename app/controllers/{ => payments}/StartPaymentController.scala (98%) rename app/controllers/{returns => payments}/ViewPastPaymentsController.scala (96%) rename app/forms/{returns => declareDuty}/AlcoholTypeFormProvider.scala (97%) rename app/forms/{returns => declareDuty}/DeclareAlcoholDutyQuestionFormProvider.scala (97%) rename app/forms/{returns => declareDuty}/DeleteMultipleSPREntryFormProvider.scala (97%) rename app/forms/{returns => declareDuty}/DoYouHaveMultipleSPRDutyRatesFormProvider.scala (97%) rename app/forms/{returns => declareDuty}/HowMuchDoYouNeedToDeclareFormProvider.scala (95%) rename app/forms/{returns => declareDuty}/MultipleSPRListFormProvider.scala (97%) rename app/forms/{returns => declareDuty}/TellUsAboutMultipleSPRRateFormProvider.scala (94%) rename app/forms/{returns => declareDuty}/TellUsAboutSingleSPRRateFormProvider.scala (95%) rename app/forms/{returns => declareDuty}/WhatDoYouNeedToDeclareFormProvider.scala (97%) delete mode 100644 app/models/checkAndSubmit/AdrReturnCreatedDetails.scala rename app/models/{returns => checkAndSubmit}/AdrReturnSubmission.scala (99%) rename app/models/{returns => declareDuty}/AlcoholDuty.scala (97%) rename app/models/{returns => declareDuty}/VolumeAndRateByTaxType.scala (97%) rename app/models/{returns => declareDuty}/VolumesByTaxType.scala (96%) rename app/pages/{returns => declareDuty}/AlcoholDutyPage.scala (93%) rename app/pages/{returns => declareDuty}/AlcoholTypePage.scala (97%) rename app/pages/{returns => declareDuty}/DeclareAlcoholDutyQuestionPage.scala (97%) rename app/pages/{returns => declareDuty}/DeleteMultipleSPREntryPage.scala (97%) rename app/pages/{returns => declareDuty}/DoYouHaveMultipleSPRDutyRatesPage.scala (97%) rename app/pages/{returns => declareDuty}/DoYouWantToAddMultipleSPRToListPage.scala (97%) rename app/pages/{returns => declareDuty}/DutyCalculationPage.scala (93%) rename app/pages/{returns => declareDuty}/HowMuchDoYouNeedToDeclarePage.scala (92%) rename app/pages/{returns => declareDuty}/MultipleSPRListPage.scala (92%) rename app/pages/{returns => declareDuty}/TellUsAboutMultipleSPRRatePage.scala (92%) rename app/pages/{returns => declareDuty}/TellUsAboutSingleSPRRatePage.scala (92%) rename app/pages/{returns => declareDuty}/WhatDoYouNeedToDeclarePage.scala (97%) rename app/pages/{returns => declareDuty}/package.scala (97%) rename app/viewmodels/{returns => }/ReturnPeriodViewModel.scala (97%) rename app/viewmodels/{returns => declareDuty}/AlcoholTypeViewModel.scala (97%) rename app/viewmodels/{returns => declareDuty}/CategoriesByRateTypeHelper.scala (98%) rename app/viewmodels/{returns => declareDuty}/CheckYourAnswersSPRSummaryListHelper.scala (97%) rename app/viewmodels/{returns => declareDuty}/CheckYourAnswersSummaryListHelper.scala (95%) rename app/viewmodels/{returns => declareDuty}/DutyCalculationHelper.scala (94%) rename app/viewmodels/{returns => declareDuty}/HowMuchDoYouNeedToDeclareSummary.scala (93%) rename app/viewmodels/{returns => declareDuty}/MultipleSPRListHelper.scala (92%) rename app/viewmodels/{returns => declareDuty}/MultipleSPRListSummary.scala (96%) rename app/viewmodels/{returns => declareDuty}/RateBandHelper.scala (99%) rename app/viewmodels/{returns => declareDuty}/SmallProducerReliefSummary.scala (88%) rename app/viewmodels/{returns => declareDuty}/TaxBandsViewModel.scala (98%) rename app/viewmodels/{returns => declareDuty}/TellUsAboutMultipleSPRRateHelper.scala (98%) rename app/viewmodels/{returns => declareDuty}/TellUsAboutMultipleSPRRateSummary.scala (96%) rename app/viewmodels/{returns => declareDuty}/TellUsAboutSingleSPRRateSummary.scala (95%) rename app/viewmodels/{returns => declareDuty}/WhatDoYouNeedToDeclareSummary.scala (94%) rename app/viewmodels/{returns => payments}/ViewPastPaymentsViewModel.scala (97%) rename app/views/{returns => declareDuty}/AlcoholTypeView.scala.html (92%) rename app/views/{returns => declareDuty}/CheckYourAnswersSPRView.scala.html (90%) rename app/views/{returns => declareDuty}/CheckYourAnswersView.scala.html (92%) rename app/views/{returns => declareDuty}/DeclareAlcoholDutyQuestionView.scala.html (95%) rename app/views/{returns => declareDuty}/DeleteMultipleSPREntryView.scala.html (92%) rename app/views/{returns => declareDuty}/DoYouHaveMultipleSPRDutyRatesView.scala.html (93%) rename app/views/{returns => declareDuty}/DutyCalculationView.scala.html (94%) rename app/views/{returns => declareDuty}/HowMuchDoYouNeedToDeclareView.scala.html (96%) rename app/views/{returns => declareDuty}/MultipleSPRListView.scala.html (95%) rename app/views/{returns => declareDuty}/TellUsAboutMultipleSPRRateView.scala.html (96%) rename app/views/{returns => declareDuty}/TellUsAboutSingleSPRRateView.scala.html (97%) rename app/views/{returns => declareDuty}/WhatDoYouNeedToDeclareView.scala.html (94%) rename app/views/{returns => payments}/ViewPastPaymentsView.scala.html (100%) rename test/controllers/{returns => declareDuty}/AlcoholTypeControllerSpec.scala (97%) rename test/controllers/{returns => declareDuty}/CheckYourAnswersControllerSpec.scala (85%) rename test/controllers/{returns => declareDuty}/CheckYourAnswersSPRControllerSpec.scala (80%) rename test/controllers/{returns => declareDuty}/DeclareAlcoholDutyQuestionControllerSpec.scala (97%) rename test/controllers/{returns => declareDuty}/DeleteMultipleSPREntryControllerSpec.scala (90%) rename test/controllers/{returns => declareDuty}/DoYouHaveMultipleSPRDutyRatesControllerSpec.scala (94%) rename test/controllers/{returns => declareDuty}/DutyCalculationControllerSpec.scala (88%) rename test/controllers/{returns => declareDuty}/HowMuchDoYouNeedToDeclareControllerSpec.scala (96%) rename test/controllers/{returns => declareDuty}/MultipleSPRListControllerSpec.scala (95%) rename test/controllers/{returns => declareDuty}/TellUsAboutMultipleSPRRateControllerSpec.scala (97%) rename test/controllers/{returns => declareDuty}/TellUsAboutSingleSPRRateControllerSpec.scala (95%) rename test/controllers/{returns => declareDuty}/WhatDoYouNeedToDeclareControllerSpec.scala (97%) rename test/controllers/{ => payments}/StartDirectDebitControllerSpec.scala (90%) rename test/controllers/{ => payments}/StartPaymentControllerSpec.scala (88%) rename test/controllers/{returns => payments}/ViewPastPaymentsControllerSpec.scala (90%) rename test/forms/{returns => declareDuty}/AlcoholTypeFormProviderSpec.scala (97%) rename test/forms/{returns => declareDuty}/DeleteMultipleSPREntryFormProviderSpec.scala (97%) rename test/forms/{returns => declareDuty}/DoYouHaveMultipleSPRDutyRatesFormProviderSpec.scala (97%) rename test/forms/{returns => declareDuty}/HowMuchDoYouNeedToDeclareFormProviderSpec.scala (98%) rename test/forms/{returns => declareDuty}/MultipleSPRListFormProviderSpec.scala (97%) rename test/forms/{returns => declareDuty}/TellUsAboutMultipleSPRRateFormProviderSpec.scala (98%) rename test/forms/{returns => declareDuty}/TellUsAboutSingleSPRRateFormProviderSpec.scala (99%) rename test/forms/{returns => declareDuty}/WhatDoYouNeedToDeclareFormProviderSpec.scala (98%) rename test/models/{returns => declareDuty}/AdrReturnSubmissionSpec.scala (92%) rename test/models/{returns => declareDuty}/ReturnAdjustmentsRowSpec.scala (97%) rename test/viewmodels/{returns => declareDuty}/CategoriesByRateTypeHelperSpec.scala (99%) rename test/viewmodels/{returns => declareDuty}/DutyCalculationHelperSpec.scala (96%) rename test/viewmodels/{returns => declareDuty}/MultipleSPRListSummarySpec.scala (99%) rename test/viewmodels/{returns => declareDuty}/RateBandHelperSpec.scala (99%) rename test/viewmodels/{returns => declareDuty}/ReturnPeriodViewModelSpec.scala (95%) rename test/viewmodels/{returns => declareDuty}/SmallProducerReliefSummarySpec.scala (98%) rename test/viewmodels/{returns => declareDuty}/TaxBandsViewModelSpec.scala (99%) rename test/viewmodels/{returns => declareDuty}/TellUsAboutMultipleSPRRateHelperSpec.scala (98%) rename test/viewmodels/{returns => declareDuty}/TellUsAboutMultipleSPRRateSummarySpec.scala (98%) rename test/viewmodels/{returns => declareDuty}/TellUsAboutSingleSPRRateSummarySpec.scala (99%) rename test/viewmodels/{returns => payments}/ViewPastPaymentsViewModelSpec.scala (97%) diff --git a/app/connectors/AlcoholDutyCalculatorConnector.scala b/app/connectors/AlcoholDutyCalculatorConnector.scala index c20bfcfd..245e5fe5 100644 --- a/app/connectors/AlcoholDutyCalculatorConnector.scala +++ b/app/connectors/AlcoholDutyCalculatorConnector.scala @@ -18,7 +18,7 @@ package connectors import config.FrontendAppConfig import models.adjustment.{AdjustmentDuty, AdjustmentTypes} -import models.returns.AlcoholDuty +import models.declareDuty.AlcoholDuty import models.{AlcoholRegime, RateBand, RatePeriod} import play.api.http.Status.OK import play.api.libs.json.Json diff --git a/app/connectors/AlcoholDutyReturnsConnector.scala b/app/connectors/AlcoholDutyReturnsConnector.scala index 1dd14034..51f0a48f 100644 --- a/app/connectors/AlcoholDutyReturnsConnector.scala +++ b/app/connectors/AlcoholDutyReturnsConnector.scala @@ -19,7 +19,8 @@ package connectors import cats.data.EitherT import config.FrontendAppConfig import models.ObligationData -import models.returns.{AdrReturnCreatedDetails, AdrReturnSubmission, ReturnDetails} +import models.checkAndSubmit.{AdrReturnCreatedDetails, AdrReturnSubmission} +import models.returns.{ReturnDetails} import play.api.Logging import uk.gov.hmrc.http.{HeaderCarrier, HttpReadsInstances, HttpResponse, StringContextOps, UpstreamErrorResponse} diff --git a/app/connectors/DutyCalculation.scala b/app/connectors/DutyCalculation.scala index 858d3d51..ea43036d 100644 --- a/app/connectors/DutyCalculation.scala +++ b/app/connectors/DutyCalculation.scala @@ -16,7 +16,7 @@ package connectors -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import models.adjustment.AdjustmentTypes import play.api.libs.json.{Json, OFormat} diff --git a/app/controllers/BeforeStartReturnController.scala b/app/controllers/BeforeStartReturnController.scala index 3078ba03..f065b676 100644 --- a/app/controllers/BeforeStartReturnController.scala +++ b/app/controllers/BeforeStartReturnController.scala @@ -28,8 +28,7 @@ import services.AuditService import uk.gov.hmrc.alcoholdutyreturns.models.ReturnAndUserDetails import uk.gov.hmrc.http.HeaderCarrier import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.BeforeStartReturnViewModel -import viewmodels.returns.ReturnPeriodViewModel +import viewmodels.{BeforeStartReturnViewModel, ReturnPeriodViewModel} import views.html.BeforeStartReturnView import java.time.{Clock, Instant, LocalDate} diff --git a/app/controllers/adjustment/AdjustmentVolumeController.scala b/app/controllers/adjustment/AdjustmentVolumeController.scala index 64f5c058..dc00ce1f 100644 --- a/app/controllers/adjustment/AdjustmentVolumeController.scala +++ b/app/controllers/adjustment/AdjustmentVolumeController.scala @@ -31,7 +31,7 @@ import models.requests.DataRequest import play.api.Logging import play.api.data.Form import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.RateBandHelper.rateBandContent +import viewmodels.declareDuty.RateBandHelper.rateBandContent import views.html.adjustment.AdjustmentVolumeView import scala.concurrent.{ExecutionContext, Future} diff --git a/app/controllers/adjustment/AdjustmentVolumeWithSPRController.scala b/app/controllers/adjustment/AdjustmentVolumeWithSPRController.scala index 5877da78..d65a9281 100644 --- a/app/controllers/adjustment/AdjustmentVolumeWithSPRController.scala +++ b/app/controllers/adjustment/AdjustmentVolumeWithSPRController.scala @@ -31,7 +31,7 @@ import models.requests.DataRequest import play.api.Logging import play.api.data.Form import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.RateBandHelper.rateBandContent +import viewmodels.declareDuty.RateBandHelper.rateBandContent import views.html.adjustment.AdjustmentVolumeWithSPRView import scala.concurrent.{ExecutionContext, Future} diff --git a/app/controllers/checkAndSubmit/DutyDueForThisReturnController.scala b/app/controllers/checkAndSubmit/DutyDueForThisReturnController.scala index 773acaa3..10981c99 100644 --- a/app/controllers/checkAndSubmit/DutyDueForThisReturnController.scala +++ b/app/controllers/checkAndSubmit/DutyDueForThisReturnController.scala @@ -22,7 +22,7 @@ import connectors.AlcoholDutyReturnsConnector import controllers.actions._ import models.UserAnswers import models.audit.AuditReturnSubmitted -import models.returns.AdrReturnSubmission +import models.checkAndSubmit.AdrReturnSubmission import play.api.Logging import javax.inject.Inject diff --git a/app/controllers/checkAndSubmit/ReturnSubmittedController.scala b/app/controllers/checkAndSubmit/ReturnSubmittedController.scala index 5c08566f..169c8c3a 100644 --- a/app/controllers/checkAndSubmit/ReturnSubmittedController.scala +++ b/app/controllers/checkAndSubmit/ReturnSubmittedController.scala @@ -28,8 +28,7 @@ import play.api.i18n.{I18nSupport, MessagesApi} import play.api.libs.json.Json import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.DateTimeHelper -import viewmodels.returns.ReturnPeriodViewModel +import viewmodels.{DateTimeHelper, ReturnPeriodViewModel} import views.html.checkAndSubmit.ReturnSubmittedView class ReturnSubmittedController @Inject() ( diff --git a/app/controllers/returns/AlcoholTypeController.scala b/app/controllers/declareDuty/AlcoholTypeController.scala similarity index 94% rename from app/controllers/returns/AlcoholTypeController.scala rename to app/controllers/declareDuty/AlcoholTypeController.scala index 90c962fc..d136657a 100644 --- a/app/controllers/returns/AlcoholTypeController.scala +++ b/app/controllers/declareDuty/AlcoholTypeController.scala @@ -14,20 +14,20 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import controllers.actions._ -import forms.returns.AlcoholTypeFormProvider +import forms.declareDuty.AlcoholTypeFormProvider import javax.inject.Inject import models.{AlcoholRegime, Mode, UserAnswers} import navigation.ReturnsNavigator -import pages.returns.{AlcoholTypePage, nextPages} +import pages.declareDuty.{AlcoholTypePage, nextPages} import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import connectors.CacheConnector import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import views.html.returns.AlcoholTypeView +import views.html.declareDuty.AlcoholTypeView import scala.concurrent.{ExecutionContext, Future} import scala.util.Try diff --git a/app/controllers/returns/CheckYourAnswersController.scala b/app/controllers/declareDuty/CheckYourAnswersController.scala similarity index 92% rename from app/controllers/returns/CheckYourAnswersController.scala rename to app/controllers/declareDuty/CheckYourAnswersController.scala index 4ccb3be3..1dc32f8e 100644 --- a/app/controllers/returns/CheckYourAnswersController.scala +++ b/app/controllers/declareDuty/CheckYourAnswersController.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import controllers.actions._ import models.AlcoholRegime @@ -24,8 +24,8 @@ import javax.inject.Inject import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.CheckYourAnswersSummaryListHelper -import views.html.returns.CheckYourAnswersView +import viewmodels.declareDuty.CheckYourAnswersSummaryListHelper +import views.html.declareDuty.CheckYourAnswersView class CheckYourAnswersController @Inject() ( override val messagesApi: MessagesApi, diff --git a/app/controllers/returns/CheckYourAnswersSPRController.scala b/app/controllers/declareDuty/CheckYourAnswersSPRController.scala similarity index 89% rename from app/controllers/returns/CheckYourAnswersSPRController.scala rename to app/controllers/declareDuty/CheckYourAnswersSPRController.scala index 58f55ce9..9a7b09ea 100644 --- a/app/controllers/returns/CheckYourAnswersSPRController.scala +++ b/app/controllers/declareDuty/CheckYourAnswersSPRController.scala @@ -14,21 +14,21 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import connectors.CacheConnector import controllers.actions._ -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import models.{AlcoholRegime, UserAnswers} -import pages.returns.{MultipleSPRListPage, TellUsAboutMultipleSPRRatePage} +import pages.declareDuty.{MultipleSPRListPage, TellUsAboutMultipleSPRRatePage} import play.api.Logging import javax.inject.Inject import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.CheckYourAnswersSPRSummaryListHelper -import views.html.returns.CheckYourAnswersSPRView +import viewmodels.declareDuty.CheckYourAnswersSPRSummaryListHelper +import views.html.declareDuty.CheckYourAnswersSPRView import scala.concurrent.{ExecutionContext, Future} import scala.util.Try @@ -68,7 +68,7 @@ class CheckYourAnswersSPRController @Inject() ( updatedUserAnswers <- Future.fromTry(updateUserAnswer(request.userAnswers, regime, sprRateEntry, index)) cleanedUserAnswers <- Future.fromTry(updatedUserAnswers.removeByKey(TellUsAboutMultipleSPRRatePage, regime)) _ <- cacheConnector.set(cleanedUserAnswers) - } yield Redirect(controllers.returns.routes.MultipleSPRListController.onPageLoad(regime)) + } yield Redirect(controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime)) } } diff --git a/app/controllers/returns/DeclareAlcoholDutyQuestionController.scala b/app/controllers/declareDuty/DeclareAlcoholDutyQuestionController.scala similarity index 93% rename from app/controllers/returns/DeclareAlcoholDutyQuestionController.scala rename to app/controllers/declareDuty/DeclareAlcoholDutyQuestionController.scala index 8056def8..f2ce83f0 100644 --- a/app/controllers/returns/DeclareAlcoholDutyQuestionController.scala +++ b/app/controllers/declareDuty/DeclareAlcoholDutyQuestionController.scala @@ -14,19 +14,19 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import connectors.CacheConnector import controllers.actions._ -import forms.returns.DeclareAlcoholDutyQuestionFormProvider +import forms.declareDuty.DeclareAlcoholDutyQuestionFormProvider import models.AlcoholRegime.{Beer, Cider, OtherFermentedProduct, Spirits, Wine} import models.{AlcoholRegime, Mode, UserAnswers} import navigation.ReturnsNavigator -import pages.returns.{AlcoholTypePage, DeclareAlcoholDutyQuestionPage, sectionPages} +import pages.declareDuty.{AlcoholTypePage, DeclareAlcoholDutyQuestionPage, sectionPages} import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import views.html.returns.DeclareAlcoholDutyQuestionView +import views.html.declareDuty.DeclareAlcoholDutyQuestionView import javax.inject.Inject import scala.concurrent.{ExecutionContext, Future} diff --git a/app/controllers/returns/DeleteMultipleSPREntryController.scala b/app/controllers/declareDuty/DeleteMultipleSPREntryController.scala similarity index 90% rename from app/controllers/returns/DeleteMultipleSPREntryController.scala rename to app/controllers/declareDuty/DeleteMultipleSPREntryController.scala index e8259c35..ab474bab 100644 --- a/app/controllers/returns/DeleteMultipleSPREntryController.scala +++ b/app/controllers/declareDuty/DeleteMultipleSPREntryController.scala @@ -14,21 +14,21 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import controllers.actions._ -import forms.returns.DeleteMultipleSPREntryFormProvider +import forms.declareDuty.DeleteMultipleSPREntryFormProvider import javax.inject.Inject import models.{AlcoholRegime, NormalMode} -import pages.returns.{DeleteMultipleSPREntryPage, MultipleSPRListPage} +import pages.declareDuty.{DeleteMultipleSPREntryPage, MultipleSPRListPage} import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import connectors.CacheConnector import navigation.ReturnsNavigator import play.api.Logging import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import views.html.returns.DeleteMultipleSPREntryView +import views.html.declareDuty.DeleteMultipleSPREntryView import scala.concurrent.{ExecutionContext, Future} @@ -80,7 +80,8 @@ class DeleteMultipleSPREntryController @Inject() ( navigator.nextPageWithRegime(DeleteMultipleSPREntryPage, NormalMode, updatedAnswers, regime) ) } else { - Future.successful(Redirect(controllers.returns.routes.MultipleSPRListController.onPageLoad(regime))) + Future + .successful(Redirect(controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime))) } ) } diff --git a/app/controllers/returns/DoYouHaveMultipleSPRDutyRatesController.scala b/app/controllers/declareDuty/DoYouHaveMultipleSPRDutyRatesController.scala similarity index 92% rename from app/controllers/returns/DoYouHaveMultipleSPRDutyRatesController.scala rename to app/controllers/declareDuty/DoYouHaveMultipleSPRDutyRatesController.scala index 7af48ff9..71b99ee1 100644 --- a/app/controllers/returns/DoYouHaveMultipleSPRDutyRatesController.scala +++ b/app/controllers/declareDuty/DoYouHaveMultipleSPRDutyRatesController.scala @@ -14,20 +14,20 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import controllers.actions._ -import forms.returns.DoYouHaveMultipleSPRDutyRatesFormProvider +import forms.declareDuty.DoYouHaveMultipleSPRDutyRatesFormProvider import javax.inject.Inject import models.{AlcoholRegime, Mode} import navigation.ReturnsNavigator -import pages.returns.{DoYouHaveMultipleSPRDutyRatesPage, nextPages} +import pages.declareDuty.{DoYouHaveMultipleSPRDutyRatesPage, nextPages} import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import connectors.CacheConnector import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import views.html.returns.DoYouHaveMultipleSPRDutyRatesView +import views.html.declareDuty.DoYouHaveMultipleSPRDutyRatesView import scala.concurrent.{ExecutionContext, Future} diff --git a/app/controllers/returns/DutyCalculationController.scala b/app/controllers/declareDuty/DutyCalculationController.scala similarity index 91% rename from app/controllers/returns/DutyCalculationController.scala rename to app/controllers/declareDuty/DutyCalculationController.scala index 612e6aeb..39c44188 100644 --- a/app/controllers/returns/DutyCalculationController.scala +++ b/app/controllers/declareDuty/DutyCalculationController.scala @@ -14,22 +14,22 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import connectors.{AlcoholDutyCalculatorConnector, CacheConnector, TotalDutyCalculationRequest} import controllers.actions._ -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import models.{AlcoholRegime, UserAnswers} import pages.QuestionPage -import pages.returns.{AlcoholDutyPage, DoYouHaveMultipleSPRDutyRatesPage, DutyCalculationPage, HowMuchDoYouNeedToDeclarePage, MultipleSPRListPage, TellUsAboutSingleSPRRatePage} +import pages.declareDuty.{AlcoholDutyPage, DoYouHaveMultipleSPRDutyRatesPage, DutyCalculationPage, HowMuchDoYouNeedToDeclarePage, MultipleSPRListPage, TellUsAboutSingleSPRRatePage} import play.api.Logging import javax.inject.Inject import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.DutyCalculationHelper -import views.html.returns.DutyCalculationView +import viewmodels.declareDuty.DutyCalculationHelper +import views.html.declareDuty.DutyCalculationView import scala.concurrent.{ExecutionContext, Future} diff --git a/app/controllers/returns/HowMuchDoYouNeedToDeclareController.scala b/app/controllers/declareDuty/HowMuchDoYouNeedToDeclareController.scala similarity index 93% rename from app/controllers/returns/HowMuchDoYouNeedToDeclareController.scala rename to app/controllers/declareDuty/HowMuchDoYouNeedToDeclareController.scala index 61183485..992917f8 100644 --- a/app/controllers/returns/HowMuchDoYouNeedToDeclareController.scala +++ b/app/controllers/declareDuty/HowMuchDoYouNeedToDeclareController.scala @@ -14,23 +14,23 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import controllers.actions._ -import forms.returns.HowMuchDoYouNeedToDeclareFormProvider +import forms.declareDuty.HowMuchDoYouNeedToDeclareFormProvider import javax.inject.Inject import models.{AlcoholRegime, Mode, RateBand} import navigation.ReturnsNavigator -import pages.returns.{HowMuchDoYouNeedToDeclarePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{HowMuchDoYouNeedToDeclarePage, WhatDoYouNeedToDeclarePage} import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import connectors.CacheConnector -import models.returns.{VolumeAndRateByTaxType, VolumesByTaxType} +import models.declareDuty.{VolumeAndRateByTaxType, VolumesByTaxType} import play.api.Logging import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.CategoriesByRateTypeHelper -import views.html.returns.HowMuchDoYouNeedToDeclareView +import viewmodels.declareDuty.CategoriesByRateTypeHelper +import views.html.declareDuty.HowMuchDoYouNeedToDeclareView import scala.concurrent.{ExecutionContext, Future} import scala.util.{Failure, Success, Try} diff --git a/app/controllers/returns/MultipleSPRListController.scala b/app/controllers/declareDuty/MultipleSPRListController.scala similarity index 93% rename from app/controllers/returns/MultipleSPRListController.scala rename to app/controllers/declareDuty/MultipleSPRListController.scala index e10f38b6..e4ab8681 100644 --- a/app/controllers/returns/MultipleSPRListController.scala +++ b/app/controllers/declareDuty/MultipleSPRListController.scala @@ -14,22 +14,22 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import controllers.actions._ -import forms.returns.MultipleSPRListFormProvider +import forms.declareDuty.MultipleSPRListFormProvider import javax.inject.Inject import models.{AlcoholRegime, NormalMode} import navigation.ReturnsNavigator -import pages.returns.DoYouWantToAddMultipleSPRToListPage +import pages.declareDuty.DoYouWantToAddMultipleSPRToListPage import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import connectors.CacheConnector import play.api.Logging import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.MultipleSPRListHelper -import views.html.returns.MultipleSPRListView +import viewmodels.declareDuty.MultipleSPRListHelper +import views.html.declareDuty.MultipleSPRListView import scala.concurrent.{ExecutionContext, Future} diff --git a/app/controllers/returns/ReturnController.scala b/app/controllers/declareDuty/ReturnController.scala similarity index 97% rename from app/controllers/returns/ReturnController.scala rename to app/controllers/declareDuty/ReturnController.scala index d40d83ce..31540a17 100644 --- a/app/controllers/returns/ReturnController.scala +++ b/app/controllers/declareDuty/ReturnController.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import models.AlcoholRegime import models.requests.DataRequest diff --git a/app/controllers/returns/TellUsAboutMultipleSPRRateController.scala b/app/controllers/declareDuty/TellUsAboutMultipleSPRRateController.scala similarity index 93% rename from app/controllers/returns/TellUsAboutMultipleSPRRateController.scala rename to app/controllers/declareDuty/TellUsAboutMultipleSPRRateController.scala index 47edb0cf..41e369c0 100644 --- a/app/controllers/returns/TellUsAboutMultipleSPRRateController.scala +++ b/app/controllers/declareDuty/TellUsAboutMultipleSPRRateController.scala @@ -14,24 +14,24 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import controllers.actions._ -import forms.returns.TellUsAboutMultipleSPRRateFormProvider +import forms.declareDuty.TellUsAboutMultipleSPRRateFormProvider import javax.inject.Inject import models.{AlcoholRegime, CheckMode, Mode, NormalMode, UserAnswers} import navigation.ReturnsNavigator -import pages.returns.{MultipleSPRListPage, TellUsAboutMultipleSPRRatePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{MultipleSPRListPage, TellUsAboutMultipleSPRRatePage, WhatDoYouNeedToDeclarePage} import play.api.i18n.{I18nSupport, Messages, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import connectors.CacheConnector -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import play.api.Logging import play.api.data.Form import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.TellUsAboutMultipleSPRRateHelper -import views.html.returns.TellUsAboutMultipleSPRRateView +import viewmodels.declareDuty.TellUsAboutMultipleSPRRateHelper +import views.html.declareDuty.TellUsAboutMultipleSPRRateView import scala.concurrent.{ExecutionContext, Future} diff --git a/app/controllers/returns/TellUsAboutSingleSPRRateController.scala b/app/controllers/declareDuty/TellUsAboutSingleSPRRateController.scala similarity index 92% rename from app/controllers/returns/TellUsAboutSingleSPRRateController.scala rename to app/controllers/declareDuty/TellUsAboutSingleSPRRateController.scala index 808a10f1..4ff2b6b4 100644 --- a/app/controllers/returns/TellUsAboutSingleSPRRateController.scala +++ b/app/controllers/declareDuty/TellUsAboutSingleSPRRateController.scala @@ -14,23 +14,23 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import controllers.actions._ -import forms.returns.TellUsAboutSingleSPRRateFormProvider +import forms.declareDuty.TellUsAboutSingleSPRRateFormProvider import javax.inject.Inject import models.{AlcoholRegime, Mode} import navigation.ReturnsNavigator -import pages.returns.{TellUsAboutSingleSPRRatePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{TellUsAboutSingleSPRRatePage, WhatDoYouNeedToDeclarePage} import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import connectors.CacheConnector -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import play.api.Logging import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.CategoriesByRateTypeHelper -import views.html.returns.TellUsAboutSingleSPRRateView +import viewmodels.declareDuty.CategoriesByRateTypeHelper +import views.html.declareDuty.TellUsAboutSingleSPRRateView import scala.concurrent.{ExecutionContext, Future} diff --git a/app/controllers/returns/WhatDoYouNeedToDeclareController.scala b/app/controllers/declareDuty/WhatDoYouNeedToDeclareController.scala similarity index 95% rename from app/controllers/returns/WhatDoYouNeedToDeclareController.scala rename to app/controllers/declareDuty/WhatDoYouNeedToDeclareController.scala index 10b6479d..bef09fe0 100644 --- a/app/controllers/returns/WhatDoYouNeedToDeclareController.scala +++ b/app/controllers/declareDuty/WhatDoYouNeedToDeclareController.scala @@ -14,23 +14,23 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import connectors.{AlcoholDutyCalculatorConnector, CacheConnector} import controllers.actions._ -import forms.returns.WhatDoYouNeedToDeclareFormProvider +import forms.declareDuty.WhatDoYouNeedToDeclareFormProvider import models.requests.DataRequest import models.{AlcoholRegime, Mode, RateBand, ReturnPeriod, UserAnswers} import navigation.ReturnsNavigator import pages.QuestionPage -import pages.returns.{WhatDoYouNeedToDeclarePage, nextPages} +import pages.declareDuty.{WhatDoYouNeedToDeclarePage, nextPages} import play.api.Logging import play.api.i18n.{I18nSupport, MessagesApi} import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import uk.gov.hmrc.http.HeaderCarrier import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.TaxBandsViewModel -import views.html.returns.WhatDoYouNeedToDeclareView +import viewmodels.declareDuty.TaxBandsViewModel +import views.html.declareDuty.WhatDoYouNeedToDeclareView import javax.inject.Inject import scala.concurrent.{ExecutionContext, Future} diff --git a/app/controllers/StartDirectDebitController.scala b/app/controllers/payments/StartDirectDebitController.scala similarity index 98% rename from app/controllers/StartDirectDebitController.scala rename to app/controllers/payments/StartDirectDebitController.scala index d9446797..1fd471dc 100644 --- a/app/controllers/StartDirectDebitController.scala +++ b/app/controllers/payments/StartDirectDebitController.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package controllers +package controllers.payments import config.FrontendAppConfig import connectors.DirectDebitConnector diff --git a/app/controllers/StartPaymentController.scala b/app/controllers/payments/StartPaymentController.scala similarity index 98% rename from app/controllers/StartPaymentController.scala rename to app/controllers/payments/StartPaymentController.scala index 6568e004..8cbae0f7 100644 --- a/app/controllers/StartPaymentController.scala +++ b/app/controllers/payments/StartPaymentController.scala @@ -14,20 +14,20 @@ * limitations under the License. */ -package controllers +package controllers.payments import config.Constants.{adrReturnCreatedDetails, pastPaymentsSessionKey} import config.FrontendAppConfig import connectors.PayApiConnector -import models.OutstandingPayment import controllers.actions.IdentifyWithEnrolmentAction +import models.OutstandingPayment import models.audit.AuditPaymentStarted import models.checkAndSubmit.AdrReturnCreatedDetails import models.payments.StartPaymentRequest import play.api.Logging import play.api.i18n.I18nSupport import play.api.libs.json.Json -import play.api.mvc.{Action, AnyContent, MessagesControllerComponents, Result, Session} +import play.api.mvc._ import services.AuditService import uk.gov.hmrc.http.HeaderCarrier import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController diff --git a/app/controllers/returns/ViewPastPaymentsController.scala b/app/controllers/payments/ViewPastPaymentsController.scala similarity index 96% rename from app/controllers/returns/ViewPastPaymentsController.scala rename to app/controllers/payments/ViewPastPaymentsController.scala index 848f6b50..9d76e972 100644 --- a/app/controllers/returns/ViewPastPaymentsController.scala +++ b/app/controllers/payments/ViewPastPaymentsController.scala @@ -14,23 +14,23 @@ * limitations under the License. */ -package controllers.returns +package controllers.payments +import config.Constants.pastPaymentsSessionKey import connectors.AlcoholDutyAccountConnector import controllers.actions.IdentifyWithEnrolmentAction +import models.payments.OutstandingPayments import play.api.Logging import play.api.i18n.{I18nSupport, MessagesApi} +import play.api.libs.json.Json import play.api.mvc.{Action, AnyContent, MessagesControllerComponents} import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController -import viewmodels.returns.ViewPastPaymentsViewModel -import views.html.returns.ViewPastPaymentsView -import play.api.libs.json.Json +import viewmodels.payments.ViewPastPaymentsViewModel +import views.html.payments.ViewPastPaymentsView import java.time.{LocalDate, Year} import javax.inject.Inject import scala.concurrent.ExecutionContext -import config.Constants.pastPaymentsSessionKey -import models.payments.OutstandingPayments class ViewPastPaymentsController @Inject() ( override val messagesApi: MessagesApi, identify: IdentifyWithEnrolmentAction, diff --git a/app/forms/returns/AlcoholTypeFormProvider.scala b/app/forms/declareDuty/AlcoholTypeFormProvider.scala similarity index 97% rename from app/forms/returns/AlcoholTypeFormProvider.scala rename to app/forms/declareDuty/AlcoholTypeFormProvider.scala index a31b4b72..41803ea8 100644 --- a/app/forms/returns/AlcoholTypeFormProvider.scala +++ b/app/forms/declareDuty/AlcoholTypeFormProvider.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import javax.inject.Inject import forms.mappings.Mappings diff --git a/app/forms/returns/DeclareAlcoholDutyQuestionFormProvider.scala b/app/forms/declareDuty/DeclareAlcoholDutyQuestionFormProvider.scala similarity index 97% rename from app/forms/returns/DeclareAlcoholDutyQuestionFormProvider.scala rename to app/forms/declareDuty/DeclareAlcoholDutyQuestionFormProvider.scala index 0af5dfa6..024b5a70 100644 --- a/app/forms/returns/DeclareAlcoholDutyQuestionFormProvider.scala +++ b/app/forms/declareDuty/DeclareAlcoholDutyQuestionFormProvider.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import forms.mappings.Mappings import play.api.data.Form diff --git a/app/forms/returns/DeleteMultipleSPREntryFormProvider.scala b/app/forms/declareDuty/DeleteMultipleSPREntryFormProvider.scala similarity index 97% rename from app/forms/returns/DeleteMultipleSPREntryFormProvider.scala rename to app/forms/declareDuty/DeleteMultipleSPREntryFormProvider.scala index e8cd66ef..7df4890b 100644 --- a/app/forms/returns/DeleteMultipleSPREntryFormProvider.scala +++ b/app/forms/declareDuty/DeleteMultipleSPREntryFormProvider.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import javax.inject.Inject diff --git a/app/forms/returns/DoYouHaveMultipleSPRDutyRatesFormProvider.scala b/app/forms/declareDuty/DoYouHaveMultipleSPRDutyRatesFormProvider.scala similarity index 97% rename from app/forms/returns/DoYouHaveMultipleSPRDutyRatesFormProvider.scala rename to app/forms/declareDuty/DoYouHaveMultipleSPRDutyRatesFormProvider.scala index 8bb0f793..9bce9933 100644 --- a/app/forms/returns/DoYouHaveMultipleSPRDutyRatesFormProvider.scala +++ b/app/forms/declareDuty/DoYouHaveMultipleSPRDutyRatesFormProvider.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import javax.inject.Inject diff --git a/app/forms/returns/HowMuchDoYouNeedToDeclareFormProvider.scala b/app/forms/declareDuty/HowMuchDoYouNeedToDeclareFormProvider.scala similarity index 95% rename from app/forms/returns/HowMuchDoYouNeedToDeclareFormProvider.scala rename to app/forms/declareDuty/HowMuchDoYouNeedToDeclareFormProvider.scala index 3b128672..e4957e21 100644 --- a/app/forms/returns/HowMuchDoYouNeedToDeclareFormProvider.scala +++ b/app/forms/declareDuty/HowMuchDoYouNeedToDeclareFormProvider.scala @@ -14,14 +14,14 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import javax.inject.Inject import forms.mappings.Mappings import models.AlcoholRegime import play.api.data.Form import play.api.data.Forms._ -import models.returns.VolumesByTaxType +import models.declareDuty.VolumesByTaxType import play.api.i18n.Messages class HowMuchDoYouNeedToDeclareFormProvider @Inject() extends Mappings { diff --git a/app/forms/returns/MultipleSPRListFormProvider.scala b/app/forms/declareDuty/MultipleSPRListFormProvider.scala similarity index 97% rename from app/forms/returns/MultipleSPRListFormProvider.scala rename to app/forms/declareDuty/MultipleSPRListFormProvider.scala index 4234a372..5945e409 100644 --- a/app/forms/returns/MultipleSPRListFormProvider.scala +++ b/app/forms/declareDuty/MultipleSPRListFormProvider.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import javax.inject.Inject diff --git a/app/forms/returns/TellUsAboutMultipleSPRRateFormProvider.scala b/app/forms/declareDuty/TellUsAboutMultipleSPRRateFormProvider.scala similarity index 94% rename from app/forms/returns/TellUsAboutMultipleSPRRateFormProvider.scala rename to app/forms/declareDuty/TellUsAboutMultipleSPRRateFormProvider.scala index 4021ec9e..1b747cde 100644 --- a/app/forms/returns/TellUsAboutMultipleSPRRateFormProvider.scala +++ b/app/forms/declareDuty/TellUsAboutMultipleSPRRateFormProvider.scala @@ -14,13 +14,13 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import javax.inject.Inject import forms.mappings.Mappings import models.AlcoholRegime import play.api.data.Form -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import play.api.i18n.Messages class TellUsAboutMultipleSPRRateFormProvider @Inject() extends Mappings { diff --git a/app/forms/returns/TellUsAboutSingleSPRRateFormProvider.scala b/app/forms/declareDuty/TellUsAboutSingleSPRRateFormProvider.scala similarity index 95% rename from app/forms/returns/TellUsAboutSingleSPRRateFormProvider.scala rename to app/forms/declareDuty/TellUsAboutSingleSPRRateFormProvider.scala index df3cc221..a1b38455 100644 --- a/app/forms/returns/TellUsAboutSingleSPRRateFormProvider.scala +++ b/app/forms/declareDuty/TellUsAboutSingleSPRRateFormProvider.scala @@ -14,14 +14,14 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import javax.inject.Inject import forms.mappings.Mappings import models.AlcoholRegime import play.api.data.Form import play.api.data.Forms._ -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import play.api.i18n.Messages class TellUsAboutSingleSPRRateFormProvider @Inject() extends Mappings { diff --git a/app/forms/returns/WhatDoYouNeedToDeclareFormProvider.scala b/app/forms/declareDuty/WhatDoYouNeedToDeclareFormProvider.scala similarity index 97% rename from app/forms/returns/WhatDoYouNeedToDeclareFormProvider.scala rename to app/forms/declareDuty/WhatDoYouNeedToDeclareFormProvider.scala index 8c311e6a..f176a4b2 100644 --- a/app/forms/returns/WhatDoYouNeedToDeclareFormProvider.scala +++ b/app/forms/declareDuty/WhatDoYouNeedToDeclareFormProvider.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import javax.inject.Inject import forms.mappings.Mappings diff --git a/app/forms/mappings/Mappings.scala b/app/forms/mappings/Mappings.scala index 0c326b51..2f82e23b 100644 --- a/app/forms/mappings/Mappings.scala +++ b/app/forms/mappings/Mappings.scala @@ -16,7 +16,7 @@ package forms.mappings -import models.returns.{VolumeAndRateByTaxType, VolumesByTaxType} +import models.declareDuty.{VolumeAndRateByTaxType, VolumesByTaxType} import java.time.{LocalDate, YearMonth} import play.api.data.FieldMapping diff --git a/app/forms/mappings/VolumesAndRateFormatter.scala b/app/forms/mappings/VolumesAndRateFormatter.scala index 8956d54d..4f27da7b 100644 --- a/app/forms/mappings/VolumesAndRateFormatter.scala +++ b/app/forms/mappings/VolumesAndRateFormatter.scala @@ -17,7 +17,7 @@ package forms.mappings import config.Constants -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import play.api.data.FormError import play.api.data.format.Formatter diff --git a/app/forms/mappings/VolumesFormatter.scala b/app/forms/mappings/VolumesFormatter.scala index b5289b1e..68d3204b 100644 --- a/app/forms/mappings/VolumesFormatter.scala +++ b/app/forms/mappings/VolumesFormatter.scala @@ -17,7 +17,7 @@ package forms.mappings import config.Constants -import models.returns.VolumesByTaxType +import models.declareDuty.VolumesByTaxType import play.api.data.FormError import play.api.data.format.Formatter diff --git a/app/models/audit/AuditReturnSubmitted.scala b/app/models/audit/AuditReturnSubmitted.scala index 4e119c8c..711ece2b 100644 --- a/app/models/audit/AuditReturnSubmitted.scala +++ b/app/models/audit/AuditReturnSubmitted.scala @@ -18,7 +18,7 @@ package models.audit import models.{AlcoholRegime, UserAnswers} import models.audit.AuditType.ReturnSubmitted -import models.returns.{AdrAdjustmentItem, AdrDutyDeclaredItem, AdrDutySuspendedProduct, AdrRepackagedDraughtAdjustmentItem, AdrReturnSubmission, AdrSpiritsProduced, AdrTotals} +import models.checkAndSubmit.{AdrAdjustmentItem, AdrDutyDeclaredItem, AdrDutySuspendedProduct, AdrRepackagedDraughtAdjustmentItem, AdrReturnSubmission, AdrSpiritsProduced, AdrTotals} import play.api.libs.json.{Json, OFormat} import java.time.Instant diff --git a/app/models/checkAndSubmit/AdrReturnCreatedDetails.scala b/app/models/checkAndSubmit/AdrReturnCreatedDetails.scala deleted file mode 100644 index 3f8758bc..00000000 --- a/app/models/checkAndSubmit/AdrReturnCreatedDetails.scala +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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 models.checkAndSubmit - -import play.api.libs.json.{Json, OFormat} - -import java.time.{Instant, LocalDate} - -case class AdrReturnCreatedDetails( - processingDate: Instant, - amount: BigDecimal, - chargeReference: Option[String], - paymentDueDate: Option[LocalDate] -) - -object AdrReturnCreatedDetails { - implicit val format: OFormat[AdrReturnCreatedDetails] = Json.format[AdrReturnCreatedDetails] -} diff --git a/app/models/returns/AdrReturnSubmission.scala b/app/models/checkAndSubmit/AdrReturnSubmission.scala similarity index 99% rename from app/models/returns/AdrReturnSubmission.scala rename to app/models/checkAndSubmit/AdrReturnSubmission.scala index 985bb2a5..cd3ce27c 100644 --- a/app/models/returns/AdrReturnSubmission.scala +++ b/app/models/checkAndSubmit/AdrReturnSubmission.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package models.returns +package models.checkAndSubmit import enumeratum.{Enum, EnumEntry, PlayJsonEnum} import models.{SpiritType, UnitsOfMeasure} diff --git a/app/models/returns/AlcoholDuty.scala b/app/models/declareDuty/AlcoholDuty.scala similarity index 97% rename from app/models/returns/AlcoholDuty.scala rename to app/models/declareDuty/AlcoholDuty.scala index d7678bfb..f37cf8f6 100644 --- a/app/models/returns/AlcoholDuty.scala +++ b/app/models/declareDuty/AlcoholDuty.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package models.returns +package models.declareDuty import play.api.libs.json.{Json, OFormat} diff --git a/app/models/returns/VolumeAndRateByTaxType.scala b/app/models/declareDuty/VolumeAndRateByTaxType.scala similarity index 97% rename from app/models/returns/VolumeAndRateByTaxType.scala rename to app/models/declareDuty/VolumeAndRateByTaxType.scala index a7717656..616f7843 100644 --- a/app/models/returns/VolumeAndRateByTaxType.scala +++ b/app/models/declareDuty/VolumeAndRateByTaxType.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package models.returns +package models.declareDuty import play.api.libs.json._ diff --git a/app/models/returns/VolumesByTaxType.scala b/app/models/declareDuty/VolumesByTaxType.scala similarity index 96% rename from app/models/returns/VolumesByTaxType.scala rename to app/models/declareDuty/VolumesByTaxType.scala index f270ed96..24e867ee 100644 --- a/app/models/returns/VolumesByTaxType.scala +++ b/app/models/declareDuty/VolumesByTaxType.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package models.returns +package models.declareDuty import play.api.libs.json.{Json, OFormat} diff --git a/app/navigation/ReturnsNavigator.scala b/app/navigation/ReturnsNavigator.scala index 0fcaad2e..8b01c83e 100644 --- a/app/navigation/ReturnsNavigator.scala +++ b/app/navigation/ReturnsNavigator.scala @@ -22,7 +22,7 @@ import controllers.routes import models.RateType.{Core, DraughtAndSmallProducerRelief, DraughtRelief, SmallProducerRelief} import pages._ import models._ -import pages.returns._ +import pages.declareDuty._ @Singleton class ReturnsNavigator @Inject() () { @@ -44,9 +44,9 @@ class ReturnsNavigator @Inject() () { .map(_.rateType) .intersect(Set(Core, DraughtRelief)) .nonEmpty => - controllers.returns.routes.HowMuchDoYouNeedToDeclareController.onPageLoad(NormalMode, regime) + controllers.declareDuty.routes.HowMuchDoYouNeedToDeclareController.onPageLoad(NormalMode, regime) case Some(_) => - controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) + controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) case _ => routes.TaskListController.onPageLoad } @@ -62,9 +62,9 @@ class ReturnsNavigator @Inject() () { .map(_.rateType) .intersect(Set(SmallProducerRelief, DraughtAndSmallProducerRelief)) .nonEmpty => - controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) + controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) case Some(_) => - controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) case _ => routes.TaskListController.onPageLoad } @@ -76,11 +76,11 @@ class ReturnsNavigator @Inject() () { _ => (ua.getByKey(DoYouHaveMultipleSPRDutyRatesPage, regime), ua.getByKey(MultipleSPRListPage, regime)) match { case (Some(true), Some(list)) if list.nonEmpty => - controllers.returns.routes.MultipleSPRListController.onPageLoad(regime) + controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime) case (Some(true), _) => - controllers.returns.routes.TellUsAboutMultipleSPRRateController.onPageLoad(NormalMode, regime) + controllers.declareDuty.routes.TellUsAboutMultipleSPRRateController.onPageLoad(NormalMode, regime) case (Some(false), _) => - controllers.returns.routes.TellUsAboutSingleSPRRateController.onPageLoad(NormalMode, regime) + controllers.declareDuty.routes.TellUsAboutSingleSPRRateController.onPageLoad(NormalMode, regime) case _ => routes.TaskListController.onPageLoad } @@ -91,13 +91,13 @@ class ReturnsNavigator @Inject() () { hasValueChanged => index => if (hasValueChanged || index.isEmpty) { - controllers.returns.routes.CheckYourAnswersSPRController.onPageLoad(regime, index) + controllers.declareDuty.routes.CheckYourAnswersSPRController.onPageLoad(regime, index) } else { - controllers.returns.routes.MultipleSPRListController.onPageLoad(regime) + controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime) } case TellUsAboutSingleSPRRatePage => - _ => regime => _ => _ => controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + _ => regime => _ => _ => controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) case DoYouWantToAddMultipleSPRToListPage => ua => @@ -106,8 +106,8 @@ class ReturnsNavigator @Inject() () { _ => ua.getByKey(DoYouWantToAddMultipleSPRToListPage, regime) match { case Some(true) => - controllers.returns.routes.TellUsAboutMultipleSPRRateController.onPageLoad(CheckMode, regime) - case Some(false) => controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + controllers.declareDuty.routes.TellUsAboutMultipleSPRRateController.onPageLoad(CheckMode, regime) + case Some(false) => controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) case _ => routes.TaskListController.onPageLoad } @@ -118,9 +118,9 @@ class ReturnsNavigator @Inject() () { _ => ua.getByKey(MultipleSPRListPage, regime) match { case Some(list) if list.nonEmpty => - controllers.returns.routes.MultipleSPRListController.onPageLoad(regime) + controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime) case _ => - controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) + controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) } case _ => _ => _ => _ => _ => routes.TaskListController.onPageLoad @@ -135,11 +135,11 @@ class ReturnsNavigator @Inject() () { if (hasChanged) { normalRoutesReturnJourney(WhatDoYouNeedToDeclarePage)(ua)(regime)(hasChanged)(index) } else { - controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } case HowMuchDoYouNeedToDeclarePage => - _ => regime => _ => _ => controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + _ => regime => _ => _ => controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) case DoYouHaveMultipleSPRDutyRatesPage => ua => @@ -149,11 +149,11 @@ class ReturnsNavigator @Inject() () { if (hasChanged) { normalRoutesReturnJourney(DoYouHaveMultipleSPRDutyRatesPage)(ua)(regime)(hasChanged)(index) } else { - controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } case TellUsAboutSingleSPRRatePage => - _ => regime => _ => _ => controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + _ => regime => _ => _ => controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) case TellUsAboutMultipleSPRRatePage => _ => @@ -161,17 +161,17 @@ class ReturnsNavigator @Inject() () { hasChanged => index => if (hasChanged) - controllers.returns.routes.CheckYourAnswersSPRController.onPageLoad(regime, index) + controllers.declareDuty.routes.CheckYourAnswersSPRController.onPageLoad(regime, index) else - controllers.returns.routes.MultipleSPRListController.onPageLoad(regime) + controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime) case _ => _ => _ => _ => _ => routes.TaskListController.onPageLoad } private val checkRouteMap: Page => UserAnswers => Boolean => Call = { - case pages.returns.DeclareAlcoholDutyQuestionPage => + case pages.declareDuty.DeclareAlcoholDutyQuestionPage => userAnswers => _ => declareAlcoholQuestionRoute(userAnswers, CheckMode) - case _ => _ => _ => routes.TaskListController.onPageLoad + case _ => _ => _ => routes.TaskListController.onPageLoad } def nextPageWithRegime( @@ -203,7 +203,7 @@ class ReturnsNavigator @Inject() () { private def declareAlcoholQuestionRoute(userAnswers: UserAnswers, mode: Mode): Call = userAnswers.get(DeclareAlcoholDutyQuestionPage) match { case Some(true) if userAnswers.regimes.regimes.size > 1 => - controllers.returns.routes.AlcoholTypeController.onPageLoad(mode) + controllers.declareDuty.routes.AlcoholTypeController.onPageLoad(mode) case Some(_) => routes.TaskListController.onPageLoad case _ => routes.JourneyRecoveryController.onPageLoad() } diff --git a/app/pages/returns/AlcoholDutyPage.scala b/app/pages/declareDuty/AlcoholDutyPage.scala similarity index 93% rename from app/pages/returns/AlcoholDutyPage.scala rename to app/pages/declareDuty/AlcoholDutyPage.scala index 4a844e57..8fae5f58 100644 --- a/app/pages/returns/AlcoholDutyPage.scala +++ b/app/pages/declareDuty/AlcoholDutyPage.scala @@ -14,10 +14,10 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import models.AlcoholRegime -import models.returns.AlcoholDuty +import models.declareDuty.AlcoholDuty import pages.QuestionPage import play.api.libs.json.JsPath diff --git a/app/pages/returns/AlcoholTypePage.scala b/app/pages/declareDuty/AlcoholTypePage.scala similarity index 97% rename from app/pages/returns/AlcoholTypePage.scala rename to app/pages/declareDuty/AlcoholTypePage.scala index 72b4ed00..ea731f82 100644 --- a/app/pages/returns/AlcoholTypePage.scala +++ b/app/pages/declareDuty/AlcoholTypePage.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import models.AlcoholRegime import pages.QuestionPage diff --git a/app/pages/returns/DeclareAlcoholDutyQuestionPage.scala b/app/pages/declareDuty/DeclareAlcoholDutyQuestionPage.scala similarity index 97% rename from app/pages/returns/DeclareAlcoholDutyQuestionPage.scala rename to app/pages/declareDuty/DeclareAlcoholDutyQuestionPage.scala index a9297834..b521c4c3 100644 --- a/app/pages/returns/DeclareAlcoholDutyQuestionPage.scala +++ b/app/pages/declareDuty/DeclareAlcoholDutyQuestionPage.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import pages.QuestionPage import play.api.libs.json.JsPath diff --git a/app/pages/returns/DeleteMultipleSPREntryPage.scala b/app/pages/declareDuty/DeleteMultipleSPREntryPage.scala similarity index 97% rename from app/pages/returns/DeleteMultipleSPREntryPage.scala rename to app/pages/declareDuty/DeleteMultipleSPREntryPage.scala index ef245bf1..c7bad128 100644 --- a/app/pages/returns/DeleteMultipleSPREntryPage.scala +++ b/app/pages/declareDuty/DeleteMultipleSPREntryPage.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import pages.QuestionPage import play.api.libs.json.JsPath diff --git a/app/pages/returns/DoYouHaveMultipleSPRDutyRatesPage.scala b/app/pages/declareDuty/DoYouHaveMultipleSPRDutyRatesPage.scala similarity index 97% rename from app/pages/returns/DoYouHaveMultipleSPRDutyRatesPage.scala rename to app/pages/declareDuty/DoYouHaveMultipleSPRDutyRatesPage.scala index e1fecc32..bd3fe502 100644 --- a/app/pages/returns/DoYouHaveMultipleSPRDutyRatesPage.scala +++ b/app/pages/declareDuty/DoYouHaveMultipleSPRDutyRatesPage.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import models.AlcoholRegime import pages.QuestionPage diff --git a/app/pages/returns/DoYouWantToAddMultipleSPRToListPage.scala b/app/pages/declareDuty/DoYouWantToAddMultipleSPRToListPage.scala similarity index 97% rename from app/pages/returns/DoYouWantToAddMultipleSPRToListPage.scala rename to app/pages/declareDuty/DoYouWantToAddMultipleSPRToListPage.scala index bddd040a..0e589620 100644 --- a/app/pages/returns/DoYouWantToAddMultipleSPRToListPage.scala +++ b/app/pages/declareDuty/DoYouWantToAddMultipleSPRToListPage.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import models.AlcoholRegime import pages.QuestionPage diff --git a/app/pages/returns/DutyCalculationPage.scala b/app/pages/declareDuty/DutyCalculationPage.scala similarity index 93% rename from app/pages/returns/DutyCalculationPage.scala rename to app/pages/declareDuty/DutyCalculationPage.scala index 4a2d2264..90074f64 100644 --- a/app/pages/returns/DutyCalculationPage.scala +++ b/app/pages/declareDuty/DutyCalculationPage.scala @@ -14,10 +14,10 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import models.AlcoholRegime -import models.returns.AlcoholDuty +import models.declareDuty.AlcoholDuty import pages.QuestionPage import play.api.libs.json.JsPath diff --git a/app/pages/returns/HowMuchDoYouNeedToDeclarePage.scala b/app/pages/declareDuty/HowMuchDoYouNeedToDeclarePage.scala similarity index 92% rename from app/pages/returns/HowMuchDoYouNeedToDeclarePage.scala rename to app/pages/declareDuty/HowMuchDoYouNeedToDeclarePage.scala index 22f58baa..35dd2073 100644 --- a/app/pages/returns/HowMuchDoYouNeedToDeclarePage.scala +++ b/app/pages/declareDuty/HowMuchDoYouNeedToDeclarePage.scala @@ -14,10 +14,10 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import models.AlcoholRegime -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import pages.QuestionPage import play.api.libs.json.JsPath diff --git a/app/pages/returns/MultipleSPRListPage.scala b/app/pages/declareDuty/MultipleSPRListPage.scala similarity index 92% rename from app/pages/returns/MultipleSPRListPage.scala rename to app/pages/declareDuty/MultipleSPRListPage.scala index e611dc85..b68cb9db 100644 --- a/app/pages/returns/MultipleSPRListPage.scala +++ b/app/pages/declareDuty/MultipleSPRListPage.scala @@ -14,10 +14,10 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import models.AlcoholRegime -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import pages.QuestionPage import play.api.libs.json.JsPath diff --git a/app/pages/returns/TellUsAboutMultipleSPRRatePage.scala b/app/pages/declareDuty/TellUsAboutMultipleSPRRatePage.scala similarity index 92% rename from app/pages/returns/TellUsAboutMultipleSPRRatePage.scala rename to app/pages/declareDuty/TellUsAboutMultipleSPRRatePage.scala index 90854a9f..64244378 100644 --- a/app/pages/returns/TellUsAboutMultipleSPRRatePage.scala +++ b/app/pages/declareDuty/TellUsAboutMultipleSPRRatePage.scala @@ -14,10 +14,10 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import models.AlcoholRegime -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import pages.QuestionPage import play.api.libs.json.JsPath diff --git a/app/pages/returns/TellUsAboutSingleSPRRatePage.scala b/app/pages/declareDuty/TellUsAboutSingleSPRRatePage.scala similarity index 92% rename from app/pages/returns/TellUsAboutSingleSPRRatePage.scala rename to app/pages/declareDuty/TellUsAboutSingleSPRRatePage.scala index 8a8d43d3..12ea644e 100644 --- a/app/pages/returns/TellUsAboutSingleSPRRatePage.scala +++ b/app/pages/declareDuty/TellUsAboutSingleSPRRatePage.scala @@ -14,10 +14,10 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import models.AlcoholRegime -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import pages.QuestionPage import play.api.libs.json.JsPath diff --git a/app/pages/returns/WhatDoYouNeedToDeclarePage.scala b/app/pages/declareDuty/WhatDoYouNeedToDeclarePage.scala similarity index 97% rename from app/pages/returns/WhatDoYouNeedToDeclarePage.scala rename to app/pages/declareDuty/WhatDoYouNeedToDeclarePage.scala index 9247b4f8..ad0f6799 100644 --- a/app/pages/returns/WhatDoYouNeedToDeclarePage.scala +++ b/app/pages/declareDuty/WhatDoYouNeedToDeclarePage.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package pages.returns +package pages.declareDuty import models.{AlcoholRegime, RateBand} import pages.QuestionPage diff --git a/app/pages/returns/package.scala b/app/pages/declareDuty/package.scala similarity index 97% rename from app/pages/returns/package.scala rename to app/pages/declareDuty/package.scala index 3d89618d..fb8e2308 100644 --- a/app/pages/returns/package.scala +++ b/app/pages/declareDuty/package.scala @@ -18,7 +18,7 @@ package pages import models.AlcoholRegime -package object returns { +package object declareDuty { def nextPages(currentPage: QuestionPage[_]): Seq[_ <: QuestionPage[Map[AlcoholRegime, _]]] = sectionPages.dropWhile(_ != currentPage).tail diff --git a/app/services/checkAndSubmit/AdrReturnSubmissionService.scala b/app/services/checkAndSubmit/AdrReturnSubmissionService.scala index 65fd4eb1..783a7ac5 100644 --- a/app/services/checkAndSubmit/AdrReturnSubmissionService.scala +++ b/app/services/checkAndSubmit/AdrReturnSubmissionService.scala @@ -22,14 +22,15 @@ import config.FrontendAppConfig import connectors.AlcoholDutyCalculatorConnector import models.adjustment.{AdjustmentEntry, AdjustmentType} import models.adjustment.AdjustmentType.{Drawback, Overdeclaration, RepackagedDraughtProducts, Spoilt, Underdeclaration} -import models.returns.AdrTypeOfSpirit.fromSpiritsType +import models.checkAndSubmit.{AdrAdjustmentItem, AdrAdjustments, AdrAlcoholQuantity, AdrDuty, AdrDutyDeclared, AdrDutyDeclaredItem, AdrDutySuspended, AdrDutySuspendedAlcoholRegime, AdrDutySuspendedProduct, AdrOtherIngredient, AdrRepackagedDraughtAdjustmentItem, AdrReturnSubmission, AdrSpirits, AdrSpiritsGrainsQuantities, AdrSpiritsIngredientsVolumes, AdrSpiritsProduced, AdrSpiritsVolumes, AdrTotals, AdrTypeOfSpirit, AdrUnitOfMeasure} +import models.declareDuty.AlcoholDuty +import models.checkAndSubmit.AdrTypeOfSpirit.fromSpiritsType import models.{AlcoholRegime, ReturnPeriod, UserAnswers} -import models.returns.{AdrAdjustmentItem, AdrAdjustments, AdrAlcoholQuantity, AdrDuty, AdrDutyDeclared, AdrDutyDeclaredItem, AdrDutySuspended, AdrDutySuspendedAlcoholRegime, AdrDutySuspendedProduct, AdrOtherIngredient, AdrRepackagedDraughtAdjustmentItem, AdrReturnSubmission, AdrSpirits, AdrSpiritsGrainsQuantities, AdrSpiritsIngredientsVolumes, AdrSpiritsProduced, AdrSpiritsVolumes, AdrTotals, AdrTypeOfSpirit, AdrUnitOfMeasure, AlcoholDuty} import models.spiritsQuestions.{EthyleneGasOrMolassesUsed, OtherMaltedGrains} import pages.QuestionPage import pages.adjustment.{AdjustmentEntryListPage, DeclareAdjustmentQuestionPage, OverDeclarationReasonPage, UnderDeclarationReasonPage} import pages.dutySuspended.{DeclareDutySuspendedDeliveriesQuestionPage, DutySuspendedBeerPage, DutySuspendedCiderPage, DutySuspendedOtherFermentedPage, DutySuspendedSpiritsPage, DutySuspendedWinePage} -import pages.returns.{AlcoholDutyPage, DeclareAlcoholDutyQuestionPage} +import pages.declareDuty.{AlcoholDutyPage, DeclareAlcoholDutyQuestionPage} import pages.spiritsQuestions.{AlcoholUsedPage, DeclareQuarterlySpiritsPage, DeclareSpiritsTotalPage, EthyleneGasOrMolassesUsedPage, GrainsUsedPage, OtherIngredientsUsedPage, OtherMaltedGrainsPage, OtherSpiritsProducedPage, SpiritTypePage, WhiskyPage} import play.api.libs.json.Reads import uk.gov.hmrc.http.HeaderCarrier diff --git a/app/viewmodels/BeforeStartReturnViewModel.scala b/app/viewmodels/BeforeStartReturnViewModel.scala index ee8cd118..3ab6539b 100644 --- a/app/viewmodels/BeforeStartReturnViewModel.scala +++ b/app/viewmodels/BeforeStartReturnViewModel.scala @@ -21,7 +21,7 @@ import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.content.Text import uk.gov.hmrc.govukfrontend.views.viewmodels.warningtext.WarningText -import viewmodels.returns.ReturnPeriodViewModel.viewDateFormatter +import ReturnPeriodViewModel.viewDateFormatter import java.time.LocalDate diff --git a/app/viewmodels/returns/ReturnPeriodViewModel.scala b/app/viewmodels/ReturnPeriodViewModel.scala similarity index 97% rename from app/viewmodels/returns/ReturnPeriodViewModel.scala rename to app/viewmodels/ReturnPeriodViewModel.scala index 13406827..78bb08f1 100644 --- a/app/viewmodels/returns/ReturnPeriodViewModel.scala +++ b/app/viewmodels/ReturnPeriodViewModel.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels import models.ReturnPeriod diff --git a/app/viewmodels/checkAnswers/adjustment/AdjustmentListSummaryHelper.scala b/app/viewmodels/checkAnswers/adjustment/AdjustmentListSummaryHelper.scala index 674ce110..9adea0d7 100644 --- a/app/viewmodels/checkAnswers/adjustment/AdjustmentListSummaryHelper.scala +++ b/app/viewmodels/checkAnswers/adjustment/AdjustmentListSummaryHelper.scala @@ -24,7 +24,7 @@ import pages.adjustment.AdjustmentEntryListPage import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.Aliases.{HeadCell, Text} import uk.gov.hmrc.govukfrontend.views.viewmodels.table.TableRow -import viewmodels.returns.RateBandHelper.rateBandRecap +import viewmodels.declareDuty.RateBandHelper.rateBandRecap import viewmodels.{Money, TableRowActionViewModel, TableRowViewModel, TableTotalViewModel, TableViewModel} object AdjustmentListSummaryHelper { diff --git a/app/viewmodels/checkAnswers/adjustment/AdjustmentRepackagedTaxTypeSummary.scala b/app/viewmodels/checkAnswers/adjustment/AdjustmentRepackagedTaxTypeSummary.scala index 41fab87a..54b52b40 100644 --- a/app/viewmodels/checkAnswers/adjustment/AdjustmentRepackagedTaxTypeSummary.scala +++ b/app/viewmodels/checkAnswers/adjustment/AdjustmentRepackagedTaxTypeSummary.scala @@ -21,7 +21,7 @@ import models.adjustment.AdjustmentEntry import models.CheckMode import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.summarylist.SummaryListRow -import viewmodels.returns.RateBandHelper.rateBandRecap +import viewmodels.declareDuty.RateBandHelper.rateBandRecap import viewmodels.govuk.summarylist._ import viewmodels.implicits._ diff --git a/app/viewmodels/checkAnswers/adjustment/AdjustmentTaxTypeSummary.scala b/app/viewmodels/checkAnswers/adjustment/AdjustmentTaxTypeSummary.scala index b95c03cc..1ae68210 100644 --- a/app/viewmodels/checkAnswers/adjustment/AdjustmentTaxTypeSummary.scala +++ b/app/viewmodels/checkAnswers/adjustment/AdjustmentTaxTypeSummary.scala @@ -24,7 +24,7 @@ import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.summarylist.SummaryListRow import viewmodels.govuk.summarylist._ import viewmodels.implicits._ -import viewmodels.returns.RateBandHelper.rateBandRecap +import viewmodels.declareDuty.RateBandHelper.rateBandRecap object AdjustmentTaxTypeSummary { diff --git a/app/viewmodels/checkAnswers/checkAndSubmit/DutyDueForThisReturnHelper.scala b/app/viewmodels/checkAnswers/checkAndSubmit/DutyDueForThisReturnHelper.scala index 8593acac..6156b929 100644 --- a/app/viewmodels/checkAnswers/checkAndSubmit/DutyDueForThisReturnHelper.scala +++ b/app/viewmodels/checkAnswers/checkAndSubmit/DutyDueForThisReturnHelper.scala @@ -20,10 +20,10 @@ import cats.data.EitherT import config.Constants import connectors.AlcoholDutyCalculatorConnector import models.AlcoholRegime.{Beer, Cider, OtherFermentedProduct, Spirits, Wine} -import models.returns.AlcoholDuty +import models.declareDuty.AlcoholDuty import models.{AlcoholRegime, NormalMode, UserAnswers} import pages.adjustment.{AdjustmentTotalPage, DeclareAdjustmentQuestionPage} -import pages.returns.{AlcoholDutyPage, DeclareAlcoholDutyQuestionPage} +import pages.declareDuty.{AlcoholDutyPage, DeclareAlcoholDutyQuestionPage} import play.api.Logging import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.content.Text @@ -116,7 +116,7 @@ class DutyDueForThisReturnHelper @Inject() ( actions = Seq( TableRowActionViewModel( label = "Change", - href = controllers.returns.routes.DeclareAlcoholDutyQuestionController.onPageLoad(NormalMode) + href = controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController.onPageLoad(NormalMode) ) ) ) @@ -134,7 +134,7 @@ class DutyDueForThisReturnHelper @Inject() ( actions = Seq( TableRowActionViewModel( label = "Change", - href = controllers.returns.routes.CheckYourAnswersController.onPageLoad(alcoholRegime) + href = controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(alcoholRegime) ) ) ) diff --git a/app/viewmodels/returns/AlcoholTypeViewModel.scala b/app/viewmodels/declareDuty/AlcoholTypeViewModel.scala similarity index 97% rename from app/viewmodels/returns/AlcoholTypeViewModel.scala rename to app/viewmodels/declareDuty/AlcoholTypeViewModel.scala index a7e841f7..dc877c20 100644 --- a/app/viewmodels/returns/AlcoholTypeViewModel.scala +++ b/app/viewmodels/declareDuty/AlcoholTypeViewModel.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.AlcoholRegimes import play.api.i18n.Messages diff --git a/app/viewmodels/returns/CategoriesByRateTypeHelper.scala b/app/viewmodels/declareDuty/CategoriesByRateTypeHelper.scala similarity index 98% rename from app/viewmodels/returns/CategoriesByRateTypeHelper.scala rename to app/viewmodels/declareDuty/CategoriesByRateTypeHelper.scala index 8e62b69b..0f959356 100644 --- a/app/viewmodels/returns/CategoriesByRateTypeHelper.scala +++ b/app/viewmodels/declareDuty/CategoriesByRateTypeHelper.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.{RateBand, RateType} import play.api.i18n.Messages diff --git a/app/viewmodels/returns/CheckYourAnswersSPRSummaryListHelper.scala b/app/viewmodels/declareDuty/CheckYourAnswersSPRSummaryListHelper.scala similarity index 97% rename from app/viewmodels/returns/CheckYourAnswersSPRSummaryListHelper.scala rename to app/viewmodels/declareDuty/CheckYourAnswersSPRSummaryListHelper.scala index 243e70e8..0901051e 100644 --- a/app/viewmodels/returns/CheckYourAnswersSPRSummaryListHelper.scala +++ b/app/viewmodels/declareDuty/CheckYourAnswersSPRSummaryListHelper.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.{AlcoholRegime, UserAnswers} import play.api.i18n.Messages diff --git a/app/viewmodels/returns/CheckYourAnswersSummaryListHelper.scala b/app/viewmodels/declareDuty/CheckYourAnswersSummaryListHelper.scala similarity index 95% rename from app/viewmodels/returns/CheckYourAnswersSummaryListHelper.scala rename to app/viewmodels/declareDuty/CheckYourAnswersSummaryListHelper.scala index 4fc88ee2..0fc499f4 100644 --- a/app/viewmodels/returns/CheckYourAnswersSummaryListHelper.scala +++ b/app/viewmodels/declareDuty/CheckYourAnswersSummaryListHelper.scala @@ -14,10 +14,10 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.{AlcoholRegime, UserAnswers} -import pages.returns.WhatDoYouNeedToDeclarePage +import pages.declareDuty.WhatDoYouNeedToDeclarePage import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.summarylist.SummaryList diff --git a/app/viewmodels/returns/DutyCalculationHelper.scala b/app/viewmodels/declareDuty/DutyCalculationHelper.scala similarity index 94% rename from app/viewmodels/returns/DutyCalculationHelper.scala rename to app/viewmodels/declareDuty/DutyCalculationHelper.scala index 26e4a0e2..0798c8f2 100644 --- a/app/viewmodels/returns/DutyCalculationHelper.scala +++ b/app/viewmodels/declareDuty/DutyCalculationHelper.scala @@ -14,11 +14,11 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty -import models.returns.{AlcoholDuty, DutyByTaxType} +import models.declareDuty.{AlcoholDuty, DutyByTaxType} import models.{AlcoholRegime, RateBand, UserAnswers} -import pages.returns.WhatDoYouNeedToDeclarePage +import pages.declareDuty.WhatDoYouNeedToDeclarePage import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.content.Text import uk.gov.hmrc.govukfrontend.views.viewmodels.table.{HeadCell, TableRow} @@ -86,7 +86,7 @@ object DutyCalculationHelper { actions = Seq( TableRowActionViewModel( label = "Change", - href = controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime), + href = controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime), visuallyHiddenText = Some(rateBandRecap(rateBand)) ) ) diff --git a/app/viewmodels/returns/HowMuchDoYouNeedToDeclareSummary.scala b/app/viewmodels/declareDuty/HowMuchDoYouNeedToDeclareSummary.scala similarity index 93% rename from app/viewmodels/returns/HowMuchDoYouNeedToDeclareSummary.scala rename to app/viewmodels/declareDuty/HowMuchDoYouNeedToDeclareSummary.scala index cd87753b..2f6ade63 100644 --- a/app/viewmodels/returns/HowMuchDoYouNeedToDeclareSummary.scala +++ b/app/viewmodels/declareDuty/HowMuchDoYouNeedToDeclareSummary.scala @@ -14,12 +14,12 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.RateType.{Core, DraughtRelief} -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import models.{AlcoholRegime, CheckMode, RateBand, RateType, UserAnswers} -import pages.returns.HowMuchDoYouNeedToDeclarePage +import pages.declareDuty.HowMuchDoYouNeedToDeclarePage import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.content.Text import uk.gov.hmrc.govukfrontend.views.viewmodels.summarylist.{Actions, Card, CardTitle, SummaryList, SummaryListRow, Value} @@ -55,7 +55,9 @@ object HowMuchDoYouNeedToDeclareSummary { items = Seq( ActionItemViewModel( "site.change", - controllers.returns.routes.HowMuchDoYouNeedToDeclareController.onPageLoad(CheckMode, regime).url + controllers.declareDuty.routes.HowMuchDoYouNeedToDeclareController + .onPageLoad(CheckMode, regime) + .url ) ) ) diff --git a/app/viewmodels/returns/MultipleSPRListHelper.scala b/app/viewmodels/declareDuty/MultipleSPRListHelper.scala similarity index 92% rename from app/viewmodels/returns/MultipleSPRListHelper.scala rename to app/viewmodels/declareDuty/MultipleSPRListHelper.scala index 9d6812dd..e2b44293 100644 --- a/app/viewmodels/returns/MultipleSPRListHelper.scala +++ b/app/viewmodels/declareDuty/MultipleSPRListHelper.scala @@ -14,11 +14,11 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.{AlcoholRegime, NormalMode, RateBand, UserAnswers} -import models.returns.VolumeAndRateByTaxType -import pages.returns.{MultipleSPRListPage, WhatDoYouNeedToDeclarePage} +import models.declareDuty.VolumeAndRateByTaxType +import pages.declareDuty.{MultipleSPRListPage, WhatDoYouNeedToDeclarePage} import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.Aliases.{HeadCell, Text} import uk.gov.hmrc.govukfrontend.views.viewmodels.table.TableRow @@ -101,13 +101,13 @@ object MultipleSPRListHelper { actions = Seq( TableRowActionViewModel( label = messages("site.change"), - href = controllers.returns.routes.TellUsAboutMultipleSPRRateController + href = controllers.declareDuty.routes.TellUsAboutMultipleSPRRateController .onPageLoad(NormalMode, regime, Some(index)), visuallyHiddenText = Some(messages("productList.change.hidden")) ), TableRowActionViewModel( label = messages("site.remove"), - href = controllers.returns.routes.DeleteMultipleSPREntryController.onPageLoad(regime, Some(index)), + href = controllers.declareDuty.routes.DeleteMultipleSPREntryController.onPageLoad(regime, Some(index)), visuallyHiddenText = Some(messages("productList.remove.hidden")) ) ) diff --git a/app/viewmodels/returns/MultipleSPRListSummary.scala b/app/viewmodels/declareDuty/MultipleSPRListSummary.scala similarity index 96% rename from app/viewmodels/returns/MultipleSPRListSummary.scala rename to app/viewmodels/declareDuty/MultipleSPRListSummary.scala index 81282ba4..0d3102e6 100644 --- a/app/viewmodels/returns/MultipleSPRListSummary.scala +++ b/app/viewmodels/declareDuty/MultipleSPRListSummary.scala @@ -14,10 +14,10 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.{AlcoholRegime, RateBand, UserAnswers} -import pages.returns.{MultipleSPRListPage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{MultipleSPRListPage, WhatDoYouNeedToDeclarePage} import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.summarylist.{SummaryListRow, Value} import RateBandHelper.rateBandRecap diff --git a/app/viewmodels/returns/RateBandHelper.scala b/app/viewmodels/declareDuty/RateBandHelper.scala similarity index 99% rename from app/viewmodels/returns/RateBandHelper.scala rename to app/viewmodels/declareDuty/RateBandHelper.scala index 2b693ecf..79aaebaf 100644 --- a/app/viewmodels/returns/RateBandHelper.scala +++ b/app/viewmodels/declareDuty/RateBandHelper.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.{ABVRange, AlcoholByVolume, RateBand, RateType} import play.api.i18n.Messages diff --git a/app/viewmodels/returns/SmallProducerReliefSummary.scala b/app/viewmodels/declareDuty/SmallProducerReliefSummary.scala similarity index 88% rename from app/viewmodels/returns/SmallProducerReliefSummary.scala rename to app/viewmodels/declareDuty/SmallProducerReliefSummary.scala index 3c700ddb..1f0bc55e 100644 --- a/app/viewmodels/returns/SmallProducerReliefSummary.scala +++ b/app/viewmodels/declareDuty/SmallProducerReliefSummary.scala @@ -14,10 +14,10 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.{AlcoholRegime, CheckMode, UserAnswers} -import pages.returns.DoYouHaveMultipleSPRDutyRatesPage +import pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.content.Text import uk.gov.hmrc.govukfrontend.views.viewmodels.summarylist.{Actions, Card, CardTitle, SummaryList, SummaryListRow} @@ -34,14 +34,14 @@ object SmallProducerReliefSummary { regime, titleKey = "tellUsAboutSingleSPRRate", rows = MultipleSPRListSummary.rows(regime, userAnswers), - call = controllers.returns.routes.MultipleSPRListController.onPageLoad(regime).url + call = controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime).url ) } else { createSummaryList( regime, titleKey = "tellUsAboutMultipleSPRRate", rows = TellUsAboutSingleSPRRateSummary.rows(regime, userAnswers), - call = controllers.returns.routes.TellUsAboutSingleSPRRateController.onPageLoad(CheckMode, regime).url + call = controllers.declareDuty.routes.TellUsAboutSingleSPRRateController.onPageLoad(CheckMode, regime).url ) } diff --git a/app/viewmodels/returns/TaxBandsViewModel.scala b/app/viewmodels/declareDuty/TaxBandsViewModel.scala similarity index 98% rename from app/viewmodels/returns/TaxBandsViewModel.scala rename to app/viewmodels/declareDuty/TaxBandsViewModel.scala index 0844ce88..dc73d49a 100644 --- a/app/viewmodels/returns/TaxBandsViewModel.scala +++ b/app/viewmodels/declareDuty/TaxBandsViewModel.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.{RateBand, RateType} import play.api.i18n.Messages diff --git a/app/viewmodels/returns/TellUsAboutMultipleSPRRateHelper.scala b/app/viewmodels/declareDuty/TellUsAboutMultipleSPRRateHelper.scala similarity index 98% rename from app/viewmodels/returns/TellUsAboutMultipleSPRRateHelper.scala rename to app/viewmodels/declareDuty/TellUsAboutMultipleSPRRateHelper.scala index 75d60e7e..d3410113 100644 --- a/app/viewmodels/returns/TellUsAboutMultipleSPRRateHelper.scala +++ b/app/viewmodels/declareDuty/TellUsAboutMultipleSPRRateHelper.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.RateBand import play.api.i18n.Messages diff --git a/app/viewmodels/returns/TellUsAboutMultipleSPRRateSummary.scala b/app/viewmodels/declareDuty/TellUsAboutMultipleSPRRateSummary.scala similarity index 96% rename from app/viewmodels/returns/TellUsAboutMultipleSPRRateSummary.scala rename to app/viewmodels/declareDuty/TellUsAboutMultipleSPRRateSummary.scala index dea8e36a..9c86440b 100644 --- a/app/viewmodels/returns/TellUsAboutMultipleSPRRateSummary.scala +++ b/app/viewmodels/declareDuty/TellUsAboutMultipleSPRRateSummary.scala @@ -14,11 +14,11 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty -import controllers.returns.routes +import controllers.declareDuty.routes import models.{AlcoholRegime, CheckMode, UserAnswers} -import pages.returns.{TellUsAboutMultipleSPRRatePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{TellUsAboutMultipleSPRRatePage, WhatDoYouNeedToDeclarePage} import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.content.HtmlContent import uk.gov.hmrc.govukfrontend.views.viewmodels.summarylist.{ActionItem, SummaryListRow} diff --git a/app/viewmodels/returns/TellUsAboutSingleSPRRateSummary.scala b/app/viewmodels/declareDuty/TellUsAboutSingleSPRRateSummary.scala similarity index 95% rename from app/viewmodels/returns/TellUsAboutSingleSPRRateSummary.scala rename to app/viewmodels/declareDuty/TellUsAboutSingleSPRRateSummary.scala index 0e6058d5..4621181c 100644 --- a/app/viewmodels/returns/TellUsAboutSingleSPRRateSummary.scala +++ b/app/viewmodels/declareDuty/TellUsAboutSingleSPRRateSummary.scala @@ -14,10 +14,10 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.{AlcoholRegime, UserAnswers} -import pages.returns.{TellUsAboutSingleSPRRatePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{TellUsAboutSingleSPRRatePage, WhatDoYouNeedToDeclarePage} import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.viewmodels.summarylist.{SummaryListRow, Value} import RateBandHelper.rateBandRecap diff --git a/app/viewmodels/returns/WhatDoYouNeedToDeclareSummary.scala b/app/viewmodels/declareDuty/WhatDoYouNeedToDeclareSummary.scala similarity index 94% rename from app/viewmodels/returns/WhatDoYouNeedToDeclareSummary.scala rename to app/viewmodels/declareDuty/WhatDoYouNeedToDeclareSummary.scala index 48889cf6..206caecb 100644 --- a/app/viewmodels/returns/WhatDoYouNeedToDeclareSummary.scala +++ b/app/viewmodels/declareDuty/WhatDoYouNeedToDeclareSummary.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import models.{AlcoholRegime, CheckMode, RateBand} import play.api.i18n.Messages @@ -46,7 +46,7 @@ object WhatDoYouNeedToDeclareSummary { items = Seq( ActionItemViewModel( "site.change", - controllers.returns.routes.WhatDoYouNeedToDeclareController.onPageLoad(CheckMode, regime).url + controllers.declareDuty.routes.WhatDoYouNeedToDeclareController.onPageLoad(CheckMode, regime).url ) ) ) diff --git a/app/viewmodels/returns/ViewPastPaymentsViewModel.scala b/app/viewmodels/payments/ViewPastPaymentsViewModel.scala similarity index 97% rename from app/viewmodels/returns/ViewPastPaymentsViewModel.scala rename to app/viewmodels/payments/ViewPastPaymentsViewModel.scala index e32623b3..9b8f8df1 100644 --- a/app/viewmodels/returns/ViewPastPaymentsViewModel.scala +++ b/app/viewmodels/payments/ViewPastPaymentsViewModel.scala @@ -14,22 +14,22 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.payments -import play.api.Logging -import play.api.i18n.Messages -import viewmodels.{DateTimeHelper, Money, TableRowActionViewModel, TableRowViewModel, TableViewModel} - -import java.time.{LocalDate, YearMonth} -import javax.inject.Inject -import uk.gov.hmrc.govukfrontend.views.Aliases.{HeadCell, HtmlContent, TableRow, Text} import config.Constants import config.Constants.boldFontCssClass import models.OutstandingPaymentStatusToDisplay.{Due, NothingToPay, Overdue} import models.TransactionType.RPI import models.{HistoricPayment, OutstandingPayment, OutstandingPaymentStatusToDisplay, TransactionType, UnallocatedPayment} -import uk.gov.hmrc.govukfrontend.views.html.components.{GovukTag, Tag} +import play.api.Logging +import play.api.i18n.Messages import play.twirl.api.Html +import uk.gov.hmrc.govukfrontend.views.Aliases.{HeadCell, HtmlContent, TableRow, Text} +import uk.gov.hmrc.govukfrontend.views.html.components.{GovukTag, Tag} +import viewmodels._ + +import java.time.{LocalDate, YearMonth} +import javax.inject.Inject class ViewPastPaymentsViewModel @Inject() (dateTimeHelper: DateTimeHelper) extends Logging { @@ -175,7 +175,7 @@ class ViewPastPaymentsViewModel @Inject() (dateTimeHelper: DateTimeHelper) exten Seq( TableRowActionViewModel( label = messages("viewPastPayments.payNow.firstPart.hidden"), - href = controllers.routes.StartPaymentController.initiateAndRedirectFromPastPayments(index), + href = controllers.payments.routes.StartPaymentController.initiateAndRedirectFromPastPayments(index), visuallyHiddenText = Some(messages("viewPastPayments.payNow.secondPart.hidden", amount)) ) ) diff --git a/app/viewmodels/returns/ViewReturnViewModel.scala b/app/viewmodels/returns/ViewReturnViewModel.scala index 009c5f34..c532aa54 100644 --- a/app/viewmodels/returns/ViewReturnViewModel.scala +++ b/app/viewmodels/returns/ViewReturnViewModel.scala @@ -17,7 +17,7 @@ package viewmodels.returns import config.Constants -import models.returns.{ReturnAdjustments, ReturnAdjustmentsRow, ReturnAlcoholDeclared, ReturnAlcoholDeclaredRow, ReturnDetails} +import models.returns._ import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.Aliases.{HeadCell, Text} import uk.gov.hmrc.govukfrontend.views.viewmodels.table.TableRow diff --git a/app/viewmodels/tasklist/ReturnTaskListCreator.scala b/app/viewmodels/tasklist/ReturnTaskListCreator.scala index 36abc0ee..c36eff4d 100644 --- a/app/viewmodels/tasklist/ReturnTaskListCreator.scala +++ b/app/viewmodels/tasklist/ReturnTaskListCreator.scala @@ -21,7 +21,7 @@ import models.{AlcoholRegime, AlcoholRegimes, CheckMode, Mode, NormalMode, Spiri import pages.QuestionPage import pages.adjustment.{AdjustmentEntryListPage, AdjustmentListPage, CurrentAdjustmentEntryPage, DeclareAdjustmentQuestionPage, OverDeclarationReasonPage, OverDeclarationTotalPage, UnderDeclarationReasonPage, UnderDeclarationTotalPage} import pages.dutySuspended.{DeclareDutySuspendedDeliveriesQuestionPage, DutySuspendedBeerPage, DutySuspendedCiderPage, DutySuspendedOtherFermentedPage, DutySuspendedSpiritsPage, DutySuspendedWinePage} -import pages.returns.{AlcoholDutyPage, AlcoholTypePage, DeclareAlcoholDutyQuestionPage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{AlcoholDutyPage, AlcoholTypePage, DeclareAlcoholDutyQuestionPage, WhatDoYouNeedToDeclarePage} import pages.spiritsQuestions.{AlcoholUsedPage, DeclareQuarterlySpiritsPage, DeclareSpiritsTotalPage, EthyleneGasOrMolassesUsedPage, GrainsUsedPage, OtherIngredientsUsedPage, OtherMaltedGrainsPage, OtherSpiritsProducedPage, SpiritTypePage, WhiskyPage} import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.Aliases.{Hint, TaskList} @@ -120,21 +120,21 @@ class ReturnTaskListCreator @Inject() () { TaskListItem( title = TaskListItemTitle(content = Text(messages(s"taskList.section.returns.$regime"))), status = AlcholDutyTaskListItemStatus.completed, - href = Some(controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime).url) + href = Some(controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime).url) ) case (None, Some(_)) => TaskListItem( title = TaskListItemTitle(content = Text(messages(s"taskList.section.returns.$regime"))), status = AlcholDutyTaskListItemStatus.inProgress, href = - Some(controllers.returns.routes.WhatDoYouNeedToDeclareController.onPageLoad(NormalMode, regime).url) + Some(controllers.declareDuty.routes.WhatDoYouNeedToDeclareController.onPageLoad(NormalMode, regime).url) ) case _ => TaskListItem( title = TaskListItemTitle(content = Text(messages(s"taskList.section.returns.$regime"))), status = AlcholDutyTaskListItemStatus.notStarted, href = - Some(controllers.returns.routes.WhatDoYouNeedToDeclareController.onPageLoad(NormalMode, regime).url) + Some(controllers.declareDuty.routes.WhatDoYouNeedToDeclareController.onPageLoad(NormalMode, regime).url) ) } ) @@ -331,7 +331,7 @@ class ReturnTaskListCreator @Inject() () { title = TaskListItemTitle(content = Text(messages(s"taskList.section.returns.needToDeclare.yes"))), status = AlcholDutyTaskListItemStatus.completed, href = Some( - controllers.returns.routes.DeclareAlcoholDutyQuestionController + controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController .onPageLoad(CheckMode) .url ) @@ -343,7 +343,7 @@ class ReturnTaskListCreator @Inject() () { title = TaskListItemTitle(content = Text(messages(s"taskList.section.returns.needToDeclare.yes"))), status = AlcholDutyTaskListItemStatus.inProgress, href = Some( - controllers.returns.routes.DeclareAlcoholDutyQuestionController + controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController .onPageLoad(CheckMode) .url ) @@ -355,7 +355,7 @@ class ReturnTaskListCreator @Inject() () { title = TaskListItemTitle(content = Text(messages(s"taskList.section.returns.needToDeclare.no"))), status = AlcholDutyTaskListItemStatus.completed, href = Some( - controllers.returns.routes.DeclareAlcoholDutyQuestionController + controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController .onPageLoad(CheckMode) .url ) @@ -368,7 +368,7 @@ class ReturnTaskListCreator @Inject() () { title = TaskListItemTitle(content = Text(messages(s"taskList.section.returns.needToDeclare.notStarted"))), status = AlcholDutyTaskListItemStatus.notStarted, href = Some( - controllers.returns.routes.DeclareAlcoholDutyQuestionController + controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController .onPageLoad(NormalMode) .url ) diff --git a/app/views/BeforeStartReturnView.scala.html b/app/views/BeforeStartReturnView.scala.html index b5a1d83b..d3aece61 100644 --- a/app/views/BeforeStartReturnView.scala.html +++ b/app/views/BeforeStartReturnView.scala.html @@ -15,7 +15,7 @@ *@ @import components.{SectionHeading, PageHeading} -@import viewmodels.returns.ReturnPeriodViewModel +@import viewmodels.ReturnPeriodViewModel @import viewmodels.BeforeStartReturnViewModel @import java.time.LocalDate diff --git a/app/views/checkAndSubmit/ReturnSubmittedView.scala.html b/app/views/checkAndSubmit/ReturnSubmittedView.scala.html index e82eecc9..1b93c2ec 100644 --- a/app/views/checkAndSubmit/ReturnSubmittedView.scala.html +++ b/app/views/checkAndSubmit/ReturnSubmittedView.scala.html @@ -78,12 +78,12 @@ link( id = "direct-debit-start", text = messages("returnSubmitted.direct.debit.setupOrManageLink.text"), - href = controllers.routes.StartDirectDebitController.initiateAndRedirect().url + href = controllers.payments.routes.StartDirectDebitController.initiateAndRedirect().url ))) @govukButton( - ButtonViewModel("continueButton", messages("site.payNow")).asLink(controllers.routes.StartPaymentController.initiateAndRedirect().url) + ButtonViewModel("continueButton", messages("site.payNow")).asLink(controllers.payments.routes.StartPaymentController.initiateAndRedirect().url) ) @paragraph( content = diff --git a/app/views/returns/AlcoholTypeView.scala.html b/app/views/declareDuty/AlcoholTypeView.scala.html similarity index 92% rename from app/views/returns/AlcoholTypeView.scala.html rename to app/views/declareDuty/AlcoholTypeView.scala.html index 5bb0858a..d785f115 100644 --- a/app/views/returns/AlcoholTypeView.scala.html +++ b/app/views/declareDuty/AlcoholTypeView.scala.html @@ -15,7 +15,7 @@ *@ @import components.{SectionHeading, PageHeading, Paragraph} -@import viewmodels.returns.AlcoholTypeViewModel +@import viewmodels.declareDuty.AlcoholTypeViewModel @import models.AlcoholRegimes @this( @@ -33,7 +33,7 @@ @layout(pageTitle = title(form, messages("alcoholType.title"))) { - @formHelper(action = controllers.returns.routes.AlcoholTypeController.onSubmit(mode), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.AlcoholTypeController.onSubmit(mode), Symbol("autoComplete") -> "off") { @if(form.errors.nonEmpty) { @govukErrorSummary(ErrorSummaryViewModel(form, errorLinkOverrides = Map("value" -> AlcoholTypeViewModel.checkboxItems(regimes).headOption.flatMap(_.id).getOrElse("")))) diff --git a/app/views/returns/CheckYourAnswersSPRView.scala.html b/app/views/declareDuty/CheckYourAnswersSPRView.scala.html similarity index 90% rename from app/views/returns/CheckYourAnswersSPRView.scala.html rename to app/views/declareDuty/CheckYourAnswersSPRView.scala.html index 82f9c5d4..f9a8e4d4 100644 --- a/app/views/returns/CheckYourAnswersSPRView.scala.html +++ b/app/views/declareDuty/CheckYourAnswersSPRView.scala.html @@ -28,7 +28,7 @@ @(regime:AlcoholRegime, list: SummaryList, index:Option[Int])(implicit request: Request[_], messages: Messages) @layout(pageTitle = titleNoForm(messages("checkYourAnswers.title"))) { - @formHelper(action = controllers.returns.routes.CheckYourAnswersSPRController.onSubmit(regime, index), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.CheckYourAnswersSPRController.onSubmit(regime, index), Symbol("autoComplete") -> "off") { @sectionHeading( id = "checkYourAnswerSPR-section", text = messages(s"section.return.$regime") diff --git a/app/views/returns/CheckYourAnswersView.scala.html b/app/views/declareDuty/CheckYourAnswersView.scala.html similarity index 92% rename from app/views/returns/CheckYourAnswersView.scala.html rename to app/views/declareDuty/CheckYourAnswersView.scala.html index 6076ec67..9c220f6f 100644 --- a/app/views/returns/CheckYourAnswersView.scala.html +++ b/app/views/declareDuty/CheckYourAnswersView.scala.html @@ -15,7 +15,7 @@ *@ @import components.{SectionHeading, PageHeading} -@import viewmodels.returns.ReturnSummaryList +@import viewmodels.declareDuty.ReturnSummaryList @import uk.gov.hmrc.govukfrontend.views.html.components._ @this( @@ -49,7 +49,7 @@ @govukButton( ButtonViewModel("saveAndContinueButton", messages("site.saveAndContinue")) - .asLink(controllers.returns.routes.DutyCalculationController.onPageLoad(regime).url) + .asLink(controllers.declareDuty.routes.DutyCalculationController.onPageLoad(regime).url) ) } diff --git a/app/views/returns/DeclareAlcoholDutyQuestionView.scala.html b/app/views/declareDuty/DeclareAlcoholDutyQuestionView.scala.html similarity index 95% rename from app/views/returns/DeclareAlcoholDutyQuestionView.scala.html rename to app/views/declareDuty/DeclareAlcoholDutyQuestionView.scala.html index 24dfe44d..404b846b 100644 --- a/app/views/returns/DeclareAlcoholDutyQuestionView.scala.html +++ b/app/views/declareDuty/DeclareAlcoholDutyQuestionView.scala.html @@ -36,7 +36,7 @@ @layout(pageTitle = title(form, messages("declareAlcoholDutyQuestion.title"))) { - @formHelper(action = controllers.returns.routes.DeclareAlcoholDutyQuestionController.onSubmit(mode), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController.onSubmit(mode), Symbol("autoComplete") -> "off") { @if(form.errors.nonEmpty) { @govukErrorSummary(ErrorSummaryViewModel(form)) diff --git a/app/views/returns/DeleteMultipleSPREntryView.scala.html b/app/views/declareDuty/DeleteMultipleSPREntryView.scala.html similarity index 92% rename from app/views/returns/DeleteMultipleSPREntryView.scala.html rename to app/views/declareDuty/DeleteMultipleSPREntryView.scala.html index 22f1e078..8598015a 100644 --- a/app/views/returns/DeleteMultipleSPREntryView.scala.html +++ b/app/views/declareDuty/DeleteMultipleSPREntryView.scala.html @@ -29,7 +29,7 @@ @layout(pageTitle = title(form, messages("deleteMultipleSPREntry.title", messages(s"return.regime.$regime")))) { - @formHelper(action = controllers.returns.routes.DeleteMultipleSPREntryController.onSubmit(regime, Some(index)), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.DeleteMultipleSPREntryController.onSubmit(regime, Some(index)), Symbol("autoComplete") -> "off") { @if(form.errors.nonEmpty) { @govukErrorSummary(ErrorSummaryViewModel(form)) diff --git a/app/views/returns/DoYouHaveMultipleSPRDutyRatesView.scala.html b/app/views/declareDuty/DoYouHaveMultipleSPRDutyRatesView.scala.html similarity index 93% rename from app/views/returns/DoYouHaveMultipleSPRDutyRatesView.scala.html rename to app/views/declareDuty/DoYouHaveMultipleSPRDutyRatesView.scala.html index 02617684..a492a3e5 100644 --- a/app/views/returns/DoYouHaveMultipleSPRDutyRatesView.scala.html +++ b/app/views/declareDuty/DoYouHaveMultipleSPRDutyRatesView.scala.html @@ -33,7 +33,7 @@ @layout(pageTitle = title(form, messages("doYouHaveMultipleSPRDutyRates.title", messages(s"return.regime.$regime")))) { - @formHelper(action = controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController.onSubmit(mode, regime), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController.onSubmit(mode, regime), Symbol("autoComplete") -> "off") { @if(form.errors.nonEmpty) { @govukErrorSummary(ErrorSummaryViewModel(form)) diff --git a/app/views/returns/DutyCalculationView.scala.html b/app/views/declareDuty/DutyCalculationView.scala.html similarity index 94% rename from app/views/returns/DutyCalculationView.scala.html rename to app/views/declareDuty/DutyCalculationView.scala.html index 9046cfe6..a1bdf6ac 100644 --- a/app/views/returns/DutyCalculationView.scala.html +++ b/app/views/declareDuty/DutyCalculationView.scala.html @@ -35,7 +35,7 @@ @layout(pageTitle = titleNoForm(messages("dutyCalculation.title", totalDuty))) { - @formHelper(action = controllers.returns.routes.DutyCalculationController.onSubmit(regime), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.DutyCalculationController.onSubmit(regime), Symbol("autoComplete") -> "off") { @sectionHeading( id = "dutyCalculation-section", text = messages(s"section.return.$regime") diff --git a/app/views/returns/HowMuchDoYouNeedToDeclareView.scala.html b/app/views/declareDuty/HowMuchDoYouNeedToDeclareView.scala.html similarity index 96% rename from app/views/returns/HowMuchDoYouNeedToDeclareView.scala.html rename to app/views/declareDuty/HowMuchDoYouNeedToDeclareView.scala.html index a54f01d2..919e5929 100644 --- a/app/views/returns/HowMuchDoYouNeedToDeclareView.scala.html +++ b/app/views/declareDuty/HowMuchDoYouNeedToDeclareView.scala.html @@ -17,7 +17,7 @@ @import viewmodels.InputWidth._ @import components.{SectionHeading, PageHeading, Paragraph, SubHeading} @import uk.gov.hmrc.govukfrontend.views.html.components._ -@import viewmodels.returns.CategoriesByRateTypeViewModel +@import viewmodels.declareDuty.CategoriesByRateTypeViewModel @this( layout: templates.Layout, @@ -36,7 +36,7 @@ @layout(pageTitle = title(form, messages(s"howMuchDoYouNeedToDeclare.title.$regime"))) { - @formHelper(action = controllers.returns.routes.HowMuchDoYouNeedToDeclareController.onSubmit(mode, regime), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.HowMuchDoYouNeedToDeclareController.onSubmit(mode, regime), Symbol("autoComplete") -> "off") { @if(form.errors.nonEmpty) { @govukErrorSummary(ErrorSummaryViewModel(form)) diff --git a/app/views/returns/MultipleSPRListView.scala.html b/app/views/declareDuty/MultipleSPRListView.scala.html similarity index 95% rename from app/views/returns/MultipleSPRListView.scala.html rename to app/views/declareDuty/MultipleSPRListView.scala.html index feb1010c..ead927cd 100644 --- a/app/views/returns/MultipleSPRListView.scala.html +++ b/app/views/declareDuty/MultipleSPRListView.scala.html @@ -35,7 +35,7 @@ @layout(pageTitle = title(form, messages(s"multipleSPRList.title", messages(s"alcoholType.$regime"))), fullWidth = true, showBackLink = false) { - @formHelper(action = controllers.returns.routes.MultipleSPRListController.onSubmit(regime), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.MultipleSPRListController.onSubmit(regime), Symbol("autoComplete") -> "off") { @if(form.errors.nonEmpty) { @govukErrorSummary(ErrorSummaryViewModel(form)) diff --git a/app/views/returns/TellUsAboutMultipleSPRRateView.scala.html b/app/views/declareDuty/TellUsAboutMultipleSPRRateView.scala.html similarity index 96% rename from app/views/returns/TellUsAboutMultipleSPRRateView.scala.html rename to app/views/declareDuty/TellUsAboutMultipleSPRRateView.scala.html index f763704c..b3ae9f41 100644 --- a/app/views/returns/TellUsAboutMultipleSPRRateView.scala.html +++ b/app/views/declareDuty/TellUsAboutMultipleSPRRateView.scala.html @@ -36,7 +36,7 @@ @layout(pageTitle = title(form, messages("tellUsAboutMultipleSPRRate.title", messages(s"return.regime.$regime")))) { - @formHelper(action = controllers.returns.routes.TellUsAboutMultipleSPRRateController.onSubmit(mode, regime, index), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.TellUsAboutMultipleSPRRateController.onSubmit(mode, regime, index), Symbol("autoComplete") -> "off") { @if(form.errors.nonEmpty) { @govukErrorSummary(ErrorSummaryViewModel(form)) diff --git a/app/views/returns/TellUsAboutSingleSPRRateView.scala.html b/app/views/declareDuty/TellUsAboutSingleSPRRateView.scala.html similarity index 97% rename from app/views/returns/TellUsAboutSingleSPRRateView.scala.html rename to app/views/declareDuty/TellUsAboutSingleSPRRateView.scala.html index 1f9f62c2..d5eaa343 100644 --- a/app/views/returns/TellUsAboutSingleSPRRateView.scala.html +++ b/app/views/declareDuty/TellUsAboutSingleSPRRateView.scala.html @@ -16,7 +16,7 @@ @import viewmodels.InputWidth._ @import components.{SectionHeading, SubHeading, PageHeading, Paragraph} -@import viewmodels.returns.CategoriesByRateTypeViewModel +@import viewmodels.declareDuty.CategoriesByRateTypeViewModel @this( layout: templates.Layout, @@ -34,7 +34,7 @@ @layout(pageTitle = title(form, messages(s"tellUsAboutSingleSPRRate.title.$regime"))) { - @formHelper(action = controllers.returns.routes.TellUsAboutSingleSPRRateController.onSubmit(mode, regime), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.TellUsAboutSingleSPRRateController.onSubmit(mode, regime), Symbol("autoComplete") -> "off") { @if(form.errors.nonEmpty) { @govukErrorSummary(ErrorSummaryViewModel(form)) diff --git a/app/views/returns/WhatDoYouNeedToDeclareView.scala.html b/app/views/declareDuty/WhatDoYouNeedToDeclareView.scala.html similarity index 94% rename from app/views/returns/WhatDoYouNeedToDeclareView.scala.html rename to app/views/declareDuty/WhatDoYouNeedToDeclareView.scala.html index 69f211f3..ac06210e 100644 --- a/app/views/returns/WhatDoYouNeedToDeclareView.scala.html +++ b/app/views/declareDuty/WhatDoYouNeedToDeclareView.scala.html @@ -15,7 +15,7 @@ *@ @import components.{SectionHeading, PageHeading, Paragraph, SubHeading} -@import viewmodels.returns.TaxBandsViewModel +@import viewmodels.declareDuty.TaxBandsViewModel @this( layout: templates.Layout, @@ -33,7 +33,7 @@ @layout(pageTitle = title(form, messages("whatDoYouNeedToDeclare.title"))) { - @formHelper(action = controllers.returns.routes.WhatDoYouNeedToDeclareController.onSubmit(mode, regime), Symbol("autoComplete") -> "off") { + @formHelper(action = controllers.declareDuty.routes.WhatDoYouNeedToDeclareController.onSubmit(mode, regime), Symbol("autoComplete") -> "off") { @if(form.errors.nonEmpty) { @govukErrorSummary(ErrorSummaryViewModel(form, errorLinkOverrides = Map("value" -> "value_0"))) diff --git a/app/views/returns/ViewPastPaymentsView.scala.html b/app/views/payments/ViewPastPaymentsView.scala.html similarity index 100% rename from app/views/returns/ViewPastPaymentsView.scala.html rename to app/views/payments/ViewPastPaymentsView.scala.html diff --git a/conf/app.routes b/conf/app.routes index 4ede09a1..e9ddf310 100644 --- a/conf/app.routes +++ b/conf/app.routes @@ -30,7 +30,7 @@ GET /check-your-returns controllers.returns.Vie GET /view-your-return/:periodKey controllers.returns.ViewReturnController.onPageLoad(periodKey: String) -GET /view-payments controllers.returns.ViewPastPaymentsController.onPageLoad +GET /view-payments controllers.payments.ViewPastPaymentsController.onPageLoad GET /task-list/your-alcohol-duty-return controllers.TaskListController.onPageLoad @@ -41,55 +41,55 @@ GET /start controllers.ServiceEntr # Beginning of product entry sub-journey -GET /do-you-need-to-declare-duty controllers.returns.DeclareAlcoholDutyQuestionController.onPageLoad(mode: Mode = NormalMode) -POST /do-you-need-to-declare-duty controllers.returns.DeclareAlcoholDutyQuestionController.onSubmit(mode: Mode = NormalMode) -GET /change-do-you-need-to-declare-duty controllers.returns.DeclareAlcoholDutyQuestionController.onPageLoad(mode: Mode = CheckMode) -POST /change-do-you-need-to-declare-duty controllers.returns.DeclareAlcoholDutyQuestionController.onSubmit(mode: Mode = CheckMode) +GET /do-you-need-to-declare-duty controllers.declareDuty.DeclareAlcoholDutyQuestionController.onPageLoad(mode: Mode = NormalMode) +POST /do-you-need-to-declare-duty controllers.declareDuty.DeclareAlcoholDutyQuestionController.onSubmit(mode: Mode = NormalMode) +GET /change-do-you-need-to-declare-duty controllers.declareDuty.DeclareAlcoholDutyQuestionController.onPageLoad(mode: Mode = CheckMode) +POST /change-do-you-need-to-declare-duty controllers.declareDuty.DeclareAlcoholDutyQuestionController.onSubmit(mode: Mode = CheckMode) -GET /which-types-do-you-need-to-declare controllers.returns.AlcoholTypeController.onPageLoad(mode: Mode = NormalMode) -POST /which-types-do-you-need-to-declare controllers.returns.AlcoholTypeController.onSubmit(mode: Mode = NormalMode) -GET /change-which-types-do-you-need-to-declare controllers.returns.AlcoholTypeController.onPageLoad(mode: Mode = CheckMode) -POST /change-which-types-do-you-need-to-declare controllers.returns.AlcoholTypeController.onSubmit(mode: Mode = CheckMode) +GET /which-types-do-you-need-to-declare controllers.declareDuty.AlcoholTypeController.onPageLoad(mode: Mode = NormalMode) +POST /which-types-do-you-need-to-declare controllers.declareDuty.AlcoholTypeController.onSubmit(mode: Mode = NormalMode) +GET /change-which-types-do-you-need-to-declare controllers.declareDuty.AlcoholTypeController.onPageLoad(mode: Mode = CheckMode) +POST /change-which-types-do-you-need-to-declare controllers.declareDuty.AlcoholTypeController.onSubmit(mode: Mode = CheckMode) -GET /what-do-you-need-to-declare/:regime controllers.returns.WhatDoYouNeedToDeclareController.onPageLoad(mode: Mode = NormalMode, regime: AlcoholRegime) -POST /what-do-you-need-to-declare/:regime controllers.returns.WhatDoYouNeedToDeclareController.onSubmit(mode: Mode = NormalMode, regime: AlcoholRegime) -GET /change-what-do-you-need-to-declare/:regime controllers.returns.WhatDoYouNeedToDeclareController.onPageLoad(mode: Mode = CheckMode, regime: AlcoholRegime) -POST /change-what-do-you-need-to-declare/:regime controllers.returns.WhatDoYouNeedToDeclareController.onSubmit(mode: Mode = CheckMode, regime: AlcoholRegime) +GET /what-do-you-need-to-declare/:regime controllers.declareDuty.WhatDoYouNeedToDeclareController.onPageLoad(mode: Mode = NormalMode, regime: AlcoholRegime) +POST /what-do-you-need-to-declare/:regime controllers.declareDuty.WhatDoYouNeedToDeclareController.onSubmit(mode: Mode = NormalMode, regime: AlcoholRegime) +GET /change-what-do-you-need-to-declare/:regime controllers.declareDuty.WhatDoYouNeedToDeclareController.onPageLoad(mode: Mode = CheckMode, regime: AlcoholRegime) +POST /change-what-do-you-need-to-declare/:regime controllers.declareDuty.WhatDoYouNeedToDeclareController.onSubmit(mode: Mode = CheckMode, regime: AlcoholRegime) -GET /how-much-do-you-need-to-declare/:regime controllers.returns.HowMuchDoYouNeedToDeclareController.onPageLoad(mode: Mode = NormalMode, regime: AlcoholRegime) -POST /how-much-do-you-need-to-declare/:regime controllers.returns.HowMuchDoYouNeedToDeclareController.onSubmit(mode: Mode = NormalMode, regime: AlcoholRegime) -GET /change-how-much-do-you-need-to-declare/:regime controllers.returns.HowMuchDoYouNeedToDeclareController.onPageLoad(mode: Mode = CheckMode, regime: AlcoholRegime) -POST /change-how-much-do-you-need-to-declare/:regime controllers.returns.HowMuchDoYouNeedToDeclareController.onSubmit(mode: Mode = CheckMode, regime: AlcoholRegime) +GET /how-much-do-you-need-to-declare/:regime controllers.declareDuty.HowMuchDoYouNeedToDeclareController.onPageLoad(mode: Mode = NormalMode, regime: AlcoholRegime) +POST /how-much-do-you-need-to-declare/:regime controllers.declareDuty.HowMuchDoYouNeedToDeclareController.onSubmit(mode: Mode = NormalMode, regime: AlcoholRegime) +GET /change-how-much-do-you-need-to-declare/:regime controllers.declareDuty.HowMuchDoYouNeedToDeclareController.onPageLoad(mode: Mode = CheckMode, regime: AlcoholRegime) +POST /change-how-much-do-you-need-to-declare/:regime controllers.declareDuty.HowMuchDoYouNeedToDeclareController.onSubmit(mode: Mode = CheckMode, regime: AlcoholRegime) -GET /do-you-have-multiple-small-producer-relief-duty-rates/:regime controllers.returns.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(mode: Mode = NormalMode, regime: AlcoholRegime) -POST /do-you-have-multiple-small-producer-relief-duty-rates/:regime controllers.returns.DoYouHaveMultipleSPRDutyRatesController.onSubmit(mode: Mode = NormalMode, regime: AlcoholRegime) -GET /change-do-you-have-multiple-small-producer-relief-duty-rates/:regime controllers.returns.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(mode: Mode = CheckMode, regime: AlcoholRegime) -POST /change-do-you-have-multiple-small-producer-relief-duty-rates/:regime controllers.returns.DoYouHaveMultipleSPRDutyRatesController.onSubmit(mode: Mode = CheckMode, regime: AlcoholRegime) +GET /do-you-have-multiple-small-producer-relief-duty-rates/:regime controllers.declareDuty.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(mode: Mode = NormalMode, regime: AlcoholRegime) +POST /do-you-have-multiple-small-producer-relief-duty-rates/:regime controllers.declareDuty.DoYouHaveMultipleSPRDutyRatesController.onSubmit(mode: Mode = NormalMode, regime: AlcoholRegime) +GET /change-do-you-have-multiple-small-producer-relief-duty-rates/:regime controllers.declareDuty.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(mode: Mode = CheckMode, regime: AlcoholRegime) +POST /change-do-you-have-multiple-small-producer-relief-duty-rates/:regime controllers.declareDuty.DoYouHaveMultipleSPRDutyRatesController.onSubmit(mode: Mode = CheckMode, regime: AlcoholRegime) -GET /tell-us-about-single-spr-rate/:regime controllers.returns.TellUsAboutSingleSPRRateController.onPageLoad(mode: Mode = NormalMode, regime: AlcoholRegime) -POST /tell-us-about-single-spr-rate/:regime controllers.returns.TellUsAboutSingleSPRRateController.onSubmit(mode: Mode = NormalMode, regime: AlcoholRegime) -GET /change-tell-us-about-single-spr-rate/:regime controllers.returns.TellUsAboutSingleSPRRateController.onPageLoad(mode: Mode = CheckMode, regime: AlcoholRegime) -POST /change-tell-us-about-single-spr-rate/:regime controllers.returns.TellUsAboutSingleSPRRateController.onSubmit(mode: Mode = CheckMode, regime: AlcoholRegime) +GET /tell-us-about-single-spr-rate/:regime controllers.declareDuty.TellUsAboutSingleSPRRateController.onPageLoad(mode: Mode = NormalMode, regime: AlcoholRegime) +POST /tell-us-about-single-spr-rate/:regime controllers.declareDuty.TellUsAboutSingleSPRRateController.onSubmit(mode: Mode = NormalMode, regime: AlcoholRegime) +GET /change-tell-us-about-single-spr-rate/:regime controllers.declareDuty.TellUsAboutSingleSPRRateController.onPageLoad(mode: Mode = CheckMode, regime: AlcoholRegime) +POST /change-tell-us-about-single-spr-rate/:regime controllers.declareDuty.TellUsAboutSingleSPRRateController.onSubmit(mode: Mode = CheckMode, regime: AlcoholRegime) -GET /multiple-spr-rates/:regime controllers.returns.TellUsAboutMultipleSPRRateController.onPageLoad(mode: Mode = NormalMode, regime: AlcoholRegime, index:Option[Int] ?= None) -POST /multiple-spr-rates/:regime controllers.returns.TellUsAboutMultipleSPRRateController.onSubmit(mode: Mode = NormalMode, regime: AlcoholRegime, index:Option[Int] ?= None) -GET /change-multiple-spr-rates/:regime controllers.returns.TellUsAboutMultipleSPRRateController.onPageLoad(mode: Mode = CheckMode, regime: AlcoholRegime, index:Option[Int] ?= None) -POST /change-multiple-spr-rates/:regime controllers.returns.TellUsAboutMultipleSPRRateController.onSubmit(mode: Mode = CheckMode, regime: AlcoholRegime, index:Option[Int] ?= None) +GET /multiple-spr-rates/:regime controllers.declareDuty.TellUsAboutMultipleSPRRateController.onPageLoad(mode: Mode = NormalMode, regime: AlcoholRegime, index:Option[Int] ?= None) +POST /multiple-spr-rates/:regime controllers.declareDuty.TellUsAboutMultipleSPRRateController.onSubmit(mode: Mode = NormalMode, regime: AlcoholRegime, index:Option[Int] ?= None) +GET /change-multiple-spr-rates/:regime controllers.declareDuty.TellUsAboutMultipleSPRRateController.onPageLoad(mode: Mode = CheckMode, regime: AlcoholRegime, index:Option[Int] ?= None) +POST /change-multiple-spr-rates/:regime controllers.declareDuty.TellUsAboutMultipleSPRRateController.onSubmit(mode: Mode = CheckMode, regime: AlcoholRegime, index:Option[Int] ?= None) -GET /check-your-answers-spr/:regime controllers.returns.CheckYourAnswersSPRController.onPageLoad(regime:AlcoholRegime, index:Option[Int] ?= None) -POST /check-your-answers-spr/:regime controllers.returns.CheckYourAnswersSPRController.onSubmit(regime:AlcoholRegime, index:Option[Int] ?= None) +GET /check-your-answers-spr/:regime controllers.declareDuty.CheckYourAnswersSPRController.onPageLoad(regime:AlcoholRegime, index:Option[Int] ?= None) +POST /check-your-answers-spr/:regime controllers.declareDuty.CheckYourAnswersSPRController.onSubmit(regime:AlcoholRegime, index:Option[Int] ?= None) -GET /return-check-your-answers/:regime controllers.returns.CheckYourAnswersController.onPageLoad(regime:AlcoholRegime) +GET /return-check-your-answers/:regime controllers.declareDuty.CheckYourAnswersController.onPageLoad(regime:AlcoholRegime) -GET /multiple-spr-list/:regime controllers.returns.MultipleSPRListController.onPageLoad(regime:AlcoholRegime) -POST /multiple-spr-list/:regime controllers.returns.MultipleSPRListController.onSubmit(regime:AlcoholRegime) +GET /multiple-spr-list/:regime controllers.declareDuty.MultipleSPRListController.onPageLoad(regime:AlcoholRegime) +POST /multiple-spr-list/:regime controllers.declareDuty.MultipleSPRListController.onSubmit(regime:AlcoholRegime) -GET /delete-multiple-spr-entry/:regime controllers.returns.DeleteMultipleSPREntryController.onPageLoad(regime:AlcoholRegime, index:Option[Int] ?= None) -POST /delete-multiple-spr-entry/:regime controllers.returns.DeleteMultipleSPREntryController.onSubmit(regime:AlcoholRegime, index:Option[Int] ?= None) +GET /delete-multiple-spr-entry/:regime controllers.declareDuty.DeleteMultipleSPREntryController.onPageLoad(regime:AlcoholRegime, index:Option[Int] ?= None) +POST /delete-multiple-spr-entry/:regime controllers.declareDuty.DeleteMultipleSPREntryController.onSubmit(regime:AlcoholRegime, index:Option[Int] ?= None) -GET /duty-due/:regime controllers.returns.DutyCalculationController.onPageLoad(regime:AlcoholRegime) -POST /duty-due/:regime controllers.returns.DutyCalculationController.onSubmit(regime:AlcoholRegime) +GET /duty-due/:regime controllers.declareDuty.DutyCalculationController.onPageLoad(regime:AlcoholRegime) +POST /duty-due/:regime controllers.declareDuty.DutyCalculationController.onSubmit(regime:AlcoholRegime) # Beginning of duty suspended deliveries sub-journey GET /do-you-need-to-declare-delivered-received-duty-suspended controllers.dutySuspended.DeclareDutySuspendedDeliveriesQuestionController.onPageLoad(mode: Mode = NormalMode) @@ -255,7 +255,7 @@ POST /return-summary controllers.checkAndSubmit.DutyD GET /return-submitted controllers.checkAndSubmit.ReturnSubmittedController.onPageLoad() -GET /start-payment controllers.StartPaymentController.initiateAndRedirect() -GET /start-direct-debit controllers.StartDirectDebitController.initiateAndRedirect() -GET /start-payment/:index controllers.StartPaymentController.initiateAndRedirectFromPastPayments(index: Int) +GET /start-payment controllers.payments.StartPaymentController.initiateAndRedirect() +GET /start-direct-debit controllers.payments.StartDirectDebitController.initiateAndRedirect() +GET /start-payment/:index controllers.payments.StartPaymentController.initiateAndRedirectFromPastPayments(index: Int) # End of check and submit sub-journey \ No newline at end of file diff --git a/it/test/AlcoholDutyCalculatorConnectorISpec.scala b/it/test/AlcoholDutyCalculatorConnectorISpec.scala index 476ee0ca..43ef759c 100644 --- a/it/test/AlcoholDutyCalculatorConnectorISpec.scala +++ b/it/test/AlcoholDutyCalculatorConnectorISpec.scala @@ -18,7 +18,7 @@ import cats.data.NonEmptySeq import com.github.tomakehurst.wiremock.client.WireMock.{aResponse, equalTo, equalToJson, get, post, urlMatching, urlPathEqualTo} import connectors.{AdjustmentDutyCalculationRequest, AdjustmentTotalCalculationRequest, AlcoholDutyCalculatorConnector, RepackagedDutyChangeRequest, TotalDutyCalculationRequest} import models.adjustment.{AdjustmentDuty, AdjustmentTypes} -import models.returns.{AlcoholDuty, DutyByTaxType} +import models.declareDuty.{AlcoholDuty, DutyByTaxType} import models.{ABVRange, AlcoholByVolume, AlcoholType, RangeDetailsByRegime, RateBand, RatePeriod, RateType} import play.api.Application import play.api.http.Status.{BAD_REQUEST, INTERNAL_SERVER_ERROR, NOT_FOUND, OK} diff --git a/test-utils/common/TestData.scala b/test-utils/common/TestData.scala index 746d3a95..76732cfe 100644 --- a/test-utils/common/TestData.scala +++ b/test-utils/common/TestData.scala @@ -20,8 +20,8 @@ import cats.data.NonEmptySeq import generators.ModelGenerators import models.AlcoholRegime.{Beer, Cider, OtherFermentedProduct, Spirits, Wine} import models.adjustment.{AdjustmentEntry, AdjustmentType} -import models.returns.AdrUnitOfMeasure.Tonnes -import models.returns._ +import models.checkAndSubmit.AdrUnitOfMeasure.Tonnes +import models.declareDuty._ import models._ import org.scalacheck.Gen import pages.adjustment._ @@ -29,10 +29,10 @@ import pages.dutySuspended._ import pages.spiritsQuestions._ import play.api.libs.json.Json import org.scalacheck.Gen.{listOfN, numChar} -import pages.returns.{AlcoholDutyPage, DeclareAlcoholDutyQuestionPage} +import pages.declareDuty.{AlcoholDutyPage, DeclareAlcoholDutyQuestionPage} import models.TransactionType.{LPI, RPI, Return} -import models.returns.{ReturnAdjustments, ReturnAdjustmentsRow, ReturnAlcoholDeclared, ReturnAlcoholDeclaredRow, ReturnDetails, ReturnDetailsIdentification, ReturnTotalDutyDue} -import models.{AlcoholRegimes, ObligationData, ObligationStatus, OpenPayments, OutstandingPayment, ReturnId, ReturnPeriod, UnallocatedPayment, UserAnswers} +import models.checkAndSubmit.{AdrAdjustmentItem, AdrAdjustments, AdrAlcoholQuantity, AdrDuty, AdrDutyDeclared, AdrDutyDeclaredItem, AdrDutySuspended, AdrDutySuspendedAlcoholRegime, AdrDutySuspendedProduct, AdrOtherIngredient, AdrRepackagedDraughtAdjustmentItem, AdrReturnSubmission, AdrSpirits, AdrSpiritsGrainsQuantities, AdrSpiritsIngredientsVolumes, AdrSpiritsProduced, AdrSpiritsVolumes, AdrTotals, AdrTypeOfSpirit} +import models.returns._ import uk.gov.hmrc.alcoholdutyreturns.models.ReturnAndUserDetails import java.time.{Clock, Instant, LocalDate, Month, YearMonth, ZoneId} diff --git a/test-utils/common/TestPages.scala b/test-utils/common/TestPages.scala index cf1140a5..809ea0e2 100644 --- a/test-utils/common/TestPages.scala +++ b/test-utils/common/TestPages.scala @@ -19,10 +19,10 @@ package common import models.AlcoholRegime._ import models.dutySuspended.{DutySuspendedBeer, DutySuspendedCider, DutySuspendedOtherFermented, DutySuspendedSpirits, DutySuspendedWine} import models.{AlcoholRegime, RateBand, UserAnswers} -import models.returns.{AlcoholDuty, DutyByTaxType, VolumeAndRateByTaxType} +import models.declareDuty.{AlcoholDuty, DutyByTaxType, VolumeAndRateByTaxType} import pages.adjustment.{AdjustmentTotalPage, DeclareAdjustmentQuestionPage} import pages.dutySuspended.{DutySuspendedBeerPage, DutySuspendedCiderPage, DutySuspendedOtherFermentedPage, DutySuspendedSpiritsPage, DutySuspendedWinePage} -import pages.returns.{AlcoholDutyPage, DeclareAlcoholDutyQuestionPage, DoYouHaveMultipleSPRDutyRatesPage, MultipleSPRListPage, TellUsAboutMultipleSPRRatePage, TellUsAboutSingleSPRRatePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{AlcoholDutyPage, DeclareAlcoholDutyQuestionPage, DoYouHaveMultipleSPRDutyRatesPage, MultipleSPRListPage, TellUsAboutMultipleSPRRatePage, TellUsAboutSingleSPRRatePage, WhatDoYouNeedToDeclarePage} import scala.collection.immutable.SortedMap diff --git a/test-utils/generators/ModelGenerators.scala b/test-utils/generators/ModelGenerators.scala index 0a62f848..5c4f7e4c 100644 --- a/test-utils/generators/ModelGenerators.scala +++ b/test-utils/generators/ModelGenerators.scala @@ -22,7 +22,7 @@ import org.scalacheck.Arbitrary.arbitrary import org.scalacheck.Gen.Choose import org.scalacheck.{Arbitrary, Gen} import enumeratum.scalacheck._ -import models.returns.{DutyByTaxType, VolumeAndRateByTaxType} +import models.declareDuty.{DutyByTaxType, VolumeAndRateByTaxType} import java.time.YearMonth diff --git a/test/connectors/AlcoholDutyCalculatorConnectorSpec.scala b/test/connectors/AlcoholDutyCalculatorConnectorSpec.scala index d7058a4c..b73508d7 100644 --- a/test/connectors/AlcoholDutyCalculatorConnectorSpec.scala +++ b/test/connectors/AlcoholDutyCalculatorConnectorSpec.scala @@ -20,7 +20,7 @@ import base.SpecBase import cats.data.NonEmptySeq import config.FrontendAppConfig import models.adjustment.{AdjustmentDuty, AdjustmentTypes} -import models.returns.{AlcoholDuty, DutyByTaxType} +import models.declareDuty.{AlcoholDuty, DutyByTaxType} import models.{ABVRange, AlcoholByVolume, AlcoholRegime, AlcoholType, RangeDetailsByRegime, RateBand, RatePeriod, RateType} import org.mockito.ArgumentMatchers.any import org.mockito.ArgumentMatchersSugar.eqTo diff --git a/test/connectors/AlcoholDutyReturnsConnectorSpec.scala b/test/connectors/AlcoholDutyReturnsConnectorSpec.scala index 1a4467f5..ac769226 100644 --- a/test/connectors/AlcoholDutyReturnsConnectorSpec.scala +++ b/test/connectors/AlcoholDutyReturnsConnectorSpec.scala @@ -18,7 +18,7 @@ package connectors import base.SpecBase import config.FrontendAppConfig -import models.returns.AdrReturnCreatedDetails +import models.checkAndSubmit.AdrReturnCreatedDetails import org.mockito.ArgumentMatchers.any import org.mockito.ArgumentMatchersSugar.eqTo import org.scalatest.concurrent.ScalaFutures diff --git a/test/controllers/BeforeStartReturnControllerSpec.scala b/test/controllers/BeforeStartReturnControllerSpec.scala index ad30099e..751991ba 100644 --- a/test/controllers/BeforeStartReturnControllerSpec.scala +++ b/test/controllers/BeforeStartReturnControllerSpec.scala @@ -28,8 +28,7 @@ import play.api.test.Helpers._ import play.api.inject.bind import services.AuditService import uk.gov.hmrc.http.UpstreamErrorResponse -import viewmodels.BeforeStartReturnViewModel -import viewmodels.returns.ReturnPeriodViewModel +import viewmodels.{BeforeStartReturnViewModel, ReturnPeriodViewModel} import views.html.BeforeStartReturnView import java.time.{Clock, Instant, LocalDate} diff --git a/test/controllers/checkAndSubmit/DutyDueForThisReturnControllerSpec.scala b/test/controllers/checkAndSubmit/DutyDueForThisReturnControllerSpec.scala index 93a21d06..2c6806e9 100644 --- a/test/controllers/checkAndSubmit/DutyDueForThisReturnControllerSpec.scala +++ b/test/controllers/checkAndSubmit/DutyDueForThisReturnControllerSpec.scala @@ -20,7 +20,7 @@ import base.SpecBase import cats.data.EitherT import connectors.AlcoholDutyReturnsConnector import models.audit.AuditReturnSubmitted -import models.returns.{AdrReturnCreatedDetails, AdrReturnSubmission} +import models.checkAndSubmit.{AdrReturnCreatedDetails, AdrReturnSubmission} import org.mockito.ArgumentMatchers.any import org.mockito.ArgumentMatchersSugar.eqTo import play.api.inject.bind diff --git a/test/controllers/returns/AlcoholTypeControllerSpec.scala b/test/controllers/declareDuty/AlcoholTypeControllerSpec.scala similarity index 97% rename from test/controllers/returns/AlcoholTypeControllerSpec.scala rename to test/controllers/declareDuty/AlcoholTypeControllerSpec.scala index 9edf62a8..2506f4fd 100644 --- a/test/controllers/returns/AlcoholTypeControllerSpec.scala +++ b/test/controllers/declareDuty/AlcoholTypeControllerSpec.scala @@ -14,21 +14,21 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase -import forms.returns.AlcoholTypeFormProvider +import forms.declareDuty.AlcoholTypeFormProvider import models.{AlcoholRegime, AlcoholRegimes, NormalMode} import navigation.{FakeReturnsNavigator, ReturnsNavigator} import org.mockito.ArgumentMatchers.any -import pages.returns.AlcoholTypePage +import pages.declareDuty.AlcoholTypePage import play.api.inject.bind import play.api.mvc.Call import play.api.test.Helpers._ import connectors.CacheConnector import models.AlcoholRegime.{Beer, Cider, Wine} import uk.gov.hmrc.http.HttpResponse -import views.html.returns.AlcoholTypeView +import views.html.declareDuty.AlcoholTypeView import scala.concurrent.Future diff --git a/test/controllers/returns/CheckYourAnswersControllerSpec.scala b/test/controllers/declareDuty/CheckYourAnswersControllerSpec.scala similarity index 85% rename from test/controllers/returns/CheckYourAnswersControllerSpec.scala rename to test/controllers/declareDuty/CheckYourAnswersControllerSpec.scala index 3788f459..69b7d67d 100644 --- a/test/controllers/returns/CheckYourAnswersControllerSpec.scala +++ b/test/controllers/declareDuty/CheckYourAnswersControllerSpec.scala @@ -14,15 +14,15 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase import models.AlcoholRegime import org.scalacheck.Arbitrary._ -import pages.returns.{HowMuchDoYouNeedToDeclarePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{HowMuchDoYouNeedToDeclarePage, WhatDoYouNeedToDeclarePage} import play.api.test.Helpers._ -import viewmodels.returns.CheckYourAnswersSummaryListHelper -import views.html.returns.CheckYourAnswersView +import viewmodels.declareDuty.CheckYourAnswersSummaryListHelper +import views.html.declareDuty.CheckYourAnswersView class CheckYourAnswersControllerSpec extends SpecBase { @@ -46,7 +46,7 @@ class CheckYourAnswersControllerSpec extends SpecBase { val application = applicationBuilder(userAnswers = Some(userAnswers)).build() running(application) { - val request = FakeRequest(GET, controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime).url) + val request = FakeRequest(GET, controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime).url) val result = route(application, request).value @@ -86,7 +86,7 @@ class CheckYourAnswersControllerSpec extends SpecBase { val application = applicationBuilder(userAnswers = None).build() running(application) { - val request = FakeRequest(GET, controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime).url) + val request = FakeRequest(GET, controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime).url) val result = route(application, request).value @@ -100,7 +100,7 @@ class CheckYourAnswersControllerSpec extends SpecBase { val application = applicationBuilder(userAnswers = Some(emptyUserAnswers)).build() running(application) { - val request = FakeRequest(GET, controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime).url) + val request = FakeRequest(GET, controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime).url) val result = route(application, request).value diff --git a/test/controllers/returns/CheckYourAnswersSPRControllerSpec.scala b/test/controllers/declareDuty/CheckYourAnswersSPRControllerSpec.scala similarity index 80% rename from test/controllers/returns/CheckYourAnswersSPRControllerSpec.scala rename to test/controllers/declareDuty/CheckYourAnswersSPRControllerSpec.scala index f2c7ad46..0b853007 100644 --- a/test/controllers/returns/CheckYourAnswersSPRControllerSpec.scala +++ b/test/controllers/declareDuty/CheckYourAnswersSPRControllerSpec.scala @@ -14,19 +14,19 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase import connectors.CacheConnector import navigation.{FakeReturnsNavigator, ReturnsNavigator} import org.mockito.ArgumentMatchers.any -import pages.returns.{TellUsAboutMultipleSPRRatePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{TellUsAboutMultipleSPRRatePage, WhatDoYouNeedToDeclarePage} import play.api.inject.bind import play.api.mvc.Call import play.api.test.Helpers._ import uk.gov.hmrc.http.HttpResponse -import viewmodels.returns.CheckYourAnswersSPRSummaryListHelper -import views.html.returns.CheckYourAnswersSPRView +import viewmodels.declareDuty.CheckYourAnswersSPRSummaryListHelper +import views.html.declareDuty.CheckYourAnswersSPRView import scala.concurrent.Future @@ -53,7 +53,8 @@ class CheckYourAnswersSPRControllerSpec extends SpecBase { val application = applicationBuilder(userAnswers = Some(userAnswers)).build() running(application) { - val request = FakeRequest(GET, controllers.returns.routes.CheckYourAnswersSPRController.onPageLoad(regime).url) + val request = + FakeRequest(GET, controllers.declareDuty.routes.CheckYourAnswersSPRController.onPageLoad(regime).url) val result = route(application, request).value @@ -72,7 +73,8 @@ class CheckYourAnswersSPRControllerSpec extends SpecBase { val application = applicationBuilder(userAnswers = Some(emptyUserAnswers)).build() running(application) { - val request = FakeRequest(GET, controllers.returns.routes.CheckYourAnswersSPRController.onPageLoad(regime).url) + val request = + FakeRequest(GET, controllers.declareDuty.routes.CheckYourAnswersSPRController.onPageLoad(regime).url) val result = route(application, request).value @@ -86,7 +88,8 @@ class CheckYourAnswersSPRControllerSpec extends SpecBase { val application = applicationBuilder(userAnswers = Some(emptyUserAnswers)).build() running(application) { - val request = FakeRequest(POST, controllers.returns.routes.CheckYourAnswersSPRController.onSubmit(regime).url) + val request = + FakeRequest(POST, controllers.declareDuty.routes.CheckYourAnswersSPRController.onSubmit(regime).url) val result = route(application, request).value @@ -109,12 +112,13 @@ class CheckYourAnswersSPRControllerSpec extends SpecBase { .build() running(application) { - val request = FakeRequest(POST, controllers.returns.routes.CheckYourAnswersSPRController.onSubmit(regime).url) + val request = + FakeRequest(POST, controllers.declareDuty.routes.CheckYourAnswersSPRController.onSubmit(regime).url) val result = route(application, request).value status(result) mustEqual SEE_OTHER - redirectLocation(result).value mustEqual controllers.returns.routes.MultipleSPRListController + redirectLocation(result).value mustEqual controllers.declareDuty.routes.MultipleSPRListController .onPageLoad(regime) .url } @@ -137,12 +141,12 @@ class CheckYourAnswersSPRControllerSpec extends SpecBase { running(application) { val request = - FakeRequest(POST, controllers.returns.routes.CheckYourAnswersSPRController.onSubmit(regime, index).url) + FakeRequest(POST, controllers.declareDuty.routes.CheckYourAnswersSPRController.onSubmit(regime, index).url) val result = route(application, request).value status(result) mustEqual SEE_OTHER - redirectLocation(result).value mustEqual controllers.returns.routes.MultipleSPRListController + redirectLocation(result).value mustEqual controllers.declareDuty.routes.MultipleSPRListController .onPageLoad(regime) .url } diff --git a/test/controllers/returns/DeclareAlcoholDutyQuestionControllerSpec.scala b/test/controllers/declareDuty/DeclareAlcoholDutyQuestionControllerSpec.scala similarity index 97% rename from test/controllers/returns/DeclareAlcoholDutyQuestionControllerSpec.scala rename to test/controllers/declareDuty/DeclareAlcoholDutyQuestionControllerSpec.scala index 44641131..63115057 100644 --- a/test/controllers/returns/DeclareAlcoholDutyQuestionControllerSpec.scala +++ b/test/controllers/declareDuty/DeclareAlcoholDutyQuestionControllerSpec.scala @@ -14,21 +14,21 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase import connectors.CacheConnector -import forms.returns.DeclareAlcoholDutyQuestionFormProvider +import forms.declareDuty.DeclareAlcoholDutyQuestionFormProvider import models.AlcoholRegime.Beer import models.{AlcoholRegimes, NormalMode} import navigation.{FakeReturnsNavigator, ReturnsNavigator} import org.mockito.ArgumentMatchers.any -import pages.returns.DeclareAlcoholDutyQuestionPage +import pages.declareDuty.DeclareAlcoholDutyQuestionPage import play.api.inject.bind import play.api.mvc.Call import play.api.test.Helpers._ import uk.gov.hmrc.http.HttpResponse -import views.html.returns.DeclareAlcoholDutyQuestionView +import views.html.declareDuty.DeclareAlcoholDutyQuestionView import scala.concurrent.Future diff --git a/test/controllers/returns/DeleteMultipleSPREntryControllerSpec.scala b/test/controllers/declareDuty/DeleteMultipleSPREntryControllerSpec.scala similarity index 90% rename from test/controllers/returns/DeleteMultipleSPREntryControllerSpec.scala rename to test/controllers/declareDuty/DeleteMultipleSPREntryControllerSpec.scala index d3219463..f24877fd 100644 --- a/test/controllers/returns/DeleteMultipleSPREntryControllerSpec.scala +++ b/test/controllers/declareDuty/DeleteMultipleSPREntryControllerSpec.scala @@ -14,18 +14,18 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase -import forms.returns.DeleteMultipleSPREntryFormProvider +import forms.declareDuty.DeleteMultipleSPREntryFormProvider import org.mockito.ArgumentMatchers.any -import pages.returns.{MultipleSPRListPage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{MultipleSPRListPage, WhatDoYouNeedToDeclarePage} import play.api.inject.bind import play.api.test.Helpers._ import connectors.CacheConnector import models.NormalMode import uk.gov.hmrc.http.HttpResponse -import views.html.returns.DeleteMultipleSPREntryView +import views.html.declareDuty.DeleteMultipleSPREntryView import scala.concurrent.Future @@ -57,9 +57,9 @@ class DeleteMultipleSPREntryControllerSpec extends SpecBase { val form = formProvider() lazy val deleteMultipleSPREntryRoute = - controllers.returns.routes.DeleteMultipleSPREntryController.onPageLoad(regime, Some(index)).url + controllers.declareDuty.routes.DeleteMultipleSPREntryController.onPageLoad(regime, Some(index)).url lazy val deleteMultipleSPREntryRouteWithoutIndex = - controllers.returns.routes.DeleteMultipleSPREntryController.onPageLoad(regime, None).url + controllers.declareDuty.routes.DeleteMultipleSPREntryController.onPageLoad(regime, None).url "DeleteMultipleSPREntry Controller" - { "must return OK and the correct view for a GET" in { @@ -111,7 +111,7 @@ class DeleteMultipleSPREntryControllerSpec extends SpecBase { val result = route(application, request).value status(result) mustEqual SEE_OTHER - redirectLocation(result).value mustEqual controllers.returns.routes.MultipleSPRListController + redirectLocation(result).value mustEqual controllers.declareDuty.routes.MultipleSPRListController .onPageLoad(regime) .url } @@ -137,7 +137,7 @@ class DeleteMultipleSPREntryControllerSpec extends SpecBase { val result = route(application, request).value status(result) mustEqual SEE_OTHER - redirectLocation(result).value mustEqual controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController + redirectLocation(result).value mustEqual controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController .onPageLoad(NormalMode, regime) .url } @@ -155,7 +155,7 @@ class DeleteMultipleSPREntryControllerSpec extends SpecBase { val result = route(application, request).value status(result) mustEqual SEE_OTHER - redirectLocation(result).value mustEqual controllers.returns.routes.MultipleSPRListController + redirectLocation(result).value mustEqual controllers.declareDuty.routes.MultipleSPRListController .onPageLoad(regime) .url } @@ -211,7 +211,7 @@ class DeleteMultipleSPREntryControllerSpec extends SpecBase { val application = applicationBuilder(userAnswers = None).build() val deleteMultipleSPREntryRoute = - controllers.returns.routes.DeleteMultipleSPREntryController.onPageLoad(regime, None).url + controllers.declareDuty.routes.DeleteMultipleSPREntryController.onPageLoad(regime, None).url running(application) { val request = FakeRequest(GET, deleteMultipleSPREntryRoute) diff --git a/test/controllers/returns/DoYouHaveMultipleSPRDutyRatesControllerSpec.scala b/test/controllers/declareDuty/DoYouHaveMultipleSPRDutyRatesControllerSpec.scala similarity index 94% rename from test/controllers/returns/DoYouHaveMultipleSPRDutyRatesControllerSpec.scala rename to test/controllers/declareDuty/DoYouHaveMultipleSPRDutyRatesControllerSpec.scala index 9f7741cb..938d41fc 100644 --- a/test/controllers/returns/DoYouHaveMultipleSPRDutyRatesControllerSpec.scala +++ b/test/controllers/declareDuty/DoYouHaveMultipleSPRDutyRatesControllerSpec.scala @@ -14,20 +14,20 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase -import forms.returns.DoYouHaveMultipleSPRDutyRatesFormProvider +import forms.declareDuty.DoYouHaveMultipleSPRDutyRatesFormProvider import models.{CheckMode, NormalMode} import navigation.{FakeReturnsNavigator, ReturnsNavigator} import org.mockito.ArgumentMatchers.any -import pages.returns.DoYouHaveMultipleSPRDutyRatesPage +import pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage import play.api.inject.bind import play.api.mvc.Call import play.api.test.Helpers._ import connectors.CacheConnector import uk.gov.hmrc.http.HttpResponse -import views.html.returns.DoYouHaveMultipleSPRDutyRatesView +import views.html.declareDuty.DoYouHaveMultipleSPRDutyRatesView import scala.concurrent.Future @@ -40,9 +40,9 @@ class DoYouHaveMultipleSPRDutyRatesControllerSpec extends SpecBase { val regime = regimeGen.sample.value lazy val doYouHaveMultipleSPRDutyRatesRoute = - controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime).url + controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime).url lazy val doYouHaveMultipleSPRDutyRatesRouteCheckMode = - controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(CheckMode, regime).url + controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(CheckMode, regime).url "DoYouHaveMultipleSPRDutyRates Controller" - { diff --git a/test/controllers/returns/DutyCalculationControllerSpec.scala b/test/controllers/declareDuty/DutyCalculationControllerSpec.scala similarity index 88% rename from test/controllers/returns/DutyCalculationControllerSpec.scala rename to test/controllers/declareDuty/DutyCalculationControllerSpec.scala index c287d35c..88f54829 100644 --- a/test/controllers/returns/DutyCalculationControllerSpec.scala +++ b/test/controllers/declareDuty/DutyCalculationControllerSpec.scala @@ -14,18 +14,18 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase import connectors.{AlcoholDutyCalculatorConnector, CacheConnector} -import models.returns.{AlcoholDuty, DutyByTaxType} +import models.declareDuty.{AlcoholDuty, DutyByTaxType} import org.mockito.ArgumentMatchers.any -import pages.returns.{DoYouHaveMultipleSPRDutyRatesPage, DutyCalculationPage, HowMuchDoYouNeedToDeclarePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{DoYouHaveMultipleSPRDutyRatesPage, DutyCalculationPage, HowMuchDoYouNeedToDeclarePage, WhatDoYouNeedToDeclarePage} import play.api.inject.bind import play.api.test.Helpers._ import uk.gov.hmrc.http.HttpResponse -import viewmodels.returns.DutyCalculationHelper -import views.html.returns.DutyCalculationView +import viewmodels.declareDuty.DutyCalculationHelper +import views.html.declareDuty.DutyCalculationView import scala.concurrent.Future @@ -82,7 +82,7 @@ class DutyCalculationControllerSpec extends SpecBase { .build() running(application) { - val request = FakeRequest(GET, controllers.returns.routes.DutyCalculationController.onPageLoad(regime).url) + val request = FakeRequest(GET, controllers.declareDuty.routes.DutyCalculationController.onPageLoad(regime).url) val result = route(application, request).value @@ -118,7 +118,7 @@ class DutyCalculationControllerSpec extends SpecBase { .build() running(application) { - val request = FakeRequest(GET, controllers.returns.routes.DutyCalculationController.onPageLoad(regime).url) + val request = FakeRequest(GET, controllers.declareDuty.routes.DutyCalculationController.onPageLoad(regime).url) val result = route(application, request).value @@ -152,7 +152,7 @@ class DutyCalculationControllerSpec extends SpecBase { .build() running(application) { - val request = FakeRequest(GET, controllers.returns.routes.DutyCalculationController.onPageLoad(regime).url) + val request = FakeRequest(GET, controllers.declareDuty.routes.DutyCalculationController.onPageLoad(regime).url) val result = route(application, request).value @@ -177,7 +177,7 @@ class DutyCalculationControllerSpec extends SpecBase { .build() running(application) { - val request = FakeRequest(POST, controllers.returns.routes.DutyCalculationController.onSubmit(regime).url) + val request = FakeRequest(POST, controllers.declareDuty.routes.DutyCalculationController.onSubmit(regime).url) val result = route(application, request).value @@ -200,7 +200,7 @@ class DutyCalculationControllerSpec extends SpecBase { .build() running(application) { - val request = FakeRequest(POST, controllers.returns.routes.DutyCalculationController.onSubmit(regime).url) + val request = FakeRequest(POST, controllers.declareDuty.routes.DutyCalculationController.onSubmit(regime).url) val result = route(application, request).value diff --git a/test/controllers/returns/HowMuchDoYouNeedToDeclareControllerSpec.scala b/test/controllers/declareDuty/HowMuchDoYouNeedToDeclareControllerSpec.scala similarity index 96% rename from test/controllers/returns/HowMuchDoYouNeedToDeclareControllerSpec.scala rename to test/controllers/declareDuty/HowMuchDoYouNeedToDeclareControllerSpec.scala index 390f56d3..25a01391 100644 --- a/test/controllers/returns/HowMuchDoYouNeedToDeclareControllerSpec.scala +++ b/test/controllers/declareDuty/HowMuchDoYouNeedToDeclareControllerSpec.scala @@ -14,22 +14,22 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase -import forms.returns.HowMuchDoYouNeedToDeclareFormProvider +import forms.declareDuty.HowMuchDoYouNeedToDeclareFormProvider import models.{AlcoholRegime, NormalMode} import navigation.{FakeReturnsNavigator, ReturnsNavigator} import org.mockito.ArgumentMatchers.any -import pages.returns.{HowMuchDoYouNeedToDeclarePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{HowMuchDoYouNeedToDeclarePage, WhatDoYouNeedToDeclarePage} import play.api.inject.bind import play.api.mvc.Call import play.api.test.Helpers._ import connectors.CacheConnector import org.scalacheck.Arbitrary._ import uk.gov.hmrc.http.HttpResponse -import viewmodels.returns.CategoriesByRateTypeHelper -import views.html.returns.HowMuchDoYouNeedToDeclareView +import viewmodels.declareDuty.CategoriesByRateTypeHelper +import views.html.declareDuty.HowMuchDoYouNeedToDeclareView import scala.concurrent.Future diff --git a/test/controllers/returns/MultipleSPRListControllerSpec.scala b/test/controllers/declareDuty/MultipleSPRListControllerSpec.scala similarity index 95% rename from test/controllers/returns/MultipleSPRListControllerSpec.scala rename to test/controllers/declareDuty/MultipleSPRListControllerSpec.scala index 8effa4b2..ae8f0dd2 100644 --- a/test/controllers/returns/MultipleSPRListControllerSpec.scala +++ b/test/controllers/declareDuty/MultipleSPRListControllerSpec.scala @@ -14,20 +14,20 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase -import forms.returns.MultipleSPRListFormProvider +import forms.declareDuty.MultipleSPRListFormProvider import navigation.{FakeReturnsNavigator, ReturnsNavigator} import org.mockito.ArgumentMatchers.any -import pages.returns.{DoYouWantToAddMultipleSPRToListPage, MultipleSPRListPage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{DoYouWantToAddMultipleSPRToListPage, MultipleSPRListPage, WhatDoYouNeedToDeclarePage} import play.api.inject.bind import play.api.mvc.Call import play.api.test.Helpers._ import connectors.CacheConnector import uk.gov.hmrc.http.HttpResponse -import viewmodels.returns.MultipleSPRListHelper -import views.html.returns.MultipleSPRListView +import viewmodels.declareDuty.MultipleSPRListHelper +import views.html.declareDuty.MultipleSPRListView import scala.concurrent.Future @@ -51,7 +51,7 @@ class MultipleSPRListControllerSpec extends SpecBase { .success .value - lazy val multipleSPRListRoute = controllers.returns.routes.MultipleSPRListController.onPageLoad(regime).url + lazy val multipleSPRListRoute = controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime).url "MultipleSPRList Controller" - { diff --git a/test/controllers/returns/TellUsAboutMultipleSPRRateControllerSpec.scala b/test/controllers/declareDuty/TellUsAboutMultipleSPRRateControllerSpec.scala similarity index 97% rename from test/controllers/returns/TellUsAboutMultipleSPRRateControllerSpec.scala rename to test/controllers/declareDuty/TellUsAboutMultipleSPRRateControllerSpec.scala index b2f48d76..a2665a2b 100644 --- a/test/controllers/returns/TellUsAboutMultipleSPRRateControllerSpec.scala +++ b/test/controllers/declareDuty/TellUsAboutMultipleSPRRateControllerSpec.scala @@ -14,22 +14,22 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase -import forms.returns.TellUsAboutMultipleSPRRateFormProvider +import forms.declareDuty.TellUsAboutMultipleSPRRateFormProvider import models.{CheckMode, NormalMode} import navigation.{FakeReturnsNavigator, ReturnsNavigator} import org.mockito.ArgumentMatchers.any -import pages.returns.{MultipleSPRListPage, TellUsAboutMultipleSPRRatePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{MultipleSPRListPage, TellUsAboutMultipleSPRRatePage, WhatDoYouNeedToDeclarePage} import play.api.inject.bind import play.api.mvc.Call import play.api.test.Helpers._ import connectors.CacheConnector -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import uk.gov.hmrc.http.HttpResponse -import viewmodels.returns.TellUsAboutMultipleSPRRateHelper -import views.html.returns.TellUsAboutMultipleSPRRateView +import viewmodels.declareDuty.TellUsAboutMultipleSPRRateHelper +import views.html.declareDuty.TellUsAboutMultipleSPRRateView import scala.concurrent.Future diff --git a/test/controllers/returns/TellUsAboutSingleSPRRateControllerSpec.scala b/test/controllers/declareDuty/TellUsAboutSingleSPRRateControllerSpec.scala similarity index 95% rename from test/controllers/returns/TellUsAboutSingleSPRRateControllerSpec.scala rename to test/controllers/declareDuty/TellUsAboutSingleSPRRateControllerSpec.scala index f990b181..8c03797b 100644 --- a/test/controllers/returns/TellUsAboutSingleSPRRateControllerSpec.scala +++ b/test/controllers/declareDuty/TellUsAboutSingleSPRRateControllerSpec.scala @@ -14,22 +14,22 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase -import forms.returns.TellUsAboutSingleSPRRateFormProvider +import forms.declareDuty.TellUsAboutSingleSPRRateFormProvider import models.{AlcoholRegime, NormalMode, RateBand} import navigation.{FakeReturnsNavigator, ReturnsNavigator} import org.mockito.ArgumentMatchers.any -import pages.returns.{TellUsAboutSingleSPRRatePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{TellUsAboutSingleSPRRatePage, WhatDoYouNeedToDeclarePage} import play.api.inject.bind import play.api.mvc.Call import play.api.test.Helpers._ import connectors.CacheConnector -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import uk.gov.hmrc.http.HttpResponse -import viewmodels.returns.CategoriesByRateTypeHelper -import views.html.returns.TellUsAboutSingleSPRRateView +import viewmodels.declareDuty.CategoriesByRateTypeHelper +import views.html.declareDuty.TellUsAboutSingleSPRRateView import scala.concurrent.Future diff --git a/test/controllers/returns/WhatDoYouNeedToDeclareControllerSpec.scala b/test/controllers/declareDuty/WhatDoYouNeedToDeclareControllerSpec.scala similarity index 97% rename from test/controllers/returns/WhatDoYouNeedToDeclareControllerSpec.scala rename to test/controllers/declareDuty/WhatDoYouNeedToDeclareControllerSpec.scala index 04efc0fd..faac7185 100644 --- a/test/controllers/returns/WhatDoYouNeedToDeclareControllerSpec.scala +++ b/test/controllers/declareDuty/WhatDoYouNeedToDeclareControllerSpec.scala @@ -14,21 +14,21 @@ * limitations under the License. */ -package controllers.returns +package controllers.declareDuty import base.SpecBase -import forms.returns.WhatDoYouNeedToDeclareFormProvider +import forms.declareDuty.WhatDoYouNeedToDeclareFormProvider import models.{CheckMode, NormalMode} import navigation.{FakeReturnsNavigator, ReturnsNavigator} import org.mockito.ArgumentMatchers.any -import pages.returns.{AlcoholTypePage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{AlcoholTypePage, WhatDoYouNeedToDeclarePage} import play.api.inject.bind import play.api.mvc.Call import play.api.test.Helpers._ import connectors.{AlcoholDutyCalculatorConnector, CacheConnector} import uk.gov.hmrc.http.HttpResponse -import viewmodels.returns.TaxBandsViewModel -import views.html.returns.WhatDoYouNeedToDeclareView +import viewmodels.declareDuty.TaxBandsViewModel +import views.html.declareDuty.WhatDoYouNeedToDeclareView import scala.concurrent.Future diff --git a/test/controllers/StartDirectDebitControllerSpec.scala b/test/controllers/payments/StartDirectDebitControllerSpec.scala similarity index 90% rename from test/controllers/StartDirectDebitControllerSpec.scala rename to test/controllers/payments/StartDirectDebitControllerSpec.scala index 52bc15e3..76913de3 100644 --- a/test/controllers/StartDirectDebitControllerSpec.scala +++ b/test/controllers/payments/StartDirectDebitControllerSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package controllers +package controllers.payments import base.SpecBase import cats.data.EitherT @@ -43,7 +43,7 @@ class StartDirectDebitControllerSpec extends SpecBase { running(application) { val request = - FakeRequest(GET, controllers.routes.StartDirectDebitController.initiateAndRedirect().url) + FakeRequest(GET, controllers.payments.routes.StartDirectDebitController.initiateAndRedirect().url) val result = route(application, request).value @@ -65,7 +65,7 @@ class StartDirectDebitControllerSpec extends SpecBase { running(application) { val request = - FakeRequest(GET, controllers.routes.StartDirectDebitController.initiateAndRedirect().url) + FakeRequest(GET, controllers.payments.routes.StartDirectDebitController.initiateAndRedirect().url) val result = route(application, request).value diff --git a/test/controllers/StartPaymentControllerSpec.scala b/test/controllers/payments/StartPaymentControllerSpec.scala similarity index 88% rename from test/controllers/StartPaymentControllerSpec.scala rename to test/controllers/payments/StartPaymentControllerSpec.scala index 862a0522..52dde88e 100644 --- a/test/controllers/StartPaymentControllerSpec.scala +++ b/test/controllers/payments/StartPaymentControllerSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package controllers +package controllers.payments import base.SpecBase import cats.data.EitherT @@ -30,8 +30,8 @@ import org.mockito.ArgumentMatchersSugar.eqTo import play.api.http.Status.SEE_OTHER import play.api.inject.bind import play.api.libs.json.Json -import services.AuditService import play.api.test.Helpers._ +import services.AuditService import java.time.{Clock, Instant, LocalDate} @@ -82,7 +82,7 @@ class StartPaymentControllerSpec extends SpecBase { running(application) { val request = - FakeRequest(GET, controllers.routes.StartPaymentController.initiateAndRedirect().url).withSession( + FakeRequest(GET, controllers.payments.routes.StartPaymentController.initiateAndRedirect().url).withSession( adrReturnCreatedDetails -> Json.toJson(returnDetails).toString() ) @@ -107,7 +107,7 @@ class StartPaymentControllerSpec extends SpecBase { running(application) { val request = - FakeRequest(GET, controllers.routes.StartPaymentController.initiateAndRedirect().url) + FakeRequest(GET, controllers.payments.routes.StartPaymentController.initiateAndRedirect().url) .withSession(adrReturnCreatedDetails -> Json.toJson(returnDetails).toString()) val result = route(application, request).value @@ -130,7 +130,7 @@ class StartPaymentControllerSpec extends SpecBase { running(application) { val request = - FakeRequest(GET, controllers.routes.StartPaymentController.initiateAndRedirect().url) + FakeRequest(GET, controllers.payments.routes.StartPaymentController.initiateAndRedirect().url) val result = route(application, request).value @@ -160,7 +160,10 @@ class StartPaymentControllerSpec extends SpecBase { running(application) { val request = - FakeRequest(GET, controllers.routes.StartPaymentController.initiateAndRedirectFromPastPayments(0).url) + FakeRequest( + GET, + controllers.payments.routes.StartPaymentController.initiateAndRedirectFromPastPayments(0).url + ) .withSession( pastPaymentsSessionKey -> Json.toJson(Seq(outstandingPayment)).toString() ) @@ -186,7 +189,10 @@ class StartPaymentControllerSpec extends SpecBase { running(application) { val request = - FakeRequest(GET, controllers.routes.StartPaymentController.initiateAndRedirectFromPastPayments(0).url) + FakeRequest( + GET, + controllers.payments.routes.StartPaymentController.initiateAndRedirectFromPastPayments(0).url + ) .withSession(pastPaymentsSessionKey -> Json.toJson(Seq(outstandingPayment)).toString()) val result = route(application, request).value @@ -205,7 +211,10 @@ class StartPaymentControllerSpec extends SpecBase { running(application) { val request = - FakeRequest(GET, controllers.routes.StartPaymentController.initiateAndRedirectFromPastPayments(3).url) + FakeRequest( + GET, + controllers.payments.routes.StartPaymentController.initiateAndRedirectFromPastPayments(3).url + ) .withSession( pastPaymentsSessionKey -> Json.toJson(Seq(outstandingPayment)).toString() ) @@ -226,7 +235,10 @@ class StartPaymentControllerSpec extends SpecBase { running(application) { val request = - FakeRequest(GET, controllers.routes.StartPaymentController.initiateAndRedirectFromPastPayments(0).url) + FakeRequest( + GET, + controllers.payments.routes.StartPaymentController.initiateAndRedirectFromPastPayments(0).url + ) .withSession( pastPaymentsSessionKey -> Json.toJson("malformed JSON").toString() ) diff --git a/test/controllers/returns/ViewPastPaymentsControllerSpec.scala b/test/controllers/payments/ViewPastPaymentsControllerSpec.scala similarity index 90% rename from test/controllers/returns/ViewPastPaymentsControllerSpec.scala rename to test/controllers/payments/ViewPastPaymentsControllerSpec.scala index db8f57a4..8708ff02 100644 --- a/test/controllers/returns/ViewPastPaymentsControllerSpec.scala +++ b/test/controllers/payments/ViewPastPaymentsControllerSpec.scala @@ -14,16 +14,15 @@ * limitations under the License. */ -package controllers.returns +package controllers.payments import base.SpecBase import connectors.AlcoholDutyAccountConnector -import controllers.returns import org.mockito.ArgumentMatchers.any import play.api.inject.bind import play.api.test.Helpers._ -import viewmodels.returns.ViewPastPaymentsViewModel -import views.html.returns.ViewPastPaymentsView +import viewmodels.payments.ViewPastPaymentsViewModel +import views.html.payments.ViewPastPaymentsView import java.time.LocalDate import scala.concurrent.Future @@ -44,7 +43,7 @@ class ViewPastPaymentsControllerSpec extends SpecBase { .overrides(bind[AlcoholDutyAccountConnector].toInstance(mockAlcoholDutyAccountsConnector)) .build() running(application) { - val request = FakeRequest(GET, returns.routes.ViewPastPaymentsController.onPageLoad.url) + val request = FakeRequest(GET, controllers.payments.routes.ViewPastPaymentsController.onPageLoad.url) val result = route(application, request).value val view = application.injector.instanceOf[ViewPastPaymentsView] @@ -77,7 +76,7 @@ class ViewPastPaymentsControllerSpec extends SpecBase { when(mockAlcoholDutyAccountsConnector.outstandingPayments(any())(any())) thenReturn Future.failed( new Exception("test Exception") ) - val request = FakeRequest(GET, returns.routes.ViewPastPaymentsController.onPageLoad.url) + val request = FakeRequest(GET, controllers.payments.routes.ViewPastPaymentsController.onPageLoad.url) val result = route(application, request).value diff --git a/test/controllers/returns/ViewPastReturnsControllerSpec.scala b/test/controllers/returns/ViewPastReturnsControllerSpec.scala index 426853fd..f452bf64 100644 --- a/test/controllers/returns/ViewPastReturnsControllerSpec.scala +++ b/test/controllers/returns/ViewPastReturnsControllerSpec.scala @@ -18,7 +18,6 @@ package controllers.returns import base.SpecBase import connectors.AlcoholDutyReturnsConnector -import controllers.returns import org.mockito.ArgumentMatchers.any import play.api.inject.bind import play.api.test.Helpers._ @@ -39,7 +38,7 @@ class ViewPastReturnsControllerSpec extends SpecBase { .overrides(bind[AlcoholDutyReturnsConnector].toInstance(mockAlcoholDutyReturnsConnector)) .build() running(application) { - val request = FakeRequest(GET, returns.routes.ViewPastReturnsController.onPageLoad.url) + val request = FakeRequest(GET, controllers.returns.routes.ViewPastReturnsController.onPageLoad.url) val result = route(application, request).value val view = application.injector.instanceOf[ViewPastReturnsView] @@ -63,7 +62,7 @@ class ViewPastReturnsControllerSpec extends SpecBase { when(mockAlcoholDutyReturnsConnector.obligationDetails(any())(any())) thenReturn Future.failed( new Exception("test Exception") ) - val request = FakeRequest(GET, returns.routes.ViewPastReturnsController.onPageLoad.url) + val request = FakeRequest(GET, controllers.returns.routes.ViewPastReturnsController.onPageLoad.url) val result = route(application, request).value diff --git a/test/controllers/returns/ViewReturnControllerSpec.scala b/test/controllers/returns/ViewReturnControllerSpec.scala index 3167c6e6..6e5bd856 100644 --- a/test/controllers/returns/ViewReturnControllerSpec.scala +++ b/test/controllers/returns/ViewReturnControllerSpec.scala @@ -18,7 +18,6 @@ package controllers.returns import base.SpecBase import connectors.AlcoholDutyReturnsConnector -import controllers.returns import org.mockito.ArgumentMatchers.any import org.mockito.ArgumentMatchersSugar.eqTo import play.api.inject.bind @@ -48,7 +47,7 @@ class ViewReturnControllerSpec extends SpecBase { when(mockViewModel.createAdjustmentsViewModel(returnDetails)).thenReturn(tableModel) when(mockViewModel.createTotalDueViewModel(returnDetails)).thenReturn(totalTableModel) - val request = FakeRequest(GET, returns.routes.ViewReturnController.onPageLoad(periodKey).url) + val request = FakeRequest(GET, controllers.returns.routes.ViewReturnController.onPageLoad(periodKey).url) val result = route(application, request).value val view = application.injector.instanceOf[ViewReturnView] @@ -76,7 +75,7 @@ class ViewReturnControllerSpec extends SpecBase { .overrides(bind[AlcoholDutyReturnsConnector].toInstance(mockReturnsConnector)) .build() running(application) { - val request = FakeRequest(GET, returns.routes.ViewReturnController.onPageLoad(periodKey).url) + val request = FakeRequest(GET, controllers.returns.routes.ViewReturnController.onPageLoad(periodKey).url) val result = route(application, request).value status(result) mustEqual SEE_OTHER @@ -92,7 +91,7 @@ class ViewReturnControllerSpec extends SpecBase { .overrides(bind[AlcoholDutyReturnsConnector].toInstance(mockReturnsConnector)) .build() running(application) { - val request = FakeRequest(GET, returns.routes.ViewReturnController.onPageLoad(periodKey).url) + val request = FakeRequest(GET, controllers.returns.routes.ViewReturnController.onPageLoad(periodKey).url) val result = route(application, request).value status(result) mustEqual SEE_OTHER diff --git a/test/forms/returns/AlcoholTypeFormProviderSpec.scala b/test/forms/declareDuty/AlcoholTypeFormProviderSpec.scala similarity index 97% rename from test/forms/returns/AlcoholTypeFormProviderSpec.scala rename to test/forms/declareDuty/AlcoholTypeFormProviderSpec.scala index 29c0aec2..87b1c3bb 100644 --- a/test/forms/returns/AlcoholTypeFormProviderSpec.scala +++ b/test/forms/declareDuty/AlcoholTypeFormProviderSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import forms.behaviours.CheckboxFieldBehaviours diff --git a/test/forms/returns/DeleteMultipleSPREntryFormProviderSpec.scala b/test/forms/declareDuty/DeleteMultipleSPREntryFormProviderSpec.scala similarity index 97% rename from test/forms/returns/DeleteMultipleSPREntryFormProviderSpec.scala rename to test/forms/declareDuty/DeleteMultipleSPREntryFormProviderSpec.scala index d909d38d..ff7811d1 100644 --- a/test/forms/returns/DeleteMultipleSPREntryFormProviderSpec.scala +++ b/test/forms/declareDuty/DeleteMultipleSPREntryFormProviderSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import forms.behaviours.BooleanFieldBehaviours import play.api.data.FormError diff --git a/test/forms/returns/DoYouHaveMultipleSPRDutyRatesFormProviderSpec.scala b/test/forms/declareDuty/DoYouHaveMultipleSPRDutyRatesFormProviderSpec.scala similarity index 97% rename from test/forms/returns/DoYouHaveMultipleSPRDutyRatesFormProviderSpec.scala rename to test/forms/declareDuty/DoYouHaveMultipleSPRDutyRatesFormProviderSpec.scala index 6ea93604..70cb3230 100644 --- a/test/forms/returns/DoYouHaveMultipleSPRDutyRatesFormProviderSpec.scala +++ b/test/forms/declareDuty/DoYouHaveMultipleSPRDutyRatesFormProviderSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import forms.behaviours.BooleanFieldBehaviours import play.api.data.FormError diff --git a/test/forms/returns/HowMuchDoYouNeedToDeclareFormProviderSpec.scala b/test/forms/declareDuty/HowMuchDoYouNeedToDeclareFormProviderSpec.scala similarity index 98% rename from test/forms/returns/HowMuchDoYouNeedToDeclareFormProviderSpec.scala rename to test/forms/declareDuty/HowMuchDoYouNeedToDeclareFormProviderSpec.scala index c1bb2db9..d575cfcb 100644 --- a/test/forms/returns/HowMuchDoYouNeedToDeclareFormProviderSpec.scala +++ b/test/forms/declareDuty/HowMuchDoYouNeedToDeclareFormProviderSpec.scala @@ -14,12 +14,12 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import base.SpecBase import forms.behaviours.StringFieldBehaviours import generators.ModelGenerators -import models.returns.VolumesByTaxType +import models.declareDuty.VolumesByTaxType import play.api.data.FormError import play.api.i18n.Messages diff --git a/test/forms/returns/MultipleSPRListFormProviderSpec.scala b/test/forms/declareDuty/MultipleSPRListFormProviderSpec.scala similarity index 97% rename from test/forms/returns/MultipleSPRListFormProviderSpec.scala rename to test/forms/declareDuty/MultipleSPRListFormProviderSpec.scala index 67c53ee5..cd9e2678 100644 --- a/test/forms/returns/MultipleSPRListFormProviderSpec.scala +++ b/test/forms/declareDuty/MultipleSPRListFormProviderSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import forms.behaviours.BooleanFieldBehaviours import play.api.data.FormError diff --git a/test/forms/returns/TellUsAboutMultipleSPRRateFormProviderSpec.scala b/test/forms/declareDuty/TellUsAboutMultipleSPRRateFormProviderSpec.scala similarity index 98% rename from test/forms/returns/TellUsAboutMultipleSPRRateFormProviderSpec.scala rename to test/forms/declareDuty/TellUsAboutMultipleSPRRateFormProviderSpec.scala index 00d83667..d2b301cb 100644 --- a/test/forms/returns/TellUsAboutMultipleSPRRateFormProviderSpec.scala +++ b/test/forms/declareDuty/TellUsAboutMultipleSPRRateFormProviderSpec.scala @@ -14,12 +14,12 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import base.SpecBase import forms.behaviours.StringFieldBehaviours import generators.ModelGenerators -import models.returns.VolumeAndRateByTaxType +import models.declareDuty.VolumeAndRateByTaxType import play.api.data.FormError import play.api.i18n.Messages diff --git a/test/forms/returns/TellUsAboutSingleSPRRateFormProviderSpec.scala b/test/forms/declareDuty/TellUsAboutSingleSPRRateFormProviderSpec.scala similarity index 99% rename from test/forms/returns/TellUsAboutSingleSPRRateFormProviderSpec.scala rename to test/forms/declareDuty/TellUsAboutSingleSPRRateFormProviderSpec.scala index 5cb0755a..d459b81f 100644 --- a/test/forms/returns/TellUsAboutSingleSPRRateFormProviderSpec.scala +++ b/test/forms/declareDuty/TellUsAboutSingleSPRRateFormProviderSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import forms.behaviours.StringFieldBehaviours import org.mockito.MockitoSugar.mock diff --git a/test/forms/returns/WhatDoYouNeedToDeclareFormProviderSpec.scala b/test/forms/declareDuty/WhatDoYouNeedToDeclareFormProviderSpec.scala similarity index 98% rename from test/forms/returns/WhatDoYouNeedToDeclareFormProviderSpec.scala rename to test/forms/declareDuty/WhatDoYouNeedToDeclareFormProviderSpec.scala index 9386a562..79f010a5 100644 --- a/test/forms/returns/WhatDoYouNeedToDeclareFormProviderSpec.scala +++ b/test/forms/declareDuty/WhatDoYouNeedToDeclareFormProviderSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package forms.returns +package forms.declareDuty import forms.behaviours.CheckboxFieldBehaviours import generators.ModelGenerators diff --git a/test/forms/mappings/MappingsSpec.scala b/test/forms/mappings/MappingsSpec.scala index cf2b0e65..4a3c2193 100644 --- a/test/forms/mappings/MappingsSpec.scala +++ b/test/forms/mappings/MappingsSpec.scala @@ -20,7 +20,7 @@ import base.SpecBase import play.api.data.{Form, FormError} import models.Enumerable import models.adjustment.{AdjustmentVolume, AdjustmentVolumeWithSPR} -import models.returns.{VolumeAndRateByTaxType, VolumesByTaxType} +import models.declareDuty.{VolumeAndRateByTaxType, VolumesByTaxType} import java.time.YearMonth diff --git a/test/models/returns/AdrReturnSubmissionSpec.scala b/test/models/declareDuty/AdrReturnSubmissionSpec.scala similarity index 92% rename from test/models/returns/AdrReturnSubmissionSpec.scala rename to test/models/declareDuty/AdrReturnSubmissionSpec.scala index d33491e6..3a5eb92a 100644 --- a/test/models/returns/AdrReturnSubmissionSpec.scala +++ b/test/models/declareDuty/AdrReturnSubmissionSpec.scala @@ -14,10 +14,11 @@ * limitations under the License. */ -package models.returns +package models.declareDuty import base.SpecBase import models.UnitsOfMeasure +import models.checkAndSubmit.AdrUnitOfMeasure class AdrReturnSubmissionSpec extends SpecBase { "AdrUnitOfMeasure" - { diff --git a/test/models/returns/ReturnAdjustmentsRowSpec.scala b/test/models/declareDuty/ReturnAdjustmentsRowSpec.scala similarity index 97% rename from test/models/returns/ReturnAdjustmentsRowSpec.scala rename to test/models/declareDuty/ReturnAdjustmentsRowSpec.scala index f8b24a18..97fed628 100644 --- a/test/models/returns/ReturnAdjustmentsRowSpec.scala +++ b/test/models/declareDuty/ReturnAdjustmentsRowSpec.scala @@ -14,9 +14,10 @@ * limitations under the License. */ -package models.returns +package models.declareDuty import base.SpecBase +import models.returns.ReturnAdjustmentsRow import org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper import play.api.libs.json.{JsSuccess, Json} diff --git a/test/navigation/ReturnsNavigatorSpec.scala b/test/navigation/ReturnsNavigatorSpec.scala index 9e2def5b..e21499bb 100644 --- a/test/navigation/ReturnsNavigatorSpec.scala +++ b/test/navigation/ReturnsNavigatorSpec.scala @@ -22,7 +22,7 @@ import models.AlcoholRegime.Beer import models.{AlcoholRegimes, CheckMode, NormalMode} import models.RateType.{Core, DraughtAndSmallProducerRelief, DraughtRelief, SmallProducerRelief} import pages.Page -import pages.returns.DeclareAlcoholDutyQuestionPage +import pages.declareDuty.DeclareAlcoholDutyQuestionPage class ReturnsNavigatorSpec extends SpecBase { @@ -44,17 +44,17 @@ class ReturnsNavigatorSpec extends SpecBase { navigator.nextPage( DeclareAlcoholDutyQuestionPage, NormalMode, - emptyUserAnswers.set(pages.returns.DeclareAlcoholDutyQuestionPage, true).success.value - ) mustBe controllers.returns.routes.AlcoholTypeController.onPageLoad(NormalMode) + emptyUserAnswers.set(pages.declareDuty.DeclareAlcoholDutyQuestionPage, true).success.value + ) mustBe controllers.declareDuty.routes.AlcoholTypeController.onPageLoad(NormalMode) } "must go from the Alcohol to declare to the task list page if the user has only 1 approval" in { navigator.nextPage( - pages.returns.DeclareAlcoholDutyQuestionPage, + pages.declareDuty.DeclareAlcoholDutyQuestionPage, NormalMode, emptyUserAnswers .copy(regimes = AlcoholRegimes(Set(Beer))) - .set(pages.returns.DeclareAlcoholDutyQuestionPage, true) + .set(pages.declareDuty.DeclareAlcoholDutyQuestionPage, true) .success .value ) mustBe routes.TaskListController.onPageLoad @@ -62,15 +62,15 @@ class ReturnsNavigatorSpec extends SpecBase { "must go from the Alcohol to declare to the task list page if the answer is No" in { navigator.nextPage( - pages.returns.DeclareAlcoholDutyQuestionPage, + pages.declareDuty.DeclareAlcoholDutyQuestionPage, NormalMode, - emptyUserAnswers.set(pages.returns.DeclareAlcoholDutyQuestionPage, false).success.value + emptyUserAnswers.set(pages.declareDuty.DeclareAlcoholDutyQuestionPage, false).success.value ) mustBe routes.TaskListController.onPageLoad } "must go from the Alcohol to declare to the Journey recovery page if the answer is missing" in { navigator.nextPage( - pages.returns.DeclareAlcoholDutyQuestionPage, + pages.declareDuty.DeclareAlcoholDutyQuestionPage, NormalMode, emptyUserAnswers ) mustBe routes.JourneyRecoveryController.onPageLoad() @@ -93,14 +93,14 @@ class ReturnsNavigatorSpec extends SpecBase { val rateBandDraughtRelief = rateBands.last.copy(rateType = DraughtRelief) navigator.nextPageWithRegime( - pages.returns.WhatDoYouNeedToDeclarePage, + pages.declareDuty.WhatDoYouNeedToDeclarePage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.WhatDoYouNeedToDeclarePage, regime, Set(rateBandCore, rateBandDraughtRelief)) + .setByKey(pages.declareDuty.WhatDoYouNeedToDeclarePage, regime, Set(rateBandCore, rateBandDraughtRelief)) .success .value, regime - ) mustBe controllers.returns.routes.HowMuchDoYouNeedToDeclareController.onPageLoad(NormalMode, regime) + ) mustBe controllers.declareDuty.routes.HowMuchDoYouNeedToDeclareController.onPageLoad(NormalMode, regime) } "must go from the WhatDoYouNeedToDeclare page to the DoYouHaveMultipleSPRDutyRates page if the user selected any 'SmallProducerRelief' or 'DraughtAndSmallProducerRelief' entries" in { @@ -108,19 +108,19 @@ class ReturnsNavigatorSpec extends SpecBase { val rateBandDraughtAndSPR = rateBands.last.copy(rateType = DraughtAndSmallProducerRelief) navigator.nextPageWithRegime( - pages.returns.WhatDoYouNeedToDeclarePage, + pages.declareDuty.WhatDoYouNeedToDeclarePage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.WhatDoYouNeedToDeclarePage, regime, Set(rateBandSPR, rateBandDraughtAndSPR)) + .setByKey(pages.declareDuty.WhatDoYouNeedToDeclarePage, regime, Set(rateBandSPR, rateBandDraughtAndSPR)) .success .value, regime - ) mustBe controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) + ) mustBe controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) } "must go from the WhatDoYouNeedToDeclare page to the Task List page if the user hasn't selected any entries" in { navigator.nextPageWithRegime( - pages.returns.WhatDoYouNeedToDeclarePage, + pages.declareDuty.WhatDoYouNeedToDeclarePage, NormalMode, emptyUserAnswers, regime @@ -132,14 +132,14 @@ class ReturnsNavigatorSpec extends SpecBase { val rateBandDraughtAndSPR = rateBands.last.copy(rateType = DraughtAndSmallProducerRelief) navigator.nextPageWithRegime( - pages.returns.HowMuchDoYouNeedToDeclarePage, + pages.declareDuty.HowMuchDoYouNeedToDeclarePage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.WhatDoYouNeedToDeclarePage, regime, Set(rateBandSPR, rateBandDraughtAndSPR)) + .setByKey(pages.declareDuty.WhatDoYouNeedToDeclarePage, regime, Set(rateBandSPR, rateBandDraughtAndSPR)) .success .value, regime - ) mustBe controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) + ) mustBe controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) } "must go from the HowMuchDoYouNeedToDeclare page to the Check Your Answer page if the user did not select any 'SmallProducerRelief' or 'DraughtAndSmallProducerRelief' entries" in { @@ -147,19 +147,19 @@ class ReturnsNavigatorSpec extends SpecBase { val rateBandDraughtRelief = rateBands.last.copy(rateType = DraughtRelief) navigator.nextPageWithRegime( - pages.returns.HowMuchDoYouNeedToDeclarePage, + pages.declareDuty.HowMuchDoYouNeedToDeclarePage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.WhatDoYouNeedToDeclarePage, regime, Set(rateBandCore, rateBandDraughtRelief)) + .setByKey(pages.declareDuty.WhatDoYouNeedToDeclarePage, regime, Set(rateBandCore, rateBandDraughtRelief)) .success .value, regime - ) mustBe controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } "must go from the HowMuchDoYouNeedToDeclare page to the Task List page if the user hasn't selected any entries" in { navigator.nextPageWithRegime( - pages.returns.HowMuchDoYouNeedToDeclarePage, + pages.declareDuty.HowMuchDoYouNeedToDeclarePage, NormalMode, emptyUserAnswers, regime @@ -168,48 +168,48 @@ class ReturnsNavigatorSpec extends SpecBase { "must go from the DoYouHaveMultipleSPRDutyRates page to the TellUsAboutMultipleSPRRate page if the user selected 'Yes' and the Multiple SPR list is empty" in { navigator.nextPageWithRegime( - pages.returns.DoYouHaveMultipleSPRDutyRatesPage, + pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.DoYouHaveMultipleSPRDutyRatesPage, regime, true) + .setByKey(pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, regime, true) .success .value, regime - ) mustBe controllers.returns.routes.TellUsAboutMultipleSPRRateController.onPageLoad(NormalMode, regime) + ) mustBe controllers.declareDuty.routes.TellUsAboutMultipleSPRRateController.onPageLoad(NormalMode, regime) } "must go from the DoYouHaveMultipleSPRDutyRates page to the TellUsAboutSingleSPRRate page if the user selected 'No'" in { navigator.nextPageWithRegime( - pages.returns.DoYouHaveMultipleSPRDutyRatesPage, + pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.DoYouHaveMultipleSPRDutyRatesPage, regime, false) + .setByKey(pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, regime, false) .success .value, regime - ) mustBe controllers.returns.routes.TellUsAboutSingleSPRRateController.onPageLoad(NormalMode, regime) + ) mustBe controllers.declareDuty.routes.TellUsAboutSingleSPRRateController.onPageLoad(NormalMode, regime) } "must go from the DoYouHaveMultipleSPRDutyRates page to the MultipleSPRList page if the user selected 'Yes' and the Multiple SPR list is not empty" in { val volumeAndRateByTaxType = genVolumeAndRateByTaxTypeRateBand(rateBands.head).arbitrary.sample.value navigator.nextPageWithRegime( - pages.returns.DoYouHaveMultipleSPRDutyRatesPage, + pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.DoYouHaveMultipleSPRDutyRatesPage, regime, true) + .setByKey(pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, regime, true) .success .value - .setByKey(pages.returns.MultipleSPRListPage, regime, Seq(volumeAndRateByTaxType)) + .setByKey(pages.declareDuty.MultipleSPRListPage, regime, Seq(volumeAndRateByTaxType)) .success .value, regime - ) mustBe controllers.returns.routes.MultipleSPRListController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime) } "must go from the DoYouHaveMultipleSPRDutyRates page to the Task List page if the user hasn't selected any entries" in { navigator.nextPageWithRegime( - pages.returns.DoYouHaveMultipleSPRDutyRatesPage, + pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, NormalMode, emptyUserAnswers, regime @@ -218,72 +218,72 @@ class ReturnsNavigatorSpec extends SpecBase { "must go from the TellUsAboutMultipleSPRRate page to the CheckYourAnswersSPR page if hasAnswerChanged variable is true and an index is provided" in { navigator.nextPageWithRegime( - pages.returns.TellUsAboutMultipleSPRRatePage, + pages.declareDuty.TellUsAboutMultipleSPRRatePage, NormalMode, emptyUserAnswers, regime, hasAnswerChanged = true, index = Some(0) - ) mustBe controllers.returns.routes.CheckYourAnswersSPRController.onPageLoad(regime, index = Some(0)) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersSPRController.onPageLoad(regime, index = Some(0)) } "must go from the TellUsAboutMultipleSPRRate page to the CheckYourAnswersSPR page if no index is selected" in { navigator.nextPageWithRegime( - pages.returns.TellUsAboutMultipleSPRRatePage, + pages.declareDuty.TellUsAboutMultipleSPRRatePage, NormalMode, emptyUserAnswers, regime, index = None - ) mustBe controllers.returns.routes.CheckYourAnswersSPRController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersSPRController.onPageLoad(regime) } "must go from the TellUsAboutMultipleSPRRate page to the MultipleSPRList page if no index is provided" in { navigator.nextPageWithRegime( - pages.returns.TellUsAboutMultipleSPRRatePage, + pages.declareDuty.TellUsAboutMultipleSPRRatePage, NormalMode, emptyUserAnswers, regime, index = Some(0) - ) mustBe controllers.returns.routes.MultipleSPRListController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime) } "must go from the TellUsAboutSingleSPRRate page to the CheckYourAnswers page if no index is provided" in { navigator.nextPageWithRegime( - pages.returns.TellUsAboutSingleSPRRatePage, + pages.declareDuty.TellUsAboutSingleSPRRatePage, NormalMode, emptyUserAnswers, regime, index = Some(0) - ) mustBe controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } "must go from the DoYouWantToAddMultipleSPRToList page to the TellUsAboutMultipleSPRRate page if the user has selected 'true'" in { navigator.nextPageWithRegime( - pages.returns.DoYouWantToAddMultipleSPRToListPage, + pages.declareDuty.DoYouWantToAddMultipleSPRToListPage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.DoYouWantToAddMultipleSPRToListPage, regime, true) + .setByKey(pages.declareDuty.DoYouWantToAddMultipleSPRToListPage, regime, true) .success .value, regime - ) mustBe controllers.returns.routes.TellUsAboutMultipleSPRRateController.onPageLoad(CheckMode, regime) + ) mustBe controllers.declareDuty.routes.TellUsAboutMultipleSPRRateController.onPageLoad(CheckMode, regime) } "must go from the DoYouWantToAddMultipleSPRToList page to the CheckYourAnswers page if the user has selected 'false'" in { navigator.nextPageWithRegime( - pages.returns.DoYouWantToAddMultipleSPRToListPage, + pages.declareDuty.DoYouWantToAddMultipleSPRToListPage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.DoYouWantToAddMultipleSPRToListPage, regime, false) + .setByKey(pages.declareDuty.DoYouWantToAddMultipleSPRToListPage, regime, false) .success .value, regime - ) mustBe controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } "must go from the DoYouWantToAddMultipleSPRToList page to the TaskList page if the user hasn't selected any entries" in { navigator.nextPageWithRegime( - pages.returns.DoYouWantToAddMultipleSPRToListPage, + pages.declareDuty.DoYouWantToAddMultipleSPRToListPage, NormalMode, emptyUserAnswers, regime @@ -294,26 +294,26 @@ class ReturnsNavigatorSpec extends SpecBase { val volumeAndRateByTaxType = genVolumeAndRateByTaxTypeRateBand(rateBands.head).arbitrary.sample.value navigator.nextPageWithRegime( - pages.returns.DeleteMultipleSPREntryPage, + pages.declareDuty.DeleteMultipleSPREntryPage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.MultipleSPRListPage, regime, Seq(volumeAndRateByTaxType)) + .setByKey(pages.declareDuty.MultipleSPRListPage, regime, Seq(volumeAndRateByTaxType)) .success .value, regime - ) mustBe controllers.returns.routes.MultipleSPRListController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime) } "must go from the DeleteMultipleSPREntry page to the DoYouHaveMultipleSPRDutyRates page if the list is empty" in { navigator.nextPageWithRegime( - pages.returns.DeleteMultipleSPREntryPage, + pages.declareDuty.DeleteMultipleSPREntryPage, NormalMode, emptyUserAnswers - .setByKey(pages.returns.MultipleSPRListPage, regime, Seq.empty) + .setByKey(pages.declareDuty.MultipleSPRListPage, regime, Seq.empty) .success .value, regime - ) mustBe controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) + ) mustBe controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) } } } @@ -330,25 +330,25 @@ class ReturnsNavigatorSpec extends SpecBase { navigator.nextPage( DeclareAlcoholDutyQuestionPage, CheckMode, - emptyUserAnswers.set(pages.returns.DeclareAlcoholDutyQuestionPage, true).success.value - ) mustBe controllers.returns.routes.AlcoholTypeController.onPageLoad(CheckMode) + emptyUserAnswers.set(pages.declareDuty.DeclareAlcoholDutyQuestionPage, true).success.value + ) mustBe controllers.declareDuty.routes.AlcoholTypeController.onPageLoad(CheckMode) } "must go from the DeclareAlcoholDutyQuestion page to the Task List page when answer is No" in { navigator.nextPage( DeclareAlcoholDutyQuestionPage, CheckMode, - emptyUserAnswers.set(pages.returns.DeclareAlcoholDutyQuestionPage, false).success.value + emptyUserAnswers.set(pages.declareDuty.DeclareAlcoholDutyQuestionPage, false).success.value ) mustBe routes.TaskListController.onPageLoad } "must go from the Alcohol to declare to the task list page if the user has only 1 approval in CheckMode" in { navigator.nextPage( - pages.returns.DeclareAlcoholDutyQuestionPage, + pages.declareDuty.DeclareAlcoholDutyQuestionPage, CheckMode, emptyUserAnswers .copy(regimes = AlcoholRegimes(Set(Beer))) - .set(pages.returns.DeclareAlcoholDutyQuestionPage, true) + .set(pages.declareDuty.DeclareAlcoholDutyQuestionPage, true) .success .value ) mustBe routes.TaskListController.onPageLoad @@ -372,15 +372,15 @@ class ReturnsNavigatorSpec extends SpecBase { val rateBandDraughtRelief = rateBands.last.copy(rateType = DraughtRelief) navigator.nextPageWithRegime( - pages.returns.WhatDoYouNeedToDeclarePage, + pages.declareDuty.WhatDoYouNeedToDeclarePage, CheckMode, emptyUserAnswers - .setByKey(pages.returns.WhatDoYouNeedToDeclarePage, regime, Set(rateBandCore, rateBandDraughtRelief)) + .setByKey(pages.declareDuty.WhatDoYouNeedToDeclarePage, regime, Set(rateBandCore, rateBandDraughtRelief)) .success .value, regime, hasAnswerChanged = true - ) mustBe controllers.returns.routes.HowMuchDoYouNeedToDeclareController.onPageLoad(NormalMode, regime) + ) mustBe controllers.declareDuty.routes.HowMuchDoYouNeedToDeclareController.onPageLoad(NormalMode, regime) } "must go from the WhatDoYouNeedToDeclare page to the DoYouHaveMultipleSPRDutyRates page if the user has changed answers selected any 'SmallProducerRelief' or 'DraughtAndSmallProducerRelief' entries" in { @@ -388,88 +388,88 @@ class ReturnsNavigatorSpec extends SpecBase { val rateBandDraughtAndSPR = rateBands.last.copy(rateType = DraughtAndSmallProducerRelief) navigator.nextPageWithRegime( - pages.returns.WhatDoYouNeedToDeclarePage, + pages.declareDuty.WhatDoYouNeedToDeclarePage, CheckMode, emptyUserAnswers - .setByKey(pages.returns.WhatDoYouNeedToDeclarePage, regime, Set(rateBandSPR, rateBandDraughtAndSPR)) + .setByKey(pages.declareDuty.WhatDoYouNeedToDeclarePage, regime, Set(rateBandSPR, rateBandDraughtAndSPR)) .success .value, regime, hasAnswerChanged = true - ) mustBe controllers.returns.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) + ) mustBe controllers.declareDuty.routes.DoYouHaveMultipleSPRDutyRatesController.onPageLoad(NormalMode, regime) } "must go from the WhatDoYouNeedToDeclare page to the Check Your Answers page if the user did not change answers" in { navigator.nextPageWithRegime( - pages.returns.WhatDoYouNeedToDeclarePage, + pages.declareDuty.WhatDoYouNeedToDeclarePage, CheckMode, emptyUserAnswers, regime - ) mustBe controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } "must go from the HowMuchDoYouNeedToDeclare page to the Check Your Answers if the user has changed answers" in { navigator.nextPageWithRegime( - pages.returns.HowMuchDoYouNeedToDeclarePage, + pages.declareDuty.HowMuchDoYouNeedToDeclarePage, CheckMode, emptyUserAnswers, regime, hasAnswerChanged = true - ) mustBe controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } "must go from the HowMuchDoYouNeedToDeclare page to the Check Your Answers if the user did not change answers" in { navigator.nextPageWithRegime( - pages.returns.HowMuchDoYouNeedToDeclarePage, + pages.declareDuty.HowMuchDoYouNeedToDeclarePage, CheckMode, emptyUserAnswers, regime - ) mustBe controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } "must go from the TellUsAboutSingleSPRRate page to the Check Your Answers if the user has changed answers" in { navigator.nextPageWithRegime( - pages.returns.TellUsAboutSingleSPRRatePage, + pages.declareDuty.TellUsAboutSingleSPRRatePage, CheckMode, emptyUserAnswers, regime, hasAnswerChanged = true - ) mustBe controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } "must go from the TellUsAboutSingleSPRRate page to the Check Your Answers if the user did not change answers" in { navigator.nextPageWithRegime( - pages.returns.TellUsAboutSingleSPRRatePage, + pages.declareDuty.TellUsAboutSingleSPRRatePage, CheckMode, emptyUserAnswers, regime - ) mustBe controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } "must go from the DoYouHaveMultipleSPRDutyRates page to the TellUsAboutMultipleSPRRate page if the user has changed the answer and selected 'Yes' and the Multiple SPR list is empty" in { navigator.nextPageWithRegime( - pages.returns.DoYouHaveMultipleSPRDutyRatesPage, + pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, CheckMode, emptyUserAnswers - .setByKey(pages.returns.DoYouHaveMultipleSPRDutyRatesPage, regime, true) + .setByKey(pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, regime, true) .success .value, regime, hasAnswerChanged = true - ) mustBe controllers.returns.routes.TellUsAboutMultipleSPRRateController.onPageLoad(NormalMode, regime) + ) mustBe controllers.declareDuty.routes.TellUsAboutMultipleSPRRateController.onPageLoad(NormalMode, regime) } "must go from the DoYouHaveMultipleSPRDutyRates page to the TellUsAboutSingleSPRRate page if the user has changed the answer and selected 'No'" in { navigator.nextPageWithRegime( - pages.returns.DoYouHaveMultipleSPRDutyRatesPage, + pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, CheckMode, emptyUserAnswers - .setByKey(pages.returns.DoYouHaveMultipleSPRDutyRatesPage, regime, false) + .setByKey(pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, regime, false) .success .value, regime, hasAnswerChanged = true - ) mustBe controllers.returns.routes.TellUsAboutSingleSPRRateController.onPageLoad(NormalMode, regime) + ) mustBe controllers.declareDuty.routes.TellUsAboutSingleSPRRateController.onPageLoad(NormalMode, regime) } "must go from the DoYouHaveMultipleSPRDutyRates page to the MultipleSPRList page if the user has change answer and selected 'Yes' and the Multiple SPR list is not empty" in { @@ -477,58 +477,58 @@ class ReturnsNavigatorSpec extends SpecBase { val volumeAndRateByTaxType = genVolumeAndRateByTaxTypeRateBand(rateBands.head).arbitrary.sample.value navigator.nextPageWithRegime( - pages.returns.DoYouHaveMultipleSPRDutyRatesPage, + pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, CheckMode, emptyUserAnswers - .setByKey(pages.returns.DoYouHaveMultipleSPRDutyRatesPage, regime, true) + .setByKey(pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, regime, true) .success .value - .setByKey(pages.returns.MultipleSPRListPage, regime, Seq(volumeAndRateByTaxType)) + .setByKey(pages.declareDuty.MultipleSPRListPage, regime, Seq(volumeAndRateByTaxType)) .success .value, regime, hasAnswerChanged = true - ) mustBe controllers.returns.routes.MultipleSPRListController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime) } "must go from the DoYouHaveMultipleSPRDutyRates page to the Check Your Answers page if the user not change the answer" in { navigator.nextPageWithRegime( - pages.returns.DoYouHaveMultipleSPRDutyRatesPage, + pages.declareDuty.DoYouHaveMultipleSPRDutyRatesPage, CheckMode, emptyUserAnswers, regime - ) mustBe controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime) } "must go from the TellUsAboutMultipleSPRRate page to the CheckYourAnswersSPR page if hasAnswerChanged variable is true and an index is provided" in { navigator.nextPageWithRegime( - pages.returns.TellUsAboutMultipleSPRRatePage, + pages.declareDuty.TellUsAboutMultipleSPRRatePage, CheckMode, emptyUserAnswers, regime, hasAnswerChanged = true, index = Some(0) - ) mustBe controllers.returns.routes.CheckYourAnswersSPRController.onPageLoad(regime, index = Some(0)) + ) mustBe controllers.declareDuty.routes.CheckYourAnswersSPRController.onPageLoad(regime, index = Some(0)) } "must go from the TellUsAboutMultipleSPRRate page to the CheckYourAnswers page if no index is selected" in { navigator.nextPageWithRegime( - pages.returns.TellUsAboutMultipleSPRRatePage, + pages.declareDuty.TellUsAboutMultipleSPRRatePage, CheckMode, emptyUserAnswers, regime, index = None - ) mustBe controllers.returns.routes.MultipleSPRListController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime) } "must go from the TellUsAboutMultipleSPRRate page to the MultipleSPRList page if no index is provided" in { navigator.nextPageWithRegime( - pages.returns.TellUsAboutMultipleSPRRatePage, + pages.declareDuty.TellUsAboutMultipleSPRRatePage, CheckMode, emptyUserAnswers, regime, index = Some(0) - ) mustBe controllers.returns.routes.MultipleSPRListController.onPageLoad(regime) + ) mustBe controllers.declareDuty.routes.MultipleSPRListController.onPageLoad(regime) } } } diff --git a/test/services/checkAndSubmit/AdrReturnSubmissionServiceSpec.scala b/test/services/checkAndSubmit/AdrReturnSubmissionServiceSpec.scala index 34a74553..c4a4cc49 100644 --- a/test/services/checkAndSubmit/AdrReturnSubmissionServiceSpec.scala +++ b/test/services/checkAndSubmit/AdrReturnSubmissionServiceSpec.scala @@ -21,12 +21,12 @@ import common.TestData import config.FrontendAppConfig import connectors.AlcoholDutyCalculatorConnector import models.adjustment.AdjustmentDuty -import models.returns.{AdrAdjustments, AdrSpirits, AdrSpiritsGrainsQuantities, AdrSpiritsProduced, AdrTotals} +import models.checkAndSubmit.{AdrAdjustments, AdrSpirits, AdrSpiritsGrainsQuantities, AdrSpiritsProduced, AdrTotals} import models.spiritsQuestions.{EthyleneGasOrMolassesUsed, GrainsUsed} import org.mockito.ArgumentMatchers.any import pages.adjustment.{AdjustmentEntryListPage, DeclareAdjustmentQuestionPage} import pages.dutySuspended._ -import pages.returns.{AlcoholDutyPage, DeclareAlcoholDutyQuestionPage} +import pages.declareDuty.{AlcoholDutyPage, DeclareAlcoholDutyQuestionPage} import pages.spiritsQuestions.{DeclareQuarterlySpiritsPage, EthyleneGasOrMolassesUsedPage, GrainsUsedPage, OtherIngredientsUsedPage, OtherMaltedGrainsPage} import play.api.Application import queries.Settable diff --git a/test/viewmodels/BeforeStartReturnViewModelSpec.scala b/test/viewmodels/BeforeStartReturnViewModelSpec.scala index f87dcb95..2aefd5df 100644 --- a/test/viewmodels/BeforeStartReturnViewModelSpec.scala +++ b/test/viewmodels/BeforeStartReturnViewModelSpec.scala @@ -23,7 +23,7 @@ import play.api.inject.bind import play.api.test.Helpers.running import uk.gov.hmrc.govukfrontend.views.viewmodels.content.Text import uk.gov.hmrc.govukfrontend.views.viewmodels.warningtext.WarningText -import viewmodels.returns.ReturnPeriodViewModel.viewDateFormatter +import ReturnPeriodViewModel.viewDateFormatter import java.time.LocalDate diff --git a/test/viewmodels/returns/CategoriesByRateTypeHelperSpec.scala b/test/viewmodels/declareDuty/CategoriesByRateTypeHelperSpec.scala similarity index 99% rename from test/viewmodels/returns/CategoriesByRateTypeHelperSpec.scala rename to test/viewmodels/declareDuty/CategoriesByRateTypeHelperSpec.scala index 8d931fa3..d2447f26 100644 --- a/test/viewmodels/returns/CategoriesByRateTypeHelperSpec.scala +++ b/test/viewmodels/declareDuty/CategoriesByRateTypeHelperSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import base.SpecBase import models.RateBand diff --git a/test/viewmodels/returns/DutyCalculationHelperSpec.scala b/test/viewmodels/declareDuty/DutyCalculationHelperSpec.scala similarity index 96% rename from test/viewmodels/returns/DutyCalculationHelperSpec.scala rename to test/viewmodels/declareDuty/DutyCalculationHelperSpec.scala index 399340b2..41968a3d 100644 --- a/test/viewmodels/returns/DutyCalculationHelperSpec.scala +++ b/test/viewmodels/declareDuty/DutyCalculationHelperSpec.scala @@ -14,14 +14,14 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import base.SpecBase -import models.returns.{AlcoholDuty, DutyByTaxType} +import models.declareDuty.{AlcoholDuty, DutyByTaxType} import models.AlcoholRegime import org.scalacheck.Arbitrary.arbitrary import org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper -import pages.returns.WhatDoYouNeedToDeclarePage +import pages.declareDuty.WhatDoYouNeedToDeclarePage class DutyCalculationHelperSpec extends SpecBase { diff --git a/test/viewmodels/returns/MultipleSPRListSummarySpec.scala b/test/viewmodels/declareDuty/MultipleSPRListSummarySpec.scala similarity index 99% rename from test/viewmodels/returns/MultipleSPRListSummarySpec.scala rename to test/viewmodels/declareDuty/MultipleSPRListSummarySpec.scala index 785c98bb..a768bebc 100644 --- a/test/viewmodels/returns/MultipleSPRListSummarySpec.scala +++ b/test/viewmodels/declareDuty/MultipleSPRListSummarySpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import base.SpecBase import models.AlcoholRegime.Beer diff --git a/test/viewmodels/returns/RateBandHelperSpec.scala b/test/viewmodels/declareDuty/RateBandHelperSpec.scala similarity index 99% rename from test/viewmodels/returns/RateBandHelperSpec.scala rename to test/viewmodels/declareDuty/RateBandHelperSpec.scala index 6195443c..a3e83e61 100644 --- a/test/viewmodels/returns/RateBandHelperSpec.scala +++ b/test/viewmodels/declareDuty/RateBandHelperSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import base.SpecBase import cats.data.NonEmptySeq @@ -23,7 +23,7 @@ import models.RateType.{Core, DraughtRelief} import models.{ABVRange, AlcoholByVolume, AlcoholType, RangeDetailsByRegime, RateBand, RateType} import org.scalacheck.Gen import play.api.i18n.Messages -import viewmodels.returns.RateBandHelper +import viewmodels.declareDuty.RateBandHelper class RateBandHelperSpec extends SpecBase { val application = applicationBuilder().build() diff --git a/test/viewmodels/returns/ReturnPeriodViewModelSpec.scala b/test/viewmodels/declareDuty/ReturnPeriodViewModelSpec.scala similarity index 95% rename from test/viewmodels/returns/ReturnPeriodViewModelSpec.scala rename to test/viewmodels/declareDuty/ReturnPeriodViewModelSpec.scala index 561b034a..a50362e5 100644 --- a/test/viewmodels/returns/ReturnPeriodViewModelSpec.scala +++ b/test/viewmodels/declareDuty/ReturnPeriodViewModelSpec.scala @@ -14,11 +14,12 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import base.SpecBase import models.ReturnPeriod import org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper +import viewmodels.ReturnPeriodViewModel class ReturnPeriodViewModelSpec extends SpecBase { diff --git a/test/viewmodels/returns/SmallProducerReliefSummarySpec.scala b/test/viewmodels/declareDuty/SmallProducerReliefSummarySpec.scala similarity index 98% rename from test/viewmodels/returns/SmallProducerReliefSummarySpec.scala rename to test/viewmodels/declareDuty/SmallProducerReliefSummarySpec.scala index 6127d240..714c8742 100644 --- a/test/viewmodels/returns/SmallProducerReliefSummarySpec.scala +++ b/test/viewmodels/declareDuty/SmallProducerReliefSummarySpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import base.SpecBase import models.AlcoholRegime.Beer diff --git a/test/viewmodels/returns/TaxBandsViewModelSpec.scala b/test/viewmodels/declareDuty/TaxBandsViewModelSpec.scala similarity index 99% rename from test/viewmodels/returns/TaxBandsViewModelSpec.scala rename to test/viewmodels/declareDuty/TaxBandsViewModelSpec.scala index 140c7cf8..5035ff63 100644 --- a/test/viewmodels/returns/TaxBandsViewModelSpec.scala +++ b/test/viewmodels/declareDuty/TaxBandsViewModelSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import base.SpecBase import play.api.i18n.Messages diff --git a/test/viewmodels/returns/TellUsAboutMultipleSPRRateHelperSpec.scala b/test/viewmodels/declareDuty/TellUsAboutMultipleSPRRateHelperSpec.scala similarity index 98% rename from test/viewmodels/returns/TellUsAboutMultipleSPRRateHelperSpec.scala rename to test/viewmodels/declareDuty/TellUsAboutMultipleSPRRateHelperSpec.scala index 4107e3fb..f5511fc5 100644 --- a/test/viewmodels/returns/TellUsAboutMultipleSPRRateHelperSpec.scala +++ b/test/viewmodels/declareDuty/TellUsAboutMultipleSPRRateHelperSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import base.SpecBase import models.RateBand diff --git a/test/viewmodels/returns/TellUsAboutMultipleSPRRateSummarySpec.scala b/test/viewmodels/declareDuty/TellUsAboutMultipleSPRRateSummarySpec.scala similarity index 98% rename from test/viewmodels/returns/TellUsAboutMultipleSPRRateSummarySpec.scala rename to test/viewmodels/declareDuty/TellUsAboutMultipleSPRRateSummarySpec.scala index e87bc008..41de00c1 100644 --- a/test/viewmodels/returns/TellUsAboutMultipleSPRRateSummarySpec.scala +++ b/test/viewmodels/declareDuty/TellUsAboutMultipleSPRRateSummarySpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import base.SpecBase import models.AlcoholRegime.Beer diff --git a/test/viewmodels/returns/TellUsAboutSingleSPRRateSummarySpec.scala b/test/viewmodels/declareDuty/TellUsAboutSingleSPRRateSummarySpec.scala similarity index 99% rename from test/viewmodels/returns/TellUsAboutSingleSPRRateSummarySpec.scala rename to test/viewmodels/declareDuty/TellUsAboutSingleSPRRateSummarySpec.scala index bc8cc95a..2eff9d57 100644 --- a/test/viewmodels/returns/TellUsAboutSingleSPRRateSummarySpec.scala +++ b/test/viewmodels/declareDuty/TellUsAboutSingleSPRRateSummarySpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.declareDuty import base.SpecBase import models.AlcoholRegime.Beer diff --git a/test/viewmodels/returns/ViewPastPaymentsViewModelSpec.scala b/test/viewmodels/payments/ViewPastPaymentsViewModelSpec.scala similarity index 97% rename from test/viewmodels/returns/ViewPastPaymentsViewModelSpec.scala rename to test/viewmodels/payments/ViewPastPaymentsViewModelSpec.scala index e53ae660..f31be469 100644 --- a/test/viewmodels/returns/ViewPastPaymentsViewModelSpec.scala +++ b/test/viewmodels/payments/ViewPastPaymentsViewModelSpec.scala @@ -14,7 +14,7 @@ * limitations under the License. */ -package viewmodels.returns +package viewmodels.payments import base.SpecBase import org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper @@ -24,7 +24,6 @@ import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.html.components.GovukTag import uk.gov.hmrc.govukfrontend.views.viewmodels.content.Text import uk.gov.hmrc.govukfrontend.views.viewmodels.tag.Tag -import viewmodels.returns.ViewPastPaymentsViewModel import java.time.LocalDate @@ -127,7 +126,8 @@ class ViewPastPaymentsViewModelSpec extends SpecBase with ScalaCheckPropertyChec "must have the correct pay now action link for Due/Overdue return" in { val table = viewPastPaymentsViewModel.getOutstandingPaymentsTable(Seq(outstandingDuePayment)) table.rows.map { case row => - row.actions.head.href shouldBe controllers.routes.StartPaymentController.initiateAndRedirectFromPastPayments(0) + row.actions.head.href shouldBe controllers.payments.routes.StartPaymentController + .initiateAndRedirectFromPastPayments(0) } } diff --git a/test/viewmodels/returns/ViewPastReturnsHelperSpec.scala b/test/viewmodels/returns/ViewPastReturnsHelperSpec.scala index 6e33a870..dc9509dc 100644 --- a/test/viewmodels/returns/ViewPastReturnsHelperSpec.scala +++ b/test/viewmodels/returns/ViewPastReturnsHelperSpec.scala @@ -23,7 +23,6 @@ import play.api.Application import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.Aliases.Text import uk.gov.hmrc.govukfrontend.views.html.components.{GovukTag, Tag} -import viewmodels.returns.ViewPastReturnsHelper import java.time.LocalDate diff --git a/test/viewmodels/returns/ViewReturnViewModelSpec.scala b/test/viewmodels/returns/ViewReturnViewModelSpec.scala index cb660a58..b99dcdee 100644 --- a/test/viewmodels/returns/ViewReturnViewModelSpec.scala +++ b/test/viewmodels/returns/ViewReturnViewModelSpec.scala @@ -22,7 +22,6 @@ import org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper import play.api.Application import play.api.i18n.Messages import uk.gov.hmrc.govukfrontend.views.Aliases.Text -import viewmodels.returns.ViewReturnViewModel import java.time.Instant diff --git a/test/viewmodels/tasklist/AlcoholDutyTaskListHelperSpec.scala b/test/viewmodels/tasklist/AlcoholDutyTaskListHelperSpec.scala index 5e81961c..83d93fb5 100644 --- a/test/viewmodels/tasklist/AlcoholDutyTaskListHelperSpec.scala +++ b/test/viewmodels/tasklist/AlcoholDutyTaskListHelperSpec.scala @@ -23,7 +23,7 @@ import models.ReturnPeriod import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks import pages.adjustment.DeclareAdjustmentQuestionPage import pages.dutySuspended.DeclareDutySuspendedDeliveriesQuestionPage -import pages.returns.DeclareAlcoholDutyQuestionPage +import pages.declareDuty.DeclareAlcoholDutyQuestionPage import pages.spiritsQuestions.DeclareQuarterlySpiritsPage import play.api.Application import play.api.i18n.Messages diff --git a/test/viewmodels/tasklist/ReturnTaskListCreatorSpec.scala b/test/viewmodels/tasklist/ReturnTaskListCreatorSpec.scala index cf97781c..6b18374e 100644 --- a/test/viewmodels/tasklist/ReturnTaskListCreatorSpec.scala +++ b/test/viewmodels/tasklist/ReturnTaskListCreatorSpec.scala @@ -20,12 +20,12 @@ import base.SpecBase import models.AlcoholRegime._ import models.adjustment.AdjustmentEntry import models.adjustment.AdjustmentType.Underdeclaration -import models.returns.{AlcoholDuty, DutyByTaxType} +import models.declareDuty.{AlcoholDuty, DutyByTaxType} import models.{AlcoholRegime, AlcoholRegimes, CheckMode, NormalMode, UserAnswers} import org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper import pages.adjustment.{AdjustmentEntryListPage, AdjustmentListPage, CurrentAdjustmentEntryPage, DeclareAdjustmentQuestionPage, OverDeclarationReasonPage, OverDeclarationTotalPage, UnderDeclarationReasonPage, UnderDeclarationTotalPage} import pages.dutySuspended._ -import pages.returns.{AlcoholDutyPage, AlcoholTypePage, DeclareAlcoholDutyQuestionPage, WhatDoYouNeedToDeclarePage} +import pages.declareDuty.{AlcoholDutyPage, AlcoholTypePage, DeclareAlcoholDutyQuestionPage, WhatDoYouNeedToDeclarePage} import pages.spiritsQuestions._ import play.api.Application import play.api.i18n.Messages @@ -51,7 +51,7 @@ class ReturnTaskListCreatorSpec extends SpecBase { ) result.taskList.items.head.status shouldBe AlcholDutyTaskListItemStatus.notStarted result.taskList.items.head.href shouldBe Some( - controllers.returns.routes.DeclareAlcoholDutyQuestionController.onPageLoad(NormalMode).url + controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController.onPageLoad(NormalMode).url ) } @@ -70,7 +70,7 @@ class ReturnTaskListCreatorSpec extends SpecBase { ) result.taskList.items.head.status shouldBe AlcholDutyTaskListItemStatus.completed result.taskList.items.head.href shouldBe Some( - controllers.returns.routes.DeclareAlcoholDutyQuestionController.onPageLoad(CheckMode).url + controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController.onPageLoad(CheckMode).url ) } @@ -90,7 +90,7 @@ class ReturnTaskListCreatorSpec extends SpecBase { ) result.taskList.items.head.status shouldBe AlcholDutyTaskListItemStatus.inProgress result.taskList.items.head.href shouldBe Some( - controllers.returns.routes.DeclareAlcoholDutyQuestionController.onPageLoad(CheckMode).url + controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController.onPageLoad(CheckMode).url ) } @@ -115,7 +115,7 @@ class ReturnTaskListCreatorSpec extends SpecBase { ) result.taskList.items.head.status shouldBe AlcholDutyTaskListItemStatus.completed result.taskList.items.head.href shouldBe Some( - controllers.returns.routes.DeclareAlcoholDutyQuestionController.onPageLoad(CheckMode).url + controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController.onPageLoad(CheckMode).url ) AlcoholRegime.values.foreach(regime => @@ -124,7 +124,7 @@ class ReturnTaskListCreatorSpec extends SpecBase { case Some(task) => task.status shouldBe AlcholDutyTaskListItemStatus.notStarted task.href shouldBe Some( - controllers.returns.routes.WhatDoYouNeedToDeclareController.onPageLoad(NormalMode, regime).url + controllers.declareDuty.routes.WhatDoYouNeedToDeclareController.onPageLoad(NormalMode, regime).url ) case None => fail(s"Task for regime $regime not found") } @@ -173,7 +173,7 @@ class ReturnTaskListCreatorSpec extends SpecBase { ) result.taskList.items.head.status shouldBe AlcholDutyTaskListItemStatus.completed result.taskList.items.head.href shouldBe Some( - controllers.returns.routes.DeclareAlcoholDutyQuestionController.onPageLoad(CheckMode).url + controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController.onPageLoad(CheckMode).url ) result.taskList.items @@ -181,7 +181,7 @@ class ReturnTaskListCreatorSpec extends SpecBase { case Some(task) => task.status shouldBe AlcholDutyTaskListItemStatus.completed task.href shouldBe Some( - controllers.returns.routes.CheckYourAnswersController.onPageLoad(regime).url + controllers.declareDuty.routes.CheckYourAnswersController.onPageLoad(regime).url ) case None => fail(s"Task for regime $regime not found") } @@ -212,7 +212,7 @@ class ReturnTaskListCreatorSpec extends SpecBase { ) result.taskList.items.head.status shouldBe AlcholDutyTaskListItemStatus.completed result.taskList.items.head.href shouldBe Some( - controllers.returns.routes.DeclareAlcoholDutyQuestionController.onPageLoad(CheckMode).url + controllers.declareDuty.routes.DeclareAlcoholDutyQuestionController.onPageLoad(CheckMode).url ) result.taskList.items @@ -220,7 +220,7 @@ class ReturnTaskListCreatorSpec extends SpecBase { case Some(task) => task.status shouldBe AlcholDutyTaskListItemStatus.inProgress task.href shouldBe Some( - controllers.returns.routes.WhatDoYouNeedToDeclareController.onPageLoad(NormalMode, regime).url + controllers.declareDuty.routes.WhatDoYouNeedToDeclareController.onPageLoad(NormalMode, regime).url ) case None => fail(s"Task for regime $regime not found") }