Properties tab: add sort toggle (alphabetical / proximity) #225
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — follow-up to PR #207 (proximity-based default sort).
Repo
ldraney/landscaping-assistantUser Story
As a crew lead browsing the Properties tab
I want to toggle between alphabetical and proximity sort
So that I can quickly find a client by name OR plan a route by location
Context
PR #207 replaced alphabetical sort with nearest-neighbor proximity sort as the only option on the Properties tab. While proximity sort is useful for route planning, it makes it hard to find a specific client by scrolling — the order isn't predictable without knowing the geography. Alphabetical should be the default, with proximity available as an opt-in toggle.
File Targets
Files the agent should modify or create:
app/controllers/properties_controller.rb— readsortparam, chooseby_proximityor alphabeticalapp/views/properties/manage.html.erb— add sort toggle button/linkapp/assets/stylesheets/application.css— minimal styling for toggle if neededspec/requests/properties_spec.rb— test both sort modes via query paramFiles the agent should NOT touch:
app/models/property.rb—by_proximityalready works, no model changes neededapp/controllers/weeks_controller.rb— Week view sort is a separate concernFeature Flag
none
Acceptance Criteria
?sort=proximity)Property.by_proximity— no new geo logicTest Expectations
GET /properties/managereturns alphabetical order by defaultGET /properties/manage?sort=proximityreturns proximity orderbundle exec rspec spec/requests/properties_spec.rbConstraints
Checklist
Related
landscaping-assistant— project this affects