Now that we got maps working again, let's put agents on the map.
We've created a bit of a mess here because we got Locations that go on the map, but they are connected only to resources. Agents have an address field, that is not mapped. And they also have a primary_location field that is a Location, and would go on the map, but it's not on AgentCreateForm.
So we could either put the address field on the map (which would require geocoding when entered), or put the primary_location on the AgentCreateForm.
Problem with primary_location is that it's an extra set of steps (to create a location, and then add it to the agent).
Maybe better? when they enter the address, we could geocode it, create a Location, and make that the primary_location.
One Agent could have more than one Location (although we don't support that yet)
One Location can have more than one Agent (which we could support now)
Locations could be nested (although we don't support that yet)
Tentative plan:
Put a button on the Agent page: "Add to Map". Opens a Create Location page, with the agent address and name defaulted in. (Gives people an option to put address on map, but does not force it.)
On the Locations page, add "Agents at this Location" in the right panel before resources.
Add a Change Location page, with an option to add an Agent to this Location.
Now that we got maps working again, let's put agents on the map.
We've created a bit of a mess here because we got Locations that go on the map, but they are connected only to resources. Agents have an address field, that is not mapped. And they also have a primary_location field that is a Location, and would go on the map, but it's not on AgentCreateForm.
So we could either put the address field on the map (which would require geocoding when entered), or put the primary_location on the AgentCreateForm.
Problem with primary_location is that it's an extra set of steps (to create a location, and then add it to the agent).
Maybe better? when they enter the address, we could geocode it, create a Location, and make that the primary_location.
Might want to rethink Locations altogether...