Mike-Heneghan / ALISS

ALISS (A Local Information System for Scotland) is a service to help you find help and support close to you when you need it most.
https://aliss.org
0 stars 0 forks source link

Improve the location order in search results #53

Closed Mike-Heneghan closed 5 years ago

Mike-Heneghan commented 5 years ago

If a service has more than one location when it appears in the search results the link to that location may not be the closest one for the user.

Need to resolve this by changing the way the locations are displayed.

Mike-Heneghan commented 5 years ago

To stop users being confused with the "first location" not being nearby then don't display them.

Then check if the searched postcode and the postcode of the location matches then we have that at the top.

Create a template tag to handle the logic.

Pass in a collection of locations as well as the searched postcode.

Template tag will iterate check for matching postcode.

A further step will be to split the postcode district by the space.

Ideal result:

Mike-Heneghan commented 5 years ago

Created a service with multiple locations and entered in a way that the Aberdeen location was saved first.

The Aberdeen location is consistently the first one.

Screenshot 2019-03-21 at 14 45 24
Mike-Heneghan commented 5 years ago

To do list:

Mike-Heneghan commented 5 years ago

To do list:

Mike-Heneghan commented 5 years ago

Was going to quickly update the PR with changes to master but noticed that when a service has a single location is the location isn't in the same postcode district it doesn't appear. I'm not sure whether this is the desired behaviour.

Mike-Heneghan commented 5 years ago

Merged and a new PR to change behaviour.