Filter and search polling officers#7411
Merged
Conversation
added 8 commits
February 17, 2021 08:42
Base automatically changed from
feat/assign-officers-to-polling-stations
to
develop
February 17, 2021 13:53
Contributor
Author
|
@decidim/mantainers this can be reviewed! 🔍 |
12 tasks
Contributor
|
@orlera conflicts! |
mrcasals
suggested changes
Feb 18, 2021
Comment on lines
+17
to
+22
| query = | ||
| collection | ||
| # Includes the presided and managed polling station | ||
| .joins("LEFT JOIN decidim_votings_polling_stations presided_station ON decidim_votings_polling_officers.presided_polling_station_id = presided_station.id | ||
| LEFT JOIN decidim_votings_polling_stations managed_station ON decidim_votings_polling_officers.managed_polling_station_id = managed_station.id | ||
| LEFT JOIN decidim_users ON decidim_users.id = decidim_votings_polling_officers.decidim_user_id") |
Contributor
There was a problem hiding this comment.
could you move this to a query object, please? 😄
Contributor
Author
|
@mrcasals Conflicts solved and suggestion addressed! 👍 |
mrcasals
previously approved these changes
Feb 18, 2021
429654a to
c9b3a3e
Compare
mrcasals
approved these changes
Feb 18, 2021
entantoencuanto
added a commit
that referenced
this pull request
Feb 25, 2021
* develop: (232 commits) Add Votings to Open Data export (#7388) Add order in not highlighted assemblies by weight (#7444) Resort Menus (#7460) Polling Officer Zone (#7439) Fix session timeout when using multiple windows or tabs (#7459) Fix display of debates with multiple dates (#7393) chore: split election tests (#7451) style: make selected values primary labels with delete button (#7448) Fix and tests to avoid registered users being invited again (#7392) Migrate Admin menus to Menu Registry (#7368) New Crowdin updates (#7338) Bump to carrierwave 2.2.0 (#7441) Voting: show callout when Polling Stations miss Polling Officers (#7417) Further default orders for the API (#7436) Fix random order inconsistencies (#7437) Ensure Rails is locked to 5.2.4.x series (#7430) Add default order by ID to API list queries (#7424) Update dependencies (#7422) Ignore warning on CI when no artifacts to upload (#7420) Filter and search polling officers (#7411) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
This is yet another building block for #7105, #7106. More PRs will follow.
Allows the admin to:
NB: Since the
roleof and officer is not a DB field, but rather a calculated value depending on a number of fields, I had to work around the normalransackusage for filtering changing the query based on the requested filter.If you know or see a better way to do this, please shout 🙂
📌 Related Issues
Link your PR to an issue
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots
Screen.Recording.2021-02-17.at.14.46.01.mov