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

Add notifications setup ad hoc licence fetch #1718

Merged

Conversation

jonathangoulding
Copy link
Collaborator

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

This change introduces the 'journey' context into the notifications setup fetch services.

Due to the complexity of the queries we have decided to pass the session into the fetch services. The session contains a journey key which we use to determine what query to make.

When the journey is for an ad hoc licence we only want to fetch the recipients for that licence (we are not concerned with the returns period, due date and if is a summer return).

This change replaces some of the existing fetch requests 'where' clauses. As the query is a template literal string we can 'inject' the relevant where clause into the query.

The previous returns periods query results should not be affected.

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

This change introduces the 'journey' context into the notifications setup fetch services.

Due to the complexity of the queries we have decided to pass the session into the fetch services. The session contains a journey key which we use to determine what query to make.

When the journey is for an ad hoc licence we only want to fetch the recipients for that licence (we are not concerned with the returns period, due date and if is a summer return).

This change replaces some of the existing fetch requests 'where' clauses. As the query is a template literal string we can 'inject' the relevant where clause into the query.

The previous returns periods query results should not be affected.
@jonathangoulding jonathangoulding added the enhancement New feature or request label Feb 13, 2025
@jonathangoulding jonathangoulding self-assigned this Feb 13, 2025
@jonathangoulding
Copy link
Collaborator Author

jonathangoulding commented Feb 13, 2025

I will update the page title and any other issues (not related to the fetch) in another pr for the ad hoc returns journey.

@jonathangoulding jonathangoulding marked this pull request as ready for review February 13, 2025 16:37
jonathangoulding added a commit that referenced this pull request Feb 14, 2025
https://eaflood.atlassian.net/browse/WATER-4900

This change introduces the 'journey' context into the notifications setup review service and presenter.

This journey context is used to determine what text is shown to the user relative to the journey.

The ad hoc journey is a 'notification' and the invitations (and reminder - not yet implemented) is an 'invitations'.

The ad hoc journey does not show the remove licences link and has been blanked to be hidden in the view.

The previous static text for additional information and button text has been moved into the presenter to enable dynamic content.

Previous work has been done for the fetching of recipients #1718.
Copy link
Member

@Cruikshanks Cruikshanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some NITS in the comments. Love how the where has been incorporated!

@jonathangoulding jonathangoulding merged commit ccded01 into main Feb 14, 2025
7 checks passed
@jonathangoulding jonathangoulding deleted the feature-notifications-setup-ad-hoc-licence-review branch February 14, 2025 10:41
jonathangoulding added a commit that referenced this pull request Feb 14, 2025
#1721)

* Update notifications review to present ad-hoc and invitations journeys

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

This change introduces the 'journey' context into the notifications setup review service and presenter.

This journey context is used to determine what text is shown to the user relative to the journey.

The ad hoc journey is a 'notification' and the invitations (and reminder - not yet implemented) is an 'invitations'.

The ad hoc journey does not show the remove licences link and has been blanked to be hidden in the view.

The previous static text for additional information and button text has been moved into the presenter to enable dynamic content.

Previous work has been done for the fetching of recipients #1718.
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