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

Support both return requirements set up journeys #648

Merged
merged 4 commits into from
Jan 11, 2024

Conversation

Cruikshanks
Copy link
Member

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

The return requirement setup journey is backed by a SessionModel instance that is used to store the values a user enters as well as helpful info like the licence ID and reference. But at the moment we are only creating it for the 'no returns required' journey. We need the session to be initialised for both journeys to develop and test all the pages needed.

So, this change adds a new endpoint to /licences that will do the same thing as LicencesController.noReturnsRequired(). Only both handlers will now pass a value that denotes the journey type to the InitiateReturnRequirementSessionService so it can store it in the session for future reference.

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

The return requirement setup journey is backed by a `SessionModel` instance that is used to store the values a users enters as well as helpful info like the licence ID and reference. But at the moment we are only creating it for the 'no returns required' journey. We really need the session to be initialised for both journeys in order to develop and test all the pages needed.

So, this change adds a new endpoint to `/licences` that will do the same thing as `LicencesController.noReturnsRequired()`. Only both handlers will now pass a value that denotes the journey type to the `InitiateReturnRequirementSessionService` so it can store it in the session for future reference.
@Cruikshanks Cruikshanks added the enhancement New feature or request label Jan 10, 2024
@Cruikshanks Cruikshanks self-assigned this Jan 10, 2024
@Cruikshanks Cruikshanks marked this pull request as ready for review January 10, 2024 17:05
Cruikshanks added a commit that referenced this pull request Jan 10, 2024
https://eaflood.atlassian.net/browse/WATER-4261

Having added [support for the returns requirements set up journey session object to store which journey was selected](#648) (returns required or no returns required) it means we can now do things like enable the `/start-date` page to redirect to the correct next page. At the moment it only supports the no returns required journey which means those testing the journey need to manually manipulate the URL.

We're about to begin work on [adding the controls and validation](#646) for `/start-date` page in the returns requirements set-up journey. So, we expect this change to be updated as part of that. But till that is complete this change will allow our QA team to get on with checking other pages.
Cruikshanks added a commit that referenced this pull request Jan 10, 2024
https://eaflood.atlassian.net/browse/WATER-4261

Whilst working on some [housekeeping](#647) and [tweaks](#648) we spotted that the titles for all the new returns requirements set up pages were missing.

A quick check identified that all the pages are using our standard `layout.njk` (😁) but it expects a `pageTitle` value to be passed in the context and none of the pages are doing this (😱).

This changes fixes the issue and adds the missing titles.
@Cruikshanks Cruikshanks merged commit 1fc7a79 into main Jan 11, 2024
6 checks passed
@Cruikshanks Cruikshanks deleted the support-both-return-requirement-journeys branch January 11, 2024 08:59
Cruikshanks added a commit that referenced this pull request Jan 11, 2024
https://eaflood.atlassian.net/browse/WATER-4261

Having added [support for the returns requirements set up journey session object to store which journey was selected](#648) (returns required or no returns required) it means we can now do things like enable the `/start-date` page to redirect to the correct next page. At the moment it only supports the no-returns required journey which means those testing the journey need to manually manipulate the URL.

We're about to begin work on [adding the controls and validation](#646) for `/start-date` page in the returns requirements set-up journey. So, we expect this change to be updated as part of that. But till that is complete this change will allow our QA team to get on with checking other pages.

---------

Co-authored-by: Robert Parkinson <robertparkinson@users.noreply.github.com>
Cruikshanks added a commit that referenced this pull request Jan 11, 2024
https://eaflood.atlassian.net/browse/WATER-4261

Whilst working on some [housekeeping](#647) and [tweaks](#648) we spotted that the titles for all the new returns requirements set up pages were missing.

A quick check identified that all the pages are using our standard `layout.njk` (😁) but it expects a `pageTitle` value to be passed in the context and none of the pages are doing this (😱).

This change fixes the issue and adds the missing titles.

We also ended up doing a bit more housekeeping.

- remove the duplicate `/no-returns-check-your-answers`
- fix approve button on `check-your-answers` not redirecting properly
- remove Nunjucks `set title=` and just use `{{ pageTitle }}` in all templates
- fix 'Return to licence setup' link on approve page

---------

Co-authored-by: Robert Parkinson <robertparkinson@users.noreply.github.com>
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