-
Notifications
You must be signed in to change notification settings - Fork 5
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
Set up framework for UI filters, add Performer filter #122
Conversation
cabce8c
to
3cd4311
Compare
overview["performers"] = SiteEvaluation.objects.values_list( | ||
"configuration__performer__slug", flat=True | ||
).distinct() |
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.
Note - this adds another field, "performers", to the response of this endpoint. It's a list of every performer in the system, regardless of the filters and/or pagination applied to the site evaluations themselves. I'm torn on if this is correct, or if it should be its own endpoint, but we need some way for the frontend to know every possible performer.
vue/tailwind.config.cjs
Outdated
plugins: [], | ||
plugins: [require("daisyui")], | ||
daisyui: { | ||
themes: ['lofi'], |
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.
I didn't put too much thought into this theme, but it seemed to match the existing theme of the app the best.
// Add any filters set in the UI | ||
Object.entries(filters).forEach(([key, value]) => { | ||
filter.push(["==", ["get", key], value]); | ||
}); |
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.
This is the core of the filtering framework i attempted to set up. it dynamically generates maplibre filters based on the filters
object in the store. Currently, this only allows filtering by equality, which will need to be refactored when we get to filtering by ranges, etc.
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.
Looks great! Thanks!
No description provided.