Skip to content

Commit

Permalink
Move Return reqs. pages into setup folder (#1429)
Browse files Browse the repository at this point in the history
DEFRA/water-abstraction-team#126

We are on the cusp of our work to migrate the management of return versions (requirements) from NALD to WRLS going 'live'.

This is a significant feature that has seen many iterations since we started. So, before it gets used in earnest, we want to ensure it is 'ship shape and Bristol fashion'!

A crucial part of the tidy-up is moving all modules related to setting up a return version into a `/setup` subfolder, using the same pattern we used for setting up a bill run. We also move the routes to `/return-requirements/setup/{sessionId`.

This helps us distinguish pages used solely to 'set up' a new return requirement from those used to view and manage them.
  • Loading branch information
Cruikshanks authored Oct 20, 2024
1 parent 3dac3fc commit 0e88d29
Show file tree
Hide file tree
Showing 203 changed files with 2,766 additions and 2,706 deletions.
6 changes: 3 additions & 3 deletions app/controllers/licences.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @module LicencesController
*/

const InitiateSessionService = require('../services/return-requirements/initiate-session.service.js')
const InitiateSessionService = require('../services/return-requirements/setup/initiate-session.service.js')
const LicenceSupplementaryProcessBillingFlagService = require('../services/licences/supplementary/process-billing-flag.service.js')
const MarkedForSupplementaryBillingService = require('../services/licences/supplementary/marked-for-supplementary-billing.service.js')
const MarkForSupplementaryBillingService = require('../services/licences/supplementary/mark-for-supplementary-billing.service.js')
Expand Down Expand Up @@ -50,15 +50,15 @@ async function noReturnsRequired (request, h) {

const session = await InitiateSessionService.go(id, 'no-returns-required')

return h.redirect(`/system/return-requirements/${session.id}/start-date`)
return h.redirect(`/system/return-requirements/setup/${session.id}/start-date`)
}

async function returnsRequired (request, h) {
const { id } = request.params

const session = await InitiateSessionService.go(id, 'returns-required')

return h.redirect(`/system/return-requirements/${session.id}/start-date`)
return h.redirect(`/system/return-requirements/setup/${session.id}/start-date`)
}

async function submitMarkForSupplementaryBilling (request, h) {
Expand Down
Loading

0 comments on commit 0e88d29

Please sign in to comment.