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

ADJUST1-436 Back button in Edit tagged bail #177

Merged
merged 3 commits into from
Feb 23, 2024

Conversation

pavilionsahota
Copy link
Contributor

No description provided.

@pavilionsahota pavilionsahota requested a review from a team as a code owner February 23, 2024 10:50
@ldlharper
Copy link
Contributor

ldlharper commented Feb 23, 2024

Ah so I didn't realise the code in the template was looking for an adjustment type.

So I think the fix should change this part in the front end.

href: "/" + prisoner.prisonerNumber + "/" + model.adjustmentType.url + "/view"

The adjustment type with the edit nunjucks file is always tagged bail. So this is just unnecessary extra complication.

The adjustment type being added to the model was all done as part of the generic adjustment type form work. So you could use the same template for many different adjustment types. We know this template is only used for the tagged bail adjustment type. So the backlink is not dynamic.

Removed usage of adjustmentType in tagged bail // Adjusted destination of cancel buttons // Updated page titles
@@ -66,7 +66,7 @@
{{ govukButton({
text: "Cancel",
classes: "govuk-button--secondary",
href: "/" + prisoner.prisonerNumber
href: "/" + prisoner.prisonerNumber + "/tagged-bail/view"
Copy link
Contributor

@ldlharper ldlharper Feb 23, 2024

Choose a reason for hiding this comment

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

So this link will probably be conditional on whether or not your editing. The template and route are used for both create and edit. There is an addOrEdit variable used elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've adjusted this

Copy link
Contributor

@ldlharper ldlharper left a comment

Choose a reason for hiding this comment

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

LGTM

@ldlharper ldlharper merged commit 9e0e80a into main Feb 23, 2024
4 checks passed
@ldlharper ldlharper deleted the ADJUST1-436-Back-button-in-Edit-tagged-bail branch February 23, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants