-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add optional alias to return requirement purpose (#1177)
https://eaflood.atlassian.net/browse/WATER-4573 > Part of the return requirements set up work When setting up new return requirements, you are required to select one or more purposes. By default, we use the purpose description when referring to the return requirement purpose. But because the returns are intended to reflect what is on the licence document, sometimes there is a discrepancy between how the system describes the purpose and how it is recorded in the document. To deal with this, NALD has the concept of a 'purpose alias'. This is an optional alternate description that should be used when referring to the purpose of a return requirement. This change updates the 'Select the purpose' page in the return requirements set up journey to add a [conditional reveal to the GOV.UK checkbox](https://design-system.service.gov.uk/components/checkboxes/). This will reveal a textbox that users can use to enter a description, though it is not required. We will add some validation, but only to limit the description to 100 characters, which is the same as site description. --- As part of this, we were able to do some refactoring. The key change was to store the description from the purpose in the session to avoid having to fetch it again when we get to the `/check` page. That simplified what we were doing in that area to the extent that we could drop a service completely. But adding the optional alias with a text limit meant the validation became more complex. Plus, we now have to deal with the scenario on the purpose page where the submission is invalid, but we have to replay the user's choices. Previously, as long as they selected something, they were good to go!
- Loading branch information
1 parent
3f60b65
commit 0acfe21
Showing
14 changed files
with
612 additions
and
525 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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
52 changes: 0 additions & 52 deletions
52
app/services/return-requirements/check/returns-requirements.service.js
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.