Skip to content

Frontend/sublet map#61

Merged
jamesdoh0109 merged 7 commits into
masterfrom
frontend/sublet-map
Mar 30, 2026
Merged

Frontend/sublet map#61
jamesdoh0109 merged 7 commits into
masterfrom
frontend/sublet-map

Conversation

@alisx255
Copy link
Copy Markdown
Contributor

@alisx255 alisx255 commented Mar 27, 2026

Create a map on the sublet page to display approx location

Screenshot 2026-03-28 155930

@alisx255 alisx255 marked this pull request as ready for review March 28, 2026 20:03
Copy link
Copy Markdown
Collaborator

@jamesdoh0109 jamesdoh0109 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In serializers.py, for SubletDataSerializer, change to

class Meta:
        model = Sublet
        fields = [
            "street_address",
            "beds",
            "baths",
            "start_date",
            "end_date",
            "latitude",
            "longitude",
        ]

    def get_latitude(self, obj):
        approx_lat, _ = obj.approximate_location
        if approx_lat is not None:
            return float(approx_lat)
        return None

    def get_longitude(self, obj):
        _, approx_lon = obj.approximate_location
        if approx_lon is not None:
            return float(approx_lon)
        return None
``

Comment thread frontend/components/listings/detail/SubletMap.tsx Outdated
Comment thread frontend/lib/constants.ts
Comment thread docker-compose.yml
Copy link
Copy Markdown
Collaborator

@jamesdoh0109 jamesdoh0109 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Comment thread backend/market/models.py
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very very nit, but this change is out of scope with the PR since this touches backend. Totally fine for now, but generally you want the scope of a PR to focus on a single thing

@jamesdoh0109 jamesdoh0109 merged commit 0c0dde5 into master Mar 30, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants