Open azend opened 3 weeks ago
Sure. I'd rather you read through and approve based on merit. If you read the files by commit instead of all at once, they tell a story.
The first commit builds a page that allows access to a list of various reports, a member status report, and a view to render report data in tabular form. The view uses a later version of data tables pulled in directly from CDN.
The next commit removes the references to the CDN and copies the needed files to /public/vendor/datatables
. The data tables library is loaded as part of the adminlte theme so I updated the config to load the new library files. I also removed per-view script import for data tables because there was no file at the location it was pointed to and data tables is already loaded through the theme. I also removed the old data tables library files as they were no longer of use.
The final commit gets rid of every div.table-responsive
wrapper in the application because it does nothing currently and hinders the styling of the table generated by the new version of the data tables library.
Ignore the files tab. Just look through the changes per commit instead. If you want to test it out, just checkout this branch locally and play with it.
This PR roughs in a super basic reports mechanism for accessing predefined reports. Reports can be accessed by users with the
can:manage-reports
role and currently only one report is available. The Member Status report defined in #53 . This report mechanism utilizes the datatables library but more specifically the export function provided as part of the buttons extension. This enables the table to export its data to a paste, CSV, XLSX, or printed document all from within the browser.During the process of creating this feature, I updated the version of datatables used as well as the way it was imported. There were many broken import statements leading to a script resource location that didn't exist. Additionally, there's a UI quirk with the new version where margin is removed if there exists a
div.table-responsive
wrapper around the table. This wrapper is used in base Bootstrap 4 to make tables responsive and scrollable in the horizontal axis. However when using the datatable library, this functionality is broken and implemented in a different way. For these reasons, I have removeddiv.table-responsive
wrappers for every table in the application and verified no change in appearance or function.List of reports:
Member status report:
Report being printed: