Improve overviews and exports - Dynamic Views
For exports, a lot of associated information is not exported. For example, consider we would want to know the names of all the contact persons for projects with a specific status. There is currently no way to do this in bulk.
Perhaps we can make a dynamic table view where more columns can be added, and views can be saved for the user (extra feature). Existing views would be redefined as system views in our dynamic model.
The data that can be selected to be added to the columns should be set based on the roles that the user has, as we want to prevent certain properties from leaking. I believe we already limit the ransack gem to what properties can be used for search/filtering, and we can probably leverage it to search and filter on any property in the system.
Some implementation ideas/notes:
- Let user select a base type (project, enrollment, company, user, ...) which serves as the starting point of the search
- Limit selection always to what is
accessible_to
(or was itaccessible_by
?) (show) for the user. - Allow users to add columns associated to the base type (any depth, so also columns of associated users when going via project, limit to only ransackable columns).
- Allow filters and search to be allowed through ransack
- Allow export of the current view (tell the UI which columns to associate / preload)