Skip to content

feat: add location coordinates to opportunity list response for map view #662

@nadavosa

Description

@nadavosa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions