-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cancel bill run page #780
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://eaflood.atlassian.net/browse/WATER-4387 We need to add this to support our work to improve how bill runs are cancelled. Basically, replace the crummy legacy one! Rather than invest time in updating the existing cancel bill run page to point to what will be our new cancel endpoint we instead are investing in rebuilding it. There are already changes we'll need to make to support work on [cancelling a two-part tariff bill run](https://eaflood.atlassian.net/browse/WATER-4189) so we may as well focus our efforts into building a replacement page. This changes adds the route, controller, presenter, service and view for a new cancel bill run page.
Cruikshanks
requested review from
Demwunz,
robertparkinson,
Jozzey,
Beckyrose200 and
rvsiyad
March 1, 2024 16:31
robertparkinson
approved these changes
Mar 1, 2024
Cruikshanks
added a commit
that referenced
this pull request
Mar 1, 2024
https://eaflood.atlassian.net/browse/WATER-4387 We need to add this to support our work to improve how bill runs are cancelled. Basically, replace the crummy legacy one! In [Add cancel bill run page](#780) we add the page where the user confirms they want to cancel (delete) the bill run. This final step implements the service that will do the cancelling and the endpoint to trigger it. Unlike the legacy version when we cancel a bill run we'll - immediately update the bill run status to `cancel` - redirect the user to the bill runs page - continue the process of cancelling the bill run in the background This way the user should never see a timeout waiting for a bill run to cancel ever again. It also puts the service into a state where we can start to display to users that a bill run is in the process of being cancelled, the end goal of WATER-4387.
Cruikshanks
added a commit
that referenced
this pull request
Mar 1, 2024
https://eaflood.atlassian.net/browse/WATER-4387 We need to add this to support our work to improve how bill runs are cancelled. Basically, replace the crummy legacy one! In [Add cancel bill run page](#780) we add the page where the user confirms they want to cancel (delete) the bill run. This final step implements the service that will do the cancelling and the endpoint to trigger it. Unlike the legacy version when we cancel a bill run, we'll - immediately update the bill run status to `cancel` - redirect the user to the bill runs page - continue the process of cancelling the bill run in the background This way the user should never see a timeout waiting for a bill run to cancel ever again. It also puts the service into a state where we can start to display to users that a bill run is in the process of being cancelled, the end goal of WATER-4387.
This was referenced Mar 4, 2024
Jozzey
added a commit
that referenced
this pull request
Mar 4, 2024
https://eaflood.atlassian.net/browse/WATER-4189 Add a "Cancel bill run" button to the "Review licences" screen which was built in a previous PR #663 On clicking the cancel button the user is taken to a confirmation screen displaying the header details of the bill run and a confirmation button to cancel the bill run. Upon clicking the confirmation button the bill run should be deleted from the Charging Module & database, along with the data that has been persisted following the matching process. All the code with the exception of adding the "Cancel" button to the review screen has been done in another PR #780 Therefore this PR is to just add the button to the "Review licences" screen.
Cruikshanks
added a commit
that referenced
this pull request
Mar 16, 2024
https://eaflood.atlassian.net/browse/WATER-4410 > Part of a series of changes to add support for removing a bill licence back into the billing views We're not ready to implement removing a bill licence from a bill run as it depends on sending requests to the [Charging Module API](https://github.com/DEFRA/sroc-charging-module-api) and running the legacy refresh job to update everything on our side. But we can migrate the confirmation page a user sees when removing a licence. Not only is that one less thing in the legacy code but we can also update the view to be consistent with others we've done like - [Migrate view errored bill run page](#785) - [Migrate view empty bill run page](#783) - [Add cancel bill run page](#780) With this in place we can then fix our billing views and make the [Remove licence button](#824) visible again!
Cruikshanks
added a commit
that referenced
this pull request
Mar 17, 2024
https://eaflood.atlassian.net/browse/WATER-4410 > Part of a series of changes to add support for removing a bill licence back into the billing views We're not ready to implement removing a bill licence from a bill run as it depends on sending requests to the [Charging Module API](https://github.com/DEFRA/sroc-charging-module-api) and running the legacy refresh job to update everything on our side. But we can migrate the confirmation page a user sees when removing a licence. Not only is that one less thing in the legacy code but we can also update the view to be consistent with others we've done like - [Migrate view errored bill run page](#785) - [Migrate view empty bill run page](#783) - [Add cancel bill run page](#780) With this in place, we can then fix our billing views and make the [Remove licence button](#824) visible again!
Cruikshanks
added a commit
that referenced
this pull request
Mar 20, 2024
https://eaflood.atlassian.net/browse/WATER-4416 We'd recently spotted that the new billing views we'd developed had dropped a 'Remove licence' button. So, we used that opportunity to [Migrate confirm remove licence from bill run page](#828) and [added the button back in](#824). But then our conscientious QA team started testing it and found it didn't do what it claimed to do. That was to flag the removed licence for the next supplementary bill run. We display the same message on the confirm remove bill from bill run so now doubtful they tested that as well with the same result. We've [fixed the remove licence issue](DEFRA/water-abstraction-service#2464). But whilst we fix the legacy code for remove bill run this is a great opportunity to also migrate the confirm remove bill from bill run page. Not only is it one less thing in the legacy code but we can also update the view to be consistent with others we've done like - [Migrate confirm remove licence from bill run page](#828) - [Migrate view errored bill run page](#785) - [Migrate view empty bill run page](#783) - [Add cancel bill run page](#780)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://eaflood.atlassian.net/browse/WATER-4387
We need to add this to support our work to improve how bill runs are cancelled. Basically, replace the crummy legacy one!
Rather than invest time in updating the existing cancel bill run page to point to what will be our new cancel endpoint we instead are investing in rebuilding it. There are already changes we'll need to make to support work on cancelling a two-part tariff bill run so we may as well focus our efforts on building a replacement page.
This change adds the route, controller, presenter, service and view for a new cancel bill run page.