-
Notifications
You must be signed in to change notification settings - Fork 102
Fixed event search box directing to eventyay common event listing #581
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
Fixed event search box directing to eventyay common event listing #581
Conversation
Reviewer's Guide by SourceryThis pull request implements the event search functionality using eventyay common URLs and fixes an issue related to assigning position secrets. The event search is implemented using a typeahead search bar and a new API endpoint. The position secret fix ensures that secrets are unique within an event. Updated class diagram for EventSearchViewclassDiagram
class EventSearchView {
+get(request)
}
class APIView {
}
EventSearchView --|> APIView
EventSearchView : -query
EventSearchView : -events
EventSearchView : -results
EventSearchView : +JsonResponse results
note for EventSearchView "Handles the search API endpoint"
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @suhailnadaf509 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider adding a debounce to the search input to reduce the number of API calls.
- The JavaScript code should be placed in a separate file and properly linked in the template.
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
src/pretix/eventyay_common/static/eventyay-common/js/ui/dashboard.js
Outdated
Show resolved
Hide resolved
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
…ard.js Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
src/pretix/base/orderimport.py
Outdated
@@ -542,7 +542,7 @@ def __init__(self, *args): | |||
super().__init__(*args) | |||
|
|||
def clean(self, value, previous_values): | |||
if value and (value in self._cached or OrderPosition.all.filter(order__event__organizer=self.event.organizer, secret=value).exists()): | |||
if value and (value in self._cached or OrderPosition.all.filter(order__event__organizer=self.event.organizer, secret=value).exists()): | |||
raise ValidationError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docker build fails due to an Indentation Error here, please fix that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@suhailnadaf509 I fixed the indentation, please check whether the rest of the function is correctly indented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, thanks for the fix!
Please help to get Docker working. |
src/pretix/eventyay_common/templates/eventyay_common/dashboard/dashboard.html
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I've made the following changes to implement the event search functionality that directs to eventyay common instead of eventyay tickets:
Closes #516
Summary by Sourcery
New Features: