-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add phase filter to placements search #1211
base: main
Are you sure you want to change the base?
Conversation
Deployments
|
3a38b25
to
d1d9ebf
Compare
@@ -14,6 +14,8 @@ def index | |||
@pagy, @placements = pagy(placements.merge(query)) | |||
@placements = @placements.decorate | |||
|
|||
filter_subjects_by_phase | |||
filter_schools_by_phase |
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.
Rather and putting this here. Consider putting this as part of the schools_scope
method.
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.
@JamieCleare2525 I haven't been able to incorporate this without affecting the initialization of @schools
across the app 🤔 I thought this would work but it didn't:
def schools_scope
if filter_params[:only_partner_schools].present?
@schools = @provider.partner_schools
else
@schools = Placements::School.all
end
filter_schools_by_phase
end
I get 58 instances of an error saying that .order_by_name
can't act on nil
.
d1d9ebf
to
6dee289
Compare
6dee289
to
57d30e0
Compare
Context
This design change allows provider users to find placements in Primary or Secondary more easily.
Changes proposed in this pull request
Guidance to review
When no checkboxes are selected (default state)
When only Primary is selected
When only Secondary is selected
When both Primary and Secondary are selected
Same behaviour as when no checkboxes are selected (default state) ☝️
Link to Trello card
https://trello.com/c/oCkrtGGU/951-add-a-phase-filter-to-placements-search
Screenshots
Screen.Recording.2024-11-27.at.16.53.24.mov