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

Change delete button for routes to delete all routes for page #1710

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

thomasiles
Copy link
Contributor

@thomasiles thomasiles commented Jan 16, 2025

Let form creators delete all routes for a question

https://trello.com/c/KA2MdRKW/2036-change-delete-routes-button-to-delete-all-routes-for-a-page

https://app.mural.co/t/gaap0347/m/gaap0347/1728478914347/6a7e0b709f50f00f81cab37414fdf44ec8601a70

The delete button on the routes#show page now takes the user to a confirmation screen for removing all the routes associated with the page, not just the primary route.

screenshots

image

image

image

@thomasiles thomasiles marked this pull request as ready for review January 16, 2025 11:34
@thomasiles
Copy link
Contributor Author

I've moved the delete routes function and added a better test for it.

I've also corrected all the dodgy punctuation. I swear I check them every time and every time I get them wrong.

Copy link
Contributor

@DavidBiddle DavidBiddle left a comment

Choose a reason for hiding this comment

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

The code changes look good to me and I can see the deletion happening as expected when I run this locally 🎉

Copy link
Member

@lfdebrux lfdebrux left a comment

Choose a reason for hiding this comment

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

Looks good to me!

thomasiles and others added 3 commits January 17, 2025 14:17
Add a model and view partial to confirm the deletion of all routes for a
page.
Form creators need to be able to delete all the routes for a page, the
first route and any secondary skip routes.

Add two new routes and controller actions for deleting all the routes
for a page.

Co-authored-by: Hannah Cooper <[email protected]>
The button on routes#show currently links to journey for deleting a
single condition.

This commit changes the button to link to the action for deleting all
the routes of a page.
Copy link

@thomasiles thomasiles merged commit ba7d6f4 into main Jan 17, 2025
4 checks passed
@thomasiles thomasiles deleted the delete-all-routes branch January 17, 2025 14:22
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.

4 participants