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

Implement "remove" operation for events #8223

Open
rikukissa opened this issue Dec 16, 2024 · 0 comments
Open

Implement "remove" operation for events #8223

rikukissa opened this issue Dec 16, 2024 · 0 comments
Assignees
Labels

Comments

@rikukissa
Copy link
Member

rikukissa commented Dec 16, 2024

Description

Image

The only use case for this operation is when you start a new declaration and click on "Exit" – if this is not done, then the a draft gets stored both in the frontend and in the backend which clutters the app. Need to be deleted from both.

On the backend side, add a constraint that the event can only have a "CREATE" and "DRAFT" actions and no other actions. Otherwise trying to delete it throws an error.

Using this new operation

  1. Exit button should delete the draft and go to home view
  2. There should be the ... menu and Delete declaration inside it in the Declare action
    Image

This basically makes the same action but with a different modal. Modals are identical to Farajaland Legacy event views

For attachments:
Implement also a file deletion from the documents service. For this you need to implement a delete endpoint to the service. Users should only be able to delete files they have uploaded themselves. For this reason, you need to amend the POST /files handler in the same service to write the creating user's user id to file metadata.

@rikukissa rikukissa added the Tech label Dec 16, 2024
@rikukissa rikukissa moved this from Backlog to Ready to build in OpenCRVS Core Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Ready to build
Development

No branches or pull requests

2 participants