-
Notifications
You must be signed in to change notification settings - Fork 3
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
DDLS-387 Pull the NDR report through to the reports page #1734
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
…n used for consistency
Raffers
requested changes
Nov 29, 2024
Raffers
approved these changes
Dec 3, 2024
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.
Purpose
As a multi-client deputy with a current NDR, I want to be able to access the NDR from the reports page, so that I can complete or review NDRs
When we implemented the multi-client pathway, we removed the NDR page for these users. Some users in future may need to be able to access and complete NDRs.
Fixes DDLS-387
Approach
The approach taken has been to implement the change for all Lay users, single and multi clients. This means the "/ndr" endpoint has been deprecated.
I deleted the if statement that checks for isNdrEnabled as it is no longer required in getCorrectRouteIfDifferent in Redirector. The lay_home will be accessed whether isNdrEnabled is true or false. The report_create in getLayDeputyHomepage is only required if the NDR has not been enabled else it will show the NDR on the report page. The RedirectorTest file has been amended to delete the tests for ndr_index as the Redirector no longer checks for these scenarios.
The functionality for ndr_index has been moved into lay_home page. A check is made against all users attached to a client to find out if isNdrEnabled is set to true (i.e the checkbox has been ticked in admin app). Depending on this a flag is set (ndrEnabled) that determines if a NDR or a report will be shown.
The twig template includes a reference to the NDR index twig file if ndrEnabled is set to true.
The ndr fixture createLayNdrNotStarted in FixtureHelper required a change where isPrimary is now set to true. This was
required as it was logging out due to the isPrimary check in lay_home endpoint.
During the NDR submission journey the app was failing after the post user research step as the client id was required from the NDR by the lay_home endpoint. This was solved by including the JMS groups ['ndr-client', 'client-id'] to ensure the app returns to the correct client.
Previously, the pattern was to bring back the client and then access the NDR. However, this has been amended to use the ndrId from the route to access the NDR and then bring back the client. This is cleaner code especially for multi client deputies.
Deprecate ndr_index endpoint and redirect to hompage. Amend ndr_index references to lay_home and also include clientId.
Create behat tests to test NDR enabled checkbox results in correct report on reports page. I tried to do in 1 test but failed in pipeline so decided to do in 2 seperate tests.
Included parameters to breadcrumb for ndr review which was showing as deputyFirstname deputyLastname
Added in functionality for multi client breadcrumbs for NDR journey (similar to report journey)
Learning
Any tips and tricks, blog posts or tools which helped you. Plus anything notable you've discovered about DigiDeps
Checklist
Frontend