Add campaign-scoped favorites for jurors#387
Open
Oyelakin-Mercy wants to merge 1 commit intohatnote:masterfrom
Open
Add campaign-scoped favorites for jurors#387Oyelakin-Mercy wants to merge 1 commit intohatnote:masterfrom
Oyelakin-Mercy wants to merge 1 commit intohatnote:masterfrom
Conversation
6b582d4 to
a373c6a
Compare
a373c6a to
68cf1e3
Compare
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.
Fixes #333
Some Jurors have vote a lot of pictures, and scrolling through so many to see their favorite is stressful. This PR adds a "View Favorites" button to the juror campaign card, which allows them to quickly go to to their favorited images for a specific campaign.
Changes:
Frontend
JurorCampaignCard.vue: Added a "View Favorites" button with a heart icon that navigates to the new faves view for the campaignVoteRating.vue,VoteYesNo.vue,VoteRanking.vue: Added a "View Favorites" button alongside the existing "Edit previous votes" button in both the active voting view and the all-done staterouter/index.js: Added new/vote/:id/favesroute pointing toFavesViewjurorService.js: UpdatedgetFavesto acceptcampaignIdandoffsetparametersen.json: Addedmontage-my-campaign-favesi18n string ("View Favorites")Backend
juror_endpoints.py: Updatedget_favesendpoint to accept and passcampaign_idfilterrdb.py:JurorDAO.get_faves: Addedcampaign_idfilter and fixed a bug whereoffsetwas hardcoded to0JurorDAO.fave: Fetchround_entrybefore checking for existing fave socampaign_idis available for scoping; fixes potential cross-campaign fave collisionsJurorDAO.unfave: Scoped unfave lookup bycampaign_idandstatus; changed.one()to.one_or_none()to handle gracefully if fave doesn't existVote.check_fave: Addedcampaign_idlookup so fave checks are scoped to the correct campaign