m-h-c-t / mh-hunt-helper

Tool to help collect data, estimate attraction, catch, and drop rates for a popular game.
https://www.mhct.win
MIT License
7 stars 14 forks source link

SearchByUser table optimization #223

Closed hymccord closed 1 year ago

hymccord commented 1 year ago

✔️ Reviewable commit-by-commit

This PR has two optimizations to searchByUser.php

The library pdfmake is currently not being used by any of the datatables (it's used via datatables-buttons), so I commented it out since it's one of the largest libraries we load. I also bumped the button dependencies up. We were also missing a bootstrap js/style for the buttons.

Before: image

After: image

Bound the data directly to the datatable call. We don't need to manually iterate over the results and print out table rows and columns which is extremely error prone for new tables. We can then use some built in options to give headers, widths, and custom rendering. The timestamp was tidied up with moment.js.