Skip to content

Add disclosure withdrawal feature #37

Description

@ryanprince

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions