This comes from https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32883#c2 I'm creating a new bug report as it was outside the scope of the other one. I suggested adding Datatables to the curbside pickup module, to be able to manage the ordering and the columns in table settings. - "To be staged" tab - "Staged & ready" tab - "Patron is outside" tab - "Delivered today" tab
Created attachment 153740 [details] [review] Bug 32890: Add DataTables to curbside pickups This patch modifies the curbside pickups page in the staff interface so that each table is a DataTable with configurable columns. The patch also replaces the patron name output with patron-title.inc for consistency and to display names 'surname, firstname' for correct column sorting. To test, apply the patch and restart services. - Enable the CurbsidePickup system preference if necessary. - Properly testing requires testing data. You can run this command to REPLACE your curbside pickup data with sample data: bash <(curl -s https://gitlab.com/-/snippets/2572579/raw/main/test_curbside_pickups.sh) - Go to Circulation -> Curbside pickups. - Test DataTable functionality under each tab: sorting, paging, filtering, column visibility, and export. - Go to Administration -> Table settings -> Circulation -> Curbside pickup - Confirm that changes made to the configuration of each of the 4 curbside pickup tables is correctly applied on the curbside pickups page.
Created attachment 153743 [details] [review] Bug 32890: Add DataTables to curbside pickups This patch modifies the curbside pickups page in the staff interface so that each table is a DataTable with configurable columns. The patch also replaces the patron name output with patron-title.inc for consistency and to display names 'surname, firstname' for correct column sorting. To test, apply the patch and restart services. - Enable the CurbsidePickup system preference if necessary. - Properly testing requires testing data. You can run this command to REPLACE your curbside pickup data with sample data: bash <(curl -s https://gitlab.com/-/snippets/2572579/raw/main/test_curbside_pickups.sh) - Go to Circulation -> Curbside pickups. - Test DataTable functionality under each tab: sorting, paging, filtering, column visibility, and export. - Go to Administration -> Table settings -> Circulation -> Curbside pickup - Confirm that changes made to the configuration of each of the 4 curbside pickup tables is correctly applied on the curbside pickups page. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Much better! Thanks Owen!
Are not we then loosing the default sort we implemented on bug 32883?
Could the default ordering be the default, but then the user can change it if needed?
To be staged tab = default order should be on Pickup date/time soonest to latest Staged & ready tab = default order should be on Pickup date/time soonest to latest Patron is outside tab = default order should be on Pickup date/time soonest to latest Delivered today tab = default sort should be on Deliver date/time soonest to latest (Jonathan mentioned this one was ordered by *desc*)
I'm not sure I'm seeing the issue with the default sort under each tab. Can someone take another look?
Created attachment 167542 [details] [review] Bug 32890: Add DataTables to curbside pickups This patch modifies the curbside pickups page in the staff interface so that each table is a DataTable with configurable columns. The patch also replaces the patron name output with patron-title.inc for consistency and to display names 'surname, firstname' for correct column sorting. To test, apply the patch and restart services. - Enable the CurbsidePickup system preference if necessary. - Properly testing requires testing data. You can run this command to REPLACE your curbside pickup data with sample data: bash <(curl -s https://gitlab.com/-/snippets/2572579/raw/main/test_curbside_pickups.sh) - Go to Circulation -> Curbside pickups. - Test DataTable functionality under each tab: sorting, paging, filtering, column visibility, and export. - Go to Administration -> Table settings -> Circulation -> Curbside pickup - Confirm that changes made to the configuration of each of the 4 curbside pickup tables is correctly applied on the curbside pickups page. Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
I've rebased this patch and I set it back to "Signed off" because I don't see any issue with the table sorting.
I think everything looks good here except the Bootstrap 5 stuff is making the tables looks odd. I think just dropping the class="table table-striped" does the trick. Also, it looks like the tabs are not displaying well, I can file a different bug for that.