Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

featured planter order #310

Open
sebastiangaertner opened this issue May 11, 2023 · 2 comments
Open

featured planter order #310

sebastiangaertner opened this issue May 11, 2023 · 2 comments

Comments

@sebastiangaertner
Copy link

{"planters":[8870,5182,8380,4726,7260,6141,4755,7582,5896,4904,5896,8002,7704,3937,3952,7894,3953,3985,4031,4043,4787,5881,5925,6945,7181,7186,7188,7273,7276]}

when the above is displayed on the webmap it is not reading the json content in that specific order. It orders by uuid.

@sebastiangaertner
Copy link
Author

Could this work???

......

json_array_elements_text(data -> 'planters') AS planter_id,
   row_number() OVER () AS rn
 FROM 
   webmap.config 
 WHERE 
   name = 'featured-planter'
) AS t ON t.planter_id::text::integer = planter.id
ORDER BY t.rn;

@dadiorchen
Copy link
Contributor

The problematic code should be here:

async getFeaturedPlanters(options: FilterOptions) {

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants