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 disclosure withdrawal feature #37

Open
ryanprince opened this issue Oct 20, 2018 · 0 comments
Open

Add disclosure withdrawal feature #37

ryanprince opened this issue Oct 20, 2018 · 0 comments

Comments

@ryanprince
Copy link
Contributor

ryanprince commented Oct 20, 2018

Lobbyists need to be able to withdraw their disclosures. This feature will give lobbyists (and admin) the ability to do that by deleting a disclosure record from the system.

Description

Expected Behavior

When a disclosure is open for editing, there should be a "Withdraw Disclosure" button in a plain Bulma style, out of the way, centered at the bottom of the page. When a user clicks it, a modal should appear with the text "Withdrawing a disclosure will delete it from the system. Are you sure you want to proceed?" The modal should have a button that says "Yes, delete this disclosure." in Bulma's danger style, and a second that says "No, cancel this action." in Bulma's plain button style.

When the user finally uses the "Yes, delete this disclosure." button, a request will be sent to the server, and when the server returns that the delete was successful, the user should see a success message in the modal, and then be redirected to their dashboard.

Possible Solution

You'll need to create a delete_disclosure route in the file routes/principalDisclosure.js. It should use the requireConcernedUserOrAdmin middleware, just like the modify_disclosure route.

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

No branches or pull requests

1 participant