Skip to content

feat: add show_in_map field#664

Open
eStarKee06 wants to merge 1 commit intoGreenstand:masterfrom
eStarKee06:show-map-toggle
Open

feat: add show_in_map field#664
eStarKee06 wants to merge 1 commit intoGreenstand:masterfrom
eStarKee06:show-map-toggle

Conversation

@eStarKee06
Copy link
Copy Markdown

@eStarKee06 eStarKee06 commented Apr 12, 2026

Description

This addresses the issue Greenstand/treetracker-admin-client#1038 by adding the field in the column.

This is the BE change to add the field for the show_in_map field. The migration run through npm did not work on my end anymore so I ran this SQL query manually.

ALTER TABLE public.planter
ADD COLUMN show_in_map BOOLEAN DEFAULT false NOT NULL

Discussion 1

Should we create a script that sets the existing records to show_in_map=True. This is because if we just deploy this change, all the growers will be hidden so there should be some Backward Compat handling.

  1. For all existing planters, we make them show in map still
  2. For all new planters that will be created after deployment, they will default to show in map = false

Discussion 2

I have a few thoughts I want to share here. I mainly followed the requirement in the issue but I'm wondering if we want to be updating the API calls in the Map Web FE Client to add a filter? Or should we be adding this at the auth level?

I haven't fully checked the feasibility or how I will do it yet but I was thinking something like:

  1. show_in_map field can be renamed as something like status: str enum or is_valid: boolean. This way the field is more "generic" and there's more flexibility in how it can be used in the case that requirements get updated
  2. By default we do return the data from the API if is_valid != true or status != 'valid'. We will base it off of user role/permissions rather than search params or filters. If the sensitivity of this requirement increases, there is more security in the BE.

@eStarKee06 eStarKee06 changed the title feat: add show_in_map field [NOT READY YET] feat: add show_in_map field Apr 12, 2026
@eStarKee06 eStarKee06 changed the title [NOT READY YET] feat: add show_in_map field feat: add show_in_map field Apr 19, 2026
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.

1 participant