Summary
The opportunity list endpoint (GET /opportunities) returns ApiOpportunityGetList with district: OptionById but no coordinates. The opportunity map tab needs lat/lon to place pins.
Proposed change
Add lat and lon (nullable) to ApiOpportunityGetList derived from the opportunity's agent address postcode (opportunity.agent.address.postcode.latitude/longitude).
Fallback chain if agent has no address postcode: use the opportunity's own district centroid (district has associated postcodes with coordinates).
If neither is available, return lat: null, lon: null.
Notes
- Only include opportunities with status
NEW or SEARCHING on the map
- SDK type
ApiOpportunityGetList will need updating (coordinate with SDK bump)
- Agent address postcode is already available via the
agent relation loaded in the list query
Depends on
Nothing — standalone BE change.
Summary
The opportunity list endpoint (
GET /opportunities) returnsApiOpportunityGetListwithdistrict: OptionByIdbut no coordinates. The opportunity map tab needs lat/lon to place pins.Proposed change
Add
latandlon(nullable) toApiOpportunityGetListderived from the opportunity's agent address postcode (opportunity.agent.address.postcode.latitude/longitude).Fallback chain if agent has no address postcode: use the opportunity's own
districtcentroid (district has associated postcodes with coordinates).If neither is available, return
lat: null, lon: null.Notes
NEWorSEARCHINGon the mapApiOpportunityGetListwill need updating (coordinate with SDK bump)agentrelation loaded in the list queryDepends on
Nothing — standalone BE change.