Skip to content
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

Complete Select existing return requirement page #895

Conversation

Demwunz
Copy link
Contributor

@Demwunz Demwunz commented Apr 9, 2024

https://eaflood.atlassian.net/browse/WATER-4283

Part of the work to replace NALD for handling return requirements

We want to be able to offer users the option to copy data from an existing return requirement when setting up a new one. We made the option available in the /setup page.

When a user selects this option they'll be taken to the Select an existing return requirement from page. This change is about completing that page and the feature.

  • add the controls to the page. These will be dynamically generated based on the licences current return versions
  • add validation to the page
  • retrieve the requirements for the selected return version and populate the session with them

Once the page has completed it's work the user will be redirected to the /check page where they can see the results of their action.

@Demwunz Demwunz added the enhancement New feature or request label Apr 9, 2024
@Demwunz Demwunz self-assigned this Apr 9, 2024
@Cruikshanks Cruikshanks assigned Cruikshanks and unassigned Demwunz Jun 7, 2024
@Cruikshanks Cruikshanks changed the title Returns required - Select existing requirements Complete Select existing return requirement page Jun 7, 2024
@Cruikshanks Cruikshanks force-pushed the WATER-4283-returns-required-journey-select-existing-requirements-from-page branch 2 times, most recently from c9f8dd9 to 4f84c3f Compare June 9, 2024 22:08
Demwunz and others added 9 commits June 10, 2024 12:25
https://eaflood.atlassian.net/browse/WATER-4283

This page is part of the "returns-required" journey. This page will allow users to choose an existing return if it already exists.

The page will have one, or multiple radio controls to allow the user to choose the appropriate requirement.
SHould really have been done in [Add copy existing rtn req. option to setup journey](#1081) 😬😳
Add the service and basic presenter. Update the view to include displaying the licence ref and then hook up the controller handler to start using our new service.
Build the options from the return versions against the licence in the session.
We were build against the ticket but the title in the UI for return requirements has changed since then.
We have to pass it in our array of return versions to allow us to validate that the one being sent in the post request is one that belongs to the licence in the session.
Will sort that in a subsequent change
@Cruikshanks Cruikshanks force-pushed the WATER-4283-returns-required-journey-select-existing-requirements-from-page branch from a37184b to 22433c2 Compare June 10, 2024 11:26
This fetches the existing data and transforms it into a format that is can be used by the return requirements setup journey and its pages.

To support this and ensure the service is fully tested, we added a new support seed to create the 'complete' requirements for returns record.
@Cruikshanks Cruikshanks force-pushed the WATER-4283-returns-required-journey-select-existing-requirements-from-page branch from 22433c2 to 7380c3d Compare June 10, 2024 14:13
@Cruikshanks Cruikshanks marked this pull request as ready for review June 10, 2024 19:40
@Cruikshanks Cruikshanks merged commit 41c1456 into main Jun 10, 2024
5 of 6 checks passed
@Cruikshanks Cruikshanks deleted the WATER-4283-returns-required-journey-select-existing-requirements-from-page branch June 10, 2024 19:41
Cruikshanks added a commit that referenced this pull request Jun 12, 2024
https://eaflood.atlassian.net/browse/WATER-4283

> Part of the work to replace NALD for handling return requirements

We want to be able to offer users the option to copy data from an existing return requirement when setting up a new one. We [made the option available](#1081) in the `/setup` page.

We then did the actual work of allowing users to select the return requirements to copy and saving them to the session in [Complete Select existing return requirement page](#895).

But we've since learnt that the title we used for the page is not right. This change corrects it.
Cruikshanks added a commit that referenced this pull request Jun 12, 2024
https://eaflood.atlassian.net/browse/WATER-4283

> Part of the work to replace NALD for handling return requirements

We want to be able to offer users the option to copy data from an existing return requirement when setting up a new one. We [made the option available](#1081) in the `/setup` page.

We then did the actual work of allowing users to select the return requirements to copy and saving them to the session in [Complete Select existing return requirement page](#895).

But we've since learned that the title we used for the page is not right. This change corrects it.
Cruikshanks added a commit that referenced this pull request Jun 17, 2024
https://eaflood.atlassian.net/browse/WATER-4283

> Part of the work to replace NALD for handling return requirements

In [Complete Select existing return requirement page](#895) we added the controls and logic to enable a user to copy the return requirements from an existing return version into the session.

The H1 title we used though was though to be wrong. So, we [Correct copy existing return req. page title](#1092). When we did that, we also updated the validation message as all our current messages just replay the H1 title.

Again however, this was thought to be incorrect. Our UAT team have decided the message we should show when an option is not selected is **Select a previous requirements for returns**.

This is that change.
Cruikshanks added a commit that referenced this pull request Jun 18, 2024
https://eaflood.atlassian.net/browse/WATER-4283

> Part of the work to replace NALD for handling return requirements

In [Complete Select existing return requirement page](#895) we added the controls and logic to enable a user to copy the return requirements from an existing return version into the session.

The H1 title we used though was though to be wrong. So, we [Correct copy existing return req. page title](#1092). When we did that, we also updated the validation message as all our current messages just replay the H1 title.

Again, however, this was thought to be incorrect. Our UAT team has decided the message we should show when an option is not selected is **Select a previous requirements for returns**.

This is that change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants