Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tidy up two-part tariff review code and routes (#1443)
https://eaflood.atlassian.net/browse/WATER-4739 We have completed the annual billing engine for the two-part tariff. The matching and allocating engine, including the pages used to review the results, has been tested. However, we started this work more than 12 months ago when our understanding of what was required was at 0%! We were also in the infancy of adding and working with pages in [water-abstraction-system](https://github.com/DEFRA/water-abstraction-system). So, we made choices that, in hindsight, we would have done differently. Essentially, all our code to support reviewing a bill run is mixed in with the code to generate the matching and allocating results and the bill itself. From a maintenance viewpoint, it becomes hard to understand the context of the various modules because they have all been thrown into the same basket. We’re now about to add a bunch more code to deliver WATER-4201 . To ensure the project remains within our levels of tolerance for code maintenance, we need to do some prep work before starting WATER-4201 . That prep work includes - Move the existing ‘review’ routes to their own dedicated /bill-runs/review root URL - Split the existing route's in two - Split the existing controller's file in two - Move review-related presenters into their own presenters/bill-runs/review folder - Move review-related services into their own services/bill-runs/review folder - Move review-related validators into their own validators/bill-runs/review folder - Move review-related views into their own views/bill-runs/review folder - Update module names to reflect existing naming conventions - Update URL’s to use record ID’s rather than derived, for example, review licence ID instead of bill run ID & licence ID We also include lots of refactoring and housekeeping, simplifying both the modules and their tests, and ensuring better consistency. We've also managed to correct some issues found, for example, inconsistency with nav menu selection, error bookmarks not working, and some errant spacing.
- Loading branch information