Skip to content
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

Improve admin by adding data tables #821

Closed
11 of 12 tasks
Tracked by #790
katjam opened this issue Dec 13, 2021 · 2 comments · Fixed by #863
Closed
11 of 12 tasks
Tracked by #790

Improve admin by adding data tables #821

katjam opened this issue Dec 13, 2021 · 2 comments · Fixed by #863

Comments

@katjam
Copy link
Member

katjam commented Dec 13, 2021

Is your feature request related to a problem? Please describe.
Consider: https://aarvy.me/blog/2019/09/21/datatables-with-bootstrap-4-minimal-setup-in-rails-6/

Describe the solution you'd like

  • Add search (on name) to neighbourhood admin screens and pagination

Steps

  • Update yarn depends
  • Add relevant js library (probably a more up to date one than in that post)
  • Update /app/components/admin_index/_admin_index.html.erb
  • Possibly need to ensure that controllers have a javascript option in respond_to or it won't work
  • strip out unwanted changes re. users
  • Make datatables javascript work for Neightbourhood admins
  • Make sure tests still pass

Further work to be done

@lexiwitch
Copy link
Contributor

This fixes #793 also, doesn't it?

@kimadactyl
Copy link
Member

This fixes #793 also, doesn't it?

it doens't fix it no - #793 would be an improvement, but this is perfectly adequate for now :)

@lexiwitch lexiwitch mentioned this issue Dec 20, 2021
7 tasks
@kimadactyl kimadactyl linked a pull request Dec 21, 2021 that will close this issue
7 tasks
kimadactyl added a commit that referenced this issue Dec 23, 2021
- Add Datatables gem, yarn package and CSS file
- Add code in packs.admin.js
- Add Datatables partial and inheritable logic (mountain_view seems unhappy with ajax in webpacker)
- Update controller logic and do some optimisation
- Migrate Users, Neighbourhoods and Partners indexes to Datatables
- Update Neighbourhood edit page to reflect new logic
- Update webpack-dev-server, yarn versions, and CI build target
- Update README

Bonus: Fixes #806, #868, #861, #821

Co-authored-by: Dr Kim Foale <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants