-
Notifications
You must be signed in to change notification settings - Fork 3
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
(feature): legislations update - soft delete + batch actions (archive/destroy) #55
Conversation
7fb446c
to
410246a
Compare
{alert: 'Could not archive selected Legislations'} | ||
end | ||
|
||
redirect_to collection_path(scope: 'archived'), results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set scope to archive
after batch-archiving records
end | ||
|
||
def call | ||
@collection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to perform some extra checks before (batch)-archiving? Are there any cases when records (legislations in particular) should not have option to be archived? Those could be modeled using AM validations, similar as in CsvDataUpload
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking that this will be safeguarded by the authorization rules, where not everyone will have access to all features. (I know, I need to finish that bit!). So for now, I wouldn't spend too much time thinking. As it will be brought in or handled from a different side.
Good job so far! Comment: the deleted success message should probably say "deleted" instead of "destroyed", just for language sake. Answer to:
I'm wondering if we should discard/soft delete events, but delete documents (as they would take space in the Google Cloud Storage). What do you think? We can also confirm with them and potentially just keep the documents, if it's not too expensive. But overall this is the way! |
Having discussed this over slack we decided to go with discarding documents and events. |
it is already :) |
I also need to overwrite batch-delete action - default one still destroys objects 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! =) This is nearly there. Just one open question, and afterwards it can be merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging!
90f3afc
to
456991d
Compare
Summary
For Legislations resource:
discard
(when deleted, records are not visible anywhere in the UI)Archive
&Delete
batch actionsDeleting Legislation means:
documents
andevents
litigations
andtargets
Archiving Legislations means:
visibility_status
toarchived
so it can be unarchived to another state at any time